summaryrefslogtreecommitdiff
path: root/npc
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2020-04-25 05:41:53 -0300
committerJesusaves <cpntb1@ymail.com>2020-04-25 05:41:53 -0300
commit4b89f3b46be7287264ed934b2f6c8bd185fba854 (patch)
treeb1cd47ccc62df986296865eeaae4b9f21df41c0f /npc
parent9a5dbf071df9b07d2189f1ae7a7e6d268b2f0450 (diff)
downloadserverdata-4b89f3b46be7287264ed934b2f6c8bd185fba854.tar.gz
serverdata-4b89f3b46be7287264ed934b2f6c8bd185fba854.tar.bz2
serverdata-4b89f3b46be7287264ed934b2f6c8bd185fba854.tar.xz
serverdata-4b89f3b46be7287264ed934b2f6c8bd185fba854.zip
Guild Exchange House (actually not a house but anyway)
Now you can claim Kamelot Castle "ultimate" rewards.
Diffstat (limited to 'npc')
-rw-r--r--npc/012-1/bot.txt2
-rw-r--r--npc/guilds/_import.txt1
-rw-r--r--npc/guilds/exchange.txt95
3 files changed, 97 insertions, 1 deletions
diff --git a/npc/012-1/bot.txt b/npc/012-1/bot.txt
index dde000620..3a6422b76 100644
--- a/npc/012-1/bot.txt
+++ b/npc/012-1/bot.txt
@@ -35,7 +35,7 @@ L_Menu:
L_Where:
mes "";
mesn;
- mesq l("If you head west, you'll eventually reach Jesus Saves' Castle.");
+ mesq l("If you head west, you'll eventually reach the magical Kamelot Castle.");
next;
mesn;
mesq l("Inside it, there'll be a Transcendence Gate.");
diff --git a/npc/guilds/_import.txt b/npc/guilds/_import.txt
index 7bb36e1e4..43098eeb3 100644
--- a/npc/guilds/_import.txt
+++ b/npc/guilds/_import.txt
@@ -3,6 +3,7 @@
"npc/guilds/_warps.txt",
"npc/guilds/alchemy.txt",
"npc/guilds/bank.txt",
+"npc/guilds/exchange.txt",
"npc/guilds/forge.txt",
"npc/guilds/logs.txt",
"npc/guilds/management.txt",
diff --git a/npc/guilds/exchange.txt b/npc/guilds/exchange.txt
new file mode 100644
index 000000000..360cb2c66
--- /dev/null
+++ b/npc/guilds/exchange.txt
@@ -0,0 +1,95 @@
+// TMW2 Script
+// Author:
+// Jesusalva
+// Description:
+// Trades Guild Coins for useful items
+// Variable:
+// GUILDSHOP (bitmask)
+
+guilds,29,24,0 script Guild Coin Exchange NPC_NO_SPRITE,{
+ do
+ {
+ mes l("You have %d %s", countitem(GuildCoin), getitemlink(GuildCoin));
+ next;
+ // Calculate fruit cost
+ if (!(GUILDSHOP & GEX_fruit1)) {
+ .@fruitcost=100; .@fruitId=GEX_fruit1;
+ } else if (!(GUILDSHOP & GEX_fruit2)) {
+ .@fruitcost=200; .@fruitId=GEX_fruit2;
+ } else if (!(GUILDSHOP & GEX_fruit3)) {
+ .@fruitcost=350; .@fruitId=GEX_fruit3;
+ } else if (!(GUILDSHOP & GEX_fruit4)) {
+ .@fruitcost=500; .@fruitId=GEX_fruit4;
+ } else if (!(GUILDSHOP & GEX_fruit5)) {
+ .@fruitcost=750; .@fruitId=GEX_fruit5;
+ } else {
+ .@fruitcost=false; .@fruitId=GEX_fruitMAX;
+ }
+
+ // Calculate blueprint cost
+ if (!(GUILDSHOP & GEX_blue1)) {
+ .@bluecost=50; .@blueId=GEX_blue1;
+ } else if (!(GUILDSHOP & GEX_blue2)) {
+ .@bluecost=75; .@blueId=GEX_blue2;
+ } else if (!(GUILDSHOP & GEX_blue3)) {
+ .@bluecost=100; .@blueId=GEX_blue3;
+ } else if (!(GUILDSHOP & GEX_blue4)) {
+ .@bluecost=150; .@blueId=GEX_blue4;
+ } else if (!(GUILDSHOP & GEX_blue5)) {
+ .@bluecost=200; .@blueId=GEX_blue5;
+ } else {
+ .@bluecost=200; .@blueId=GEX_blueMAX;
+ }
+
+ menuint
+ l("Close"), 0,
+ rif(.@fruitcost, .@fruitcost+l(" Coins - Mysterious Fruit")), .@fruitId,
+ rif(.@bluecost, .@bluecost+l(" Coins - Ancient Blueprint")), .@blueId;
+
+ mes "";
+ switch (@menuret) {
+ case GEX_fruit1:
+ case GEX_fruit2:
+ case GEX_fruit3:
+ case GEX_fruit4:
+ case GEX_fruit5:
+ case GEX_fruitMAX:
+ if (countitem(GuildCoin) < .@fruitcost)
+ close;
+ delitem GuildCoin, .@fruitcost;
+ getitem MysteriousFruit, 1;
+ if (@menuret > 0)
+ GUILDSHOP=GUILDSHOP|@menuret;
+ break;
+
+ case GEX_blue1:
+ case GEX_blue2:
+ case GEX_blue3:
+ case GEX_blue4:
+ case GEX_blue5:
+ case GEX_blueMAX:
+ if (countitem(GuildCoin) < .@bluecost)
+ close;
+ delitem GuildCoin, .@bluecost;
+ getitem AncientBlueprint, 1;
+ if (@menuret > 0)
+ GUILDSHOP=GUILDSHOP|@menuret;
+ break;
+ }
+
+ } while (@menuret != 0);
+ close;
+
+OnInit:
+ .@npcId = getnpcid(.name$);
+ setunitdata(.@npcId, UDT_HEADTOP, TopHat);
+ setunitdata(.@npcId, UDT_HEADMIDDLE, GoldenWarlordPlate);
+ setunitdata(.@npcId, UDT_WEAPON, JeansChaps);
+ setunitdata(.@npcId, UDT_HEADBOTTOM, AssassinBoots);
+ setunitdata(.@npcId, UDT_HAIRSTYLE, 25);
+ setunitdata(.@npcId, UDT_HAIRCOLOR, 4);
+
+ .sex = G_MALE;
+ .distance = 5;
+ end;
+}