diff options
author | Jesusaves <cpntb1@ymail.com> | 2019-05-28 11:32:13 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2019-05-28 11:32:13 -0300 |
commit | ec1745f659a8b5e21591782cd3c0a7b239e2f1e6 (patch) | |
tree | 8925132eb2738bca231f5f9ee8c257676923951d /npc/craft/tweak.txt | |
parent | 05fc156501201bc5cde04a8abaebe0015fcf2a42 (diff) | |
download | serverdata-ec1745f659a8b5e21591782cd3c0a7b239e2f1e6.tar.gz serverdata-ec1745f659a8b5e21591782cd3c0a7b239e2f1e6.tar.bz2 serverdata-ec1745f659a8b5e21591782cd3c0a7b239e2f1e6.tar.xz serverdata-ec1745f659a8b5e21591782cd3c0a7b239e2f1e6.zip |
Option to remove an item options
Diffstat (limited to 'npc/craft/tweak.txt')
-rw-r--r-- | npc/craft/tweak.txt | 33 |
1 files changed, 29 insertions, 4 deletions
diff --git a/npc/craft/tweak.txt b/npc/craft/tweak.txt index d46a80db6..ba5a4b2bb 100644 --- a/npc/craft/tweak.txt +++ b/npc/craft/tweak.txt @@ -6,6 +6,25 @@ // Notes: // It's like smithing, but it only change an item options +// Usage: SmithTweakReset () +// Asks if player wants to remove an item options. And remove them. +function script SmithTweakReset { + mesc l("Note: This action cannot be undone."), 1; + mes l("Drag and drop here the item you want to remove the options."); + + .@id=requestitemindex(); + mes ""; + + // Ask player to confirm + mesc l("Are you sure?"), 1; + mesc l("Note: This action cannot be undone."), 1; + if (!csys_Confirm(.@id)) + return; + + csys_Check(); + return; +} + // Usage: SmithTweakSystem ({scope}) // Scopes: CRAFT_PLAYER, CRAFT_NPC // Returns true on success, false on failure @@ -13,10 +32,13 @@ function script SmithTweakSystem { // Set .scope, .knowledge and .success .scope=getarg(0, CRAFT_PLAYER); copyarray(.knowledge,RECIPES_EQUIPMENT,getarraysize(RECIPES_EQUIPMENT)); - .success=false; mes l("Which item will you tweak?"); - mesc l("WARNING, ITEM MAY BREAK"), 1; + mesc l("Note: You may fail to write skills to it."), 1; + mesc l("Operation Cost: 600 GP"), 3; + + if (Zeny < 600) + return false; .@id=requestitemindex(); mes ""; @@ -25,9 +47,12 @@ function script SmithTweakSystem { if (!csys_Confirm(.@id)) return false; + // Take the money away + Zeny-=600; + // Check if you fail if (!csys_Check(.@id)) { - mesc l("ITEM BREAKS, ALL OPTIONS LOST!"), 1; + mesc l("YOU FAIL! It is a simple item now."), 1; return false; } @@ -37,6 +62,6 @@ function script SmithTweakSystem { CRAFTSYS[CRGROUP_BASE]=10; } csys_Apply(.@id); - mesc l("SUCCESS!"), 3; + mesc l("SUCCESS! Congratulations, the item was improved!"), 3; return true; } |