JS-TWEAKING
Room.at(90).tweak(percent,target,vnum[,equip]);Items can be set to tweak via the above formula which requires three parameters and an optional fourth.
<percent>defines the percentage chance to tweak the item.
<target> defines where to put the item when loaded, can be actor, self, room etc.
<vnum> defines the vnum of the item to load and tweak.
<equip> is an optional parameter, if anything is included here the item will also
be equipped.
This will put the item through the tweak code which will tweak the item based on the items level and the slot in which it belongs. T he rule Enchanter's Delight will improve both the percentage chance and level of tweaks by 30%. Note, in the old tweak formula, perc entage and level were considered the same, hence an item that tweaked 50% of the time would also tweak to a level of 50 even though it was a level 150 item.
In order to effectively use the new formula, you must ensure that the level property on the object is appropriately set. If you cannot set this level property for one reason or another (though this should not be done often) you can call an alternative function which can accept a specifically defined level.
Room.at(90).tweakLevel(percent,target,level,vnum[,equip]);<level> defines the level to tweak the item to.
Recent Updates:
-Tweak code now uses the action description on the item to store information about when it was loaded, including a unique incrementi ng number stamp.
-Change to default all catalogue items (vnum less then or equal to 9999) to level 20 tweak if no level property is set or passed.
-Change to allow builder-defined tweak possibilities. See JS-TWEAKING-ARRAY for full details.
-Added alias tweakMob() function, some old mobs have been using this and thus haven't been loading eq. (29-Jan-2007)
Last edited by Engada in January 2007.