summaryrefslogtreecommitdiff
path: root/npc
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2019-06-07 21:52:08 -0300
committerJesusaves <cpntb1@ymail.com>2019-06-07 21:52:08 -0300
commit0c7999d8782853f7711a884646a6054e8caa6d51 (patch)
tree7b5b1de4dfca4ccbbae2006e9a7e6d910f179d5f /npc
parent03f6cfa14a952101d777c81ad22fcb83de902612 (diff)
downloadserverdata-0c7999d8782853f7711a884646a6054e8caa6d51.tar.gz
serverdata-0c7999d8782853f7711a884646a6054e8caa6d51.tar.bz2
serverdata-0c7999d8782853f7711a884646a6054e8caa6d51.tar.xz
serverdata-0c7999d8782853f7711a884646a6054e8caa6d51.zip
Nivalis Meltdown Forge: Receive 50~70% of invested ingots back!
Coal and Everburn Powder are NEVER returned because they are consumed at craft. All values are rounded down. Wooden Sword is an exception. Only for craft items.
Diffstat (limited to 'npc')
-rw-r--r--npc/012-1/jack.txt1
-rw-r--r--npc/014-3/fountain.txt2
-rw-r--r--npc/020-5/bracco.txt64
3 files changed, 65 insertions, 2 deletions
diff --git a/npc/012-1/jack.txt b/npc/012-1/jack.txt
index 3eaf5cf54..4c44cdd43 100644
--- a/npc/012-1/jack.txt
+++ b/npc/012-1/jack.txt
@@ -52,7 +52,6 @@ L_Polish:
mesq l("You can't afford my services for that amount. Sorry.");
}
- getinventorylist;
inventoryplace WoodenLog, .@count;
Zeny = Zeny - .@Cost;
diff --git a/npc/014-3/fountain.txt b/npc/014-3/fountain.txt
index f14d23b0d..b721fd2ae 100644
--- a/npc/014-3/fountain.txt
+++ b/npc/014-3/fountain.txt
@@ -26,7 +26,7 @@
goto L_NotEnoughBottles;
if (Zeny < .@Cost)
goto L_NotEnoughMoney;
- getinventorylist;
+
inventoryplace BottleOfTonoriWater, .@count;
Zeny=Zeny-.@Cost;
diff --git a/npc/020-5/bracco.txt b/npc/020-5/bracco.txt
index 0854387a2..6a914a477 100644
--- a/npc/020-5/bracco.txt
+++ b/npc/020-5/bracco.txt
@@ -7,6 +7,31 @@
020-5,31,25,0 script Bracco NPC_M_SHOPKEEPER,{
goto L_Start;
+ // Meltdown( item, price, {id1, amount1}, {id2, amount2}... )
+ function Meltdown {
+ if (getargcount() < 2 || getargcount() % 2 != 0)
+ return Exception("Faulty learning Meltdown command invoked - error");
+
+ .@index=getarg(0);
+ .@price=getarg(1);
+ mesn;
+ mesc l("Really melt down your @@? It'll cost you @@ GP. This action cannot be undone!", getinvindexlink(.@index), .@price), 1;
+ next;
+ if (askyesno() == ASK_NO || Zeny < .@price)
+ return;
+
+ failedremovecardsindex .@index, 0;
+ Zeny-=.@price;
+
+ // TODO: Inventoryplace
+ // Add Items (if inventory is full, your fault and not mine)
+ for (.@i=2;.@i < getargcount(); .@i++) {
+ getitem getarg(.@i), getarg(.@i+1);
+ .@i++;
+ }
+ return;
+ }
+
// blacksmith_create( BaseItem1, Amount, BaseItem2, Amount, PrizeItem, Price )
function blacksmith_create {
.@base1=getarg(0);
@@ -59,11 +84,16 @@ L_Start:
select
l("Trade"),
l("I'm actually looking for an item forged!"),
+ l("I would like an item melted!"),
l("Leave");
+ mes "";
if (@menu == 2)
goto L_Forge;
+ if (@menu == 3)
+ goto L_Meltdown;
+
closedialog;
if (@menu == 1)
shop .name$;
@@ -95,6 +125,40 @@ L_Forge:
}
goto L_Forge;
+L_Meltdown:
+ mesn;
+ mesc l("What item do you want to melt down? This is irreversible, and may return some ingots to you, but there is no way to tell how many you'll receive!"), 1;
+ mesc l("Each item have it's own tax.");
+ .@it=requestitemindex();
+ delinventorylist();
+ getinventorylist();
+ .@id=@inventorylist_id[.@it];
+ mes "";
+ // Returns 50~70% of invested ingots, rounded down. Never returns Coal.
+ switch (.@id) {
+ case WoodenSword:
+ Meltdown(.@it, 500, WoodenLog, rand2(5,10)); // Exception: 25~50% returned
+ break;
+ case BugSlayer:
+ Meltdown(.@it, 1000, IronIngot, rand2(4,5));
+ break;
+ case ShortGladius:
+ Meltdown(.@it, 1500, IronIngot, rand2(6,8));
+ break;
+ case Backsword:
+ Meltdown(.@it, 2000, IronIngot, rand2(9,12), TinIngot, rand2(1,2));
+ break;
+ case ShortSword:
+ Meltdown(.@it, 2500, IronIngot, rand2(12,16), TinIngot, rand2(2,3));
+ break;
+ default:
+ mesn;
+ mesq l("I cannot melt this. I only melt down equipment, and not everything I know how to!");
+ next;
+ break;
+ }
+ goto L_Meltdown;
+
OnInit:
.@npcId = getnpcid(.name$);
setunitdata(.@npcId, UDT_HEADTOP, NPCEyes);