kn4tseb
Master
Posts: 392
Likes Given: 45
Likes Received: 10 in 10 posts
Joined: May 2014
Reputation: 0
|
SKF_SCRIPTED
Guys, i set skill veterinary as SKF_SCRIPTED and i have an issue, i cant make the skill fail.
when set action to -1 it fires @Abort and i dont know how to make fire @Fail
ON=@Start
// Fires when the skill begins.
// RETURN 1 = Prevent using the skill
// RETURN 0/2 = Allow skill to be used
// ACTION = -1 = Fail (@Fail).
// ACTDIFF = Skill required to succeed (0-100). Set to a negative value to fail the skill.
any clues
Code:
ON=@Start
ACTDIFF = <R1,<EVAL <EVAL <EVAL <ACT.STR>+<ACT.DEX>+<ACT.INT>>*10>/<EVAL <VETERINARY>+1>>>
IF <ACTDIFF> >= <VETERINARY>
ACTION = -1
ENDIF
(This post was last modified: 09-11-2014 05:23 AM by kn4tseb.)
|
|
09-11-2014 04:38 AM |
|
|
Extreme
Grandmaster Poster
Posts: 1,141
Likes Given: 217
Likes Received: 90 in 77 posts
Joined: May 2012
Reputation: 20
SphereCommunity
|
|
09-11-2014 06:09 AM |
|
The following 1 user Likes Extreme's post:1 user Likes Extreme's post
htid4life (09-11-2014)
|
kn4tseb
Master
Posts: 392
Likes Given: 45
Likes Received: 10 in 10 posts
Joined: May 2014
Reputation: 0
|
RE: SKF_SCRIPTED
HAHAHAHAHAHA well i needed a lot evals
im doing my own bandage system, but i dont know what it has to do with the wrong fired trigger.... when ACTION = -1 it is suppose to fire a @FAIL trigger, instead it fires @abort
so i would code a simulated failing behavior but it may be a waste of time cause it might be a small bug or i m doing something wrong in the SKF SKILL
thats why i ask.
PD: i also tried with negative actdiff values and it prevents the skill success but fire trigger isnt fired neither.
is it possible to call the trigger when failing?? i mean something like:
Code:
[ITEMDEF 0e21]
DEFNAME=i_bandage
TYPE=t_bandage
blabla bla ...
ON=@Targon_Char
IF <ARGO.ISCREATURE> // BRAINS 1, 10 and 13 which include tameable creatures
SKILLVETERINARY <ARGO> // function.
RETURN 1
ENDIF
Code:
ON=@Start
ACTDIFF = <R1,<EVAL <EVAL <EVAL <ACT.STR>+<ACT.DEX>+<ACT.INT>>*10>/<EVAL <EVAL <VETERINARY>/10>+1>>>
IF <ACTDIFF> >= <VETERINARY>
FULLTRIGGER @FAIL // <--------something like this?
RETURN 1
ENDIF
(This post was last modified: 09-11-2014 06:48 AM by kn4tseb.)
|
|
09-11-2014 06:19 AM |
|
|
Extreme
Grandmaster Poster
Posts: 1,141
Likes Given: 217
Likes Received: 90 in 77 posts
Joined: May 2012
Reputation: 20
SphereCommunity
|
Re: RE: SKF_SCRIPTED
(09-11-2014 06:19 AM)kn4tseb Wrote: HAHAHAHAHAHA well i needed a lot evals
im doing my own bandage system, but i dont know what it has to do with the wrong fired trigger.... when ACTION = -1 it is suppose to fire a @FAIL trigger, instead it fires @abort
so i would code a simulated failing behavior but it may be a waste of time cause it might be a small bug or i m doing something wrong in the SKF SKILL
thats why i ask.
PD: i also tried with negative actdiff values and it prevents the skill success but fire trigger isnt fired neither.
is it possible to call the trigger when failing?? i mean something like:
Code:
[ITEMDEF 0e21]
DEFNAME=i_bandage
TYPE=t_bandage
blabla bla ...
ON=@Targon_Char
IF <ARGO.ISCREATURE> // BRAINS 1, 10 and 13 which include tameable creatures
SKILLVETERINARY <ARGO> // function.
RETURN 1
ELSE
RETURN 0
ENDIF
Code:
ON=@Start
ACTDIFF = <R1,<EVAL <EVAL <EVAL <ACT.STR>+<ACT.DEX>+<ACT.INT>>*10>/<EVAL <EVAL <VETERINARY>/10>+1>>>
IF <ACTDIFF> >= <VETERINARY>
FULLTRIGGER @FAIL // <--------something like this?
RETURN 1
ENDIF
<EVAL ((<ACT.STR>+<ACT.DEX>+<ACT.INT>) *10)/((<VETERINARY>/10)+1)>
You can simple use parenthesis to make your maths...
My bandage system is fully recoded, so its not use healing/veterinary triggers.
I can't understand why you are having trouble with this... Did you try @SkillFail?
STEPS BEFORE CREATE A THREAD
- Check the revisions log;
- Use the search button and use the keywords of your problem;
- Check the WIKI;
- Create a thread.
|
|
09-11-2014 06:50 AM |
|
|
XuN
Sphere Developer
Posts: 852
Likes Given: 102
Likes Received: 156 in 119 posts
Joined: Jul 2013
Reputation: 30
|
RE: SKF_SCRIPTED
Well, in this case... skf_scripted means .... nothing happens, absolutely nothing: no gains, fails, successes, actions, crafts, nothing at all.
There's a skillgain function, skillgain skill_id,difficulty to gain, ie: skillgain alchemy,1 will make a 100% gain on alchemy skill.
|
|
09-12-2014 03:27 PM |
|
|