Jump to content

VegaS

Banned
  • Posts

    363
  • Joined

  • Last visited

  • Days Won

    40
  • Feedback

    0%

Everything posted by VegaS

  1. def __SendTalkingChatPacket(self, text): arg_command = ["(racha)", "(racha2)", "(racha3)", "(racha4)", "(racha5)"] if text in arg_command: chat.AppendChat(chat.CHAT_TYPE_INFO, "[CHAT] You cannot use %s in chat!" % arg_command[x]) return Where is declared [x] ? for x in xrange(len(arg_command)): if text == arg_command[x]: chat.AppendChat(chat.CHAT_TYPE_INFO, "[CHAT] You cannot use %s in chat!" % arg_command[x]) return Also you can make like that. I know i can make like this haha ^^, but with text.find is much funny, he check you all inputvalue, with text in table he check you only first word, if u write like this with this: (command)other_text Will be working and can send command with text in table. But with my version of text.find like not work, he find you all text in inputvalue and return.
  2. Here is much better for load on command from game.py: "command_multikills" : self.ShowMultiKills, def ShowMultiKills(self, arg): x = { 1 : "(racha)", 2 : "(racha2)", 3 : "(racha3)", 4 : "(racha4)", 5 : "(racha5)" } if x.has_key(arg): chat.AppendChat(chat.CHAT_TYPE_INFO, "Succes argument: %s" % x[arg]) net.SendChatPacket(x[arg]) Example to use in quest with arg: if pc.getqf("estado") == 3 then cmdchat("command_multikills 3") Protect in chat, when someone try to use command (fris), (double) etc and he show him emoticon def __SendTalkingChatPacket(self, text): arg_command = ["(racha)", "(racha2)", "(racha3)", "(racha4)", "(racha5)"] for x in xrange(len(arg_command)): if(text.find(arg_command[x]) != -1): chat.AppendChat(chat.CHAT_TYPE_INFO, "[CHAT] You cannot use %s in chat!" % arg_command[x]) return
  3. You made changes in the common folder, and have compiled source game, and you have not recompiled the source db. This is the reason for all problem.
  4. home/game/channel/config You can put like: 300000 VIEW_RANGE: 8000
  5. Or you can make like that: [File: /Src/server/game/src/char.cpp] //1.) Search: addPacket.sAlignment = m_iAlignment / 10; //2.) Replace with: addPacket.sAlignment = m_iAlignment; //1.) Search: pack.sAlignment = m_iAlignment / 10; //2.) Replace with: pack.sAlignment = m_iAlignment; [File: /Src/server/game/src/char_battle.cpp] //1.) Search: void CHARACTER::UpdateAlignment(int iAmount) { bool bShow = false; if (m_iAlignment == m_iRealAlignment) bShow = true; int i = m_iAlignment / 10; m_iRealAlignment = MINMAX(-200000, m_iRealAlignment + iAmount, 200000); if (bShow) { m_iAlignment = m_iRealAlignment; if (i != m_iAlignment / 10) UpdatePacket(); } } //2.) Replace with: void CHARACTER::UpdateAlignment(int iAmount) { bool bShow = false; if (m_iAlignment == m_iRealAlignment) bShow = true; int i = m_iAlignment; m_iRealAlignment = MINMAX(-20000, m_iRealAlignment + iAmount, 20000); if (bShow) { m_iAlignment = m_iRealAlignment; if (i != m_iAlignment) UpdatePacket(); } } [File: /Src/server/game/src/questlua_pc.cpp] //1.) Search: int pc_get_real_alignment(lua_State* L) { lua_pushnumber(L, CQuestManager::instance().GetCurrentCharacterPtr()->GetRealAlignment()/10); return 1; } int pc_get_alignment(lua_State* L) { lua_pushnumber(L, CQuestManager::instance().GetCurrentCharacterPtr()->GetAlignment()/10); return 1; } int pc_change_alignment(lua_State * L) { int alignment = (int)(lua_tonumber(L, 1)*10); LPCHARACTER ch = CQuestManager::instance().GetCurrentCharacterPtr(); ch->UpdateAlignment(alignment); return 0; } //2.) Replace with: int pc_get_real_alignment(lua_State* L) { lua_pushnumber(L, CQuestManager::instance().GetCurrentCharacterPtr()->GetRealAlignment()); return 1; } int pc_get_alignment(lua_State* L) { lua_pushnumber(L, CQuestManager::instance().GetCurrentCharacterPtr()->GetAlignment()); return 1; } int pc_change_alignment(lua_State * L) { int alignment = (int)(lua_tonumber(L, 1)); LPCHARACTER ch = CQuestManager::instance().GetCurrentCharacterPtr(); ch->UpdateAlignment(alignment); return 0; } Now you'll get the real values, for example if your align in the game is 17214 in the database will show 17214 work good, before to make that he show multiplied by *10 equals with 172 140 in database. Now check is real for GetRealAlignment && GetAlignment.
  6. Example add in function ->> bool CHARACTER::UseItem(TItemPos Cell, TItemPos DestCell) (char_item.cpp) int pTableArray[] = {53001, 53002, 53003, 53004, 53005, 53006, 53007, 53008, 53009, 53010, 53011, 53012, 53013, 53014, 53015, 53016, 53017, 53018, 53019, 53020, 53021, 53022, 53023, 53024, 53025}; for (int i = 0; i < _countof(pTableArray); i++){ if (item->GetVnum() == pTableArray[i] && GetMapIndex() == 110) { ChatPacket(CHAT_TYPE_INFO, "<Summon> You can't summon item [%s] in this map!", item->GetName()); return false; } }
  7. [File: /src/Server/game/src/char.cpp] ..//1.) Search: else if (pchInvitee->IsBlockMode(BLOCK_PARTY_INVITE)) { ChatPacket(CHAT_TYPE_INFO, LC_TEXT("<파티> %s 님이 파티 거부 상태입니다."), pchInvitee->GetName()); return; } ..//2.) Add bellow: #ifdef ENABLE_EXTRA_BLOCK_PARTY #define ERROR_PARTY(argument) ChatPacket(CHAT_TYPE_INFO, argument); //me_vegas_func183 else if (GetGMLevel() > GM_PLAYER && pchInvitee->GetGMLevel() == GM_PLAYER) { ERROR_PARTY("<<Party>> You can not send a request to a player!"); return; } else if (GetGMLevel() == GM_PLAYER && pchInvitee->GetGMLevel() > GM_PLAYER) { ERROR_PARTY("<<Party>> You can not send a request to a staff member!"); return; } #endif [File: /src/Server/game/src/guild.cpp] ..//1.) Search: else if ( pchInvitee->GetEmpire() != pchInviter->GetEmpire() ) { pchInviter->ChatPacket( CHAT_TYPE_INFO, LC_TEXT("<길드> 다른 제국 사람을 길드에 초대할 수 없습니다.") ); return; } ..//2.) Add bellow: #ifdef ENABLE_EXTRA_BLOCK_GUILD #define ERROR_GUILD(argument) pchInviter->ChatPacket(CHAT_TYPE_INFO, argument); //me_vegas_func184 else if (pchInviter->GetGMLevel() > GM_PLAYER && pchInvitee->GetGMLevel() == GM_PLAYER) { ERROR_GUILD("<<Party>> You can not send a request to a player!"); return; } else if (pchInviter->GetGMLevel() == GM_PLAYER && pchInvitee->GetGMLevel() > GM_PLAYER) { ERROR_GUILD("<<Party>> You can not send a request to a staff member!"); return; } #endif [File: /src/Server/game/common/service.h] #define ENABLE_EXTRA_BLOCK_GUILD #define ENABLE_EXTRA_BLOCK_PARTY
  8. Hmm maybe like this? //1.) Search: if warp[i] == nil then return end //2.) Add bellow: if pc.get_level() < warp[i][3] then say_reward(string.format("<Error> Need to have level %d for can teleport in this map!", warp[i][3])) return end //3.) Search: {474300,954800}, {353100,882900}, //4.) Delete and replace with this (example for limit level on maps): {474300, 954800, 30}, --* "<Error> Need to have level %d for can teleport in this map!", 30) {353100, 882900, 45}, --* "<Error> Need to have level %d for can teleport in this map!", 45)
  9. [File: char_item.cpp] //Search: case UNIQUE_ITEM_WHITE_FLAG: ForgetMyAttacker(); item->SetCount(item->GetCount()-1); break; //Add after: case 80212: { /**************** * POINT_MAX_HP - name bonus * 10000 - value bonus * 1 - 1 hours bonus is valid, and in an hour you can use the again this book */ quest::PC* pPC = quest::CQuestManager::instance().GetPC(GetPlayerID()); int pSetting[] = {POINT_MAX_HP, 10000, 1}; int pLastTime = pPC->GetFlag("book_use.last_use_time"); if (get_global_time() - pLastTime < pSetting[2] *60*60) { ChatPacket(CHAT_TYPE_INFO, "Effect of this book is still active, please try again later!"); return false; } AddAffect(AFFECT_BOOK, pSetting[0], pSetting[1], 0, pSetting[2] *60*60, 0, true); item->SetCount(item->GetCount() -1); pPC->SetFlag("book_use.last_use_time", get_global_time()); } break; [File: affect.h] //Search: AFFECT_HOLLY_STONE_POWER = 303, //Add bellow: AFFECT_BOOK, // Sorry, now i see you are on 34k, try with this. local reward = { {MAX_HP, 10000, 1*60*60} } affect.add_collect(reward[1], reward[2], reward[3])
  10. Put without #ifdef && #def in MSWindow.cpp, like that: #include <Shobjidl.h>
  11. Hmm, try with this: //Search on char.cpp: m_iAlignment = t->lAlignment; m_iRealAlignment = t->lAlignment; //Add bellow: if (GetGMLevel() > GM_PLAYER) { m_iAlignment = 0; m_iRealAlignment = 0; }
  12. You must first stop all processes, then start the server. You can use this command in putty: killall game && killall db && sh start.sh
  13. [File: cmd_general.cpp -> ACMD(do_stat)] Search: if (ch->GetPoint(POINT_STAT) <= 0) return; Add before: if (ch->GetParty()) { ch->ChatPacket(CHAT_TYPE_NOTICE, "<<Error>> You can not increase your status while you belong to a party."); return; }
  14. M2 Download Center Download Here ( Internal ) A collision or crash is an event in which two or more bodies exert forces on each other for a relatively short time. Although the most common colloquial use of the word "collision" refers to incidents in which two or more objects collide, the scientific use of the word "collision" implies nothing about the magnitude of the force. Some examples of physical interactions that scientists would consider collisions: An insect touches its antenna to the leaf of a plant. The antenna is said to collide with leaf. A cat walks delicately through the grass. Each contact that its paws make with the ground is a collision. Each brush of its fur against a blade of grass is a collision. I will come back with a video tonight [File: src/Client/Source/GameLib/ActorInstanceCollisionDetection.cpp] //1.) Search: #include "../eterLib/GrpMath.h" //2.) Add bellow: #include "../UserInterface/PythonBackground.h" #include "../UserInterface/Locale_inc.h" //3.) Search: BOOL CActorInstance::TestActorCollision(CActorInstance & rVictim) { //4.) Add bellow: #ifdef ENABLE_STOP_COLISSION_GLOBAL /********************************************************************* * date : 2016.02.16 * function : Stop Colission * developer : VegaS * skype : sacadatt.amazon * description : Checks if the victim is one of the examples below you can easily configure. If the victim was found success as vnum site / breed ve you could go through it no longer block. */ /************ * The first value is the minimum value and the second value is the maximum value of pet vnum (mob_proto) - change 34051 with your max vnum of pet */ int pListPet[2] = {34001, 34051}; /************ * You can add whatever you like vnum of npc or monster (mob_proto) */ int pListGlobal[] = {9001, 9002, 9003, 9004, 9005, 9006, 20011, 20091, 20092, 20093, 20094, 20095, 30000}; /************ * You can add what mapname you want for enable this stop collission global like pet / npc */ const char* strMapListGlobal[] = {"metin2_map_a1", "metin2_map_a3", "metin2_map_b1", "metin2_map_b3", "metin2_map_c1", "metin2_map_c3", "season2/metin2_map_skipia_dungeon_01", "season2/metin2_map_skipia_dungeon_02", "metin2_map_duel"}; /************ * Location name of the map where the event takes place ox */ const char* strMapEventOx = "season1/metin2_map_oxevent"; std::string stringName = CPythonBackground::Instance().GetWarpMapName(); for (int i = 0; i < _countof(strMapListGlobal); i++) { #ifdef ENABLE_STOP_COLLISION_PLAYER_OX if (strMapEventOx == stringName) // Check if u are place in map ox { if (0 <= rVictim.GetRace() && rVictim.GetRace() <= 7) // Check if the victim through which pass over a player (change 7 with 8 if u have wolfman) return FALSE; // Stop collission for player --> You can go through players now successfully without lock yourself } #endif if (strMapListGlobal[i] == stringName) // Check if you are in one of the maps listed in the global list { for (int i = 0; i < _countof(pListGlobal); i++) { if (rVictim.GetRace() == pListGlobal[i] || pListPet[0] <= rVictim.GetRace() && rVictim.GetRace() <= pListPet[1]) // Verify that the victim is npc vnum listed above, or if a pet. return FALSE; // Stop collission for global vnum like a pet or npc } } } #endif [File: src/Client/Source/UserInterface/Locale_inc.h] //1.) Search: #define ENABLE_COSTUME_SYSTEM //2.) Add bellow: #ifndef ENABLE_STOP_COLISSION_GLOBAL #define ENABLE_STOP_COLISSION_GLOBAL #define ENABLE_STOP_COLLISION_PLAYER_OX #endif
  15. Please stop, do not kill c++. xD omg no. Now check is only if you have grade gm and if victim is a player. int pTableSkill[] = {94,95,96,109,110,111}; for (int i = 0; i < _countof(pTableSkill); i++) { if (dwVnum == pTableSkill[i] && GetGMLevel() > GM_PLAYER && pkVictim->GetGMLevel() == GM_PLAYER) { [......................] } }
  16. Here is a much better, because method before you can not use all the skill nor for you. Put check in function: bool CHARACTER::UseSkill(DWORD dwVnum, LPCHARACTER pkVictim, bool bUseGrandMaster) #ifdef ENABLE_REFLECT_BUFF_STAFF int pTableSkill[] = {94,95,96,109,110,111}; for (int i = 0; i < _countof(pTableSkill); i++) { if (dwVnum == pTableSkill[i] && GetGMLevel() > GM_PLAYER) { pkVictim = this; // The skills you will reflect on you when you try to give a player a buff, use as you give yourself buff. } } #endif
  17. Check again my first post, and please next time stop with quote :-w is so ugly..
  18. Hmm try with that xD [File: Src/Server/game/src/char_skill.cpp] //1.) Search in function bool CHARACTER::UseSkill(DWORD dwVnum, LPCHARACTER pkVictim, bool bUseGrandMaster): if (false == CanUseSkill(dwVnum)) return false; //2,) Add before: #define ENABLE_BLOCK_BUFF_SKILL_STAFF // put this in common/service.h #ifdef ENABLE_BLOCK_BUFF_SKILL_STAFF int pTableSkill[] = {94,95,96,109,110,111}; for (int i = 0; i < _countof(pTableSkill); i++) { if (dwVnum == pTableSkill[i] && GetGMLevel() > GM_PLAYER) { //ChatPacket(CHAT_TYPE_INFO, "You are part of staff, you can not do use buff skill."); return false; } } #endif
  19. Dear users, do not download any shit. First one put links with virustotal from executable.
  20. Or you can much easy..xd packet.h -> Server typedef struct command_login3 { BYTE header; char login[LOGIN_MAX_LEN + 1]; char passwd[PASSWD_MAX_LEN + 1]; DWORD adwClientKey[4]; #ifdef ENABLE_CHANGE_PACKET_LOGIN int tValueFake_; #endif } TPacketCGLogin3; packet.h -> Client typedef struct command_login3 { BYTE header; char name[ID_MAX_NUM + 1]; char pwd[PASS_MAX_NUM + 1]; DWORD adwClientKey[4]; #ifdef ENABLE_CHANGE_PACKET_LOGIN int tValueFake_; #endif } TPacketCGLogin3;
  21. Or you can make it much easier xD @galet int pVnumTable[] = {50011, 50012, 50013, 50014, 50015, 50016, 50017, 50018, 50019, 50020, 50021, 50022, 50023}; const char* pDestroyMessage = {"<Destroy> You can't delete item [%s] !"}; for (int i = 0; i < _countof(pVnumTable); i++){ if (pVnumTable[i] == item->GetVnum()) { ChatPacket(CHAT_TYPE_INFO, pDestroyMessage, item->GetName()); return false; } }
×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.