From 1076faa26b09f6fb9a7cc7bfa526adf043aefe1e Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Sat, 7 Jul 2018 02:33:09 -0300 Subject: @shake :> --- npc/functions/shake.txt | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 npc/functions/shake.txt (limited to 'npc/functions') 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; +} -- cgit v1.2.3-60-g2f50 From 3f1a21bd4530ccf2932a85b4e3fa9d1201704dae Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Sat, 7 Jul 2018 02:59:58 -0300 Subject: Fix bugs with shake, but there's an annoying dialog box %%e --- npc/functions/shake.txt | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'npc/functions') diff --git a/npc/functions/shake.txt b/npc/functions/shake.txt index 0dabfb602..a20fc6b43 100644 --- a/npc/functions/shake.txt +++ b/npc/functions/shake.txt @@ -7,16 +7,20 @@ OnShake: @shake+=1; movecam rand(-20,20), rand(-20,20); - if (@shake < @max_shake) + + if (@shake < @max_shake) { addtimer(50, "shake::OnShake"); - else + } else { @shake=0; + restorecam; + closedialog; + } end; // Called by GM Command OnGM: @shake=0; - @max_shake=rand(4,8); + @max_shake=rand(6,10); addtimer(50, "shake::OnShake"); end; -- cgit v1.2.3-60-g2f50 From 39dd5cb54599a533a5b8fbbc1cadac3f05053b49 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Sat, 7 Jul 2018 10:40:11 -0300 Subject: Silly typo --- npc/functions/class.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'npc/functions') diff --git a/npc/functions/class.txt b/npc/functions/class.txt index 09db90013..b1609e9bb 100644 --- a/npc/functions/class.txt +++ b/npc/functions/class.txt @@ -32,7 +32,7 @@ function script ClassMaster { L_SignUp: next; mesn; - mesq l("You have some magic power. Do you want to join the Magic Warriors? ##BThis cannot be undone##b."); + mesq l("You have some magic power. Do you want to join the @@? ##BThis cannot be undone##b.", .@CNAME$); next; mesn; mesq l("We use swords and bows to protect the people, and we use magic to spice things up! Because we're strong even without it!"); -- cgit v1.2.3-60-g2f50 From 4c9c8c07c758354a77a9ec98c2409ddeb40d98ce Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Sat, 7 Jul 2018 12:46:50 -0300 Subject: Corrections & bugfixes --- npc/012-1/guards.txt | 13 ++++++++----- npc/functions/class.txt | 4 ++-- 2 files changed, 10 insertions(+), 7 deletions(-) (limited to 'npc/functions') diff --git a/npc/012-1/guards.txt b/npc/012-1/guards.txt index d50241346..e13b05051 100644 --- a/npc/012-1/guards.txt +++ b/npc/012-1/guards.txt @@ -29,6 +29,8 @@ L_Admus: setmapflagnosave("012-1", "000-1", 22, 22); //setmapflag("012-1", mf_nocommand); // This is just too powerful! setmapflag("012-1", mf_battleground); + setmapflag("012-1", mf_nopenalty); + setmapflag("012-1",mf_bexp,126); enablenpc "Hurnsguard"; donpcevent "Hurnsguard::OnSet"; donpcevent "Lieutenant Paul::OnSet"; @@ -163,10 +165,10 @@ OnDoEvent: OnSkip: // Here, coins drop rate are based on REMAINING PLAYERS and DEFEATED MONSTER LEVEL. // A level 100 monster can have a 5% drop bonus against a level 0 monster. - // You have 1% of base chance, plus 0.5% each player + 0.05% each monster level. - if (rand(10000) <= 100 + (getmapusers("012-1")*50) + (strmobinfo(3,killedrid)*5)) + // You have 1.2% of base chance, plus 0.5% each player + 0.05% each monster level. + if (rand(10000) <= 120 + (getmapusers("012-1")*50) + (strmobinfo(3,killedrid)*5)) getmapxy(.@m$, .@x, .@y, 0); - makeitem(any(Plushroom, Chagashroom, Bread, HalfCroconut, Aquada, CasinoCoins), rand(1,2), "012-1", .@x, .@y); + makeitem(any(Plushroom, Chagashroom, Bread, HalfCroconut, Aquada, CasinoCoins, CactusCocktail, AppleCocktail, CherryCocktail), any(1,1,2), "012-1", .@x, .@y); end; OnTimer300000: @@ -207,10 +209,10 @@ OnTimer240000: // Scripted monsters if (.CYCLES == 2) { mapannounce("012-1", "Monster Lieutenant appears! Watch out!", bc_map); - monster("012-1", 65, 71, "Monster Lieutenant", NightScorpion, 1, "Hurnsguard::OnXtreem"); + bg_monster($@FK_Team2, "012-1", 65, 71, "Monster Lieutenant", NightScorpion, 1, "Hurnsguard::OnXtreem"); } else if (.CYCLES == 3) { mapannounce("012-1", "Monster Admiral appears! Kill it to liberate Hurns!", bc_map); - monster("012-1", 65, 71, "Monster Admiral", GiantMutatedBat, 1, "Hurnsguard::OnVictory"); + bg_monster($@FK_Team2, "012-1", 65, 71, "Monster Admiral", GiantMutatedBat, 1, "Hurnsguard::OnVictory"); } // One monster per user alive @@ -298,6 +300,7 @@ OnVictory: removemapmask "012-1", MASK_EVILSANCTUM; //removemapflag("012-1", mf_nocommand); removemapflag("012-1", mf_battleground); + removemapflag("012-1", mf_bexp); enablenpc "#012-1_22_62"; enablenpc "#012-1_79_17"; enablenpc "#012-1_79_102"; diff --git a/npc/functions/class.txt b/npc/functions/class.txt index b1609e9bb..427e32687 100644 --- a/npc/functions/class.txt +++ b/npc/functions/class.txt @@ -8,7 +8,7 @@ // ClassID, ClassName, OtherClass, sk1, sk2 function script ClassMaster { .@CLASS=getarg(0); - .@CNAME$=getarg(1); + .@CNAME$=getarg(1, "bug"); .@OTHER=getarg(2); //.name$=strnpcinfo(1); @@ -78,7 +78,7 @@ L_Tier1Ok: skill(.@CLASS,1,0); mes ""; mesn; - mesq l("Here, learn the ##BFalkon Punch##b. It is on Physical skills tab. You can drag it to the shortcut list. Use it to protect people!"); + mesq l("Here, learn this awesome skill. It is on the skills tab. You can drag it to the shortcut list. Use it to protect people!"); close; L_NoMagic: -- cgit v1.2.3-60-g2f50