Jump to content

Denis

Banned
  • Posts

    1031
  • Joined

  • Last visited

  • Days Won

    53
  • Feedback

    0%

Everything posted by Denis

  1. EQUIPMENT_START_INDEX should be 45*5(45 slots per inventory * 5 inventories)
  2. He's just changing the default file extensions *.eix/*.epk
  3. If i know good, for more than 2kkk store in this item, you must too edit source for max long long and when you have max gold in source, why this item need? if you can trade more than 2kkk It's much easier and cleaner to do it like that,because you don't even need to edit source, but still if you want to change the gold limit it's your choice.
  4. There's already a fix here
  5. The type and the subtype of the 27992 should be ITEM_USE and USE_ADD_ATTRIBUTE
  6. Shouldn't it be like this ? return day == 6 or day == 0
  7. Try this: void CInputMain::PartyInvite(LPCHARACTER ch, const char * c_pData) { if (ch->GetArena()) { ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("????? ???? ? ????.")); return; } TPacketCGPartyInvite * p = (TPacketCGPartyInvite*) c_pData; LPCHARACTER pInvitee = CHARACTER_MANAGER::instance().Find(p->vid); if (!pInvitee || !ch->GetDesc() || !pInvitee->GetDesc()) { sys_err("PARTY Cannot find invited character"); return; } if(ch->GetMapIndex() == 41) { ch->ChatPacket(CHAT_TYPE_INFO,"WRONG MAP INDEX"); return; } else { ch->PartyInvite(pInvitee); } }
  8. It's untested but it should work Find this function: void CInputMain::PartyInvite(LPCHARACTER ch, const char * c_pData) { if (ch->GetArena()) { ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("대련장에서 사용하실 수 없습니다.")); return; } TPacketCGPartyInvite * p = (TPacketCGPartyInvite*) c_pData; LPCHARACTER pInvitee = CHARACTER_MANAGER::instance().Find(p->vid); if (!pInvitee || !ch->GetDesc() || !pInvitee->GetDesc()) { sys_err("PARTY Cannot find invited character"); return; } } And add this line to it: ch->GetMapIndex() == 41 ? ch->ChatPacket(CHAT_TYPE_INFO,"WRONG MAP INDEX") : ch->PartyInvite(pInvitee); // 41 = map index of the blocked map So it should look something like this: void CInputMain::PartyInvite(LPCHARACTER ch, const char * c_pData) { if (ch->GetArena()) { ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("대련장에서 사용하실 수 없습니다.")); return; } TPacketCGPartyInvite * p = (TPacketCGPartyInvite*) c_pData; LPCHARACTER pInvitee = CHARACTER_MANAGER::instance().Find(p->vid); if (!pInvitee || !ch->GetDesc() || !pInvitee->GetDesc()) { sys_err("PARTY Cannot find invited character"); return; } ch->GetMapIndex() == 41 ? ch->ChatPacket(CHAT_TYPE_INFO,"WRONG MAP INDEX") : ch->PartyInvite(pInvitee); }
  9. Go to navicat press F6 key and write this: SELECT PASSWORD("your_pass"); And get your password
  10. Under self.name = name add this self.hpPercenttxt = hpPercenttxt
  11. Just write [ spoiler ] [ /spoiler ] without spaces and...
  12. Really? I can't find anything ugly about this. Actually the c++ part is very nice. I didn't check on python. And why are you wishing him good luck at his own release? ._. Sometimes I don't understand people...^^ Anyway, the idea behind that is great and I like the c++ part a lot. Oh, and a german sentence slipped through i dont know how to tell u why he is ugly also iam arabic from libya not germany alina wasn't talking to you when he/she wrote this ---> "and a german sentence slipped through " he/she was talking to the topic maker and for the python part : go to uisystem.py in root and search for this tow times self.GetChild("help_button").SAFE_SetEvent(self.__ClickHelpButton) and under it write this self.GetChild("Change_Channel").SAFE_SetEvent(self.__ClickChangeChButton) and after this def __ClickInGameShopButton(self): self.Close() net.SendChatPacket("/in_game_mall") write this def __ClickChangeChButton(self): if constInfo.channel == 0: constInfo.channel == 1 self.uuchangechannel = uichannel.ChannelChanger() self.uuchangechannel.Show() elif constInfo.channel == 1: constInfo.channel == 0 self.uuchangechannel = uichannel.ChannelChanger() self.uuchangechannel.hide() save and exit 2: change uichannel.py in root with this import ui import net import app import chat import math import wndMgr import serverInfo import background import ServerStateChecker import snd import constInfo Channel_window = "uiscript/channel.py" class ChannelChanger(ui.ScriptWindow): def __init__(self): ui.ScriptWindow.__init__(self) def __del__(self): ui.ScriptWindow.__del__(self) def Show(self): self.__LoadWindow() ui.ScriptWindow.Show(self) def __LoadWindow(self): try: pyScrLoader = ui.PythonScriptLoader() pyScrLoader.LoadScriptFile(self, Channel_window) except: import exception exception.Abort("PetWindow.LoadWindow.LoadObject") #buttons self.TitleBar = self.GetChild("TitleBar") self.channel1 = self.GetChild("Channel_1") self.channel2 = self.GetChild("Channel_2") self.channel3 = self.GetChild("Channel_3") self.channel4 = self.GetChild("Channel_4") #event buttons self.TitleBar.SetCloseEvent(ui.__mem_func__(self.Close)) self.channel1.SetEvent(ui.__mem_func__(self.___1)) self.channel2.SetEvent(ui.__mem_func__(self.___2)) self.channel3.SetEvent(ui.__mem_func__(self.___3)) self.channel4.SetEvent(ui.__mem_func__(self.___4)) def ___1(self): snd.PlaySound("sound/ui/click.wav") ch = "1" self.__OnChangeChannel(ch) def ___2(self): snd.PlaySound("sound/ui/click.wav") ch = "2" self.__OnChangeChannel(ch) def ___3(self): snd.PlaySound("sound/ui/click.wav") ch = "3" self.__OnChangeChannel(ch) def ___4(self): snd.PlaySound("sound/ui/click.wav") ch = "4" self.__OnChangeChannel(ch) def __IsSpecialMap(self): dis_maps = [ "season1/metin2_map_oxevent", "season2/metin2_map_guild_inside01", "season2/metin2_map_empirewar01", "season2/metin2_map_empirewar02", "season2/metin2_map_empirewar03", "metin2_map_dragon_timeattack_01", "metin2_map_dragon_timeattack_02", "metin2_map_dragon_timeattack_03", "metin2_map_skipia_dungeon_boss", "metin2_map_skipia_dungeon_boss2", "metin2_map_devilsCatacomb", "metin2_map_deviltower1", "metin2_map_t1", "metin2_map_t2", "metin2_map_t3", "metin2_map_t4", "metin2_map_t5", "metin2_map_wedding_01", "metin2_map_duel", "metin2_map_orclabyrinth", "metin2_map_n_flame_dungeon_01", "metin2_map_n_snow_dungeon_01" ] if str(background.GetCurrentMapName()) in dis_maps: return TRUE return FALSE def __OnChangeChannel(self, ch): ServerStateChecker.Update() channel = net.GetServerInfo()[-1] # channelnum = filter(str.isdigit, channel) if ch == channel: chat.AppendChat(chat.CHAT_TYPE_INFO, "You're already in the selected channel!") return if self.__IsSpecialMap(): chat.AppendChat(chat.CHAT_TYPE_INFO, "Sorry, This Is One of spiecal maps which you cannot change channel while you in it!") return net.SendChatPacket("/channel "+ str(ch)) self.Close() def Close(self): constInfo.channel = 0 self.Hide() return TRUE def OnPressEscapeKey(self): constInfo.channel = 0 self.Hide() return TRUE 3: change systemdialog.py in uiscript with this import uiScriptLocale ROOT = "d:/ymir work/ui/public/" window = { "name" : "SystemDialog", "style" : ("float",), "x" : SCREEN_WIDTH/2 - 100, "y" : SCREEN_HEIGHT/2 - 114, "width" : 200, "height" : 298, "children" : ( { "name" : "board", "type" : "thinboard", "x" : 0, "y" : 0, "width" : 200, "height" : 298, "children" : ( { "name" : "Change_Channel", "type" : "button", "x" : 10, "y" : 17, "text" : uiScriptLocale.SYSTEM_CHANGE_CH, "default_image" : ROOT + "XLarge_Button_01.sub", "over_image" : ROOT + "XLarge_Button_02.sub", "down_image" : ROOT + "XLarge_Button_03.sub", }, { "name" : "help_button", "type" : "button", "x" : 10, "y" : 47, "text" : uiScriptLocale.SYSTEM_HELP, "default_image" : ROOT + "XLarge_Button_01.sub", "over_image" : ROOT + "XLarge_Button_02.sub", "down_image" : ROOT + "XLarge_Button_03.sub", }, { "name" : "system_option_button", "type" : "button", "x" : 10, "y" : 97, "text" : uiScriptLocale.SYSTEMOPTION_TITLE, "default_image" : ROOT + "XLarge_Button_01.sub", "over_image" : ROOT + "XLarge_Button_02.sub", "down_image" : ROOT + "XLarge_Button_03.sub", }, { "name" : "game_option_button", "type" : "button", "x" : 10, "y" : 127, "text" : uiScriptLocale.GAMEOPTION_TITLE, "default_image" : ROOT + "XLarge_Button_01.sub", "over_image" : ROOT + "XLarge_Button_02.sub", "down_image" : ROOT + "XLarge_Button_03.sub", }, { "name" : "change_button", "type" : "button", "x" : 10, "y" : 157, "text" : uiScriptLocale.SYSTEM_CHANGE, "default_image" : ROOT + "XLarge_Button_01.sub", "over_image" : ROOT + "XLarge_Button_02.sub", "down_image" : ROOT + "XLarge_Button_03.sub", }, { "name" : "logout_button", "type" : "button", "x" : 10, "y" : 187, "text" : uiScriptLocale.SYSTEM_LOGOUT, "default_image" : ROOT + "XLarge_Button_01.sub", "over_image" : ROOT + "XLarge_Button_02.sub", "down_image" : ROOT + "XLarge_Button_03.sub", }, { "name" : "exit_button", "type" : "button", "x" : 10, "y" : 217, "text" : uiScriptLocale.SYSTEM_EXIT, "default_image" : ROOT + "XLarge_Button_01.sub", "over_image" : ROOT + "XLarge_Button_02.sub", "down_image" : ROOT + "XLarge_Button_03.sub", }, { "name" : "cancel_button", "type" : "button", "x" : 10, "y" : 257, "text" : uiScriptLocale.CANCEL, "default_image" : ROOT + "XLarge_Button_01.sub", "over_image" : ROOT + "XLarge_Button_02.sub", "down_image" : ROOT + "XLarge_Button_03.sub", }, ), }, ), } and finally go to constnfo.py in root and write this channel = 0 and the python part is over <3 Yeah,but what if the user just write /channel x? With that way the user will just skip the map check
  13. If you're using source you can do this via input_main.cpp: Before CBanwordManager::instance().ConvertString(buf, buflen); add this code: if(ch->GetMapIndex() == MAP_OX_ID && (pinfo->type == CHAT_TYPE_TALKING || pinfo->type == CHAT_TYPE_PARTY || pinfo->type == CHAT_TYPE_GUILD || pinfo->type == CHAT_TYPE_GUILD)) { return iExtraLen; } Otherwise if you're not using the source I guess I don't know any other way
  14. ​Why did you add the new map LevelByVnum and not just implemented the CPythonNonPlayer::GetMobLevel(DWORD dwVnum) like this: BYTE CPythonNonPlayer::GetMobLevel(DWORD dwVnum) { const CPythonNonPlayer::TMobTable * c_pTable = GetTable(dwVnum); if (!c_pTable) return 0; return c_pTable->bLevel; } Regards ​I don't know, I guess I forgot that I could do it like this
  15. ​[Hidden Content] ​ Dont work ​I just implemented it and it worked: [Hidden Content]
  16. Tons of errors XD [Hidden Content] ​ ​Upload here the files you edited.
  17. At client src: Change this(InstanceBase.cpp): m_dwLevel = c_rkCreateData.m_dwLevel To this: BYTE level_mob = CPythonNonPlayer::Instance().GetMobLevel(c_rkCreateData.m_dwRace); m_dwLevel = ((c_rkCreateData.m_dwRace > 8 && c_rkCreateData.m_bType == CActorInstance::TYPE_ENEMY) ? level_mob : c_rkCreateData.m_dwLevel); Ah and don't forget to include PythonNonPlayer.h After that open PythonNonPlayer.h and add this: std::map<DWORD, BYTE> LevelByVnum; After that find: const TMobTable * GetTable(DWORD dwVnum); And add this: BYTE GetMobLevel(DWORD dwVnum); Next we need to open PythonNonPlayer.cpp: Find this line: m_NonPlayerDataMap.insert(TNonPlayerDataMap::value_type(pNonPlayerData->dwVnum, pNonPlayerData)); Under that line add this: LevelByVnum[pNonPlayerData->dwVnum] = pNonPlayerData->bLevel; And finally add this event: BYTE CPythonNonPlayer::GetMobLevel(DWORD dwVnum) { map<DWORD, BYTE>::iterator it; it = LevelByVnum.find(dwVnum); if (it != LevelByVnum.end()) { return it->second; } return 0; } It's untested but it will probably work.
  18. when x.use begin pc.remove_item(x,1) end Where x your vnum.
  19. You can always change it,it isn't something hard.
×
×
  • 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.