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






Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Forge: check if smelt an ore fails or not
Author Message
Rizz
Master
**

Posts: 396
Likes Given: 21
Likes Received: 14 in 9 posts
Joined: Oct 2012
Reputation: 0



Post: #1
Forge: check if smelt an ore fails or not
How can I make a check to know if I get a success when I try to smelt an ore inot a ingot?
09-08-2015 02:28 AM
Find all posts by this user Like Post Quote this message in a reply
escribano
Journeyman
*

Posts: 170
Likes Given: 16
Likes Received: 32 in 23 posts
Joined: Nov 2012
Reputation: 2

Dragon Shard

Post: #2
RE: Forge: check if smelt an ore fails or not
Rizz, i really don't know if sphere by default do this...
I've re-script the entire craft system (packets, skillmenus, improvements, etc..) to adapt it to my shard, in my script i can handle that by default.


What im sure you can do is re-script the "smelting system", just override the typedef t_ore and create your custom smelting system on the @DClick trigger Smile

1) Inside the trigger @DClick, look for a t_forge closer to the player
2) See if ores is inside the backpack (if you want to block players smelting ore from ground)
3) Decide if you want to smell ore-by-ore or the entire amount
4) Face the player to the forge and trigger the animation and sound of smelting
5) You can do some aditional effects on the forge if you want
6) Make the if/else that will handle if the player have smelted right or failed.
7) Trigger an function that will "consume" the ores and give back the player the amount of ingots (it the player smelts right)
8) The system also need to give to the player skill sometimes, you can use the skillgain function to do that
9) Show the desired sysmessages or notices (some people like notices, i dunno why)

Seems hard.. but it's not Smile

UltimaPHP - OpenSource Ultima Online Server v0.1-pre-alpha under development, we need help!
(This post was last modified: 09-08-2015 05:21 AM by escribano.)
09-08-2015 05:15 AM
Find all posts by this user Like Post Quote this message in a reply
Rizz
Master
**

Posts: 396
Likes Given: 21
Likes Received: 14 in 9 posts
Joined: Oct 2012
Reputation: 0



Post: #3
RE: Forge: check if smelt an ore fails or not
Ahahahah I knew it XD
Bcuz for now I didn't re-write all the smelting system, I just put some code to improve it but I noticed a bug when you fail at smelting.
Hope I could use the ACTDIFF somewhere XD
(This post was last modified: 09-08-2015 12:49 PM by Rizz.)
09-08-2015 12:44 PM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Forum Jump:


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