Hello guys. I have tried make a custom skill that give another skill. I am editing some skills.
For now, I want to make the ability RK_ENCHANTBLADEgive TF_THROWSTONE temporarily.
skill.c
case RK_ENCHANTBLADE:
clif_skill_nodamage(src,bl,skill_id,skill_lv,
sc_start2(src,bl,type,100,skill_lv,((100+20*skill_lv)*status_get_lv(src))/150+sstatus->int_,skill_get_time(skill_id,skill_lv)));
pc_skill(sd,152,1,0);//Here the TF skillbreak;
i am using how base the script command: *skill <skill id>,<level>{,<flag>};
From the souce, that in the case i guess pc_skill.
script.c
BUILDIN_FUNC(skill){int id;int level;int flag = ADDSKILL_TEMP;
TBL_PC* sd;struct script_data *data;constchar* command = script_getfuncname(st);
sd = script_rid2sd(st);if( sd == NULL )return SCRIPT_CMD_SUCCESS;// no player attached, report sourceif(strcmpi(command,"addtoskill")==0)
flag = ADDSKILL_TEMP_ADDLEVEL;
data = script_getdata(st,2);
get_val(st, data);// Convert into value in case of a variable
id =( data_isstring(data)? skill_name2id(script_getstr(st,2)): script_getnum(st,2));
level = script_getnum(st,3);if( script_hasdata(st,4))
flag = script_getnum(st,4);
pc_skill(sd, id, level,(enum e_addskill_type)flag);return SCRIPT_CMD_SUCCESS;}
Even so, I did not gain the skill by using RK_ENCHANTBLADE
Question
luizragna
Hello guys. I have tried make a custom skill that give another skill. I am editing some skills.
For now, I want to make the ability RK_ENCHANTBLADE give TF_THROWSTONE temporarily.
skill.c
i am using how base the script command: *skill <skill id>,<level>{,<flag>};
From the souce, that in the case i guess pc_skill.
script.c
Even so, I did not gain the skill by using RK_ENCHANTBLADE
Link to comment
Share on other sites
0 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.