Jump to content
  • 0

RK_ENCHANTBLADE give temporarily TF_THROWSTONE


luizragna

Question


  • Group:  Members
  • Topic Count:  35
  • Topics Per Day:  0.01
  • Content Count:  107
  • Reputation:   27
  • Joined:  02/12/14
  • Last Seen:  

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

	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 skill

		break;

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;
	const char* command = script_getfuncname(st);

	sd = script_rid2sd(st);
	if( sd == NULL )
		return SCRIPT_CMD_SUCCESS;// no player attached, report source

	if (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

Link to comment
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

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.   Paste as plain text instead

  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.

×
×
  • Create New...