diff options
author | Jesusaves <cpntb1@ymail.com> | 2019-09-09 13:02:16 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2019-09-09 13:02:16 -0300 |
commit | 3b8afeb72911f0a0ff77c2ce54c92d96e0826615 (patch) | |
tree | 2f8d6afc0e1f17eef18deec635a3f01004646030 /npc | |
parent | 6574ca7535b08aa42387d9b0401186975007f711 (diff) | |
download | serverdata-3b8afeb72911f0a0ff77c2ce54c92d96e0826615.tar.gz serverdata-3b8afeb72911f0a0ff77c2ce54c92d96e0826615.tar.bz2 serverdata-3b8afeb72911f0a0ff77c2ce54c92d96e0826615.tar.xz serverdata-3b8afeb72911f0a0ff77c2ce54c92d96e0826615.zip |
Partly rewrite @shake
Diffstat (limited to 'npc')
-rw-r--r-- | npc/functions/shake.txt | 13 |
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; |