SphereCommunity
another little question :c - Printable Version

+- SphereCommunity (https://forum.spherecommunity.net)
+-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d)
+--- Forum: General Help (/Forum-General-Help)
+--- Thread: another little question :c (/Thread-another-little-question-c)



another little question :c - jexnico - 02-18-2016 09:19 AM

as I do for all new players to log into the server automatically all skills his move to 29.0? and how do I let the difficulty of evolving an easier skill? (Easy shard)


RE: another little question :c - Artyk - 02-18-2016 09:51 AM

To set the skills at first login:

Code:
on=@Login
if (tag0.skillset_flag==0)
  allskills 290
  tag0.skillset_flag=1
endif

To set an easy raising of a skill you have to work on adv_rate of each skill (skills)


RE: another little question :c - Khaos - 02-18-2016 09:54 AM

Well, you'd set the f_onchar_create or whatever it is called set the skills to whatever using allskills=<value> on the first login for that character.

As for the skillgain system, this might work? Not tested.
Code:
on=@SkillGain
if (<argn1> == <argn3>) // Is our skill value the same as the max it can gain? If so, no gain is made.
return 1
endif
if (<argn2> < <argn1>) // Did the roll of 1 - 1000 score lower than our current skill?
return 1 // If so, we don't get a gain.
endif
trigger @SkillChange
return 0 // Should this be 1? I am not sure off the top of my head.

on=@SkillChange
argn2=1 // Amount to gain in skill.
argn1=<eval <argn1> + <argn2>> // lets add that to current skill now.
return 0 // Again, should this be 1?? Not sure off the top of my head.

or as Artyk said with the tag. Either way I believe works. I would just rather handle it in after creation is done or whatever and not have to add a tag if possible.


RE: another little question :c - Artyk - 02-18-2016 10:03 AM

Khaos I don't know if it works, I remeber that @skillgain triggers only when you actually are going to get the gain

What I'm using:

Code:
[EVENTS e_skillgain]
ON=@SkillGain
    RETURN 1
    
ON=@SkillSuccess
    f_skill_gain <ARGN1>

ON=@SkillFail
    f_skill_gain <ARGN1>
    
ON=@SkillUseQuick
    f_skill_gain <ARGN1>

    
[FUNCTION f_skill_gain]
LOCAL.SKILL_GAIN = 1
I.<ARGN1> = <EVAL <I.<ARGN1>> + <LOCAL.SKILL_GAIN>>



RE: another little question :c - jexnico - 02-18-2016 10:49 AM

(02-18-2016 09:51 AM)Artyk Wrote:  To set the skills at first login:

Code:
on=@Login
if (tag0.skillset_flag==0)
  allskills 290
  tag0.skillset_flag=1
endif

To set an easy raising of a skill you have to work on adv_rate of each skill (skills)


in which text document I put this event?


RE: another little question :c - Extreme - 02-18-2016 11:07 AM

(02-18-2016 10:49 AM)jexnico Wrote:  
(02-18-2016 09:51 AM)Artyk Wrote:  To set the skills at first login:

Code:
on=@Login
if (tag0.skillset_flag==0)
  allskills 290
  tag0.skillset_flag=1
endif

To set an easy raising of a skill you have to work on adv_rate of each skill (skills)


in which text document I put this event?

Can I ask something? What is your server? TFG?


RE: another little question :c - Khaos - 02-18-2016 12:06 PM

@SkillGain should be fired in @SkillSuccess and @SkillFail. The @SkillGain should be parsing whether there is a gain from there. Which I then checked for a gain. I checked for failures and then if there was a chance for gain, forced @SkillChange trigger. Which then that checked if the skill would raise past the cap or not. If not, process the gain.

@SkillChange triggers if @SkillGain says you get a gain. @SkillGain is where it decides whether you do or not. Not @SkillSuccess or @SkillFail.

Though @SkillFail, don't quote me that it checks for @SkillGain. It should. But I don't remember anymore. If it isn't, it needs to in the hardcode, because even a failure has a chance to get a gain in EA, just a lesser chance.


RE: another little question :c - jexnico - 02-18-2016 09:08 PM

(02-18-2016 11:07 AM)Extreme Wrote:  
(02-18-2016 10:49 AM)jexnico Wrote:  
(02-18-2016 09:51 AM)Artyk Wrote:  To set the skills at first login:

Code:
on=@Login
if (tag0.skillset_flag==0)
  allskills 290
  tag0.skillset_flag=1
endif

To set an easy raising of a skill you have to work on adv_rate of each skill (skills)

in which text document I put this event?

Can I ask something? What is your server? TFG?

Não extreme, to tentando fazer um easy shard qualquer... uhashusauhas.
Isso ta comendo meus neurônios... kkkk


RE: another little question :c - rastrero - 02-23-2016 06:07 AM

dude, I dont know what exactly U r looking for but if u gonna do it once per char and u will never set it again dont use @login


go to sphere_serv_triggers.scp in sphere root dir, look for the function f_onchar_create and put it like this:


[function f_onchar_create]
allskills 290

//this way u dont need to keep an useless tag.