diff options
Diffstat (limited to 'npc/018-5-0/core.txt')
-rw-r--r-- | npc/018-5-0/core.txt | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/npc/018-5-0/core.txt b/npc/018-5-0/core.txt new file mode 100644 index 000000000..38bef9df1 --- /dev/null +++ b/npc/018-5-0/core.txt @@ -0,0 +1,28 @@ +// TMW-2 Script +// Author: +// Jesusalva +// Description: +// Controls the swimming minigame. Basically, you lose 1% HP if lack total status. + +018-5-0,0,0,0 script #01850SwimmingCtrl NPC_HIDDEN,{ + end; + +OnLoop: + if (getmap() != "018-5-0") + end; + if (ispcdead()) + end; + // Sum everything - you can have 70 str instead of splitting in 35 str and 35 vit + .@status=readparam(bStr)+readparam(bVit); + .@reqst=.reqstr+.reqvit; + debugmes "Got %d/%d (%d), heal %d", .@status,.@reqst,.@status-.@reqst,min(0, .@status-.@reqst); + //percentheal min(0, .@status-.@reqst), 0; + heal (min(0, .@status-.@reqst)*3), 0; + addtimer(3000, "#01850SwimmingCtrl::OnLoop"); + end; + +OnInit: + .reqstr=35; + .reqvit=35; + end; +} |