diff options
author | Jesusaves <cpntb1@ymail.com> | 2019-08-05 20:52:54 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2019-08-05 20:52:54 -0300 |
commit | febdb91532701de4a9653ea2eab79961ba2ec094 (patch) | |
tree | 5495b5a2e1ae9e591b099f96472e2f20609f1e20 /npc/soren | |
parent | 9314ac33c4b62874e20d124a18b5d62ab47956cb (diff) | |
download | serverdata-febdb91532701de4a9653ea2eab79961ba2ec094.tar.gz serverdata-febdb91532701de4a9653ea2eab79961ba2ec094.tar.bz2 serverdata-febdb91532701de4a9653ea2eab79961ba2ec094.tar.xz serverdata-febdb91532701de4a9653ea2eab79961ba2ec094.zip |
Fix bugs at Soren Island
Diffstat (limited to 'npc/soren')
-rw-r--r-- | npc/soren/main.txt | 56 |
1 files changed, 34 insertions, 22 deletions
diff --git a/npc/soren/main.txt b/npc/soren/main.txt index 591900d40..db098f63f 100644 --- a/npc/soren/main.txt +++ b/npc/soren/main.txt @@ -90,6 +90,10 @@ soren,105,92,0 script Soren's Fountain NPC_NO_SPRITE,{ .st=1; npctalk l("@@ started disarm process. Please stand by.", strcharinfo(0)); initnpctimer; + if (getvariableofnpc(.casterId, "Soren's Fountain") == .casterId) + @sorenp=10; + else + @sorenp=0; } close; @@ -128,14 +132,14 @@ OnTimer31000: .@val=.@val-10; if (getvariableofnpc(.casterId, "Soren's Gizmo") == .casterId) .@val=.@val-10; - if (getvariableofnpc(.casterId, "Soren's Fountain") == .casterId) - .@val=.@val-10; + if (@sorenp) + .@val-=@sorenp; percentheal (.@val/2), -13+.@val; // Monster Gen - .@amount=rand(.st/3+1, .st/2+1)+getareausers("001-7", 12); - .@mid=rand(1,3)+.st; + .@amount=rand2(.st/3+1, .st/2+1)+getareausers("soren", 12); + .@mid=rand2(1,3)+.st; switch (.@mid) { case 1: case 2: @@ -173,9 +177,9 @@ OnTimer31000: case 11: .@itemId = GingerBreadMan ; break; case 12: - .@itemId = rand(Diamond, Amethyst) ; break; + .@itemId = rand2(Diamond, Amethyst) ; break; default: // case 13 - .@itemId = rand(CopperOre, TitaniumOre) ; break; + .@itemId = rand2(CopperOre, TitaniumOre) ; break; } // Defines .@lx=.x-.distance; @@ -189,8 +193,8 @@ OnTimer31000: // If we're done with waves if (.st >= 7) { - getexp rand(1, 100), rand(1, 10); - .lifetime=gettimetick(2)+330+rand(0, 60); + getexp rand2(1, 100), rand2(1, 10); + .lifetime=gettimetick(2)+330+rand2(0, 60); npctalk l("Disarmed with success for: @@", FuzzyTime(.lifetime, 2, 2)); stopnpctimer; .st=0; specialeffect(27); @@ -241,6 +245,10 @@ soren,104,143,0 script Soren's Lake NPC_NO_SPRITE,{ .st=1; npctalk l("@@ started disarm process. Please stand by.", strcharinfo(0)); initnpctimer; + if (getvariableofnpc(.casterId, "Soren's Lake") == .casterId) + @sorenp=10; + else + @sorenp=0; } close; @@ -279,14 +287,14 @@ OnTimer30900: .@val=.@val-10; if (getvariableofnpc(.casterId, "Soren's Gizmo") == .casterId) .@val=.@val-10; - if (getvariableofnpc(.casterId, "Soren's Lake") == .casterId) - .@val=.@val-10; + if (@sorenp) + .@val-=@sorenp; percentheal (.@val/2), -13+.@val; // Monster Gen. Lake spawns less - .@amount=rand(.st/3+1, .st/2+1)+getareausers("001-7", 12)-1; - .@mid=rand(1,3)+.st; + .@amount=rand2(.st/3+1, .st/2+1)+getareausers("soren", 12)-1; + .@mid=rand2(1,3)+.st; switch (.@mid) { case 1: case 2: @@ -324,9 +332,9 @@ OnTimer30900: case 11: .@itemId = HastePotion ; break; case 12: - .@itemId = rand(Diamond, Amethyst) ; break; + .@itemId = rand2(Diamond, Amethyst) ; break; default: // case 13 - .@itemId = rand(CopperOre, TitaniumOre) ; break; + .@itemId = rand2(CopperOre, TitaniumOre) ; break; } // Defines for Lake are fixed on the same spot. .@lx=104; .@ux=104; @@ -337,7 +345,7 @@ OnTimer30900: // If we're done with waves if (.st >= 7) { - .lifetime=gettimetick(2)+330+rand(0, 60); + .lifetime=gettimetick(2)+330+rand2(0, 60); npctalk l("Disarmed with success for: @@", FuzzyTime(.lifetime, 2, 2)); stopnpctimer; .st=0; } @@ -389,6 +397,10 @@ soren,107,37,0 script Soren's Gizmo NPC_NO_SPRITE,{ .st=1; npctalk l("@@ started disarm process. Please stand by.", strcharinfo(0)); initnpctimer; + if (getvariableofnpc(.casterId, "Soren's Gizmo") == .casterId) + @sorenp=10; + else + @sorenp=0; } close; @@ -427,14 +439,14 @@ OnTimer31200: .@val=.@val-10; if (getvariableofnpc(.casterId, "Soren's Fountain") == .casterId) .@val=.@val-10; - if (getvariableofnpc(.casterId, "Soren's Gizmo") == .casterId) - .@val=.@val-10; + if (@sorenp) + .@val-=@sorenp; percentheal (.@val/2), -13+.@val; // Monster Gen. Gizmo spawns more monsters because you can move more - .@amount=rand(.st/3+1, .st/2+1)+getareausers("001-7", 12)+1; - .@mid=rand(1,3)+.st; + .@amount=rand2(.st/3+1, .st/2+1)+getareausers("soren", 12)+1; + .@mid=rand2(1,3)+.st; switch (.@mid) { case 1: case 2: @@ -472,9 +484,9 @@ OnTimer31200: case 11: .@itemId = HastePotion ; break; case 12: - .@itemId = rand(Diamond, Amethyst) ; break; + .@itemId = rand2(Diamond, Amethyst) ; break; default: // case 13 - .@itemId = rand(CopperOre, TitaniumOre) ; break; + .@itemId = rand2(CopperOre, TitaniumOre) ; break; } // Defines .@lx=.x-.distance; @@ -487,7 +499,7 @@ OnTimer31200: // If we're done with waves if (.st >= 7) { - .lifetime=gettimetick(2)+330+rand(0, 60); + .lifetime=gettimetick(2)+330+rand2(0, 60); npctalk l("Disarmed with success for: @@", FuzzyTime(.lifetime, 2, 2)); stopnpctimer; .st=0; } |