summaryrefslogtreecommitdiff
path: root/npc/functions
diff options
context:
space:
mode:
Diffstat (limited to 'npc/functions')
-rw-r--r--npc/functions/shake.txt13
1 files changed, 11 insertions, 2 deletions
diff --git a/npc/functions/shake.txt b/npc/functions/shake.txt
index 3a95d36ae..e3e5268c6 100644
--- a/npc/functions/shake.txt
+++ b/npc/functions/shake.txt
@@ -3,7 +3,16 @@
// Shake player screen
// Usage:
// set @max_shake then call OnShake
-// call OnGM
+
+// sshake( {max_shake} )
+function script sshake {
+ @max_shake=abs(getarg(0, rand2(6,10)));
+ for (.@s=0; .@s < @max_shake; .@s++) {
+ movecam rand(-20,20), rand(-20,20);
+ sleep2(50);
+ }
+ return;
+}
- script shake 32767,{
end;
@@ -26,7 +35,7 @@ OnShake:
// Called by GM Command
OnGM:
@shake=0;
- @max_shake=rand(6,10);
+ @max_shake=rand2(6,10);
addtimer(50, "shake::OnShake");
end;