Jump to content
  • 0
Sign in to follow this  
ZelosAvalon

Event Ranking

Question

i need to edit it for an sql table, I use the #Event_Points variables (points earned every monster you kill), and T_Event_Points (this variable accumulates the total points received events, to know how many you already won in total) how can i put it in sql table and creat an Event Ranking showing the players with more Event Points, i need the sql table and modify this script for working, any1 can help me ?

StartEvent: // Menu Start Event	mes "[Event Invasion]";	mes ".map$";	mes ".MvpID";	mes ".ItemID";	mes ".MobID";	mes ".MobX";	mes "Start Event now?";	switch(select("Yes:No")){		case 1:		next;		mes "^FF0000Starting the event...^000000";		close2;		goto OnStart;		case 2:		mes "Ok, start just when you're sure!";		goto Main;	}	end;	OnStart:	set .mobs_left, .MobX;	sleep2 1000;	announce "[ Rune-Midgard Guard ]: We have trouble here in the town " + .map$ + "!", bc_all;	sleep2 5000;	announce "[ Rune-Midgard Guard ]: Everyone, we need your help to get rid of these "+getmonsterinfo(.MobID,0)+"!", bc_all;	set .mobs_left, .MobX;	monster .map$,0,0,getmonsterinfo(.MobID,0) +" [Event] ",.MobID,.MobX,strnpcinfo(3) + "::OnMyMobDead";	end;		OnTimer1805000:	// 30 minutes later, kills all the mobs.	killmonster .map$,"Event Invasion::OnMyMobDead";	set .mobs_left,0;OnStop: // When the event is stopped by a GM, or all monsters dead.	killmonster .map$,strnpcinfo(3) + "::OnMyMobDead";	killmonster .map$,strnpcinfo(3) + "::OnSpecialMobDead";	announce "It seems that "+strcharinfo(0)+" has ended the Invasion!",bc_all;	end;OnMyMobDead: //When a Monster is killed	set .mobs_left, .mobs_left-1;	if (.mobs_left==0) {		announce "[ Rune-Midgard Guard ]: "+getmonsterinfo(.MvpID,0)+" has spawned in " + .map$ + "!", bc_all;		monster .map$,0,0,getmonsterinfo(.MvpID,0),.MvpID,1,"Event Invasion::OnSpecialMobDead";	} else {		set #Event_point, #Event_point + 1;		set #T_Event_point, #T_Event_point + 1;		announce "["+.mobs_left+"/"+.MobX+"] Monster left.",bc_map;	}	end;OnSpecialMobDead:		set #Event_point, #Event_point + 10;		set #T_Event_point, #T_Event_point + 10;		announce strcharinfo(0)+" has fought off the "+ getmonsterinfo(.MobID,0) +" Invasion and has been awarded a worthy prize!", bc_all;		getitem .ItemID,1;		donpcevent "Event Invasion::OnStop";		set .map$,"null";		set .MvpID,"-";		set .ItemID,"-";		set .MobID,"-";		set .MobX,"0";	}	end;}

 

Share this post


Link to post
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.   Restore formatting

  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.

Loading...
Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.