Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
SKF_SCRIPTED
Author Message
kn4tseb
Master
**

Posts: 392
Likes Given: 45
Likes Received: 10 in 10 posts
Joined: May 2014
Reputation: 0



Post: #1
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
Find all posts by this user Like Post Quote this message in a reply
Extreme
Grandmaster Poster
***

Posts: 1,140
Likes Given: 217
Likes Received: 89 in 76 posts
Joined: May 2012
Reputation: 20

SphereCommunity

Post: #2
RE: SKF_SCRIPTED
Hoooly shit! How many eval's do you need? Lol
As I said, you need code your own bandage system because its not accessible.

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:09 AM
Find all posts by this user Like Post Quote this message in a reply
[+] 1 user Likes Extreme's post
kn4tseb
Master
**

Posts: 392
Likes Given: 45
Likes Received: 10 in 10 posts
Joined: May 2014
Reputation: 0



Post: #3
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
Find all posts by this user Like Post Quote this message in a reply
Extreme
Grandmaster Poster
***

Posts: 1,140
Likes Given: 217
Likes Received: 89 in 76 posts
Joined: May 2012
Reputation: 20

SphereCommunity

Post: #4
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
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: #5
RE: SKF_SCRIPTED
ACTION=-1 will make you stop the action, so it's the same of abort the skill (@Abort)

to make sure it will fail (@Fail), you need to set a negative ACTDIFF (like -10), this will make the skill fail at the end of the action. And if you need a instant-fail just use ACTDIFF=-10 and then TIMER=0
09-11-2014 08:14 AM
Find all posts by this user Like Post Quote this message in a reply
kn4tseb
Master
**

Posts: 392
Likes Given: 45
Likes Received: 10 in 10 posts
Joined: May 2014
Reputation: 0



Post: #6
RE: SKF_SCRIPTED
Got it but i tried with negative ACTDIFF values and indeed it prevents the skill to success but it doesnt fire the fail trigger

Well, fulltrigger @skillfail did the job, which is great, would have been perfect if negatives actdiff values fire the @fail trigger but im ok with this..
thank you both guys.
(This post was last modified: 09-11-2014 08:27 AM by kn4tseb.)
09-11-2014 08:15 AM
Find all posts by this user Like Post Quote this message in a reply
XuN
Sphere Developer
*****

Posts: 852
Likes Given: 102
Likes Received: 156 in 119 posts
Joined: Jul 2013
Reputation: 30



Post: #7
RE: SKF_SCRIPTED
SKF_SCRIPTED means scripted ... no defaults at all Smile
09-12-2014 12:38 AM
Find all posts by this user Like Post Quote this message in a reply
[+] 1 user Likes XuN's post
kn4tseb
Master
**

Posts: 392
Likes Given: 45
Likes Received: 10 in 10 posts
Joined: May 2014
Reputation: 0



Post: #8
RE: SKF_SCRIPTED
understood, it's just not easy at first to know what is a default behavior and what is not.. for example @Gain and ADV_RATES .. im not so sure how they work under a SKF_SCRIPTED but they do pretty well actually, most of times there's no need to touch it, so i suppose it's something learnt by SUCCESS/ERROR intents. =]
09-12-2014 05:24 AM
Find all posts by this user Like Post Quote this message in a reply
XuN
Sphere Developer
*****

Posts: 852
Likes Given: 102
Likes Received: 156 in 119 posts
Joined: Jul 2013
Reputation: 30



Post: #9
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
Find all posts by this user Like Post Quote this message in a reply
kn4tseb
Master
**

Posts: 392
Likes Given: 45
Likes Received: 10 in 10 posts
Joined: May 2014
Reputation: 0



Post: #10
RE: SKF_SCRIPTED
yes but difficulty is harder when higher??? and ARGN2 under @Gain it changes with adv_rates, nomatter if it or not SKF_SCRIPTED, its not neccesary to set a value, i suppose it checks ACT's and ACTDIFF to make some calculations about skillgaining...
09-13-2014 08:25 AM
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)