diff options
author | Jesusaves <cpntb1@ymail.com> | 2018-05-31 20:37:16 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2018-05-31 20:37:44 -0300 |
commit | 18ce8f0b54a2d7dfb76c3082ebbac970f3e66d76 (patch) | |
tree | 7f52d361f225fd5d3bc8f363586e478b50b3d30f /npc | |
parent | 566a348a24da13be8b7cc7dd3c68b75d3e6848b1 (diff) | |
download | serverdata-18ce8f0b54a2d7dfb76c3082ebbac970f3e66d76.tar.gz serverdata-18ce8f0b54a2d7dfb76c3082ebbac970f3e66d76.tar.bz2 serverdata-18ce8f0b54a2d7dfb76c3082ebbac970f3e66d76.tar.xz serverdata-18ce8f0b54a2d7dfb76c3082ebbac970f3e66d76.zip |
Incomplete, but I need to save pipelines
Diffstat (limited to 'npc')
-rw-r--r-- | npc/005-6/zitoni.txt | 4 | ||||
-rw-r--r-- | npc/007-1/torches.txt | 147 | ||||
-rw-r--r-- | npc/007-1/zarkor.txt | 55 |
3 files changed, 193 insertions, 13 deletions
diff --git a/npc/005-6/zitoni.txt b/npc/005-6/zitoni.txt index 1381da49b..060df0577 100644 --- a/npc/005-6/zitoni.txt +++ b/npc/005-6/zitoni.txt @@ -28,8 +28,8 @@ L_Menu: l("Can you reset my stats please?"), l("Do you make any other kind of potions?"), rif(.@q1 == 1 || .@q1 == 2, l("Can you help me with Everburn Powder? I need 5.")), - rif(.@q1 == 3 && countitem(DarkDesertMushroom) >= 1),l("Zarkor sent you this gift. He needs Everburn Powder.")), - rif(.@q1 >= 4),l("Create Everburn Powder.")), + rif(.@q1 == 3 && countitem(DarkDesertMushroom) >= 1,l("Zarkor sent you this gift. He needs Everburn Powder.")), + rif(.@q1 >= 4,l("Create Everburn Powder.")), lg("You are weird, I have to go sorry."); mes ""; diff --git a/npc/007-1/torches.txt b/npc/007-1/torches.txt new file mode 100644 index 000000000..57a93a241 --- /dev/null +++ b/npc/007-1/torches.txt @@ -0,0 +1,147 @@ +// TMW-2 script. +// Author: +// Crazyfefe +// Jesusalva +// Description: +// Torches +// Variables: +// TulimsharQuest_DarkInvocator +// Values: +// 0 Default. +// 1 Quest Found. +// 2 Quest Accepted. +// 3 Bomb Defused. +// 4 Quest Completed. + + +function script CheckTorch { + @torch_count = 0; + @count_tmp = 0; + if (debug) + npctalk3 l("Hello, I am T-@@, of the @@ order.", @torch, $@TorchBits[@torch]); + if (getq2(TulimsharQuest_DarkInvocator) & $@TorchBits[@torch]) + goto L_Empty; + if (countitem(EverburnPowder) <= 0) { + dispbottom(l("I do not have Everburn Powder to lit the torch.")); + end; + } + setq2 TulimsharQuest_DarkInvocator, getq2(TulimsharQuest_DarkInvocator) | $@TorchBits[@torch]; + + goto L_Loop; + +L_TorchTally: + specialeffect(53); + specialeffect(54); + getmapxy(.@m, .@x, .@y, UNITTYPE_PC); + + switch (@torch_count) { + case 1: + areamonster .@m, .@x-2, .@y-2, .@x+2, .@y+2, "Magic Maggot", CaveMaggot, 3, "Zarkor::OnMonster"; + break; + case 2: + areamonster .@m, .@x-2, .@y-2, .@x+2, .@y+2, "Magic Maggot", CaveMaggot, 3, "Zarkor::OnMonster"; + areamonster .@m, .@x-2, .@y-2, .@x+2, .@y+2, "Magic Goblin", MagicGoblin, 1, "Zarkor::OnMonster"; + break; + case 3: + areamonster .@m, .@x-2, .@y-2, .@x+2, .@y+2, "Magic Maggot", CaveMaggot, 4, "Zarkor::OnMonster"; + areamonster .@m, .@x-2, .@y-2, .@x+2, .@y+2, "Magic Goblin", MagicGoblin, 3, "Zarkor::OnMonster"; + break; + case 4: + areamonster .@m, .@x-2, .@y-2, .@x+2, .@y+2, "Black Scorpion", BlackScorpion, 1, "Zarkor::OnMonster"; + areamonster .@m, .@x-2, .@y-2, .@x+2, .@y+2, "Magic Maggot", CaveMaggot, 1, "Zarkor::OnMonster"; + areamonster .@m, .@x-2, .@y-2, .@x+2, .@y+2, "Magic Goblin", MagicGoblin, 4, "Zarkor::OnMonster"; + break; + case 5: + areamonster .@m, .@x-2, .@y-2, .@x+2, .@y+2, "Black Scorpion", BlackScorpion, 2, "Zarkor::OnMonster"; + areamonster .@m, .@x-2, .@y-2, .@x+2, .@y+2, "Magic Maggot", CaveMaggot, 2, "Zarkor::OnMonster"; + areamonster .@m, .@x-2, .@y-2, .@x+2, .@y+2, "Magic Goblin", MagicGoblin, 5, "Zarkor::OnMonster"; + break; + } + + delitem EverburnPowder, 1; + if (@torch_count == 5) { + message strcharinfo(0), l("All torches are lit!"); + //killmonsterall("007-1"); + setq1 TulimsharQuest_DarkInvocator, 6; + } + + return; + +L_Loop: + while (@count_tmp < 5) { + @count_tmp = (@count_tmp + 1); + if (getq2(TulimsharQuest_DarkInvocator) & $@TorchBits[@count_tmp]) + @torch_count = (@torch_count + 1); + } + goto L_TorchTally; + +L_Empty: + message strcharinfo(0), l("This torch is already lit."); + return; + +} + +007-1,166,145,0 script Torch#1 NPC_NO_SPRITE,{ + @torch = 1; + .@q = getq(TulimsharQuest_DarkInvocator); + if (.@q == 5) { + CheckTorch(); + } + end; +OnInit: + // Remember: array start at zero, but barrels count start at 1. "Fixing" may break torch 5! + setarray $@TorchBits, (1 << 1), (1 << 2), (1 << 3), (1 << 4), (1 << 5), (1 << 6); + .sex = G_OTHER; + .distance = 1; + end; +} + +007-1,65,116,0 script Torch#2 NPC_NO_SPRITE,{ + @torch = 2; + .@q = getq(TulimsharQuest_DarkInvocator); + if (.@q == 5) { + CheckTorch(); + } + end; +OnInit: + .sex = G_OTHER; + .distance = 1; + end; +} + +007-1,62,133,0 script Torch#3 NPC_NO_SPRITE,{ + @torch = 3; + .@q = getq(TulimsharQuest_DarkInvocator); + if (.@q == 5) { + CheckTorch(); + } + end; +OnInit: + .sex = G_OTHER; + .distance = 1; + end; +} +007-1,35,125,0 script Torch#4 NPC_NO_SPRITE,{ + @torch = 4; + .@q = getq(TulimsharQuest_DarkInvocator); + if (.@q == 5) { + CheckTorch(); + } + end; +OnInit: + .sex = G_OTHER; + .distance = 1; + end; +} +007-1,139,24,0 script Torch#5 NPC_NO_SPRITE,{ + @torch = 5; + .@q = getq(TulimsharQuest_DarkInvocator); + if (.@q == 5) { + CheckTorch(); + } + end; +OnInit: + .sex = G_OTHER; + .distance = 1; + end; +} diff --git a/npc/007-1/zarkor.txt b/npc/007-1/zarkor.txt index e1c903136..048342ad1 100644 --- a/npc/007-1/zarkor.txt +++ b/npc/007-1/zarkor.txt @@ -36,15 +36,18 @@ break; case 5: mesn "Saulc, the Bug Master"; - mesq l("Sorry, the script is broken again. Blame the usual that the torches are nowhere to be found."); + mesq col("What, are we really letting you do something so insane as summoning the Monster King?! Blame Saulc!!", 9); next; - mesn "Saulc, the Bug Master"; - mesq l("Once that gets out of the way, this NPC will be finished. See you then!"); + mesn "Zarkor, the Dark Summoner"; + mesq l("You didn't lit every torch yet! Hurry up!!"); close; - // Locations - // 166, 145 - // 65, 116 - // + break; + case 6: + if (getq2(TulimsharQuest_DarkInvocator) == 0) { + setq TulimsharQuest_DarkInvocator, 4; + goto L_Quest; + } + goto L_Ritual; break; } @@ -74,8 +77,8 @@ L_Start: mesn strcharinfo(0); select l("Indeed. Sorry. I'm not giving you anything."), - rif(countitem(Ruby) >= 1, l("I swear silence, over this bloody ruby."), - rif(countitem(Topaz) >= 1, l("I swear silence, over this shining topaz."); + rif(countitem(Ruby) >= 1, l("I swear silence, over this bloody ruby.")), + rif(countitem(Topaz) >= 1, l("I swear silence, over this shining topaz.")); mes ""; switch (@menu) { @@ -148,9 +151,24 @@ L_Quest: setq TulimsharQuest_DarkInvocator, 5; close; -L_Finish: - // Yadda yadda yadda dialog +L_Ritual: + percentheal 100, 0; + specialeffect(56); + mes col("Zarkor spills many fluids on the lake, with much concentration.", 9); + next; + specialeffect(56); + mesn "Zarkor, the Dark Summoner"; + mes col("Zarkor starts a weird chant.", 9); + next; + specialeffect(312); + mesn "Zarkor, the Dark Summoner"; + mesq l("MONSTER KING, APPEAR TO ME!"); + next; + goto L_Finish; + + +L_Finish: // These values were taken from Experience table, and are magic numbers getexp 9174, 412; // Pay roughly what you spent @@ -158,8 +176,23 @@ L_Finish: // (3000*5 + 4*500G + 1000 + 5*84 + 5*66 + 5*80 + 850) = 20.000 Zeny=Zeny+20000; + mesn; + mesq l("*Ugh* Thanks for your help. Here... Take this, as promised."); + next; + mesn strcharinfo(0); + mesq l("Are you feeling well? That was a pretty powerful attack!"); + next; + mesn; + mesq lg("Do not worry with me, youngling... I'll be fine."); close; +OnMonster: + end; + +OnPCDieEvent: + if (getq(TulimsharQuest_DarkInvocator) == 5) + setq2 TulimsharQuest_DarkInvocator, 0; + end; OnInit: .sex = G_MALE; |