...RUN SCRIPT...
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
29
30
31
32
33
34
35
36
37
38
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
29
30
31
32
33
34
35
36
37
38
on:keyhit02 { if ($s2g_runpressed==1) {skip;} if ($s2g_stamina>1000) { $s2g_runpressed=1; $s2g_player_speed=($s2g_player_speed*2.0); player_speed $s2g_player_speed; timer 0,1000,0,"weaken"; freetimers 0,"runrecover"; // msg "$s2g_player_speed"; } } on:keyrelease02 { if ($s2g_runpressed==0) {skip;} $s2g_runpressed=0; freetimers 0,"weaken"; timer 0,1000,0,"runrecover"; $s2g_player_speed=($s2g_player_speed*0.5); player_speed $s2g_player_speed; // msg "$s2g_player_speed"; } on:runrecover { $s2g_stamina+=500; // msg "$s2g_stamina"; if ($s2g_stamina>=5000) {freetimers 0,"runrecover";} } on:weaken { // msg "$s2g_stamina"; $s2g_stamina-=1000; $tmp1=(storage("unit",1,1)*-1.0); $tmp2=(storage("unit",1,2)*1.0); $tmp3=($tmp1/$tmp2); if ($tmp>0.8) {$s2g_stamina-=1000;} freevar $tmp1,$tmp2,$tmp3; if ($s2g_stamina<=0) {event "keyrelease02","global";} }
Help me if u can help
tell me if u have other script
Thank you
Ps 1 : This code is from "stranded 2 Extension Mod"
Ps 2 : I'm not good at English.