Ask Mootie - Question & Answer Thread

Hello Mootie, Can u explain me how to make a Flyff GM Account , Trust me ive tried the Guides and videos on Youtube and i google it few times but it not working :S

Mootie - Ask Mootie - Question & Answer Thread - RaGEZONE Forums


 
Mootie, I just compiled the source and my client is running at 100% CPU. Is there any way to bring it down? To optimize it and use much less CPU as possible. I know its a common problem and there are fixes for it.

Thanks
 
Last edited:
Mootie, I just compiled the source and my client is running at 100% CPU. Is there any way to bring it down? To optimize it and use much less CPU as possible. I know its a common problem and there are fixes for it.

Thanks

100% of what? In general, CPU usage rates aren't very accurate for profiling. Go attach visual studio or intel profiler and check the clocks of each function to figure out what is causing the issue. Although, if you have a single core CPU... Flyff usually maxes out that. So might just be an issue with Flyff. Officials have decreased their CPU usage significantly, but it's still quite high relative to other games.

There are some methods to reduce CPU usage that I know of, but none will resolve the issue completely. Also, I'm not willing to disclose these methods, seeing as they'll likely just get leaked and released here as all of my work does eventually. Not that I have anything against legitimate developers knowing my methods, but the issue is a legitimate developer wouldn't NEED me to tell them.


This is startup speed only. Also, it has adverse effects on gameplay, considering this method forces maps to load when user presses M key.
 
hey mootie this is source related problem, hope its big enough to get an answer :p, I've tried to enable the STEAL command to allow everyone to pick up even tho only one player killed the monster itself, and for some reason it wouldn't do the job, it keeps telling that it belongs to the player that killed the monster, is there a way to remove it completely or reduce the amount of time it takes till other players can pick up the items? I've searched all over the source and found things I cannot understand by myself with my c++ knowledge.. much appreciated, thanks!
 
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:
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:
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:
@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.
 
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
 
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:
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,
 
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.


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

I don't know what you mean by "increase usage of source". Clarify.


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

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.


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...
 
Nvm for the source increase or some like that..

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

from:
9u6fZx2 - Ask Mootie - Question & Answer Thread - RaGEZONE Forums


To:
Mootie - Ask Mootie - Question & Answer Thread - RaGEZONE Forums


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

Please Response...Thanks ^_____^
 
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.
 
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.
 
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.
 
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 !!
 
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:
CWndBase* pWndBase = g_WndMng.GetWndBase( APP_SELECT_SERVER );
	if( pWndBase )
		((CWndSelectServer*)pWndBase)->Connected();

From what i understand here is when the server is sellected it will continue from here on.
 
Back