Ehi guys I'm new here, I hope that you understand the english, I have a problem with my rage scripts, in short words when the mob is in rage stance, end get a hit with a weapon, o try to hit me, the rage stance disappear.. here the script, you can use if you want!
[EVENTS e_NPCAI_Rage] ON=@HitTry if <tag0.InRage> if (<hits> >= <eval (<str> * 3) / 7>) || (<serv.time> >= <eval <tag0.LastTimeRage> + 500>) //Will rage if the NPC didn't rage in the last 5 seconds tag.InRage color = <tag0.OriginalColor> dex = <tag0.OriginalDex> str = <tag0.OriginalStr> tag.LastTimeRage = <serv.time> endif return 0 endif if <serv.time> >= <eval <tag0.LastTimeRage> + 500> //Will rage if the NPC didn't rage in the last 5 seconds f_TryRage endif
ON=@GetHit if <tag0.InRage> if (<hits> >= <eval (<str> * 3) / 7>) || (<serv.time> >= <eval <tag0.LastTimeRage> + 500>) //Will rage if the NPC didn't rage in the last 5 seconds tag.InRage color = <tag0.OriginalColor> dex = <tag0.OriginalDex> str = <tag0.OriginalStr> tag.LastTimeRage = <serv.time> endif return 0 endif if <serv.time> >= <eval <tag0.LastTimeRage> + 500> //Will rage if the NPC didn't rage in the last 5 seconds f_TryRage endif
[FUNCTION f_TryRage] if ((<color> == 098d) || (<eval rand(100)> == 1)) return 0 endif tag.OriginalColor = <color> tag.OriginalDex = <dex> tag.OriginalStr = <str> tag.LastTimeRage = <serv.time> tag.InRage = 1 color = 098d dex = <eval <dex> * 3> str = <eval <str> * 2> sayua 020,6,6,0 *Berseker* sound 427 timerf 20,f_RemoveRage //Will remove the rage if gets healed or after 6 seconds
[FUNCTION f_RemoveRage] if <tag0.InRage> tag.InRage color = <tag0.OriginalColor> dex = <tag0.OriginalDex> str = <tag0.OriginalStr> tag.LastTimeRage = <serv.time> sayua 020,6,6,0 *Breathless* endif
I use sphere 56b pre-release 2013
|