Jump to content
  • 0

Guardian Stone Announcer


GM Winter

Question


  • Group:  Members
  • Topic Count:  176
  • Topics Per Day:  0.14
  • Content Count:  666
  • Reputation:   9
  • Joined:  12/04/20
  • Last Seen:  

Hello Master's i would like to ask for help if mob 1907 or Guardian Stone is Destroyed the name of the player will be announce thank you ?

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  19
  • Topics Per Day:  0.00
  • Content Count:  292
  • Reputation:   46
  • Joined:  10/30/12
  • Last Seen:  

Maybe you can check this topic/post/reply:

 

OnNPCKillEvent:
if( killedrid == 1907 )
	announce strcharinfo(0)+" of "+strcharinfo(2)+" slained "+getmonsterinfo( killedrid,MOB_NAME )+" at "+strcharinfo(3),bc_all,0xFF0000";
end; 

try this

  • Love 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  176
  • Topics Per Day:  0.14
  • Content Count:  666
  • Reputation:   9
  • Joined:  12/04/20
  • Last Seen:  

On 4/8/2021 at 10:12 PM, mrfizi said:

Maybe you can check this topic/post/reply:

 

thanks but i didnt get it ?

On 4/8/2021 at 10:38 PM, mrfizi said:
OnNPCKillEvent:
if( killedrid == 1907 )
	announce strcharinfo(0)+" of "+strcharinfo(2)+" slained "+getmonsterinfo( killedrid,MOB_NAME )+" at "+strcharinfo(3),bc_all,0xFF0000";
end; 

try this

thanks men 

 

On 4/10/2021 at 4:54 PM, Emistry said:

if you're using the default script, then you shall change this instead.

npc/guild2/agit_main_se.txt#L1492-L1505

OnGuardianStoneDied:
	set .@num, atoi(charat(strnpcinfo(1),2));
	set .@var$,"$agit_"+substr(strnpcinfo(2),0,1)+substr(strnpcinfo(2),8,9);
	setd .@var$+"["+(.@num-1)+"]",1;
	if (getd(.@var$+"[0]") == 1 || getd(.@var$+"[0]") == 2) set .@destroyed, .@destroyed+1;
	if (getd(.@var$+"[1]") == 1 || getd(.@var$+"[1]") == 2) set .@destroyed, .@destroyed+1;
	
	if (playerattached()) mapannounce strnpcinfo(2),"The "+((.@num == 1)?"1st":"2nd")+" Guardian Stone has been destroyed by "+strcharinfo(3)+"!",bc_map,"0x00ff00";
	else mapannounce strnpcinfo(2),"The "+((.@num == 1)?"1st":"2nd")+" Guardian Stone has been destroyed!",bc_map,"0x00ff00";
	
	if (.@destroyed == 2) {
		mapannounce strnpcinfo(2),"All of the Guardian Stones have been destroyed!",bc_map,"0x00ff00";
		donpcevent "RL0#"+strnpcinfo(2)+"::OnDisable";
	}
	donpcevent "gard"+.@num+"#"+strnpcinfo(2)+"::OnReset";
	initnpctimer;
	end;

 

thank you Master ❤️

Link to comment
Share on other sites

  • 0

  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10013
  • Reputation:   2346
  • Joined:  10/28/11
  • Last Seen:  

if you're using the default script, then you shall change this instead.

npc/guild2/agit_main_se.txt#L1492-L1505

OnGuardianStoneDied:
	set .@num, atoi(charat(strnpcinfo(1),2));
	set .@var$,"$agit_"+substr(strnpcinfo(2),0,1)+substr(strnpcinfo(2),8,9);
	setd .@var$+"["+(.@num-1)+"]",1;
	if (getd(.@var$+"[0]") == 1 || getd(.@var$+"[0]") == 2) set .@destroyed, .@destroyed+1;
	if (getd(.@var$+"[1]") == 1 || getd(.@var$+"[1]") == 2) set .@destroyed, .@destroyed+1;
	
	if (playerattached()) mapannounce strnpcinfo(2),"The "+((.@num == 1)?"1st":"2nd")+" Guardian Stone has been destroyed by "+strcharinfo(3)+"!",bc_map,"0x00ff00";
	else mapannounce strnpcinfo(2),"The "+((.@num == 1)?"1st":"2nd")+" Guardian Stone has been destroyed!",bc_map,"0x00ff00";
	
	if (.@destroyed == 2) {
		mapannounce strnpcinfo(2),"All of the Guardian Stones have been destroyed!",bc_map,"0x00ff00";
		donpcevent "RL0#"+strnpcinfo(2)+"::OnDisable";
	}
	donpcevent "gard"+.@num+"#"+strnpcinfo(2)+"::OnReset";
	initnpctimer;
	end;

 

  • Like 1
Link to comment
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.   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...