Jump to content

ScreamMyName

Inactive Member
  • Posts

    184
  • Joined

  • Last visited

  • Feedback

    0%

Posts posted by ScreamMyName

  1. 5 hours ago, xP3NG3Rx said:

    I think not lucky to call the Interface class from interfaceModule.py more than once because of the __init__ function.

    Try to bind the self to the gameoptiondialog.
    objectDlg.BindInterface(self) like for whisper or inventory or dragonsoul etc.

    You mean something like this ?            dlgInterface.BindInterface(self)

    1114 22:00:33582 :: global name 'dlgInterface' is not defined

  2. Hello I'm trying to do some work on uigameoption.py

    Let's say i have something like this

        def __OnClickHudOff(self):
            if constInfo.HUD == 1:
                constInfo.HUD = 0
                self.interface = interfaceModule.Interface()
                self.interface.HideAllQuestButton()
                chat.AppendChat(chat.CHAT_TYPE_INFO, "test")    
                self.setHud[0].SetUp()
                self.setHud[1].Down()

    So it's basically the same thing as in game.py   def __PressQKey(self): and it works

    but when i try to do it in uigameoption.py it doesn't work..in syserr i got 

    1114 14:44:24782 :: Traceback (most recent call last):

    1114 14:44:24782 ::   File "ui.py", line 1016, in CallEvent

    1114 14:44:24783 ::   File "ui.py", line 87, in __call__

    1114 14:44:24783 ::   File "ui.py", line 69, in __call__

    1114 14:44:24784 ::   File "uiGameOption.py", line 323, in __OnClickHudOff

    1114 14:44:24784 ::   File "interfaceModule.py", line 1225, in HideAllQuestButton

    1114 14:44:24784 :: AttributeError
    1114 14:44:24784 :: : 
    1114 14:44:24784 :: 'Interface' object has no attribute 'questButtonList'
    1114 14:44:24784 :: 

    So then I add in interfacemodule.py

    self.questButtonList = None
    

    Then I get an error 

    1114 14:49:24710 :: Traceback (most recent call last):
    
    1114 14:49:24710 ::   File "ui.py", line 1016, in CallEvent
    
    1114 14:49:24710 ::   File "ui.py", line 87, in __call__
    
    1114 14:49:24711 ::   File "ui.py", line 69, in __call__
    
    1114 14:49:24711 ::   File "uiGameOption.py", line 323, in __OnClickHudOff
    
    1114 14:49:24711 ::   File "interfaceModule.py", line 1226, in HideAllQuestButton
    
    1114 14:49:24712 :: TypeError
    1114 14:49:24712 :: : 
    1114 14:49:24712 :: 'NoneType' object is not iterable

     

    Which I have no idea what it means.. so can anyone help? What am I doing wrong :<?

  3. The simplest way is to do it via quest... just change when id.use to  when id.use with pc.get_map_index != map index.

    or when id.use with pc.get_map_index == map index

    chat("You can't use it here")

     

    if you want to do it in source go to horse.cpp

    and add

        if (GetMapIndex() == 110 || GetMapIndex() == 111 || GetMapIndex() == 113)
        {
            ChatPacket(CHAT_TYPE_INFO, "You can't use horse in guild Arena.");
            return false;

        }

     simple as that.

  4. so first time if you have a unknow header:97 last 75,75(per exemple) you have 3.4 five filles to verify:

    -packet.h from client.Just ctrl+f and search 97 value..if dont aprea its not a problem

    -search in game source in common/tables.h and again search value 97  here you have more change to find this value and see where you have an mistake.In my case 97 is:

    	HEADER_DG_GUILD_WAR			= 97,

    so till now i have an clue named guid_war...ok lets find the problem and i search in same fille:

    typedef struct SPacketGuildWar

    and we will see that:

    typedef struct SPacketGuildWar
    {
    	BYTE	bType;
    	BYTE	bWar;
    	DWORD	dwGuildFrom;
    	DWORD	dwGuildTo;
    	long	lWarPrice;
    	long	lInitialScore;
    } TPacketGuildWar;

    now we have to pay atention on entire insctruction!Must be the same with that from client source!

    But you can fint that in packet.h from client source.

    and if  i search i find this:

    typedef struct packet_guild_war
    {
        DWORD       dwGuildSelf;
        DWORD       dwGuildOpp;
        BYTE        bType;
        BYTE        bWarState;
    } TPacketGCGuildWar;
    typedef struct packet_guild_war
    {
        DWORD       dwGuildSelf;
        DWORD       dwGuildOpp;
        BYTE        bType;
        BYTE        bWarState;
    } TPacketGCGuildWar;
    
    typedef struct SPacketGuildWarPoint
    {
        DWORD dwGainGuildID;
        DWORD dwOpponentGuildID;
        long lPoint;
    } TPacketGuildWarPoint;

    we must compare all the types of function from each fille to be the same.I see that BYTE bType is the same that i will not have an error with header...But where i can find other function like 

    DWORD       dwGuildOpp;

    to identify them?

    Now search in client source in userinterface/pythonguild to verify if the function are the same.

     

     

    Another trick to find where you have the error and where you have modified use winmerge(this if you have a unmodifier source of your client)

     

    I hope it will help you!And sorry for my english.

    so first time if you have a unknow header:97 last 75,75(per exemple) you have 3.4 five filles to verify:

    -packet.h from client.Just ctrl+f and search 97 value..if dont aprea its not a problem

    -search in game source in common/tables.h and again search value 97  here you have more change to find this value and see where you have an mistake.In my case 97 is:

    	HEADER_DG_GUILD_WAR			= 97,

    so till now i have an clue named guid_war...ok lets find the problem and i search in same fille:

    typedef struct SPacketGuildWar

    and we will see that:

    typedef struct SPacketGuildWar
    {
    	BYTE	bType;
    	BYTE	bWar;
    	DWORD	dwGuildFrom;
    	DWORD	dwGuildTo;
    	long	lWarPrice;
    	long	lInitialScore;
    } TPacketGuildWar;

    now we have to pay atention on entire insctruction!Must be the same with that from client source!

    But you can fint that in packet.h from client source.

    and if  i search i find this:

    typedef struct packet_guild_war
    {
        DWORD       dwGuildSelf;
        DWORD       dwGuildOpp;
        BYTE        bType;
        BYTE        bWarState;
    } TPacketGCGuildWar;
    typedef struct packet_guild_war
    {
        DWORD       dwGuildSelf;
        DWORD       dwGuildOpp;
        BYTE        bType;
        BYTE        bWarState;
    } TPacketGCGuildWar;
    
    typedef struct SPacketGuildWarPoint
    {
        DWORD dwGainGuildID;
        DWORD dwOpponentGuildID;
        long lPoint;
    } TPacketGuildWarPoint;

    we must compare all the types of function from each fille to be the same.I see that BYTE bType is the same that i will not have an error with header...But where i can find other function like 

    DWORD       dwGuildOpp;

    to identify them?

    Now search in client source in userinterface/pythonguild to verify if the function are the same.

     

     

    Another trick to find where you have the error and where you have modified use winmerge(this if you have a unmodifier source of your client)

     

    I hope it will help you!And sorry for my english.

    This won't always work. For example I have

    Unknown packet header: 235, last: 251 250

    and there is no packet 235 in source.

     

     

  5. open "char_battle.cpp" from game folder in server source and search for

    void CHARACTER::UseArrow(LPITEM pkArrow, DWORD dwArrowCount)

    it'll be like this

    void CHARACTER::UseArrow(LPITEM pkArrow, DWORD dwArrowCount)
    {
        int iCount = pkArrow->GetCount();
        DWORD dwVnum = pkArrow->GetVnum();
        iCount = iCount - MIN(iCount, dwArrowCount);
        pkArrow->SetCount(iCount);
    
        if (iCount == 0)
        {
            LPITEM pkNewArrow = FindSpecifyItem(dwVnum);
    
            sys_log(0, "UseArrow : FindSpecifyItem %u %p", dwVnum, get_pointer(pkNewArrow));
    
            if (pkNewArrow)
                EquipItem(pkNewArrow);
        }
    }

    make it look like this

    void CHARACTER::UseArrow(LPITEM pkArrow, DWORD dwArrowCount)
    {
        int iCount = pkArrow->GetCount();
        DWORD dwVnum = pkArrow->GetVnum();
        if (iCount == 0)
        {
            LPITEM pkNewArrow = FindSpecifyItem(dwVnum);
    
            sys_log(0, "UseArrow : FindSpecifyItem %u %p", dwVnum, get_pointer(pkNewArrow));
    
            if (pkNewArrow)
                EquipItem(pkNewArrow);
        }
    }

     

    btw this :

        if (iCount == 0)
        {
            LPITEM pkNewArrow = FindSpecifyItem(dwVnum);
    
            sys_log(0, "UseArrow : FindSpecifyItem %u %p", dwVnum, get_pointer(pkNewArrow));
    
            if (pkNewArrow)
                EquipItem(pkNewArrow);
        }

    is basicly mmmmmmm useless

    yeah it/s useless but this is not useless

    if (pkNewArrow)
                EquipItem(pkNewArrow);

    it'll attach new group of arrows when the first count to 0 :) so it can be written like this

    void CHARACTER::UseArrow(LPITEM pkArrow, DWORD dwArrowCount)
    {
        int iCount = pkArrow->GetCount();
        DWORD dwVnum = pkArrow->GetVnum();
        LPITEM pkNewArrow = FindSpecifyItem(dwVnum);
        if (iCount == 0)
            if (pkNewArrow)
                EquipItem(pkNewArrow);
    }

     

    It is useless if you have a infinite arrow it will never end therefore you won't need EquipItem(pkNewArrow) because you will always have one.

  6. You people.. when they don't add anything new everyone is like "OH NO GLOBAL SERVER ARE DYING NO NEW STUFF BRB CRYING" and when they add something new everyone is like "WTF THIS AINT WOW GUYS".

    I really like 15.5 update especially new stones and bonus changer thingy+ .

×
×
  • 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.