I haven't scripting in years, I used to be an old scripter back in the TUS days, 51a and eventually in the 55i days.. but, I've forgotten a lot in the past 5 years or so, and I can't seem to wrap my head around this problem and I feel it should be simple.
Basically, I'm trying to (if possible) trigger the "Skillgain chance" in an unnatural environment for a skill.
What I plan on doing is completely disabling ItemID's normal functions, and "fake it" with another function. The new way I plan on writing ItemID (and Arms Lore, but that's not important right now) is when you single click on an item it'll tell you information about that item in a SYSMESSAGE, based on how high your ItemID skill is, and then, "test" the skill and allow skillgain like you would if you used it normally.
Alternatively, I wouldn't mind simply having a "Random chance" script that just raised the skill at random, but I'd rather it just test the skill correctly and let Sphere decide if it wants to give the user a skillgain.
Here's a quick script I have written up, I just need to plugin the value that either tests the skill (allowing for default skill gains) or just stick in a random variable for a chance at a gain. Either will work, but I'm stuck trying to figure it out.
I eventually plan on plugging this into every single item in the game (Yes, I know, I'm crazy.) but first I need to figure the skill gains out.
Super-basic script I have so far, yes, I know I overwrote a core ITEMDEF, I did it on purpose.
Code:
[ITEMDEF 0f0c]
DEFNAME=i_bottle_medium_empty
TYPE=T_POTION_EMPTY
SKILLMAKE=TINKERING 21.3,t_tinker_tools
RESOURCES=2 i_ingot_iron
WEIGHT=1
ON=@CLICK
IF (<SRC.ITEMID> < 10)
SRC.SYSMESSAGE It's an empty glass bottle.
ELSE
IF (<SRC.ITEMID> < 30)
SRC.SYSMESSAGE It's a medium sized empty glass bottle.
ELSE
IF (<SRC.ITEMID> < 60)
SRC.SYSMESSAGE It's a medium sized empty glass bottle, used in alchemy. It can be filled with water.
ELSE
IF (<SRC.ITEMID> < 90)
SRC.SYSMESSAGE This is a glass bottle, commonly used for alchemy. Alchemists would mix their reagents and some water inside this bottle to create a potion.
ELSE
![[Image: 4_Logo.png]](http://aetharia.com/public/style_images/4_Logo.png)
An MMORPG based on the Ultima Online engine.
Completely Custom Map, GUI, AI, Combat, Skills, Crafts, Art, Music and so much more.
http://aetharia.com - Home of Ambition!