diff options
author | Reid <reidyaro@gmail.com> | 2011-12-25 23:34:55 +0100 |
---|---|---|
committer | Reid <reidyaro@gmail.com> | 2011-12-25 23:34:55 +0100 |
commit | a46fc205f558e9562ac41fef46cc2f045b3ba4aa (patch) | |
tree | 6604798841c69ebce5e607d756b14588ea26ec9b /npc/000-2-1 | |
parent | 28dc84035269058b3efcd0b4f8a1e018f4b03e92 (diff) | |
parent | 41dddedebc7db56787eca38dcad84f6d255aa0f3 (diff) | |
download | serverdata-a46fc205f558e9562ac41fef46cc2f045b3ba4aa.tar.gz serverdata-a46fc205f558e9562ac41fef46cc2f045b3ba4aa.tar.bz2 serverdata-a46fc205f558e9562ac41fef46cc2f045b3ba4aa.tar.xz serverdata-a46fc205f558e9562ac41fef46cc2f045b3ba4aa.zip |
Merge branch 'master' of gitorious.org:evol/serverdata-beta
Diffstat (limited to 'npc/000-2-1')
-rw-r--r-- | npc/000-2-1/peter.txt | 119 |
1 files changed, 41 insertions, 78 deletions
diff --git a/npc/000-2-1/peter.txt b/npc/000-2-1/peter.txt index 6a89fcde..645d5faf 100644 --- a/npc/000-2-1/peter.txt +++ b/npc/000-2-1/peter.txt @@ -7,50 +7,27 @@ // 4 bits array: // ShipQuests // Variable: -// 1 +// ShipQuests_Peter // Values: -// 0+0+0 default -// 0+1+0 completed bonus task -// 0+2+0 got bonus task -// 0+3+0 got non-bonus task -// 1+3+0 got non-bonus task and bonus task was completed -// 0+2+3 was warped with bonus task -// 0+3+3 was warped with non-bonus task -// 1+3+3 was warped with non-bonus task and bonus task was completed +// 0 default +// 1 task given +// 2 task given + reward expected +// 3 task completed +// 4 task completed + reward to be given +// 5 task done + reward given // "000-2-2.gat" - map with mobs 000-2-1.gat,61,34,0,1 script AreaNPC 0,0,1,{ OnTouch: - //Stop when level less than 5 - if (BaseLevel < 5) goto l_Stop; - - set @q, geta4(ShipQuests, 1); - //If player got task, but wasn't warped - if (@q > 1 && @q < 5) goto l_Warp; - //If player was warped - if (@q > 4) goto l_Check; - //If map is full of mobs and helper is free - if (getmapmobs("000-2-2.gat") == 2 && $@RAT_SAILOR_HELPER$ == "") goto l_GiveTask; - //Otherway - doevent "Peter::OnDontNeedHelp"; + set @q, geta4(ShipQuests, ShipQuests_Peter); + // Only let play pass that finished Peters quest + if (@q < 5) goto l_Stop; + warp "000-2-1",61,36; close; l_Stop: doevent "Peter::OnStop"; close; - - l_Warp: - seta4 ShipQuests, 1, @q+3; - warp "000-2-2.gat", 48, 28; - close; - - l_Check: - doevent "Peter::OnCheck"; - close; - - l_GiveTask: - doevent "Peter::OnGiveTask"; - } 000-2-1.gat,60,35,0,1 script Peter 303,{ @@ -66,14 +43,14 @@ set @q, geta4(ShipQuests, ShipQuests_Peter); - //If player wasn't warped and player is helper - if (@q < 5 && $@RAT_SAILOR_HELPER$ == strcharinfo(0)) goto l_TaskWasGiven; - - //If player got task and helper is other or player was warped - if (@q > 1) goto l_Fail; + // If player is here but has not finished the quest he aborted it since he + // cannot come here before he finished the quest while not aborting the quest + if (@q == 1 || @q == 2) goto l_QuestAborted; + if (@q == 3 || @q == 4) goto l_QuestDone; + if (@q == 5) goto l_Thanks; //If map is full of mobs and helper is free - if (getmapmobs("000-2-2.gat") == 2 && $@RAT_SAILOR_HELPER$ == "") goto OnGiveTask; + if (getmapmobs("000-2-2.gat") == 4 && $@RAT_SAILOR_HELPER$ == "") goto OnGiveTask; goto OnDontNeedHelp; close; @@ -92,9 +69,8 @@ OnGiveTask: mesn; mesq l("I need somebody who can clean the bottom of the ship of these Ratto, can you help me?"); - set @q, geta4(ShipQuests, ShipQuests_Peter); menu - rif(@q == 0, l("Yeah, but what reward will I get?")), l_BonusTask, + l("Yeah, but what reward will I get?"), l_BonusTask, l("Why not, I need to train anyway."), l_Task, l("No, they are way too dangerous for me!"), -; mesq l("Ok, ok. Come back if you change your mind."); @@ -126,17 +102,11 @@ next; set @q, geta4(ShipQuests, ShipQuests_Peter); - if (getmapmobs("000-2-2.gat") || $@RAT_SAILOR_HELPER$ != strcharinfo(0)) goto l_Fail; + if (getmapmobs("000-2-2.gat") || $@RAT_SAILOR_HELPER$ != strcharinfo(0)) goto l_QuestAborted; set $@RAT_SAILOR_HELPER$, ""; - if (@q == 5) goto l_Reward; - - set @q, @q - 4; - if (@q > 1) set @q, @q - 2; - seta4 ShipQuests, ShipQuests_Peter, @q; - mesn; - mesq l("Good job!"); - close; + if (@q == 2 || @q == 4) goto l_Reward; + goto l_Thanks; l_TalkToJulia: mesn; @@ -144,7 +114,6 @@ close; l_BonusTask: - set @q, geta4(ShipQuests, 1); mesn; mesq l("I will give you @@gp.", 500); menu @@ -156,9 +125,23 @@ l_Task: if ($@RAT_SAILOR_HELPER != "") goto OnDontNeedHelp; - seta4 ShipQuests, ShipQuests_Peter, geta4(ShipQuests, ShipQuests_Peter) + 3; + seta4 ShipQuests, ShipQuests_Peter, 1; goto l_Start; + l_QuestDone: + stopnpctimer; + seta4 ShipQuests, ShipQuests_Peter, 5; + if (@q == 4) goto l_Reward; + goto l_Thanks; + + l_QuestAborted: + stopnpctimer; + seta4 ShipQuests, ShipQuests_Peter, 0; + set $@RAT_SAILOR_HELPER$, ""; + mesn; + mesq l("Too bad that you do not want to help me."); + close; + l_Start: mesn; mesq l("Okay, you can start!"); @@ -167,42 +150,22 @@ warp "000-2-2.gat", 48, 28; close; - l_TaskWasGiven: - mesn; - mesq l("You can start now."); - close; - - l_SetCollectDelay: - set $@RAT_SAILOR_COLLECT_DELAY, 1; - close; - - l_Fail: - mesn; - mesq g(l("You failed the task!#0"), l("You failed the task!#1")); - set $@RAT_SAILOR_HELPER$, ""; - set @q, geta4(ShipQuests, ShipQuests_Peter); - if (@q == 5 || @q == 2) goto l_FailBonusTask; - if (@q > 5) set @q, @q - 6; - if (@q > 2) set @q, @q - 3; - seta4 ShipQuests, ShipQuests_Peter, @q; - close; - l_KillHelper: set $@RAT_SAILOR_HELPER$, ""; close; - l_FailBonusTask: - seta4 ShipQuests, ShipQuests_Peter, 0; - close; - l_Reward: - seta4 ShipQuests, 1, 1; mesn; mesq l("Good job!") + " " + l("Here is your reward!"); getexp 100, 0; set zeny, zeny + 500; close; + l_Thanks: + mesn; + mesq l("Thanks for helping me!"); + close; + l_Close: close; |