From 1076faa26b09f6fb9a7cc7bfa526adf043aefe1e Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Sat, 7 Jul 2018 02:33:09 -0300 Subject: @shake :> --- db/re/mob_db.conf | 2 +- npc/functions/shake.txt | 31 +++++++++++++++++++++++++++++++ npc/scripts.conf | 1 + 3 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 npc/functions/shake.txt diff --git a/db/re/mob_db.conf b/db/re/mob_db.conf index e7b38f65d..f74d2f4f1 100644 --- a/db/re/mob_db.conf +++ b/db/re/mob_db.conf @@ -1060,7 +1060,7 @@ mob_db: ( Lv: 40 Hp: 4500 Sp: 0 - Exp: 91 + Exp: 87 JExp: 9 AttackRange: 1 Attack: [300, 500] diff --git a/npc/functions/shake.txt b/npc/functions/shake.txt new file mode 100644 index 000000000..0dabfb602 --- /dev/null +++ b/npc/functions/shake.txt @@ -0,0 +1,31 @@ +// Shake player screen + +- script shake 32767,{ + end; + +// Loops until @shake is @max_shake +OnShake: + @shake+=1; + movecam rand(-20,20), rand(-20,20); + if (@shake < @max_shake) + addtimer(50, "shake::OnShake"); + else + @shake=0; + end; + +// Called by GM Command +OnGM: + @shake=0; + @max_shake=rand(4,8); + addtimer(50, "shake::OnShake"); + end; + +OnCall: + getmapxy(.@m$,.@x,.@y,0); + areatimer(.@m$, .@x-15, .@y-15, .@x+15, .@y+15, 10, "shake::OnGM"); + end; + +OnInit: + bindatcmd "shake", "shake::OnCall", 80, 80, 1; + end; +} diff --git a/npc/scripts.conf b/npc/scripts.conf index 99b443fc6..47f7613e7 100644 --- a/npc/scripts.conf +++ b/npc/scripts.conf @@ -46,6 +46,7 @@ "npc/functions/questgen.txt", "npc/functions/riddle.txt", "npc/functions/savepoint.txt", +"npc/functions/shake.txt", "npc/functions/shops.txt", "npc/functions/soul_menhir.txt", -- cgit v1.2.3-60-g2f50