summaryrefslogtreecommitdiff
path: root/npc/craft/tweak.txt
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2019-05-27 11:01:20 -0300
committerJesusaves <cpntb1@ymail.com>2019-05-27 11:01:20 -0300
commita85c9e807da07c7e2b8f5f6586114556f5fcf124 (patch)
tree023e33315f5efc850da91dbe57a2813105ea7253 /npc/craft/tweak.txt
parent46585960fd6f58ecf3ab6990cfe6870718345bb7 (diff)
downloadserverdata-a85c9e807da07c7e2b8f5f6586114556f5fcf124.tar.gz
serverdata-a85c9e807da07c7e2b8f5f6586114556f5fcf124.tar.bz2
serverdata-a85c9e807da07c7e2b8f5f6586114556f5fcf124.tar.xz
serverdata-a85c9e807da07c7e2b8f5f6586114556f5fcf124.zip
Experimental Option Setting
Diffstat (limited to 'npc/craft/tweak.txt')
-rw-r--r--npc/craft/tweak.txt46
1 files changed, 46 insertions, 0 deletions
diff --git a/npc/craft/tweak.txt b/npc/craft/tweak.txt
new file mode 100644
index 000000000..cc8242275
--- /dev/null
+++ b/npc/craft/tweak.txt
@@ -0,0 +1,46 @@
+// TMW2 Script
+// Author:
+// Jesusalva
+// Description:
+// Smith System (Player, Guild, NPC)
+// Notes:
+// It's like smithing, but it only change an item options
+
+// Usage: SmithTweakSystem ({scope})
+// Scopes: CRAFT_PLAYER, CRAFT_NPC
+// Returns true on success, false on failure
+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;
+
+ .@id=requestitemindex();
+ mes "";
+
+ if (.@id < 0)
+ return false;
+
+ // Clear all five options
+ setitemoptionbyindex(.@id, 0, 0, 0);
+ setitemoptionbyindex(.@id, 1, 0, 0);
+ setitemoptionbyindex(.@id, 2, 0, 0);
+ setitemoptionbyindex(.@id, 3, 0, 0);
+ setitemoptionbyindex(.@id, 4, 0, 0);
+
+ // Check if you fail
+ if (rand(0,10000) < 200) {
+ mesc l("ITEM BREAKS, ALL OPTIONS LOST!"), 1;
+ return false;
+ }
+
+ // Eh, apply some stuff for testing
+ setitemoptionbyindex(.@id, 0, VAR_MAXHPAMOUNT, 200);
+ setitemoptionbyindex(.@id, 1, VAR_STRAMOUNT, 10);
+ setitemoptionbyindex(.@id, 2, VAR_VITAMOUNT, -5);
+ mesc l("SUCCESS!"), 3;
+ return true;
+}