Jump to content
  • 0

doubt scrypt and mob


bewfbi

Question


  • Group:  Members
  • Topic Count:  9
  • Topics Per Day:  0.00
  • Content Count:  38
  • Reputation:   0
  • Joined:  10/07/15
  • Last Seen:  

Hello everyone, sorry for my bad english, I used google translate. So, I already did a good internet search until I got close to nothing satisfactory. Next: I'm creating an event to use with the new faction system. I want to develop an event where each faction has a base on a map point and on that basis, it contains 6 guards defending that base. the enemy faction has to defeat these bases in search of points, for each defeated guardian.:huh:
The only thing I lack is setting up the guardian to defend only the members of his faction and attack the others. I need to know how to create this script.

:(:wacko:

quiz_test,99,96,5	script	chek	-1,{

	OnTimer60000:
		if($status == 1) end;
		if (getmapusers("quiz_test") == 0) set $status,1;
		if (getmapusers("quiz_test") == 0) killmonsterall "quiz_test";
		if (getmapusers("quiz_test") == 0) end;
		announce getmapusers("quiz_test") + " jogador(es) está(ão) sobrevivendo no Compo de batalha entre Facções",8;
		initnpctimer;
	end;

}

prt_fild08,162,370,5	script	Mobfactions	-1,{
	
	query_sql "SELECT `clan_id` FROM `char` WHERE `char_id` = '"+getcharid (0)+"' ",@clan;
	query_sql "SELECT `name` FROM `clan` WHERE `clan_id`="+@clan+"",$faccao$;

	OnClock2216:
		announce "A batalha das facções, começará em 1 minutos!",8;
		disablenpc "Saída";
		initnpctimer;
		set $inf,1;
		set $status,0;
		killmonsterall "quiz_test";
	end;

	OnTimer60000:
		announce "A batalha entre facções COMEÇOU!",8;
		initnpctimer "chek";
		set $inf,0;
		set $mob,6;
		monster "quiz_test",319,138,"Guardião",1285,2,strnpcinfo(0)+"::Onguardian";
		monster "quiz_test",319,138,"Guardião",1286,2,strnpcinfo(0)+"::Onguardian";
		monster "quiz_test",319,138,"Guardião",1287,2,strnpcinfo(0)+"::Onguardian";
	end;

	Onguardian:
		if ($status == 1) end;
		announce "A Facção: "+$faccao$+" Matou 1 Guardião, ganhou 10 pontos",8;
		set $mob,$mob-1;
		if($mob == 5) announce "So exitem: 5 guardiões",8;
		if($mob == 3) announce "So exitem: 3 guardiões",8;
		if($mob == 0) announce "Morreram todos os guardiões",8;
		if($mob == 0) goto Onboxdead;
	end;

	Onboxdead:
		if ($status == 1) end;
		announce "BAtalha das facções: A facção " +$facao$+" Destruiu todos os Guardiões.",8;
		if($mob == 0) set $status,1;
		announce "Todos os guardiões foram derrotados encerrando a batalha das facções.",8;
	end;

}

 

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