From 312bc6e97c5cf42227cf51eacbb71d348df2aee2 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Sat, 12 Jan 2019 21:13:55 -0200 Subject: Move chest from 002-1 to 000-0-0, I'm only breaking intro stuff atm --- npc/000-0-0/chest.txt | 73 +++++++++++++++++++++++++++++++++++++++++++++++++ npc/000-0-0/sailors.txt | 6 +++- npc/002-1/chest.txt | 73 ------------------------------------------------- 3 files changed, 78 insertions(+), 74 deletions(-) create mode 100644 npc/000-0-0/chest.txt delete mode 100644 npc/002-1/chest.txt (limited to 'npc') diff --git a/npc/000-0-0/chest.txt b/npc/000-0-0/chest.txt new file mode 100644 index 000000000..8c332c844 --- /dev/null +++ b/npc/000-0-0/chest.txt @@ -0,0 +1,73 @@ +// TMW2 Script modified by Jesusalva +// Evol scripts. +// Authors: +// 4144 +// gumi +// omatt +// Reid +// Description: +// A box with clothes for new players. +// Variable: +// ShipQuests_Arpan +// Values: +// 1 Talked to Arpan and needs to get clothes. +// 2 Has the clothes. + +000-0-0,36,34,0 script Chest#002-1 NPC_CHEST_BIG,2,4,{ + + .@questState = getq(ShipQuests_Arpan); + + if (.@questState == 0) + { + npctalk3 l("You should talk to Magic Arpan first."); + end; + } + + if (.busy == false) + { + if (.@questState <= 1) + { + inventoryplace CreasedShirt, 2; + setq1 ShipQuests_Arpan, 2; + getitem CreasedShirt, 1; + getitem CreasedShorts, 1; + npctalk3 l("You take the clothes from the chest."); + } + + specialeffect(.dir == 0 ? 24 : 25, AREA, getnpcid(0)); // closed ? opening : closing + .dir = .dir == 0 ? 2 : 6; // closed ? opening : closing + .busy = true; // lock the animation + initnpctimer; + } + end; + +OnTimer220: + .dir = .dir == 6 ? 0 : 4; // closing ? closed : open + end; + +OnTimer500: + .busy = false; // unlock + + if (.dir == 0) + { + stopnpctimer; // stop here if the chest is closed + } + end; + +OnUnTouch: + if (getareausers(.x - 2, .y - 4, .x + 2, .y + 6) > 0 || .dir == 0) + { + end; + } +OnTimer30000: + .busy = true; + .dir = 6; // closing + specialeffect(25, AREA, getnpcid(0)); // closing + setnpctimer 0; +OnTouch: + end; + +OnInit: + .distance = 3; + end; +} diff --git a/npc/000-0-0/sailors.txt b/npc/000-0-0/sailors.txt index 1d5b19304..33c936609 100644 --- a/npc/000-0-0/sailors.txt +++ b/npc/000-0-0/sailors.txt @@ -27,7 +27,7 @@ OnTalk: mesn l("Magic Arpan"); mesq l("Yeye don't need to train here anymore! Let's head back to the ship before the sun sets, shall we?"); next; - goto L_Ready; + goto L_Skip; } // TODO @@ -66,6 +66,10 @@ OnTalk: mesc l("(Protip: Use ##Barrow keys##b to walk around once you wake up.)"); next; +L_Skip: + getitem CreasedShirt, 1; + getitem CreasedShorts, 1; + L_Ready: restorecam; adddefaultskills; diff --git a/npc/002-1/chest.txt b/npc/002-1/chest.txt deleted file mode 100644 index 248efba01..000000000 --- a/npc/002-1/chest.txt +++ /dev/null @@ -1,73 +0,0 @@ -// TMW2 Script modified by Jesusalva -// Evol scripts. -// Authors: -// 4144 -// gumi -// omatt -// Reid -// Description: -// A box with clothes for new players. -// Variable: -// ShipQuests_Arpan -// Values: -// 1 Talked to Arpan and needs to get clothes. -// 2 Has the clothes. - -002-1,51,37,0 script Chest#002-1 NPC_CHEST_BIG,2,4,{ - - .@questState = getq(ShipQuests_Arpan); - - if (.@questState == 0) - { - npctalk3 l("You should talk to Magic Arpan first."); - end; - } - - if (.busy == false) - { - if (.@questState <= 1) - { - inventoryplace CreasedShirt, 2; - setq1 ShipQuests_Arpan, 2; - getitem CreasedShirt, 1; - getitem CreasedShorts, 1; - npctalk3 l("You take the clothes from the chest."); - } - - specialeffect(.dir == 0 ? 24 : 25, AREA, getnpcid(0)); // closed ? opening : closing - .dir = .dir == 0 ? 2 : 6; // closed ? opening : closing - .busy = true; // lock the animation - initnpctimer; - } - end; - -OnTimer220: - .dir = .dir == 6 ? 0 : 4; // closing ? closed : open - end; - -OnTimer500: - .busy = false; // unlock - - if (.dir == 0) - { - stopnpctimer; // stop here if the chest is closed - } - end; - -OnUnTouch: - if (getareausers(.x - 2, .y - 4, .x + 2, .y + 6) > 0 || .dir == 0) - { - end; - } -OnTimer30000: - .busy = true; - .dir = 6; // closing - specialeffect(25, AREA, getnpcid(0)); // closing - setnpctimer 0; -OnTouch: - end; - -OnInit: - .distance = 3; - end; -} -- cgit v1.2.3-70-g09d2