Jump to content
  • 0

awards WoE


Scofield

Question


  • Group:  Members
  • Topic Count:  107
  • Topics Per Day:  0.03
  • Content Count:  265
  • Reputation:   11
  • Joined:  01/11/13
  • Last Seen:  

awards WoE I have this script that makes awards winners of woe, WOE as mine are on different days and at different castles wish he did not do this and draw the prize to the winner.

-	script	WoEPremio	-1,{
	OnInit:
	setarray .Map$[0],"prtg_cas01","prtg_cas02","prtg_cas03";	// -- Warp dos castelos que irão ser sorteados
	setarray .Map2$[0],"Kriemhild","Swanhild","Fadhgridh";		// -- Nome dos Mapas
	setarray .It[0],ID1,ID2,ID3;					// -- ID dos Prêmios
	end;

	OnAgitStart:
	set .A,rand(getarraysize(.Map$));
	set .B,rand(getarraysize(.Map$));
	while(.B==.A){
	set .B,rand(getarraysize(.Map$));
	}
	set .C,rand(getarraysize(.Map$));
	while(.C==.A || .C==.{
	set .C,rand(getarraysize(.Map$));
	}
	sleep2 1000;
	announce "O 1° prêmio ( "+getitemname(.IT[.A])+" ) será atribuído ao vencedor do castelo "+.Map2$[.A]+".",0;
	sleep2 1000;
	announce "O 2° prêmio ( "+getitemname(.IT[.B])+" ) será atribuído ao vencedor do castelo "+.Map2$[.B]+".",0;
	sleep2 1000;
	announce "O 3° Prêmio ( "+getitemname(.IT[.C])+" ) será atribuído ao vencedor do Castelo "+.Map2$[.C]+".",0;
	end;

	OnAgitEnd:
	for(set .@a,2000000; .@a<4000000; set .@a,.@a+1) {
	if(isloggedin(.@a)){
	attachrid(.@a);
	if(getcastledata(.Map$[.A],1)==getcharid(2)) getitem .It[0],1;
	if(getcastledata(.Map$[.B],1)==getcharid(2)) getitem .It[1],1;
	if(getcastledata(.Map$[.C],1)==getcharid(2)) getitem .It[2],1;
	detachrid;
	}
	sleep 1;
	}
	end;
	}
Edited by cumbe11
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...