Jump to content
  • 0

Custom Label OnAttackMob don't work


luizragna

Question


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

The custom label OnAttackMob don't trigger...

 

The script:

-	script	OnAttackMob	-1,{

OnAttackMob:

mes "ID: ^0000FF"+ mobid +"^000000";
mes "Nome: ^0000FF"+ mobnome$ +"^000000";
mes "Level: ^0000FF"+ moblevel +"^000000";
close;

}

 

mob.cpp

		case BL_PC:
		{
			struct map_session_data *sd = (TBL_PC*)src;
			char_id = sd->status.char_id;
			if( damage )
				md->attacked_id = src->id;
			
			//Variáveis Especiais [SlexFire]
			pc_setglobalreg(sd, add_str("mobid"), md->mob_id);
			pc_setglobalreg_str(sd, add_str("mobnome$"), md->name);
			pc_setglobalreg(sd, add_str("moblevel"), md->level);
			
			//Slexfire OnAttackMob
			npc_script_event(sd, NPCE_ATTACKMOB); //<--- Trigger
			
			break;
		}

 

npc.cpp

	case NPCE_ATTACKMOB: //OnAttackMob
		return script_config.attackmob_event_name;

 

npc.hpp

NPCE_ATTACKMOB, //OnAttackMob

 

script.cpp

"OnAttackMob",

 

script.hpp

const char *attackmob_event_name; //OnAttackMob

 

Edited by luizragna
  • Upvote 1
Link to comment
Share on other sites

1 answer 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.

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...