summaryrefslogtreecommitdiff
path: root/world/map/npc
diff options
context:
space:
mode:
authormekolat <mekolat@gmail.com>2015-02-03 22:58:33 -0500
committermekolat <mekolat@gmail.com>2015-02-07 17:00:09 -0500
commit7f9a54a66d661d637d5ed99ad0492487a4de7e08 (patch)
tree72be3086285193bea05d77428ed2ad872e102233 /world/map/npc
parentd370f468a6402bbf953c61f7afb5183c16c021df (diff)
downloadserverdata-7f9a54a66d661d637d5ed99ad0492487a4de7e08.tar.gz
serverdata-7f9a54a66d661d637d5ed99ad0492487a4de7e08.tar.bz2
serverdata-7f9a54a66d661d637d5ed99ad0492487a4de7e08.tar.xz
serverdata-7f9a54a66d661d637d5ed99ad0492487a4de7e08.zip
add Rill's contributions
Diffstat (limited to 'world/map/npc')
-rw-r--r--world/map/npc/009-2/selim.txt82
-rw-r--r--world/map/npc/functions/barber.txt6
2 files changed, 71 insertions, 17 deletions
diff --git a/world/map/npc/009-2/selim.txt b/world/map/npc/009-2/selim.txt
index 7ede82c7..ab74b2f9 100644
--- a/world/map/npc/009-2/selim.txt
+++ b/world/map/npc/009-2/selim.txt
@@ -1,9 +1,29 @@
-//#################################################################################
-//# #
-//# This script file contains the script for the cloth dyer. It has been #
-//# revised to require dye items; collaborating NPCs are Selim and Angus. #
-//# #
-//#################################################################################
+function|script|SelimDebug
+{
+ set @w, 0;
+ mes "[Selim Debug]";
+ menu
+ "Debug item array.", L_DebugArrayExplain,
+ "Exit debug.", L_Return;
+
+L_DebugArrayExplain:
+ mes "[How it works]";
+ mes "Click on the link to verify that it is the red variation of the item.";
+ mes "If, for example, you see [Skirt] then when you click on it you should see Red Skirt.";
+ next;
+ goto L_DebugArray;
+
+L_DebugArray:
+ mes "[@@" + @items_new[@w] + "|" + @item_names$[@w] + "@@]";
+ set @w, @w + 1;
+ if(@w >= getarraysize(@items_new)) goto L_Return;
+ menu
+ "Next.", L_DebugArray,
+ "Exit debug.", L_Return;
+
+L_Return:
+ return;
+}
009-2,32,104,0|script|Selim|326
{
@@ -12,20 +32,53 @@
cleararray @items$, "", getarraysize(@items$);
cleararray @item_names$, "", getarraysize(@item_names$);
cleararray @items_new, "", getarraysize(@items_new);
- setarray @items_new, 5131, 2250, 2060, 2070, 2110, 2180, 2100, 2170, 2090, 2120, 2080, 2140, 2130, 2150, 2160, 2190, 2200, 2210, 2230, 2240, 5131, 2220, 5000, 5011, 5022, 5033, 5044, 5055, 5066, 5077, 5088, 5099;
+ setarray @items_new, 2050, 2250, 2060, 2070, 2110, 2180, 2100, 2170, 2090, 2120, 2080, 2140, 2130, 2150, 2160, 2190, 2200, 2210, 2230, 2240, 5131, 2220, 5000, 5011, 5022, 5033, 5044, 5055, 5066, 5077, 5088, 5099;
setarray @items$, "CottonShirt", "CottonCloth", "VNeckSweater", "TurtleneckSweater", "CottonShorts", "CottonTrousers", "CottonSkirt", "Miniskirt", "TankTop", "ShortTankTop", "SilkRobe", "CottonHeadband", "DesertHat", "CottonBoots", "CottonGloves", "WhiteRabbitEars", "WizardHat", "BowlerHat", "BowlerHatBrown", "FineDress", "ContributorShirt", "SorcererRobeRed", "SorcererRobeGreen", "SorcererRobeDarkBlue", "SorcererRobeYellow", "SorcererRobeLightBlue", "SorcererRobePink", "SorcererRobeBlack", "SorcererRobeOrange", "SorcererRobePurple", "SorcererRobeDarkGreen", "SorcererRobeWhite";
setarray @item_names$, "Cotton Shirt", "Cotton Cloth", "V-Neck Sweater", "Turtleneck Sweater", "Cotton Shorts", "Cotton Trousers", "Cotton Skirt", "Miniskirt", "Tank Top", "Short Tank Top", "Silk Robe", "Cotton Headband", "Desert Hat", "Cotton Boots", "Cotton Gloves", "White Rabbit Ears", "Wizard Hat", "Bowler Hat", "Bowler Hat (brown)", "Fine Dress", "Contributor Shirt", "Red lined Sorcerer Robe", "Green lined Sorcerer Robe", "Dark Blue lined Sorcerer Robe", "Yellow lined Sorcerer Robe", "Light Blue lined Sorcerer Robe", "Pink lined Sorcerer Robe", "Black lined Sorcerer Robe", "Orange lined Sorcerer Robe", "Purple lined Sorcerer Robe", "Dark Green lined Sorcerer Robe", "White lined Sorcerer Robe";
+ if ((getgmlevel() >= 40 || debug) && (getequipid(equip_head) == 647 || getequipid(equip_head) == 725)) goto L_Debug;
goto L_Main;
+L_Debug:
+ callfunc "SelimDebug";
+ close;
+
L_Main:
mes "[Selim]";
- mes "\"What can I do for you?\"";
+ mes "\"Greetings, fair traveler. With what may I help you?\"";
menu
+ "Greetings, are you the store merchant?", L_ask_selim,
+ "But what are dyes and what purpose do they serve?", L_ask_dye,
"Can you dye something for me?", L_clothes_choice,
- "Can you tell me about dyes?", L_ask_dye,
+ "Can you also remove color from clothing?", L_ask_bleach,
"About these sorcerer robes...", L_asksorcererrobe,
"Never mind.", L_Close;
+L_ask_bleach:
+ mes "[Selim]";
+ mes "\"I'm afraid no.";
+ mes "For that, you would need to visit Candide in the Tulimshar marketplace.\"";
+ goto L_Main;
+
+L_ask_selim:
+ mes "[Selim]";
+ mes "\"That is an honest mistake you have made.";
+ mes "However I am not the merchant, but rather a Master Dyer here to serve the good people of this town.";
+ mes "I dye things, upon request.\"";
+ menu
+ "But what are dyes and where can I get them?", L_ask_dye,
+ "Can you dye something for me?", L_clothes_choice,
+ "Can you also remove color from clothing?", L_ask_bleach,
+ "Good bye.", L_Close;
+
+L_ask_dye:
+ mes "[Selim]";
+ mes "\"Dyes are special liquids used to add color to clothing. If you want me to dye something for you you will have to bring me some dye first.";
+ mes "Those behind me are nearly empty and won't last for your item.\"";
+ menu
+ "What do you mean, `bring you dye'?", L_explain_dye,
+ "Where would I get dye?", L_explain_dye,
+ "Good bye.", L_Close;
+
L_clothes_choice:
mes "[Selim]";
mes "\"What can I dye for you today?\"";
@@ -97,12 +150,6 @@ L_no_dye:
"Where would I get dye?", L_explain_dye,
"Never mind.", L_Close;
-L_ask_dye:
- mes "[Selim]";
- mes "\"blabla\"";
- menu
- "Could you give me some dye?", L_explain_dye;
-
L_explain_dye:
if (QUEST_clothdyer_knowsdye < 1)
set QUEST_clothdyer_knowsdye, 1;
@@ -127,5 +174,8 @@ L_havenone:
goto L_clothes_choice;
L_Close:
- close;
+ mes "\"Farewell and good luck in your journeys!\"";
+ close2;
+ emotion EMOTE_WINK;
+ end;
}
diff --git a/world/map/npc/functions/barber.txt b/world/map/npc/functions/barber.txt
index e7491cf3..2b2beba0 100644
--- a/world/map/npc/functions/barber.txt
+++ b/world/map/npc/functions/barber.txt
@@ -133,7 +133,7 @@ L_SameColor:
mes "You are either bald or your hair is already that color.";
goto L_Main;
-L_Done:
+S_Janitor:
// cleanup
set @menu, 0;
set @style, 0;
@@ -143,4 +143,8 @@ L_Done:
set @hairOpts, 0;
set @colorOpts, 0;
return;
+
+L_Close:
+ callsub S_Janitor;
+ return;
}