AIP_REWD_014
- // Start attack. Run and attack FindChar but only if it is still in range
- AIP_REWD_014
- CCharacter* target = GServer->GetClientByID ( entity->findChar, entity->Position->Map ) //get Target (findChar)
- if ( target == NULL ) //Doesn't exist so return
- return AI_SUCCESS
- uint32 iDistance //Byte 0
- uint32 iDist = ( int ) Rose::Math::Distance ( target->Position->current, entity->Position->current ) //Calculate distance to target
- if ( iDist > iDistance ) //Too far away. return success
- return AI_SUCCESS
- entity->thisnpc->stance = 1 //Set stance to run
- if ( !entity->Status->isTaunted) // NOT Taunted, so we are free to change the target
- entity->CurrentAction->targetID = target->clientid
- entity->StartAction( target ) //Start the attack
- else //Guess i was taunted by somebody else so i can't attack findChar
- return AI_SUCCESS
- return AI_SUCCESS
Another attack starter.
Exactly the same as 13 except for one small difference.
This time we have to be within a specified range of the target before the attack can be started.
In the SHO server it's a little bit more complex since it uses a dynamic finder routine rather than the saved version of findChar
Effectively it runs and attack the first available enemy within the specified distance then checks stuff like taunt and if any check fails then it iterates the whole process and moves on to the next enemy.
I have not got around to fixing this function fully yet but I will at some point. For now my code just uses the saved findChar value
Need to lookup information on NARose items, skills, quests?
Now featuring a newly completed skill tree for all classesFormatting fixed for different resolutions"A Gazelle is nothing but a giraffe plotted logarithmicaly"