darksun84 
Sir Spamalot
   
Posts: 1,687
Likes Given: 245
Likes Received: 162 in 151 posts
Joined: Mar 2012
Reputation: 35
![]()
|
RE: Is there a way to get the defname of the ore that is being mined
you can use the @RegionResourceFound trigger
https://wiki.spherecommunity.net/index.p...ourceFound
Also you can improve the if statement in this way:
Code:
ON=@SkillMakeItem
local.skillName = <action>
local.skillValue = <act.SKILLMAKE.1.VAL>
if <local.skillName> == skill_alchemy>
calculate_tools_bonus <findid.i_mortar_pestle>, <local.skillValue>, "alchemy"
elseif <local.skillName> == skill_blacksmith
calculate_tools_bonus <src.weapon>, <local.skillValue>, "blacksmithing"
elseif <local.skillName> == skill_bowcraft
calculate_tools_bonus <src.weapon>, <local.skillValue>, "bowcraft"
elseif <local.skillName> == skill_carpentry
calculate_tools_bonus <findid.i_saw>, <local.skillValue>, "carpentry"
elseif <local.skillName> == skill_inscription
calculate_tools_bonus <findid.i_pen_and_ink>, <local.skillValue>, "inscription"
elseif <local.skillName> == skill_tailoring
calculate_tools_bonus <findid.i_sewing_kit>, <local.skillValue>, "tailoring"
elseif <local.skillName> == skill_inscription
calculate_tools_bonus <findid.i_tinker_tools>, <local.skillValue>, "tinkering"
endif
return 0
No need to use eval in if, they are automatically evaluated, and skill_* definition are just number so no need to string compare them, also no need to do src.weapon.uid or <findid.i_tinker_tools.uid> because <src.weapon> or <findid.i_tinker_tools> return the uid by default
(This post was last modified: 07-20-2018 07:13 PM by darksun84.)
|
|
07-20-2018 06:42 PM |
|
The following 1 user Likes darksun84's post:1 user Likes darksun84's post
fabiohvp (07-21-2018)
|