Jump to content

Home

Script needed: Attack then dialog when attacker is at 10hp or so


randydg

Recommended Posts

Script needed: Attack then dialog when attacker is at 10hp or so

 

I've searched everywhere and I know there was one in scripts but I cant find it anywhere. This would be on the creatures what? on user defined ?

 

 

[Edit: I think i found it- I will try it and see if it works]

void main() {
int nCurHP = GetCurrentHitPoints(OBJECT_SELF);
int nMaxHP = GetMaxHitPoints(OBJECT_SELF);
int int7 = (nCurHP / nMaxHP);

if ((nCurHP < 50)) {
SetCommandable(1, OBJECT_SELF);
ClearAllEffects();
ClearAllActions();
SurrenderToEnemies();
CancelCombat(OBJECT_SELF);
AssignCommand(GetFirstPC(), ClearAllActions());
DelayCommand(0.2, ActionStartConversation(GetFirstPC(), "fightwon", 0, 0, 0, "", "", "", "", "", "", 0, 0xFFFFFFFF, 0xFFFFFFFF, 0));
}}

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...