Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

need help with awakening window / pickup speed

Status
Not open for further replies.
Newbie Spellweaver
Joined
Apr 9, 2021
Messages
31
Reaction score
3
Hello, Thank you all for the guides/advice that you offer to everyone. ????????

I use K18 on VS22 and Sql 2019.

I come in my turn to ask you for help for 2 things.

1- Could someone guide me on a tutorial to install a wake-up window or even the /awake command.
2. If you can tell me in which file is the argument to accelerate the speed of movement of pet pickup.

Thank you all! All the best!

Sorry for my English ????
 
Junior Spellweaver
Joined
Mar 24, 2021
Messages
149
Reaction score
25
Hello, Thank you all for the guides/advice that you offer to everyone. ????????

I use K18 on VS22 and Sql 2019.

I come in my turn to ask you for help for 2 things.

1- Could someone guide me on a tutorial to install a wake-up window or even the /awake command.
2. If you can tell me in which file is the argument to accelerate the speed of movement of pet pickup.

Thank you all! All the best!

Sorry for my English ????



I think this is what you looking for:


Functextcmd.cpp
Code:
BOOL TextCmd_GenRandomOption( CScanner & s )
{
#ifdef __WORLDSERVER 
    CUser* pUser = (CUser*)s.dwValue;
    CItemElem* pItemElem    = pUser->m_Inventory.GetAt( 0 );
    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( "Please deactivate your Pet/s." );
			}
			else
			{	
			if( pUser->GetGold() >= 300000 ){
					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( -300000 );
				}
				else
				{
					pUser->AddText( "You must have 300.000 Penya to awake something." );
				 }
		     }

		}
		else
		{
			pUser->AddText ( "You have to put the item in first slot to awake it." );
		}
	}
	
	
	
	
	
	
	
	
	
	
Add this below BEGINE_TEXTCMDFUNC_MAP:

	ON_TEXTCMDFUNC( TextCmd_GenRandomOption,		"Awake",	"awake",	"각성축복", "각축",	TCM_BOTH,	AUTH_GENERAL, "" )





And for your pet speed:
open the ProjectCmn.cpp and look for this:
Code:
BOOL CProject::LoadPropMover( LPCTSTR lpszFileName )

In this function we now go down until we see the following:
Code:
pProperty->fSpeed            = scanner.GetFloat();

The speed of the movers is generally defined here, now we want to change this specifically for pets, so it has to be a query, we do it best in this form and add it:
Code:
pProperty->fSpeed = pProperty->dwAI == AII_PET ? scanner.GetFloat() * 1.85f : scanner.GetFloat();

AII_PET is used to check whether it is a mover type pet and if so, the value that is there is multiplied by 1.85, ie. the pet is thus 85% faster than before.


That's it. This little guide can also be applied to other things.

Credits: Sedrika
 
Upvote 0
Status
Not open for further replies.
Back
Top