Ask Mootie - Question & Answer Thread

Page 8 of 10 FirstFirst 12345678910 LastLast
Results 106 to 120 of 146
  1. #106
    Apprentice MisterNiceGuy is offline
    MemberRank
    Oct 2012 Join Date
    20Posts

    Re: Ask Mootie - Question & Answer Thread

    Hey there Mootie, I've got a code which allow everyone to use /awaken command and I need to complete the code so it will stop people from using that command(function) during trades/mail/shops as it might cause scams/exploits (IMO) this is the code:

    BOOL TextCmd_GenRandomOption( CScanner & s )
    {
    #ifdef __WORLDSERVER
    CUser* pUser = (CUser*)s.dwValue;
    #ifndef __TAB_INVENTORY
    CItemElem* pItemElem = pUser->m_Inventory.GetAt( 0 );
    #else
    DWORD dwObjId = s.GetNumber();
    CItemElem* pItemElem = pUser->m_Inventory.GetAtId( dwObjId );
    #endif // __TAB_INVENTORY
    if( pItemElem ){
    int nRandomOptionKind = g_xRandomOptionProperty->GetRandomOptionKind( pItemElem );
    if( nRandomOptionKind >= 0 ){
    if(pUser->HasActivatedSystemPet() && pItemElem->GetProp()->dwItemKind3 == IK3_EGG || pUser->HasActivatedEatPet() && pItemElem->GetProp()->dwItemKind3 == IK3_PET ){
    pUser->AddText( "Put your pet back into your inventory." );
    }else{
    if( pUser->GetGold() >= 1 ){
    g_xRandomOptionProperty->InitializeRandomOption( pItemElem->GetRandomOptItemIdPtr() );
    g_xRandomOptionProperty->GenRandomOption( pItemElem->GetRandomOptItemIdPtr(), nRandomOptionKind, pItemElem->GetProp()->dwParts );
    pUser->UpdateItemEx( (BYTE)( pItemElem->m_dwObjId ), UI_RANDOMOPTITEMID, pItemElem->GetRandomOptItemId() );
    pUser->AddGold( 0 );
    //pUser->AddText( "Dir wurden 100.000 Penya für das Erwecken abgezogen." );
    }else{
    pUser->AddText( "You need to have at least 1 Penya in order to awaken this item." );
    }
    }
    }else{
    pUser->AddText ( "Either your pet is not level C or your item doesn't fit the awaken scroll meetings." );
    }
    }
    #endif // __WORLDSERVER
    #if defined(__CLIENT) && defined ( __TAB_INVENTORY)
    if( g_WndMng.m_pWndUpgradeBase == NULL )
    {
    SAFE_DELETE( g_WndMng.m_pWndUpgradeBase );
    g_WndMng.m_pWndUpgradeBase = new CWndUpgradeBase;
    g_WndMng.m_pWndUpgradeBase->Initialize( &g_WndMng, APP_TEST );
    return FALSE;
    }

    if( g_WndMng.m_pWndUpgradeBase )
    {
    if( g_WndMng.m_pWndUpgradeBase->m_pItemElem[0] )
    {
    DWORD dwObjId = g_WndMng.m_pWndUpgradeBase->m_pItemElem[0]->m_dwObjId;
    char szSkillLevel[MAX_PATH];
    sprintf( szSkillLevel, "/awaken %d", dwObjId);
    s.SetProg( szSkillLevel );
    }
    else
    {
    return FALSE;
    }
    }
    else
    {
    return FALSE;
    }
    #endif // __TAB_INVENTORY
    return TRUE;
    }


    what I do (think) I realize by myself is that this states whether it should allow to awaken or not:

    if(pUser->HasActivatedSystemPet() && pItemElem->GetProp()->dwItemKind3 == IK3_EGG || pUser->HasActivatedEatPet() && pItemElem->GetProp()->dwItemKind3 == IK3_PET ){
    pUser->AddText( "Put your pet back into your inventory." );
    if so, idk what I should put in to block it from trades/shops/mails but might be something like HasactivatedTrade / HasActivatedShop / HasActivatedMail


    please know that you're not only helping me to fix it but you're also helping me to increase my general knowledge in this kind of stuff, so any reply is very appreciated, thanks!



    EDIT:
    got into this situation:
    CWndShop* pWndShop = (CWndShop*)g_WndMng.GetWndBase( APP_SHOP_ );
    if( pWndShop )
    pWndShop->Destroy();

    CWndTrade* pWndTrade = (CWndTrade*)g_WndMng.GetWndBase( APP_TRADE );
    if( pWndTrade )
    pWndTrade->Destroy();
    or this

    BOOL TextCmd_GenRandomOption( CScanner & s )
    {
    #ifdef __WORLDSERVER
    CUser* pUser = (CUser*)s.dwValue;
    #ifndef __TAB_INVENTORY
    CItemElem* pItemElem = pUser->m_Inventory.GetAt( 0 );
    #else
    DWORD dwObjId = s.GetNumber();
    CItemElem* pItemElem = pUser->m_Inventory.GetAtId( dwObjId );
    #endif // __TAB_INVENTORY
    if( pItemElem ){
    int nRandomOptionKind = g_xRandomOptionProperty->GetRandomOptionKind( pItemElem );
    if( nRandomOptionKind >= 0 ){



    CWndShop* pWndShop = (CWndShop*)g_WndMng.GetWndBase( APP_SHOP_ );
    if( pWndShop )
    pWndShop->Destroy();

    CWndTrade* pWndTrade = (CWndTrade*)g_WndMng.GetWndBase( APP_TRADE );
    if( pWndTrade )
    pWndTrade->Destroy();

    CWndConfirmTrade* pWndConfirmTrade = (CWndConfirmTrade*)g_WndMng.GetApplet( APP_CONFIRM_TRADE );
    if( pWndConfirmTrade )
    pWndConfirmTrade->Destroy();

    CWndTradeConfirm* pWndTradeConfirm = (CWndTradeConfirm*)g_WndMng.GetWndBase( APP_TRADE_CONFIRM );
    if( pWndTradeConfirm )
    pWndTradeConfirm->Destroy();

    SAFE_DELETE( g_WndMng.m_pWndTradeGold );

    g_pPlayer->OnTradeRemoveUser();
    g_pPlayer->m_vtInfo.SetOther( NULL );







    if(pUser->HasActivatedSystemPet() && pItemElem->GetProp()->dwItemKind3 == IK3_EGG || pUser->HasActivatedEatPet() && pItemElem->GetProp()->dwItemKind3 == IK3_PET )
    {
    pUser->AddText( "Deactivate your pet." );
    }

    else
    {
    if( pUser->GetGold() >= 1 )
    {
    g_xRandomOptionProperty->InitializeRandomOption( pItemElem->GetRandomOptItemIdPtr() );
    g_xRandomOptionProperty->GenRandomOption( pItemElem->GetRandomOptItemIdPtr(), nRandomOptionKind, pItemElem->GetProp()->dwParts );
    pUser->UpdateItemEx( (BYTE)( pItemElem->m_dwObjId ), UI_RANDOMOPTITEMID, pItemElem->GetRandomOptItemId() );
    pUser->AddGold( 0 );
    //pUser->AddText( "Dir wurden 100.000 Penya für das Erwecken abgezogen." );
    }
    else
    {
    pUser->AddText( "You need to have at least 1 Penya in order to awaken this item." );
    }
    }
    }else{
    pUser->AddText ( "Either your pet is not level C or your item doesn't suit the requirments of the scroll." );
    }
    }
    #endif // __WORLDSERVER



    it doesn't work tho...
    Last edited by MisterNiceGuy; 19-05-13 at 07:25 PM.

  2. #107
    Proficient Member jayjei14 is offline
    MemberRank
    Dec 2011 Join Date
    150Posts

    Re: Ask Mootie - Question & Answer Thread

    any file i use if when i logout my neuz wont go to login page...


    no problem about DELETE APP_*** or something... the one i do is to logout
    then not responding... :( i change my database and that thing happen...

    error log:
    Spoiler:

    2013/ 5/19 18:31:01 oh my god... AIL_open_stream error

    2013/ 5/19 18:32:38 g_pPlayer is ready

    2013/ 5/19 18:34:39 May 19 2013 18:22:42 1 rCnt=1

    Neuz.exe caused an EXCEPTION_ACCESS_VIOLATION in module mssogg.asi at 001B:024A836D

    - Registers

    EAX=06A0B160 EBX=FFFFFFFF ECX=00000000 EDX=00000000 ESI=001FBB60
    EDI=001FBAA0 EBP=00000000 ESP=0012DBA4 EIP=024A836D FLG=00010213
    CS=001B DS=0023 SS=0023 ES=0023 FS=003B GS=0000

    (null)
    Last edited by jayjei14; 19-05-13 at 02:48 PM.

  3. #108
    Not working on UnitedFlyf Mootie is offline
    MemberRank
    Apr 2009 Join Date
    1,589Posts

    Re: Ask Mootie - Question & Answer Thread

    @jayjei

    I thought I made this clear about no troubleshooting...

    @MisterNiceGuy

    Just call "CMover::IsUsing(CItemElem* pItemElem)" and "IsUsingItem(CItemBase* pItem)". If both return false, you're good to go... Any exploit that can be done using mail/trade/shop/bank would require an additional exploit, which wouldn't require use of that command most likely.

    @powerdice

    Very basic question. It's pretty obvious where you would be able to disable loot owner checks.

  4. #109
    Proficient Member TheAnkou is offline
    MemberRank
    Nov 2012 Join Date
    167Posts

    Re: Ask Mootie - Question & Answer Thread

    Mootie, how can i see long time ago you help Jcdacez with pikachu bones animation "PM me sometime on MSN so I can explain how to do this with cola."

    Can you teach me too? (2)

  5. #110
    Proficient Member jayjei14 is offline
    MemberRank
    Dec 2011 Join Date
    150Posts

    Re: Ask Mootie - Question & Answer Thread

    Is there a way on how to increase usage of source?

  6. #111
    Apprentice powerdice is offline
    MemberRank
    Oct 2012 Join Date
    7Posts

    Re: Ask Mootie - Question & Answer Thread

    Oh, that's bad because I don't know ):.. could you tell me if its either in source or resource at least please? would appreciate that

  7. #112
    Apprentice MisterNiceGuy is offline
    MemberRank
    Oct 2012 Join Date
    20Posts

    Re: Ask Mootie - Question & Answer Thread

    Thanks Ill try to work this out..

    guess this wouldn't work well lol...


    CMover::IsUsing( CItemElem* pItemElem );
    {
    if( IsUsingItem( (CItemBase*) pItemElem ) )
    {
    return FALSE;
    }
    }

    C:\Patch\Official Source\_Interface\FuncTextCmd.cpp(705): error C2275: 'CItemElem' : illegal use of this type as an expression
    why wouldn't c++ understand me...
    DAMN C++...[damn me]
    Last edited by MisterNiceGuy; 21-05-13 at 10:39 AM.

  8. #113
    Owner raventh1984 is offline
    MemberRank
    May 2011 Join Date
    NetherlandsLocation
    1,499Posts

    Re: Ask Mootie - Question & Answer Thread

    Dear Mootie,

    I dont know if you will help me with this but i will try,

    I managed to get the second cluster now up and running.
    However i need some advice and or tip on how to do this.

    on the first (High) cluster i have an spec_item with different stats for weapons etc.
    On the second (Low) Cluster i want to lower those stats otherwise its still is an high rate.

    However when an player loads the client then it will only load 1 spec_item for both clusters.

    Is there an way that i can do this for example.

    Let the neuz check if you are on Cluster 1 if it is load spec_Item_High if player logs on into cluster 2 load spec_item_low.

    On an different forum someone said that i can do this with an Snapshot?
    However with my basic knowledge i dont have an clue on how to begin with it.

    Could you maybe provide with an sample code on how this works that the Neuz will check on wich cluster an player logs on to?

    With kind regards,

  9. #114
    Not working on UnitedFlyf Mootie is offline
    MemberRank
    Apr 2009 Join Date
    1,589Posts

    Re: Ask Mootie - Question & Answer Thread

    Quote Originally Posted by TheAnkou View Post
    Mootie, how can i see long time ago you help Jcdacez with pikachu bones animation "PM me sometime on MSN so I can explain how to do this with cola."

    Can you teach me too? (2)
    No.


    Quote Originally Posted by jayjei14 View Post
    Is there a way on how to increase usage of source?
    I don't know what you mean by "increase usage of source". Clarify.


    Quote Originally Posted by powerdice View Post
    Oh, that's bad because I don't know ):.. could you tell me if its either in source or resource at least please? would appreciate that
    Quote Originally Posted by MisterNiceGuy View Post
    Thanks Ill try to work this out..

    guess this wouldn't work well lol...






    why wouldn't c++ understand me...
    DAMN C++...[damn me]
    Learn basic C++ syntax before fucking with the source. You clearly don't understand conditionals and function semantics.


    Quote Originally Posted by raventh1984 View Post
    Dear Mootie,

    I dont know if you will help me with this but i will try,

    I managed to get the second cluster now up and running.
    However i need some advice and or tip on how to do this.

    on the first (High) cluster i have an spec_item with different stats for weapons etc.
    On the second (Low) Cluster i want to lower those stats otherwise its still is an high rate.

    However when an player loads the client then it will only load 1 spec_item for both clusters.

    Is there an way that i can do this for example.

    Let the neuz check if you are on Cluster 1 if it is load spec_Item_High if player logs on into cluster 2 load spec_item_low.

    On an different forum someone said that i can do this with an Snapshot?
    However with my basic knowledge i dont have an clue on how to begin with it.

    Could you maybe provide with an sample code on how this works that the Neuz will check on wich cluster an player logs on to?

    With kind regards,
    You could load certain resource files after cluster select rather than when client starts up. This way, you'd be able to load a separate file for the low rate cluster etc...

  10. #115
    Proficient Member jayjei14 is offline
    MemberRank
    Dec 2011 Join Date
    150Posts

    Re: Ask Mootie - Question & Answer Thread

    Nvm for the source increase or some like that..

    but im asking to this..
    how to do v19 npc menu?

    from:


    To:


    I already change the color of font into white.. my problem is i want to make the window like v19..

    Please Response...Thanks ^_____^

  11. #116
    Owner raventh1984 is offline
    MemberRank
    May 2011 Join Date
    NetherlandsLocation
    1,499Posts

    Re: Ask Mootie - Question & Answer Thread

    Quote Originally Posted by Mootie View Post
    You could load certain resource files after cluster select rather than when client starts up. This way, you'd be able to load a separate file for the low rate cluster etc...
    Thanks mootie for the answer, However i am looking in witch file i could do this.

    I think it has to be done in /Common/Project.cpp cause there it loads the Spec_Item.txt

    Now what i dont get is how to check if the player has choosen Cluster1 or Cluster2.

    Could you maybe provide an example?

    if not i understand it.

  12. #117
    ‎‎‎‎ Ketchup is offline
    ModeratorRank
    Jan 2009 Join Date
    New YorkLocation
    2,926Posts

    Re: Ask Mootie - Question & Answer Thread

    Quote Originally Posted by raventh1984 View Post
    Thanks mootie for the answer, However i am looking in witch file i could do this.

    I think it has to be done in /Common/Project.cpp cause there it loads the Spec_Item.txt

    Now what i dont get is how to check if the player has choosen Cluster1 or Cluster2.

    Could you maybe provide an example?

    if not i understand it.
    I would start by looking into "Key" which is in the worldserver.ini and see how it interacts then call the load that way via the source and have it if it uses a certain key to load that file over blah blah. This would only work for the world server, but i could be wrong about the whole thing but this is the direction i would look.

  13. #118
    ~FlyFF DeV~ Jomex is offline
    MemberRank
    Mar 2009 Join Date
    PolandLocation
    588Posts

    Re: Ask Mootie - Question & Answer Thread

    Quote Originally Posted by raventh1984 View Post
    Thanks mootie for the answer, However i am looking in witch file i could do this.

    I think it has to be done in /Common/Project.cpp cause there it loads the Spec_Item.txt

    Now what i dont get is how to check if the player has choosen Cluster1 or Cluster2.

    Could you maybe provide an example?

    if not i understand it.
    You can simply check it in channel selection window by making additional var for example in CProject or CNeuzApp and write to it which cluster was selected and on login it would load files you want to according to the choice.

  14. #119
    Novice truesex is offline
    MemberRank
    Dec 2012 Join Date
    2Posts

    Re: Ask Mootie - Question & Answer Thread

    How to fix the HP Bug??
    I HAVE A PROBLEM WITH THIS HP....

    IT WONT FULLY REGENERATE ..

    EXAMPLE MY ORIGINAL HP is 50389

    But when i look in to my HP its 50388 it wont regenrate event i pots it wont regenerate

    PLEASE HELP !!

  15. #120
    Owner raventh1984 is offline
    MemberRank
    May 2011 Join Date
    NetherlandsLocation
    1,499Posts

    Re: Ask Mootie - Question & Answer Thread

    Quote Originally Posted by Jomex View Post
    You can simply check it in channel selection window by making additional var for example in CProject or CNeuzApp and write to it which cluster was selected and on login it would load files you want to according to the choice.

    Thank you jomex i understand what to do. I only dont have an clue on how to begin. For example what kind of code i must use.
    I have taken an look into APP_SELECT_SERVER and i found this in DPLoginClient.cpp
    PHP Code:
    CWndBasepWndBase g_WndMng.GetWndBaseAPP_SELECT_SERVER );
        if( 
    pWndBase )
            ((
    CWndSelectServer*)pWndBase)->Connected(); 
    From what i understand here is when the server is sellected it will continue from here on.



Advertisement