summaryrefslogtreecommitdiff
path: root/npc/craft/tweak.txt
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2019-05-27 16:51:27 -0300
committerJesusaves <cpntb1@ymail.com>2019-05-27 16:51:27 -0300
commite8d53b9eecd171acf1461795dd589af16a506a4a (patch)
tree53367c3bda4346c32ead647dbe6d5c4982a9f8be /npc/craft/tweak.txt
parentf9b53e1fd26eea3a895d8712813f3daab70986b8 (diff)
downloadserverdata-e8d53b9eecd171acf1461795dd589af16a506a4a.tar.gz
serverdata-e8d53b9eecd171acf1461795dd589af16a506a4a.tar.bz2
serverdata-e8d53b9eecd171acf1461795dd589af16a506a4a.tar.xz
serverdata-e8d53b9eecd171acf1461795dd589af16a506a4a.zip
Testing options craft system... Far from ready or usable
Diffstat (limited to 'npc/craft/tweak.txt')
-rw-r--r--npc/craft/tweak.txt26
1 files changed, 8 insertions, 18 deletions
diff --git a/npc/craft/tweak.txt b/npc/craft/tweak.txt
index c6d966f4e..d46a80db6 100644
--- a/npc/craft/tweak.txt
+++ b/npc/craft/tweak.txt
@@ -21,32 +21,22 @@ function script SmithTweakSystem {
.@id=requestitemindex();
mes "";
- if (.@id < 0)
+ // Ask player to confirm
+ if (!csys_Confirm(.@id))
return false;
- // *getequipisenableopt(<equipment slot>) → cannot use here
- // Not an equipment
- if (!getiteminfo(.@id, ITEMINFO_LOC))
- 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) {
+ if (!csys_Check(.@id)) {
mesc l("ITEM BREAKS, ALL OPTIONS LOST!"), 1;
return false;
}
// Eh, apply some stuff for testing
- setitemoptionbyindex(.@id, 0, VAR_MAXHPAMOUNT, 2000);
- setitemoptionbyindex(.@id, 1, VAR_STRAMOUNT, 10);
- setitemoptionbyindex(.@id, 2, VAR_VITAMOUNT, -5);
+ if (is_gm() && !CRAFTSYS_CURRENT) {
+ CRAFTSYS_CURRENT=CRGROUP_BASE;
+ CRAFTSYS[CRGROUP_BASE]=10;
+ }
+ csys_Apply(.@id);
mesc l("SUCCESS!"), 3;
return true;
}