1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
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;
}
|