Jump to content
  • 0

Map-server crashing. I need a little help


Grimfiend

Question


  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  12
  • Reputation:   1
  • Joined:  01/11/17
  • Last Seen:  

I've made this change in the script.c:

BUILDIN_FUNC(plagiarize)
{
	int skillid, lv;
	struct map_session_data * sd = script_rid2sd(st);
	struct script_data *data;
	
	data = script_getdata(st, 2);
	skillid = ( data_isstring(data) ? skill_name2id(script_getstr(st,2)) : script_getnum(st,2) );
	lv=script_getnum(st,3);
	
	if (sd->cloneskill_idx && sd->status.skill[sd->cloneskill_idx].flag == 13){
				sd->status.skill[sd->cloneskill_idx].id = 0;
				sd->status.skill[sd->cloneskill_idx].lv = 0;
				sd->status.skill[sd->cloneskill_idx].flag = 0;
			}
	if (pc_checkskill(sd,RG_PLAGIARISM)) {		
			sd->cloneskill_idx = skillid;
			sd->status.skill[sd->cloneskill_idx].id = skillid;
			sd->status.skill[sd->cloneskill_idx].lv = lv;
			sd->status.skill[sd->cloneskill_idx].flag = 13;//cloneskill flag
			pc_setglobalreg(sd, add_str(SKILL_VAR_PLAGIARISM), skillid);
			pc_setglobalreg(sd, add_str(SKILL_VAR_PLAGIARISM_LV), lv);
			clif_skillinfoblock(sd);
			}
	return 0;
}

This mod will enable me to add skill in the Plagiarism slot via npc, but when I use this (using the npc) the map-server crash. :/

 

Sorry I don't have too much knowledge in C to understand 100% of this mod.

Edited by Grimfiend
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...