diff options
Diffstat (limited to 'npc/guilds/exchange.txt')
-rw-r--r-- | npc/guilds/exchange.txt | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/npc/guilds/exchange.txt b/npc/guilds/exchange.txt index 360cb2c66..1d2fe9b17 100644 --- a/npc/guilds/exchange.txt +++ b/npc/guilds/exchange.txt @@ -26,6 +26,21 @@ guilds,29,24,0 script Guild Coin Exchange NPC_NO_SPRITE,{ .@fruitcost=false; .@fruitId=GEX_fruitMAX; } + // Calculate mercbox cost + if (!(GUILDSHOP & GEX_merc1)) { + .@merccost=50; .@mercId=GEX_merc1; + } else if (!(GUILDSHOP & GEX_merc2)) { + .@merccost=100; .@mercId=GEX_merc2; + } else if (!(GUILDSHOP & GEX_merc3)) { + .@merccost=175; .@mercId=GEX_merc3; + } else if (!(GUILDSHOP & GEX_merc4)) { + .@merccost=250; .@mercId=GEX_merc4; + } else if (!(GUILDSHOP & GEX_merc5)) { + .@merccost=350; .@mercId=GEX_merc5; + } else { + .@merccost=false; .@mercId=GEX_mercMAX; + } + // Calculate blueprint cost if (!(GUILDSHOP & GEX_blue1)) { .@bluecost=50; .@blueId=GEX_blue1; @@ -44,6 +59,7 @@ guilds,29,24,0 script Guild Coin Exchange NPC_NO_SPRITE,{ menuint l("Close"), 0, rif(.@fruitcost, .@fruitcost+l(" Coins - Mysterious Fruit")), .@fruitId, + rif(.@merccost, .@merccost+l(" Coins - Mercenary Boxset ++")), .@mercId, rif(.@bluecost, .@bluecost+l(" Coins - Ancient Blueprint")), .@blueId; mes ""; @@ -62,6 +78,20 @@ guilds,29,24,0 script Guild Coin Exchange NPC_NO_SPRITE,{ GUILDSHOP=GUILDSHOP|@menuret; break; + case GEX_merc1: + case GEX_merc2: + case GEX_merc3: + case GEX_merc4: + case GEX_merc5: + case GEX_mercMAX: + if (countitem(GuildCoin) < .@merccost) + close; + delitem GuildCoin, .@merccost; + getitem (GUILDSHOP & GEX_merc3 ? MercBoxE : MercBoxD), 1; + if (@menuret > 0) + GUILDSHOP=GUILDSHOP|@menuret; + break; + case GEX_blue1: case GEX_blue2: case GEX_blue3: |