summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFedja Beader <fedja@protonmail.ch>2024-09-04 00:41:07 +0200
committerJesusalva Jesusalva <jesusalva@tmw2.org>2025-01-11 20:37:55 +0000
commit4efed5fce379cbad20685c551405e61dabb97a03 (patch)
tree1793bcefabecd9b83730f9648573bedd56cedf67
parent36019c0a82d76b7fb8f90b006c86edf257b50fe1 (diff)
downloadserverdata-4efed5fce379cbad20685c551405e61dabb97a03.tar.gz
serverdata-4efed5fce379cbad20685c551405e61dabb97a03.tar.bz2
serverdata-4efed5fce379cbad20685c551405e61dabb97a03.tar.xz
serverdata-4efed5fce379cbad20685c551405e61dabb97a03.zip
Refactor a little to remove unnecessary label spaghetti + fix dialog wording
+ use compareandsetq to avoid unnecessary db writes (maybe? Idk).
-rw-r--r--npc/014-2-1/woody.txt15
-rw-r--r--npc/014-2/carla.txt19
2 files changed, 16 insertions, 18 deletions
diff --git a/npc/014-2-1/woody.txt b/npc/014-2-1/woody.txt
index 919afab9c..7309002bf 100644
--- a/npc/014-2-1/woody.txt
+++ b/npc/014-2-1/woody.txt
@@ -5,18 +5,22 @@
// Description:
// Woody, is the oldest player of TMW2, he deserves his own npc :d an old trapper who give help to new player to craft Squirrel boots
// id:100 HurnscaldQuest_Woody
-// <2 - See his wife
+// <=2 - See his wife
// 3 - Access to House
// 4 - Quest Accepted
// 5 - Quest Complete
014-2-1,37,43,4 script Woody NPC_PLAYER,{
+ if (BaseLevel < 26) {
+ mesn;
+ mesq l("Hey kid, go play somewhere else, I don't have time! It's soon over!");
+ close;
+ }
+
.@Woo = getq(HurnscaldQuest_Woody);
- if (BaseLevel < 26) goto L_TooWeak;
if (.@Woo == 4) goto L_Check;
if (.@Woo == 5) goto L_Complete;
-L_GiveTask:
mesn;
mesq l("Hi, I'm Woody!");
next;
@@ -113,11 +117,6 @@ L_Lying:
next;
goto L_List;
-L_TooWeak:
- mesn;
- mesq l("Hey kid, go play somewhere else, I don't have time! It's soon over!");
- close;
-
OnInit:
.@npcId = getnpcid(.name$);
setunitdata(.@npcId, UDT_HEADTOP, MinerHat);
diff --git a/npc/014-2/carla.txt b/npc/014-2/carla.txt
index eee25d666..9c7866319 100644
--- a/npc/014-2/carla.txt
+++ b/npc/014-2/carla.txt
@@ -6,19 +6,23 @@
// Carla the Woody wife in old shaman girl. She kept house entrance from years.
// id:100 HurnscaldQuest_Woody
// 0 - Not aware of the quest
-// 1 - Know about winter
+// 1 - Player knows about Woody/Carla (introduction done)
// 2 - Quest Accepted
// 3 - Quest Complete
// 4+ - see woody
014-2,104,31,0 script Carla NPC_RAIJIN_FEMALE_WAITRESS,{
+ if (BaseLevel < 25) {
+ mesn;
+ mesq l("You should not be here! This forest is home to monsters.");
+ close;
+ }
+
.@quest = getq(HurnscaldQuest_Woody);
- if (BaseLevel < 25) goto L_TooWeak;
if (.@quest == 1) goto L_Start;
if (.@quest == 2) goto L_Check;
if (.@quest >= 3) goto L_Complete;
-L_GiveTask:
mesn;
mesq lg("Hello, new wanderer!");
next;
@@ -36,7 +40,7 @@ L_GiveTask:
L_Quest:
mes "";
mesn;
- mesq l("I'm Carla the Woody Wife, I have lived here with Woody for many years! We decided to live away from civilization, as hunter and shaman life is way better.");
+ mesq l("I am Carla, Woody's wife. I have lived here with Woody for many years! We decided to live away from civilization, as hunter and shaman life is way better.");
next;
mesn;
mesq l("But now, we are quite old. I remember the time when I was your age. My generation doesn't do stupid things like yours!");
@@ -49,7 +53,7 @@ L_Quest:
L_Start:
- setq HurnscaldQuest_Woody, 1;
+ compareandsetq HurnscaldQuest_Woody, 0, 1;
mes "";
mesn;
mesq l("No, we've done this for our whole life, and we have survived!");
@@ -172,11 +176,6 @@ L_Nope:
next;
goto L_List;
-L_TooWeak:
- mesn;
- mesq l("You should not be there! This forest is home to monsters.");
- close;
-
OnInit:
.sex = G_FEMALE;
.distance = 4;