diff options
author | Jesusaves <cpntb1@ymail.com> | 2019-03-05 23:44:58 +0000 |
---|---|---|
committer | Micksha <ms-shaman@gmx.de> | 2019-03-05 23:44:58 +0000 |
commit | 61e80d9ef9641a24f90838e8ea9cc2911a0e6c85 (patch) | |
tree | 0192e90b9c8396728c9e07dc3b89346644a68b95 /npc/functions | |
parent | e773b5ede6fad4d200428b0b4a0b1f6984751429 (diff) | |
download | serverdata-61e80d9ef9641a24f90838e8ea9cc2911a0e6c85.tar.gz serverdata-61e80d9ef9641a24f90838e8ea9cc2911a0e6c85.tar.bz2 serverdata-61e80d9ef9641a24f90838e8ea9cc2911a0e6c85.tar.xz serverdata-61e80d9ef9641a24f90838e8ea9cc2911a0e6c85.zip |
... That's why you shouldn't code with an empty stomach and without taking an
Afternoon nap %%O
Diffstat (limited to 'npc/functions')
-rw-r--r-- | npc/functions/quest-debug/003-ShipQuests_Peter.txt | 18 | ||||
-rw-r--r-- | npc/functions/util.txt | 41 |
2 files changed, 53 insertions, 6 deletions
diff --git a/npc/functions/quest-debug/003-ShipQuests_Peter.txt b/npc/functions/quest-debug/003-ShipQuests_Peter.txt index e08e1eb2..4732d238 100644 --- a/npc/functions/quest-debug/003-ShipQuests_Peter.txt +++ b/npc/functions/quest-debug/003-ShipQuests_Peter.txt @@ -1,6 +1,9 @@ // Peter quest debug // Author: // gumi +// jesusalva +// Notes: +// Using l() usually is not a good idea (translating debug text? What?) function script QuestDebug3 { do @@ -10,16 +13,19 @@ function script QuestDebug3 { mes "ShipQuests_Peter"; mes "---"; mes l("Quest state: @@", getq(ShipQuests_Peter)); + mes l("Killed mob bitmask: @@", getq2(ShipQuests_Peter)); + mes l("Instance ID: @@", getq3(ShipQuests_Peter)); next; + .@q=getq(ShipQuests_Peter); + GenericQuestDebug ShipQuests_Peter, l("Does not have the quest"), 0, - l("Peter needs help"), 6, - l("Peter asks to kill rattos"), 1, - l("Killed rattos"), 2, - l("Got no reward"), 3, - l("Peter asks to kill rattos again"), 4, - l("Peter gave reward"), 5; + l("Peter needs help"), 1, + l("Toggle Tortuga Bounty"), .@q^2, + l("Toggle Ratto Bounty"), .@q^4, + l("Toggle Croc Bounty"), .@q^8, + l("Quest complete"), 15; if (@menuret < 0) { diff --git a/npc/functions/util.txt b/npc/functions/util.txt index 0c6080b1..2cb28573 100644 --- a/npc/functions/util.txt +++ b/npc/functions/util.txt @@ -1,5 +1,6 @@ // Evol functions. // Authors: +// Jesusalva // Reid // Description: // Util functions @@ -33,3 +34,43 @@ function script season_direction { return (.@current_month / 3 + .@is_after_season_day) % 4; } + +// This is part of Jesusalva script toolkit to make his life easier when writing +// quests. Many of these are actually redudant functions. + +// Four different flavours of setq() to quickly preserve old values +function script setq1 { + // Quest, val1 , val2 , val3 , time + setq getarg(0), getarg(1), getq2(getarg(0)), getq3(getarg(0)), getqtime(getarg(0)); + return; +} + +function script setq2 { + // Quest, val1 , val2 , val3 , time + setq getarg(0), getq(getarg(0)), getarg(1), getq3(getarg(0)), getqtime(getarg(0)); + return; +} + +function script setq3 { + // Quest, val1 , val2 , val3 , time + setq getarg(0), getq(getarg(0)), getq2(getarg(0)), getarg(1), getqtime(getarg(0)); + return; +} + +function script setqtime { + // Quest, val1 , val2 , val3 , time + setq getarg(0), getq(getarg(0)), getq2(getarg(0)), getq3(getarg(0)), getarg(1); + return; +} + +// Function to quickly disregard part of getmapxy(). +// If you use this function too much, you'll lose efficiency, and it'll be better +// to use getmapxy() normally to save to temporary variables. +// Can take one optional argument (unittype argument). +function script getmap { + if (getmapxy(.@mapName$, .@xpos, .@ypos, getarg(0,0)) != 0) + return false; + return .@mapName$; +} + + |