Jump to content
  • 0

How to check for first 3 winner of an event ?


Question

Posted (edited)
Request NPC, its like a race Event first 3 players will get the prize and if the NPC already gave the prizes for those 3 it will announce we already have our 3 winners race is event is over domming map now.

 

Example script :

 

job_sword1,223,167,2 script  92,{

mapannounce "job_sword1","Player " + strcharinfo(0) + ", You have successfully finish all course you came up 1st Place!.",bc_map;

end;

+

mapannounce "job_sword1","Player " + strcharinfo(0) + ", You have successfully finish all course you came up 2nd Place!.",bc_map;

end;

+

mapannounce "job_sword1","Player " + strcharinfo(0) + ", You have successfully finish all course you came up 3rd Place!.",bc_map;

end;

}

Edited by Noire

13 answers to this question

Recommended Posts

  • 0
Posted
switch ( .winner_count++ ) {
	case 1: 
		mes "You're first winner.";
		break;
	case 2:
		mes "You're second winner.";
		break;
	case 3:
		mes "You're third winner.";
		break;
	default:
		break;
}
warp "prontera",155,181;
end;

you can try something like this.

  • 0
Posted

You can use global variables for these type of things. Just increase the value of the global variable you used every time it has been done. Set a check that will check the value of the global variable and if it is over 3, it will just end the conversation with the NPC.

  • 0
Posted (edited)
switch ( .winner_count++ ) {
	case 1: 
		mes "You're first winner.";
		break;
	case 2:
		mes "You're second winner.";
		break;
	case 3:
		mes "You're third winner.";
		break;
	default:
		break;
}
warp "prontera",155,181;
end;

you can try something like this.

 

 

How to reset the counts if i re-open the NPC ( Need to reload the scipt the reset it ) i cant open it anymore and can you add some line to doommap all players who left inside if the npc already got the 3 winners?

Edited by Noire
  • 0
Posted (edited)

 

add atcommand "doommap"; on default:

prontera...{

if(getgmlevel() >= 99){ goto GMMenu; }

switch(...){...}

GMMenu:
mes "Reset?";
menu "Yes",-;
set .winner_count,0
close;
end;

}

 

Tried its not working wont reset my characters, still need to reboot my emulator :(

any help?!
Edited by Noire

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...