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-nmm6 (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-nmm6 (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-nmm6 (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
Change smelt action to blacksmithing
Author Message
fabiohvp
Apprentice
*

Posts: 23
Likes Given: 11
Likes Received: 5 in 4 posts
Joined: Jul 2018
Reputation: 0



Post: #1
Change smelt action to blacksmithing
For me it makes more sence if the blacksmith and not the miner to smelt the ores.
So I would like to change the action of smelting to increase blacksmithing and not mining.

Also I want to know how to prevent the player from increasing skill more than 60.0 by smelting ores.

PS: I tried to change skillmake to blacksmithing in all ingots and it still increase mining.
(This post was last modified: 07-27-2018 12:54 PM by fabiohvp.)
07-27-2018 12:53 PM
Find all posts by this user Like Post Quote this message in a reply
darksun84
Sir Spamalot
****

Posts: 1,687
Likes Given: 245
Likes Received: 162 in 151 posts
Joined: Mar 2012
Reputation: 35



Post: #2
RE: Change smelt action to blacksmithing
Yes, ore smelting always use mining and it calls SkillUseQuick/UseQuick triggers.
So you can do to like this, by adding this trigger in the mining skill section in sphere_skills.scp

Code:
//Intercept smelting and test against blacksmith
ON=@useQUick
//argn2 is the difficulty, this will also allow to increase the blacksmithing skill by smelting, 7 is the blacksmith skill ID
if <skillusequick 7,<argn2>>    
    return 1 // Succeeds the skill use without awarding skill gain to mining.
else
    return 0 // Fails the skill use without awarding skill gain to mining.
endif
(This post was last modified: 07-27-2018 04:23 PM by darksun84.)
07-27-2018 04:22 PM
Find all posts by this user Like Post Quote this message in a reply
[+] 1 user Likes darksun84's post
fabiohvp
Apprentice
*

Posts: 23
Likes Given: 11
Likes Received: 5 in 4 posts
Joined: Jul 2018
Reputation: 0



Post: #3
RE: Change smelt action to blacksmithing
Very nice, but I have a couple questions.

1 - Is there another mining (beside smelting) action that triggers @UseQuick?

2 - How do I know which action triggers UseQuick, can you give me an example of another skill that have @UseQuick and which action triggers it? What is the difference between @UseQuick and @Start?
07-28-2018 11:05 AM
Find all posts by this user Like Post Quote this message in a reply
Coruja
Sphere Developer
*****

Posts: 987
Likes Given: 5
Likes Received: 226 in 187 posts
Joined: Jul 2012
Reputation: 7

Dimension Shard

Post: #4
RE: Change smelt action to blacksmithing
@[Skill]UseQuick is used by passive skills, like mining (when smelt ore), arms lore (when repair items), parrying, magic resist, camping (when use kindling), stealing (when use pickpocket dip), archery/throwing (when use archery butte), musicianship and tracking

but anyway, taking a look at the smelting code, @UseQuick seems to be used only to make the action succeed or fail using return 0/1. To take full control of the entire smelting behavior you must use custom triggers on [TYPEDEF t_ore] or [TYPEDEF t_forge]
07-29-2018 04:36 PM
Find all posts by this user Like Post Quote this message in a reply
[+] 1 user Likes Coruja's post
Post Reply 


Forum Jump:


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