The following warnings occurred:
Warning [2] Use of undefined constant SAPI_NAME - assumed 'SAPI_NAME' (this will throw an Error in a future version of PHP) - Line: 3388 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3388 errorHandler->error
/showthread.php 116 build_archive_link
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/inc/functions.php 3324 build_forum_breadcrumb
/showthread.php 195 build_forum_breadcrumb
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/showthread.php 195 build_forum_breadcrumb
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 786 - File: showthread.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/showthread.php 786 errorHandler->error






Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Trying to emulate skill advancement and override the original skill (almost) totally.
Author Message
Rayvolution
Journeyman
*

Posts: 135
Likes Given: 0
Likes Received: 2 in 2 posts
Joined: Jul 2012
Reputation: 1

Aetharia

Post: #1
Trying to emulate skill advancement and override the original skill (almost) totally.
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. Smile

Super-basic script I have so far, yes, I know I overwrote a core ITEMDEF, I did it on purpose. Smile
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]
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!
(This post was last modified: 07-21-2012 03:28 PM by Rayvolution.)
07-21-2012 03:25 PM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Messages In This Thread
Trying to emulate skill advancement and override the original skill (almost) totally. - Rayvolution - 07-21-2012 03:25 PM

Forum Jump:


User(s) browsing this thread: 1 Guest(s)