Jump to content

dadas82

Inactive Member
  • Posts

    17
  • Joined

  • Last visited

  • Feedback

    0%

Posts posted by dadas82

  1. 3 hours ago, Root said:

    well you have to add a pcket with timer in game source and client.So he can change channel,teleport after 10 seccond after opening shop.

    ecause if u change just client side it wont help it can get bypassed.Is source problem.

    I give it five second. It is bug again when you are done :(

     

    Spoiler

    EVENTFUNC(channel_event)
    {
        TimedEventInfo * info = dynamic_cast<TimedEventInfo *>( event->info );
        
        if ( info == NULL )
        {
            sys_err( "timed_event> <Factor> Null pointer" );
            return 0;
        }

        LPCHARACTER    ch = info->ch;
        if (ch == NULL) { // <Factor>
            return 0;
        }
        LPDESC d = ch->GetDesc();

        if (info->left_second <= 0)
        {
            ch->m_pkTimedEvent = NULL;

            TPacketNeedLoginLogInfo acc_info;
            acc_info.dwPlayerID = ch->GetDesc()->GetAccountTable().id;

            db_clientdesc->DBPacket( HEADER_GD_VALID_LOGOUT, 0, &acc_info, sizeof(acc_info) );

            LogManager::instance().DetailLoginLog( false, ch );

            ch->ChannelSwitch(new_ch);

            return 0;
        }
        else
        {
            ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("%d초 남았습니다."), info->left_second);
            --info->left_second;
        }

        return PASSES_PER_SEC(1);
    }

    ACMD(do_move_channel)
    {
        char arg1[256];
        one_argument(argument, arg1, sizeof(arg1));

        if (!*arg1)
            return;

        str_to_number(new_ch, arg1);

        if( new_ch < 1 || new_ch > 4)
            return;
        
        if (new_ch == g_bChannel)
            {
                ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("Channel_Move_ch"));
                return;
            }

        if (!ch->IsPC())
            return;

        ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("Channel_Move"));

        int nExitLimitTime = 10;

        if (ch->IsHack(false, true, nExitLimitTime) && false == CThreeWayWar::instance().IsSungZiMapIndex(ch->GetMapIndex()) && (!ch->GetWarMap() || ch->GetWarMap()->GetType() == GUILD_WAR_TYPE_FLAG))
            return;

        TimedEventInfo* info = AllocEventInfo<TimedEventInfo>();

        {
            if (ch->IsPosition(POS_FIGHTING))
                info->left_second = 10;
            else
                info->left_second = 5;
        }

        info->ch = ch;
        info->subcmd = subcmd;
        strlcpy(info->szReason, argument, sizeof(info->szReason));

        ch->m_pkTimedEvent    = event_create(channel_event, info, 1);
    }

     

  2.  

    fix please

     

    Spoiler

    import ui
    import net
    import app
    import chat
    import math
    import wndMgr
    import serverInfo
    import background
    import ServerStateChecker
    import uichat

    class ChannelChanger(ui.ScriptWindow):
        def __init__(self):
            ui.ScriptWindow.__init__(self)

            self.__MakeWindow()
            self.__MakeBoard()
            self.__Fill_Up_ChannelList()

        def __del__(self):
            ui.ScriptWindow.__del__(self)

        def Destroy(self):
            self.Hide()
            return TRUE

        def __MakeWindow(self):
            ServerStateChecker.Create(self)
            self.SetSize(150, 190)
            self.SetPosition(
                (wndMgr.GetScreenWidth() / 2) - int(math.floor(self.GetWidth() / 2.)),
                (wndMgr.GetScreenHeight() / 2) - int(math.floor(self.GetHeight() / 2.))
            )
            #self.AddFlag("movable")
            self.AddFlag("float")
            self.Show()

        def __MakeBoard(self):
            self.Board = ui.Board()
            self.Board.SetParent(self)
            self.Board.SetSize(self.GetWidth(), self.GetHeight())
            self.Board.SetPosition(0, 0)
            #self.Board.AddFlag("movable")
            self.Board.AddFlag("float")
            self.Board.Show()

            self.TitleBar = ui.TitleBar()
            self.TitleBar.SetParent(self.Board)
            self.TitleBar.SetPosition(7, 7)
            self.TitleBar.MakeTitleBar(self.GetWidth() - 2 * 7, 'red')
            self.TitleBar.SetCloseEvent(self.Close)
            self.TitleBar.Show()

            self.RefreshButton = ui.Button()
            self.RefreshButton.SetParent(self.TitleBar)
            self.RefreshButton.SetPosition(3, 3)
            self.RefreshButton.SetUpVisual("d:/ymir work/ui/game/guild/refresh_button_01.sub")
            self.RefreshButton.SetOverVisual("d:/ymir work/ui/game/guild/refresh_button_02.sub")
            self.RefreshButton.SetDownVisual("d:/ymir work/ui/game/guild/refresh_button_03.sub")
            self.RefreshButton.SetToolTipText("Yenile", 0, - 23)
            self.RefreshButton.SetEvent(lambda : self.__Fill_Up_ChannelList())
            self.RefreshButton.Show()

            self.TitleText = ui.TextLine()
            self.TitleText.SetParent(self.TitleBar)
            self.TitleText.SetPosition(0, 4)
            self.TitleText.SetText("Kanal seç")
            self.TitleText.SetWindowHorizontalAlignCenter()
            self.TitleText.SetHorizontalAlignCenter()
            self.TitleText.Show()

            self.ServerName = ui.TextLine()
            self.ServerName.SetParent(self.TitleBar)
            self.ServerName.SetPosition(0, self.TitleBar.GetHeight())
            self.ServerName.SetText(str(net.GetServerInfo()).split(",")[0])
            self.ServerName.SetWindowHorizontalAlignCenter()
            self.ServerName.SetHorizontalAlignCenter()
            self.ServerName.Show()

            self.ChannelListBase = ui.SlotBar()
            self.ChannelListBase.SetParent(self.Board)
            self.ChannelListBase.SetSize(self.Board.GetWidth() - 2 * 16, 5 * 18 - 4+20)
            self.ChannelListBase.SetPosition(16 , 7 + self.TitleBar.GetHeight() + 6 + 10)
            self.ChannelListBase.Show()

            self.ChannelList = ui.ListBox()
            self.ChannelList.SetParent(self.ChannelListBase)
            self.ChannelList.SetSize(self.ChannelListBase.GetWidth()- 20, self.ChannelListBase.GetHeight())
            self.ChannelList.SetPosition(0, 0)
            self.ChannelList.SetEvent(ui.__mem_func__(self.__OnSelectChannel))
            self.ChannelList.Show()

            self.ChangeButton = ui.Button()
            self.ChangeButton.SetParent(self.Board)
            self.ChangeButton.SetPosition(self.Board.GetWidth() / 2 - 44, self.Board.GetHeight() - 32)
            self.ChangeButton.SetUpVisual('d:/ymir work/ui/public/Large_button_01.sub')
            self.ChangeButton.SetOverVisual('d:/ymir work/ui/public/Large_button_02.sub')
            self.ChangeButton.SetDownVisual('d:/ymir work/ui/public/Large_button_03.sub')
            self.ChangeButton.SetEvent(lambda : self.__OnClickConnectButton())
            self.ChangeButton.SetText("Değiştir")
            self.ChangeButton.Show()
            self.DisableChangeButton()

        def DisableChangeButton(self):
                
            self.ChangeButton.Disable()
            self.ChangeButton.Down()
            self.ChangeButton.ButtonText.SetFontColor(0.4, 0.4, 0.4)

        def EnableChangeButton(self):
                
            self.ChangeButton.Enable()
            self.ChangeButton.SetUp()
            self.ChangeButton.ButtonText.SetFontColor(1, 1, 1)

        def __GetRegionID(self):
            return 0

        def __GetServerID(self):
            regionID = self.__GetRegionID()
            for i in serverInfo.REGION_DICT[regionID].keys():
                if serverInfo.REGION_DICT[regionID]["name"] == net.GetServerInfo().split(",")[0]:
                    serverID = int(i)
                    break

            return serverID

        def __Fill_Up_ChannelList(self):
            self.__RequestServerStateList()
            self.__RefreshServerStateList()
            #self.ChannelList.SelectItem(0)

        def __RequestServerStateList(self):
            regionID = self.__GetRegionID()
            serverID = self.__GetServerID()

            try:
                channelDict = serverInfo.REGION_DICT[regionID][serverID]["channel"]
            except:
                return
            ServerStateChecker.Initialize(self)
            for id, channelDataDict in channelDict.items():
                key=channelDataDict["key"]
                ip=channelDataDict["ip"]
                udp_port=channelDataDict["udp_port"]
                ServerStateChecker.AddChannel(key, ip, udp_port)
            ServerStateChecker.Request()

        def __RefreshServerStateList(self):
            regionID = self.__GetRegionID()
            serverID = self.__GetServerID()
            bakChannelID = self.ChannelList.GetSelectedItem()

            self.ChannelList.ClearItem()

            try:
                channelDict = serverInfo.REGION_DICT[regionID][serverID]["channel"]
            except:
                return

            for channelID, channelDataDict in channelDict.items():
                channelName = channelDataDict["name"]
                channelState = channelDataDict["state"]
                self.ChannelList.InsertItem(channelID, "%s %s" % (channelName, channelState))

            self.ChannelList.SelectItem(bakChannelID-1)

        def NotifyChannelState(self, addrKey, state):
            try:
                stateName = serverInfo.STATE_DICT[state]
            except:
                stateName = serverInfo.STATE_NONE

            regionID  = int(addrKey / 1000)
            serverID  = int(addrKey / 10) % 100
            channelID = addrKey % 10

            try:
                serverInfo.REGION_DICT[regionID][serverID]["channel"][channelID]["state"] = stateName
                self.__RefreshChannelStateList()
            except:
                pass

        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 __OnSelectChannel(self):
            if self.ChangeButton.IsDown():
                self.EnableChangeButton()

        def __OnClickConnectButton(self):

            ServerStateChecker.Update()
            channelID = self.ChannelList.GetSelectedItem()
            if not channelID:
                return
            if net.GetServerInfo().strip().split(", ")[1] == self.ChannelList.textDict[self.ChannelList.selectedLine].strip().split(" ")[0]:
                chat.AppendChat(1, "Kanal değiştiremezsin. Zaten bu kanaldasın.")
                return
            elif self.__IsSpecialMap():
                chat.AppendChat(1, "Burada haritada kanal değiştiremezsin.")
                return
            net.SetServerInfo(net.GetServerInfo()[:-1] + str(channelID))
            self.Close()
            net.SendChatPacket("/channel "+str(channelID))

        def DirectConnect(self, ChannelIP, ChannelPort, AuthServerIP, AuthServerPort):
            net.SetLoginInfo(decode_string(net.ACCOUNT_ID), decode_string(net.ACCOUNT_PW))
            net.ConnectToAccountServer(ChannelIP, ChannelPort, AuthServerIP, AuthServerPort)
            net.DirectEnter(0)
            net.SendSelectCharacterPacket(0)
            net.SendEnterGamePacket()

        def Show(self):
            ui.ScriptWindow.Show(self)

        def Close(self):
            ServerStateChecker.Initialize(self)
            self.Hide()


        def OnPressEscapeKey(self):
            self.Close()
            return TRUE

        def OnUpdate(self):
            ServerStateChecker.Update()
     

     

  3. help me please

    db compile ok

    game error

    Compile Basarili ../DREAM_GAME_ORJINAL Cikiyor...
    Compile Basarili ../DREAM_GAME Strip Cekiliyor...
    //usr/lib/libIL.a(il_png.o): In function `iIsValidPng':
    il_png.c:(.text+0x143): undefined reference to `png_check_sig'
    //usr/lib/libIL.a(il_png.o): In function `readpng_get_image':
    il_png.c:(.text+0x5a3): undefined reference to `png_set_gray_1_2_4_to_8'
    collect2: error: ld returned 1 exit status
    gmake: *** [Makefile:129: ../DREAM_GAME] Error 1
    gmake: *** Waiting for unfinished jobs....
    //usr/lib/libIL.a(il_png.o): In function `iIsValidPng':
    il_png.c:(.text+0x143): undefined reference to `png_check_sig'
    //usr/lib/libIL.a(il_png.o): In function `readpng_get_image':
    il_png.c:(.text+0x5a3): undefined reference to `png_set_gray_1_2_4_to_8'
    collect2: error: ld returned 1 exit status
    gmake: *** [Makefile:125: ../DREAM_GAME_ORJINAL] Error 1


    EDIT: makefile edit no problem

    thanx

  4. Hello

    the item I put in the warehouse is disappearing help please

    channel1 sysrrer

    SYSERR: Jun 18 00:45:32.408295 :: pid_init: 
    Start of pid: 2132
    
    SYSERR: Jun 18 00:46:05.264833 :: ChildLoop: AsyncSQL: query failed: Incorrect integer value: 'Y' for column 'is_gm' at row 1 (query: INSERT INTO loginlog2(type, is_gm, login_time, channel, account_id, pid, ip, client_version) VALUES('INVALID', 'Y', NOW(), 1, 7695, 7022, inet_aton('192.168.1.101'), '') errno: 1366)
    SYSERR: Jun 18 00:46:41.825895 :: ChildLoop: AsyncSQL: query failed: Incorrect string value: '\xFEi K\xFDl...' for column 'hint' at row 1 (query: INSERT DELAYED INTO log (type, time, who, x, y, what, how, hint, ip, vnum) VALUES('ITEM', NOW(), 7022, 953612, 260980, 10004681, 'SAFEBOX PUT', 'Hortlak Dişi Kılıcı+9 1', '192.168.1.101', 159) errno: 1366)

    db sysrrer

    SYSERR: Jun 18 00:45:28.140164 :: pid_init: 
    Start of pid: 2120
    
    SYSERR: Jun 18 00:46:41.925636 :: ChildLoop: AsyncSQL: query failed: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 (query: REPLACE INTO item  (id, owner_id, window, pos, count, vnum, bind, transmutation, socket0, socket1, socket2, socket3, socket4, socket5,attrtype0, attrvalue0,attrtype1, attrvalue1,attrtype2, attrvalue2,attrtype3, attrvalue3,attrtype4, attrvalue4,attrtype5, attrvalue5,attrtype6, attrvalue6,applytype0, applyvalue0,applytype1, applyvalue1,applytype2, applyvalue2,applytype3, applyvalue3,applytype4, applyvalue4,applytype5, applyvalue5,applytype6, applyvalue6,applytype7, applyvalue7)VALUES(10004681, 7695, 3, 0, 1, 159, 0, 0, 1, 1, 1, 1, 1, 1 errno: 1064)
    Can not write to the item table
     edit: Problem solved Thank you
×
×
  • 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.