Page 1 of 1

Skill Vanish

Posted: Fri Aug 21, 2009 9:51 am
by master121
I want to use the rogue skill Vanish.
But after the bot uses that skill he attacks again instead of resting...
So how can i make the bot resting after using that skill ?

Re: Skill Vanish

Posted: Fri Aug 21, 2009 11:39 am
by d003232
master121 wrote:I want to use the rogue skill Vanish.
But after the bot uses that skill he attacks again instead of resting...
So how can i make the bot resting after using that skill ?
I don't understand, what's the purpose of using that skill? What do you want to do?

Re: Skill Vanish

Posted: Fri Aug 21, 2009 12:20 pm
by Administrator
master121 wrote:I want to use the rogue skill Vanish.
But after the bot uses that skill he attacks again instead of resting...
So how can i make the bot resting after using that skill ?

Yes, what do you want to do? There are two things you could do, though:
1) When hurt and in combat, break combat, vanish, then rest.
2) When out of combat and vanish is cooled down, vanish and rest.

Depending on how you want to use vanish, you will set it up two different ways. However, to rest after vanish, you can use a skill hook:

Code: Select all

<onSkillCast>
  if( arg1.Name == "ROGUE_VANISH" ) then
    player:sleep();
  end
</onSkillCast>
This will make your character wait for HP/MP to regenerate and fight any monsters that attack you first whenever you cast vanish.

Re: Skill Vanish

Posted: Sat Aug 22, 2009 1:37 am
by master121
thats what i need but where should i put that ?

Edit : I found it :P

Re: Skill Vanish

Posted: Sat Aug 22, 2009 1:42 am
by d003232
master121 wrote:thats what i need but where should i put that ?

Edit : I found it :P
Do you want to sleep or to rest? Depending from that, there are different functions. See here.