Jump to content
  • 0
Sign in to follow this  
Ink

Requesting a script for reading "true" skill point

Question

http://herc.ws/board/tracker/issue-8297-runeknight-loosing-a-skill-point/

 

Can anyone share a script which reads the "true" skill points, the "actual" skill points, and then add the difference (missing ones) to the player?

I think it would be usefull since there seem some more issues with missing skill points in hercules?

Edited by Medusalem

Share this post


Link to post
Share on other sites

7 answers to this question

Recommended Posts

  • 0
*skillpointcount()Returns the total amount of skill points a character possesses (SkillPoint+SP's used in skills) This command can be used to check the currently attached characters total amount of skill points. This means the skill points used in skill are counted, and added to SkillPoints (number of skill points not used).

That should come more handy?

Share this post


Link to post
Share on other sites
  • 0

just tested skillpointcount() and it doesn't calculate basic skill and quest skill

while getskilllist added everything up

 

and its kinda hard to tell what you mean true skill points

how to tell that player changed job at job level 45 ?

 

I think just give 1 extra skill point to all rune knights on the server ?

Share this post


Link to post
Share on other sites
  • 0

omg it's annie, i'm fainting *fanboy shout

 

i remember an issue on eathena with guild skills. 

 

prontera,164,170,4	script	Guild Bug Fix	864,{	OnWhisperGlobal:	if(guild_reset_progress!=0){		set @check,gettimetick(2);		if(@check-guild_reset_progress < 360){			mes "Please wait 1 hour before using the NPC again";			close;		}	}	mes "This is a npc to be used only by guild masters to rebuild their guilds in case they are bugged";	next;	set @GID,getcharid(2);	if(strcharinfo(0)!=getguildmaster(@GID)){		mes "You are not the guild master.";		close;	}	mes "Let's start with counting your guild skills.";	set @count,0;	for(set @i,10000;@i<10015;set @i,@i+1)		set @count, @count + getgdskilllv(@GID,@i);	next;	mes "Now let's count your remaining points and your guild level.";	query_sql "Select `guild_lv`,`skill_point` from `guild` where `guild_id` = '" + @GID + "'",@guild_level,@skill_point;	set @guild_level,@guild_level-1-@skill_point-@count;	next;	if(@guild_level){		mes "We need to remove "+@guild_level+" guild levels and give it again.";		next;		atcommand "@glevel -"+@guild_level;		atcommand "@glevel "+@guild_level;		mes "Everything should be fine now. You can use the npc again after 1 hour if necessary.";	} else {		mes "Everything seems fine with your guild. You can use the npc again after 1 hour if necessary.";	}	set guild_reset_progress,gettimetick(2);	close;}

 

But right now i have no real id how to check/read/apply for all skills in the class tree. 

Edited by Ridley

Share this post


Link to post
Share on other sites
  • 0

prontera,156,184,5	script	kjhsdfksjf	100,{	getskilllist;	for ( .@i = 0; .@i < @skilllist_count; .@i++ ) {		dispbottom @skilllist_id[.@i] +" -> "+ @skilllist_lv[.@i] +"  ["+ @skilllist_flag[.@i] +"]";		if ( !@skilllist_flag[.@i] )			.@skillpoints += @skilllist_lv[.@i];	}	dispbottom .@skillpoints +" vs "+ skillpointcount();	end;}
try this

.

.

.

I haven't tested if you get the point back when you're over 50 in rune knight

I just tested that you'll get the berserk skill back when you become job level 50 as rune knight

so there isn't a bug on the skill points calculation

 

but that bug report stand because berserk skill has no job level requirement as rune knight, only in lord knight

Share this post


Link to post
Share on other sites
  • 0

Checking some more I found that skillpointcount() will basically show how many skill points you'd have if you resetted, aka without quest and 9 basic, BUT for novice it counts in basic skill.

 

Also, each character seems to get a "jobchange_level" variable set on them when they change job, so it's possible to calculate how many points they should have.

For 1st/high 1st class It'll be (JobLevel-1) skill points + 9 basic, but we'll throw them out if we'll compare to skillpointcount. For 2nd/trans job it'll be (JobLevel + jobchange_level - 2) total, +9 basic which we won't count again. I'm trying to make a script now, i'll edit it in in a bit.

 

 

ETA: I didn't test it much, but seems to work.

 

prontera,156,184,5    script    LostPointsRestore    100,{.@sk = skillpointcount();if (eaclass()&EAJL_THIRD) {.@sks = JobLevel + jobchange_level + jobchange_level_3rd - 3;} else {    if (eaclass()&EAJL_2) {        .@sks = jobchange_level + JobLevel - 2;    } else {        .@sks = JobLevel - 1;    }}if (.@sk < .@sks){    dispbottom "It seems something strange happened to your skill points. Here, let me replenish missing ones~";    SkillPoint = SkillPoint + (.@sks-.@sk);    dispbottom "There you go. Now everything should be all right. Have fun!";} else {    dispbottom "Everything is fine with your skill points! Take care~";}end;}

It doesn't take away skill point, only grants missing ones.

 

Further edit: But this only includes up to 2nd/trans jobs. I have yet to think a way to count in 3rd jobs "should have" skillpoints.

 

Edit once more: It seems I am blind. There's "jobchange_level_3rd" variable on each player. How convenient. Edited script to support Novice, 1st, 2nd and 3rd jobs. Haven't tried with extended jobs, but might work as well.

Edited by Garr

Share this post


Link to post
Share on other sites
  • 0

A huge thank you for working on this. Do you have an idea to fix this issue at its root? Like.. If this is caused by a missing skill requirement, wouldt a simple setting for this prevent it?

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.