Jump to content
  • 0
Brynner

how can i make this script automatically start every 2hrs?

Question

anyone know how to make this script automatically start every 2hrs?

and also the item reward is fix. every time you won you will get 10 poring_coins automatically and all your member.

thanks in advance.

 

//**********************************************************************************// ____                    _                                            _   _  ____ //|  _  ___   ___   ____ | |  ___   ____   ___   ___   __  ___   _  _ | |_| |/ __ |//| |__// _  / _  |  _ | | / _  |  _  / _  /  _| / _)/ _  | | ||___  |__  |//| |  |  __/ ||_|| | |__/| ||  __/ | |__/|  __/ | |  _  ||_|| |  |    | |   | |//|_|______|____/_| |___|_|____|_| |_______|_|_|_(___/ ___/_|_|_|____|_|___|_|//------------------|_|-------------|_|---------------------------------------------//**********************************************************************************//**********************************************************************************//===== rAthena Script =============================================================//= King Of Emperium Hill//===== By: ========================================================================//= Peopleperson49 (Eddie)//===== Start Date: ================================================================//= 27AUG2012//===== Current Version: ===========================================================//= 5.0//===== Compatible With: ===========================================================//= rAthena SVN//===== Description: ===============================================================//= My version of King Of Emperium Hill. It was make for donkeyg on rAthena.org.//=	I did not use the other versions as a base. You can set it to give both a//=	zeny and item prizes to the guild leader through the Emperium Assistant.//=	They can collect once after each time the KoE ends.//===== Version Control: ===========================================================//= 1.0 First Version.//= 1.1 Minor Bug Fixes.//= 1.2 Small Optomizations. Added Assitant to give rewards daily.//= 1.3 Only guild master man collect rewards.//= 1.4 Rewards changed from daily to only be collected once after KoE ends.//= 1.5 Changed the days and time that KoE happens.//= 1.6 Removed all KoE functions from script and based just on start and stop time.//= 1.7 Added warp portals from prontera to any character that is in a guild.//= 1.8 Added GM feature to allow adjustment of zeny and item prizes in game.//=	1.9 Added restriction to prevent changing prizes while KoE is running.//= 2.0 Added KoE prizes to OnInit to reset prizes each time scripts are reloaded.//= 2.1 Added $KoEPrizeTracker to the OnInit however I suggest that you keep it//=	commented out unless you want to allow prizes to be collected again//=	everytime you reload scripts. I mainly added it for easy testing.//= 2.2 Moved flags to a better location that was not hanging over the edge of the//=	steps.//= 2.3 Commented out the $KoEPrizeTracker in the OnInit section.//= 2.4 Moved location of emperium from 49,49 to 50,50 so that is is centered in the//=	block.//= 2.5 Changed the mapannounce when the emperium is broken.//= 2.6 Changed the OnClock gettime(4) to use&&instead of  || . Now the check//=	actually works!//= 2.7 Added gettime(3) and KoEActualStart to the OnInit incase scripts are//=	reloaded during the time that KoE is set to be running.//= 2.8 Added $KoEStatus to ending OnClock to prevent it from running ending portion//=	of the script when KoE was not already going.//= 2.9 Adding missing mapflag loadevent.//= 3.0 Changed item prize to allow 5 seperate prizes to be given.//= 3.1 Added the option for monster or guildmonster function using the variable//=	$EmpSpawnMode to control which mode to use.//= 3.2 Removed the next; after case 255: that was causing error.//= 3.3 Removed $EmpSpawnMode because it still detected the guildmonster command//=	even if it was not being used.//= 3.4 Removed the guildmonster command completely since it just confused people//=	who did not have command.//= 3.5 Added ability to set KoE time in game.//= 3.6 Expanded the ability to set KoE time in game by allowing 4 different times.//= 3.7 Removed zeny/item prize setting from script and made completely controlled//=	in game by GM.//= 3.8 Added alot of next; where they should have been.//= 3.9 Added set @KoEAddMenu$,0; to prevent it from displaying menu itmes more than//=	once.//= 4.0 Added .@RandomFinalize to allow finalize number to change each time.//= 4.1 Fixed error that prevented KoE from ending at the set time.//= 4.2 Added option to switch between PvP and GvG.//= 4.3 Fixed incorrect variable. Changed GvGPvP to $GvGPvP.//= 4.4 Added function to clear zeny and item prizes when you Clear All KoE Events.//= 4.5 Fixed finalize zeny prize to allow you to finalize prize.//= 4.6 Added OnWhisperGlobal to script to all starting and stopping KoE manually//=	using commands. Uses NPC:KingOfEmperium<TAB>StartKoE and NPC:KingOfEmperium//=	<TAB>EndKoE.//= 4.7 Modified scripts to show the guild emblem. I should have done this a long//=	time ago, but it worked fine without it and I got lazy. Thanks to donkeyg on//=	rAthena.org else for the push.//= 4.8 Added checkweight to script for collecting rewards.//= 4.9 Replaced whisper system with bindatcmd function.//= 5.0 Modified KoE event to allow up to 7 events to be set.//===== Additional Comments: =======================================================//= Need to remove the random '0' before the first event slot in the Add New KoE//=	Event section.//==================================================================================guild_vs1,27,68,5	script	Emperium Assistant	55,{	if(getgmlevel()>98) { goto GMEmpMenu; end; }	if($KOEGUILD==0) { mes "[Emperium Assistant]"; mes "Only the King Of Emperium Hill can reap the rewards!"; close; }	if(strcharinfo(2)!=GetGuildName($KOEGUILD)) { mes "[Emperium Assistant]"; mes "Your guild is not the King Of Emperium Hill!"; close; }	if(strcharinfo(0)!=GetGuildMaster($KOEGUILD)) { mes "[Emperium Assistant]"; mes "Only the guild master may collect the rewards for the guild as King Of Emperium Hill!"; close; }	goto EmpAssStart;	end;	EmpAssStart:	mes "[Emperium Assistant]";	mes " ";	mes " ";	mes " ";	mes " ";	mes "Your guild is the King Of Emperium Hill!";	next;	if($KoEStatus==1) { mes "[Emperium Assistant]"; mes " "; mes " "; mes " "; mes " "; mes "You cannot access my services at this time."; close; }	if($KoEPrizeTracker==1) { mes "[Emperium Assistant]"; mes "You can only reap the rewards of being the King Of Emperium Hill once after each battle for the Hill!"; close; }	mes "[Emperium Assistant]";	mes "Your rewards await you!";	next;	if(checkweight(1201,1)==0) { mes "[Emperium Assistant]"; mes "You are carrying too many items with you."; mes "Please come back again after you store some items into storage."; close; }	if($KoEZenyPrize>0) { set zeny,zeny+$KoEZenyPrize; }	if($KoEItemPrize1!=0&&$KoEItemAmount1!=0) { getitem $KoEItemPrize1,$KoEItemAmount1; }	if($KoEItemPrize2!=0&&$KoEItemAmount2!=0) { getitem $KoEItemPrize2,$KoEItemAmount2; }	if($KoEItemPrize3!=0&&$KoEItemAmount3!=0) { getitem $KoEItemPrize3,$KoEItemAmount3; }	if($KoEItemPrize4!=0&&$KoEItemAmount4!=0) { getitem $KoEItemPrize4,$KoEItemAmount4; }	if($KoEItemPrize5!=0&&$KoEItemAmount5!=0) { getitem $KoEItemPrize5,$KoEItemAmount5; }	set $KoEPrizeTracker,1;	mes "[Emperium Assistant]";	mes "You have been rewarded for your victory!";	close;	GMEmpMenu:	mes "[GM Menu]";	mes "From this menu you can set event times, zeny prize, and item prizes.";	switch(prompt("Add New KoE Event:Clear All KoE Events:View KoE Events:Stop Current KoE Event:Change Zeny Prize:Change Item Prize 1:Change Item Prize 2:Change Item Prize 3:Change Item Prize 4:Change Item Prize 5:Return To Non-GM Menu")) {	case 1:		next;		mes "[GM Menu]";		mes "From here you can add new KoE events.";		set .KoE,0;		set @KoEAddMenu$,0;		AddCountCheck:		if($KoEStartDay[.KoE]==0&&$KoEEndDay[.KoE]==0&&$KoEStartTime[.KoE]==0&&$KoEEndTime[.KoE]==0) { goto AddCountCheck2; }		set .KoE,.KoE+1;		goto AddCountCheck;		AddCountCheck2:		for( set .@i,1; .@i<=7; set .@i,.@i+1 ) { set @KoEAddMenu$,@KoEAddMenu$+((getd("KoEEvent_"+.@i+"$")=="")?"No Event Set":getd("KoEEvent_"+.@i+"$"))+":"; }		set .KoE,select(@KoEAddMenu$);		next;		mes "[GM Menu]";		mes "Which day do you want KoE to ^00FF00start^000000?";		switch(select("Sunday:Monday:Tuesday:Wednesday:Thursday:Friday:Saturday")) {		case 1: set $KoEStartDay[.KoE],0; break;		case 2: set $KoEStartDay[.KoE],1; break;		case 3: set $KoEStartDay[.KoE],2; break;		case 4: set $KoEStartDay[.KoE],3; break;		case 5: set $KoEStartDay[.KoE],4; break;		case 6: set $KoEStartDay[.KoE],5; break;		case 7: set $KoEStartDay[.KoE],6; break;		}		next;		mes "[GM Menu]";		mes "When do you want KoE to ^00FF00start^000000?";		switch(select("1AM:2AM:3AM:4AM:5AM:6AM:7AM:8AM:9AM:10AM:11AM:Noon:1PM:2PM:3PM:4PM:5PM:6PM:7PM:8PM:9PM:10PM:11PM:Midnight")) {		case 1: set $KoEStartTime[.KoE],"01"; break;		case 2: set $KoEStartTime[.KoE],"02"; break;		case 3: set $KoEStartTime[.KoE],"03"; break;		case 4: set $KoEStartTime[.KoE],"04"; break;		case 5: set $KoEStartTime[.KoE],"05"; break;		case 6: set $KoEStartTime[.KoE],"06"; break;		case 7: set $KoEStartTime[.KoE],"07"; break;		case 8: set $KoEStartTime[.KoE],"08"; break;		case 9: set $KoEStartTime[.KoE],"09"; break;		case 10: set $KoEStartTime[.KoE],"10"; break;		case 11: set $KoEStartTime[.KoE],"11"; break;		case 12: set $KoEStartTime[.KoE],"12"; break;		case 13: set $KoEStartTime[.KoE],"13"; break;		case 14: set $KoEStartTime[.KoE],"14"; break;		case 15: set $KoEStartTime[.KoE],"15"; break;		case 16: set $KoEStartTime[.KoE],"16"; break;		case 17: set $KoEStartTime[.KoE],"17"; break;		case 18: set $KoEStartTime[.KoE],"18"; break;		case 19: set $KoEStartTime[.KoE],"19"; break;		case 20: set $KoEStartTime[.KoE],"20"; break;		case 21: set $KoEStartTime[.KoE],"21"; break;		case 22: set $KoEStartTime[.KoE],"22"; break;		case 23: set $KoEStartTime[.KoE],"23"; break;		case 24: set $KoEStartTime[.KoE],"00"; break;		}		next;		mes "[GM Menu]";		mes "Which day do you want KoE to ^00FF00finish^000000?";		next;		switch(select("Same Day:Sunday:Monday:Tuesday:Wednesday:Thursday:Friday:Saturday")) {		case 1: set $KoEEndDay[.KoE],$KoEStartDay[.KoE]; break;		case 2: set $KoEEndDay[.KoE],0; break;		case 3: set $KoEEndDay[.KoE],1; break;		case 4: set $KoEEndDay[.KoE],2; break;		case 5: set $KoEEndDay[.KoE],3; break;		case 6: set $KoEEndDay[.KoE],4; break;		case 7: set $KoEEndDay[.KoE],5; break;		case 8: set $KoEEndDay[.KoE],6; break;		}		next;		mes "[GM Menu]";		mes "When do you want KoE to ^00FF00finish^000000?";		switch(select("1AM:2AM:3AM:4AM:5AM:6AM:7AM:8AM:9AM:10AM:11AM:Noon:1PM:2PM:3PM:4PM:5PM:6PM:7PM:8PM:9PM:10PM:11PM:Midnight")) {		case 1: set $KoEEndTime[.KoE],"01"; break;		case 2: set $KoEEndTime[.KoE],"02"; break;		case 3: set $KoEEndTime[.KoE],"03"; break;		case 4: set $KoEEndTime[.KoE],"04"; break;		case 5: set $KoEEndTime[.KoE],"05"; break;		case 6: set $KoEEndTime[.KoE],"06"; break;		case 7: set $KoEEndTime[.KoE],"07"; break;		case 8: set $KoEEndTime[.KoE],"08"; break;		case 9: set $KoEEndTime[.KoE],"09"; break;		case 10: set $KoEEndTime[.KoE],"10"; break;		case 11: set $KoEEndTime[.KoE],"11"; break;		case 12: set $KoEEndTime[.KoE],"12"; break;		case 13: set $KoEEndTime[.KoE],"13"; break;		case 14: set $KoEEndTime[.KoE],"14"; break;		case 15: set $KoEEndTime[.KoE],"15"; break;		case 16: set $KoEEndTime[.KoE],"16"; break;		case 17: set $KoEEndTime[.KoE],"17"; break;		case 18: set $KoEEndTime[.KoE],"18"; break;		case 19: set $KoEEndTime[.KoE],"19"; break;		case 20: set $KoEEndTime[.KoE],"20"; break;		case 21: set $KoEEndTime[.KoE],"21"; break;		case 22: set $KoEEndTime[.KoE],"22"; break;		case 23: set $KoEEndTime[.KoE],"23"; break;		case 24: set $KoEEndTime[.KoE],"00"; break;		}		next;		mes "[GM Menu]";		set .@RandomFinalize,rand(100,999);		mes "Are you sure you want to set a new KoE event? To finalize the new KoE event? If your 100% sure type the number ^0000FF"+.@RandomFinalize+"^000000.";		input .@Finalize;		if(.@Finalize!=.@RandomFinalize) { next; mes "[GM Menu]"; mes "It is probably for the best that you don't adjust KoE event times!"; close2; goto GMEmpMenu; end; }		if($KoEStartDay[.KoE]==0&&$KoEEndDay[.KoE]==0&&$KoETime[.KoE]==0&&$KoEEndTime[.KoE]==0) { close2; goto GMEmpMenu; end; }		if($KoEStartDay[.KoE]==0) { set $@KoEStartDayName$,"Sunday"; }		if($KoEStartDay[.KoE]==1) { set $@KoEStartDayName$,"Monday"; }		if($KoEStartDay[.KoE]==2) { set $@KoEStartDayName$,"Tuesday"; }		if($KoEStartDay[.KoE]==3) { set $@KoEStartDayName$,"Wednesday"; }		if($KoEStartDay[.KoE]==4) { set $@KoEStartDayName$,"Thursday"; }		if($KoEStartDay[.KoE]==5) { set $@KoEStartDayName$,"Friday"; }		if($KoEStartDay[.KoE]==6) { set $@KoEStartDayName$,"Saturday"; }		if($KoEEndDay[.KoE]==0) { set $@KoEEndDayName$,"Sunday"; }		if($KoEEndDay[.KoE]==1) { set $@KoEEndDayName$,"Monday"; }		if($KoEEndDay[.KoE]==2) { set $@KoEEndDayName$,"Tuesday"; }		if($KoEEndDay[.KoE]==3) { set $@KoEEndDayName$,"Wednesday"; }		if($KoEEndDay[.KoE]==4) { set $@KoEEndDayName$,"Thursday"; }		if($KoEEndDay[.KoE]==5) { set $@KoEEndDayName$,"Friday"; }		if($KoEEndDay[.KoE]==6) { set $@KoEEndDayName$,"Saturday"; }		next;		mes "[GM Menu]";		mes ""+$@KoEStartDayName$+" from "+$KoEStartTime[.KoE]+":00 till "+$@KoEStartDayName$+" at "+$KoEEndTime[.KoE]+":00";		setd("KoEEvent_"+.KoE+"$"),"Event "+.KoE+" Set";		close2; goto GMEmpMenu; end;	case 2:		next;		if($KoEStatus==1) { mes "[GM Menu]"; mes " "; mes " "; mes " "; mes "KoE events cannot be cleared at this time. You must stop the current KoE event first."; close2; goto GMEmpMenu; end; }		mes "[GM Menu]";		set .@RandomFinalize,rand(100,999);		mes "You are about to clear all the set KoE events and prizes set for them. If your 100% sure type the number ^0000FF"+.@RandomFinalize+"^000000.";		input .@Finalize;		if(.@Finalize!=.@RandomFinalize) { next; mes "[GM Menu]"; mes "It is probably for the best that you don't clear KoE events!"; close2; goto GMEmpMenu; end; }		set $KoEZenyPrize,0;		set $KoEItemPrize1,0;		set $KoEItemAmount1,0;		set $KoEItemPrize2,0;		set $KoEItemAmount2,0;		set $KoEItemPrize3,0;		set $KoEItemAmount3,0;		set $KoEItemPrize4,0;		set $KoEItemAmount4,0;		set $KoEItemPrize5,0;		set $KoEItemAmount5,0;		set .KoE,0;		ResetLoop:		set $KoEStartDay[.KoE],0;		set $KoEEndDay[.KoE],0;		set $KoEStartTime[.KoE],0;		set $KoEEndTime[.KoE],0;		setd("KoEEvent_"+.KoE+"$"),"No Event Set";		set .KoE,.KoE+1;		if(.KoE>7) { next; mes "[GM Menu]"; mes "All KoE events have been cleared."; close2; goto GMEmpMenu; end; }		goto ResetLoop;		end;	case 3:		next;		mes "Current KoE Event Times:";		mes " ";		set .KoE,1;		KoEDayCheck:		if($KoEStartDay[.KoE]==0) { set $@KoEStartDayName$,"Sunday"; }		if($KoEStartDay[.KoE]==1) { set $@KoEStartDayName$,"Monday"; }		if($KoEStartDay[.KoE]==2) { set $@KoEStartDayName$,"Tuesday"; }		if($KoEStartDay[.KoE]==3) { set $@KoEStartDayName$,"Wednesday"; }		if($KoEStartDay[.KoE]==4) { set $@KoEStartDayName$,"Thursday"; }		if($KoEStartDay[.KoE]==5) { set $@KoEStartDayName$,"Friday"; }		if($KoEStartDay[.KoE]==6) { set $@KoEStartDayName$,"Saturday"; }		if($KoEEndDay[.KoE]==0) { set $@KoEEndDayName$,"Sunday"; }		if($KoEEndDay[.KoE]==1) { set $@KoEEndDayName$,"Monday"; }		if($KoEEndDay[.KoE]==2) { set $@KoEEndDayName$,"Tuesday"; }		if($KoEEndDay[.KoE]==3) { set $@KoEEndDayName$,"Wednesday"; }		if($KoEEndDay[.KoE]==4) { set $@KoEEndDayName$,"Thursday"; }		if($KoEEndDay[.KoE]==5) { set $@KoEEndDayName$,"Friday"; }		if($KoEEndDay[.KoE]==6) { set $@KoEEndDayName$,"Saturday"; }		mes "^FF0000Event "+.KoE+"^000000";		if($KoEStartDay[.KoE]==0&&$KoEEndDay[.KoE]==0&&$KoEStartTime[.KoE]==0&&$KoEEndTime[.KoE]==0) { mes "No Event Set"; } else { mes ""+$@KoEStartDayName$+" at "+$KoEStartTime[.KoE]+":00 till "+$@KoEEndDayName$+" at "+$KoEEndTime[.KoE]+":00"; }		set .KoE,.KoE+1;		if(.KoE>7) { close2; goto GMEmpMenu; end; }		goto KoEDayCheck;		end;	case 4:		next;		if($KoEStatus==0) { mes "[GM Menu]"; mes "There is currently no KoE event running."; close2; goto GMEmpMenu; end; }		mes "[GM Menu]";		set .@RandomFinalize,rand(100,999);		mes "You are about to stop the current KoE event. If your 100% sure type the number ^0000FF"+.@RandomFinalize+"^000000.";		input .@Finalize;		if(.@Finalize!=.@RandomFinalize) { next; mes "[GM Menu]"; mes "It is probably for the best that you don't stop KoE events while there going!"; close2; goto GMEmpMenu; end; }		set $KoEStatus,0;		gvgoff "guild_vs1";		if(getmapusers("guild_vs1")>0) { MapRespawnGuildID "guild_vs1",$KOEGUILD,7; }		killmonsterall "guild_vs1",0;		set .@name$,GetGuildMaster($KOEGUILD);		if($KOEGUILD!=0) { Announce "The King of Emperium Hill has ended! The King Of Emperium Hill is the ["+GetGuildName($KOEGUILD)+"] guild.",bc_all|bc_WoE; } else { Announce "The King of Emperium Hill has ended! No guild has proven themselves King Of Emperium Hill!",bc_all|bc_WoE; }		close2;		goto GMEmpMenu;		end;	case 5:		next;		if($KoEStatus==1) { mes "[GM Menu]"; mes " "; mes " "; mes " "; mes " "; mes "You cannot adjust the Zeny Prize at this time."; close2; goto GMEmpMenu; end; }		mes "[GM Menu]";		mes "The current Zeny Prize amount is ^ff0000"+$KoEZenyPrize+"^000000.";		mes "NOTE: If it says 'NULL' or '0' then that value has not been set.";		mes " ";		mes "Enter what you want the new Zeny Prize to be.";		input .@GMAdjust;		if(.@GMAdjust<0) { next; mes "[GM Menu]"; mes "The Zeny Prize cannot be less than 0."; next; goto GMEmpMenu; end; }		next;		mes "[GM Menu]";		set .@RandomFinalize,rand(100,999);		mes "Are you sure you want to modify the Zeny Prize to ^ff0000"+.@GMAdjust+"^000000? To finalize the change in Zeny Prize type the number ^0000FF"+.@RandomFinalize+"^000000.";		input .@Finalize;		if(.@Finalize==.@RandomFinalize) { next; set $KoEZenyPrize,.@GMAdjust; mes "[GM Menu]"; mes "The Zeny Prize amount has been changed to ^ff0000"+$KoEZenyPrize+"^000000."; next; goto GMEmpMenu; end; }		next;		mes "[GM Menu]";		mes "It is probably for the best that you don't adjust the Zeny Prize!";		close2;		goto GMEmpMenu;		end;	case 6:		next;		if($KoEStatus==1) { mes "[GM Menu]"; mes " "; mes " "; mes " "; mes " "; mes "You cannot adjust the Item Prize at this time."; close2; goto GMEmpMenu; end; }		mes "[GM Menu]";		mes "From this menu you can adjust the item prize. The current Reward is: ^ff0000"+$KoEItemAmount1+"^000000 ^ff0000"+getitemname($KoEItemPrize1)+"^000000.";		mes "NOTE: If it says 'NULL' or '0' then that value has not been set.";		mes " ";		mes "Enter what you want the new Item Prize to be. WARNING: If you input an invalid itemID it will error everytime a player tries to recieve it!";		input .@GMAdjust;		next;		set $KoEItemPrize1,.@GMAdjust;		mes "The Item Prize amount has been changed to ^ff0000"+getitemname($KoEItemPrize1)+"^000000[^ff0000"+$KoEItemPrize1+"^000000].";		next;		mes "[GM Menu]";		mes "The current Item Prize Amount is ^ff0000"+$KoEItemAmount1+"^000000.";		mes "NOTE: If it says 'NULL' or '0' then that value has not been set.";		mes "Enter what you want the new Item Prize Amount to be.";		input .@GMAdjust;		if(.@GMAdjust<1) { next; mes "[GM Menu]"; mes "The Item Prize Amount cannot be less than 1."; next; goto GMEmpMenu; end; }		next;		mes "[GM Menu]";		set .@RandomFinalize,rand(100,999);		mes "Are you sure you want to modify the Item Prize Amount to ^ff0000"+.@GMAdjust+"^000000 "+getitemname($KoEItemPrize1)+"? To finalize the change in Item Prize type the number ^0000FF"+.@RandomFinalize+"^000000.";		input .@Finalize;		if(.@Finalize!=.@RandomFinalize) { next; mes "[GM Menu]"; mes "It is probably for the best that you don't adjust the Item Prize!"; next; goto GMEmpMenu; end; }		next;		mes "[GM Menu]";		set $KoEItemAmount1,.@GMAdjust;		mes "The Item Prize amount has been changed to ^ff0000"+$KoEItemAmount1+"^000000 ^ff0000"+getitemname($KoEItemPrize1)+"^000000.";		close2;		goto GMEmpMenu;		end;	case 7:		if($KoEStatus==1) { mes "[GM Menu]"; mes " "; mes " "; mes " "; mes " "; mes "You cannot adjust the Item Prize at this time."; close2; goto GMEmpMenu; end; }		mes "[GM Menu]";		mes "From this menu you can adjust the item prize. The current Reward is: ^ff0000"+$KoEItemAmount2+"^000000 ^ff0000"+getitemname($KoEItemPrize2)+"^000000.";		mes "NOTE: If it says 'NULL' or '0' then that value has not been set.";		mes " ";		mes "Enter what you want the new Item Prize to be. WARNING: If you input an invalid itemID it will error everytime a player tries to recieve it!";		input .@GMAdjust;		next;		set $KoEItemPrize2,.@GMAdjust;		mes "The Item Prize amount has been changed to ^ff0000"+getitemname($KoEItemPrize2)+"^000000[^ff0000"+$KoEItemPrize2+"^000000].";		next;		mes "[GM Menu]";		mes "The current Item Prize Amount is ^ff0000"+$KoEItemAmount2+"^000000.";		mes "NOTE: If it says 'NULL' or '0' then that value has not been set.";		mes "Enter what you want the new Item Prize Amount to be.";		input .@GMAdjust;		if(.@GMAdjust<1) { next; mes "[GM Menu]"; mes "The Item Prize Amount cannot be less than 1."; next; goto GMEmpMenu; end; }		next;		mes "[GM Menu]";		set .@RandomFinalize,rand(100,999);		mes "Are you sure you want to modify the Item Prize Amount to ^ff0000"+.@GMAdjust+"^000000 "+getitemname($KoEItemPrize2)+"? To finalize the change in Item Prize type the number ^0000FF"+.@RandomFinalize+"^000000.";		input .@Finalize;		if(.@Finalize!=.@RandomFinalize) { next; mes "[GM Menu]"; mes "It is probably for the best that you don't adjust the Item Prize!"; next; goto GMEmpMenu; end; }		next;		mes "[GM Menu]";		set $KoEItemAmount2,.@GMAdjust;		mes "The Item Prize amount has been changed to ^ff0000"+$KoEItemAmount2+"^000000 ^ff0000"+getitemname($KoEItemPrize2)+"^000000.";		close2;		goto GMEmpMenu;		end;	case 8:		next;		if($KoEStatus==1) { mes "[GM Menu]"; mes " "; mes " "; mes " "; mes " "; mes "You cannot adjust the Item Prize at this time."; close2; goto GMEmpMenu; end; }		mes "[GM Menu]";		mes "From this menu you can adjust the item prize. The current Reward is: ^ff0000"+$KoEItemAmount3+"^000000 ^ff0000"+getitemname($KoEItemPrize3)+"^000000.";		mes "NOTE: If it says 'NULL' or '0' then that value has not been set.";		mes " ";		mes "Enter what you want the new Item Prize to be. WARNING: If you input an invalid itemID it will error everytime a player tries to recieve it!";		input .@GMAdjust;		next;		set $KoEItemPrize3,.@GMAdjust;		mes "The Item Prize amount has been changed to ^ff0000"+getitemname($KoEItemPrize3)+"^000000[^ff0000"+$KoEItemPrize3+"^000000].";		next;		mes "[GM Menu]";		mes "The current Item Prize Amount is ^ff0000"+$KoEItemAmount3+"^000000.";		mes "NOTE: If it says 'NULL' or '0' then that value has not been set.";		mes "Enter what you want the new Item Prize Amount to be.";		input .@GMAdjust;		if(.@GMAdjust<1) { next; mes "[GM Menu]"; mes "The Item Prize Amount cannot be less than 1."; next; goto GMEmpMenu; end; }		next;		mes "[GM Menu]";		set .@RandomFinalize,rand(100,999);		mes "Are you sure you want to modify the Item Prize Amount to ^ff0000"+.@GMAdjust+"^000000 "+getitemname($KoEItemPrize3)+"? To finalize the change in Item Prize type the number ^0000FF"+.@RandomFinalize+"^000000.";		input .@Finalize;		if(.@Finalize!=.@RandomFinalize) { next; mes "[GM Menu]"; mes "It is probably for the best that you don't adjust the Item Prize!"; next; goto GMEmpMenu; end; }		next;		mes "[GM Menu]";		set $KoEItemAmount3,.@GMAdjust;		mes "The Item Prize amount has been changed to ^ff0000"+$KoEItemAmount3+"^000000 ^ff0000"+getitemname($KoEItemPrize3)+"^000000.";		close2;		goto GMEmpMenu;		end;	case 9:		next;		if($KoEStatus==1) { mes "[GM Menu]"; mes " "; mes " "; mes " "; mes " "; mes "You cannot adjust the Item Prize at this time."; close2; goto GMEmpMenu; end; }		mes "[GM Menu]";		mes "From this menu you can adjust the item prize. The current Reward is: ^ff0000"+$KoEItemAmount4+"^000000 ^ff0000"+getitemname($KoEItemPrize4)+"^000000.";		mes "NOTE: If it says 'NULL' or '0' then that value has not been set.";		mes " ";		mes "Enter what you want the new Item Prize to be. WARNING: If you input an invalid itemID it will error everytime a player tries to recieve it!";		input .@GMAdjust;		next;		set $KoEItemPrize4,.@GMAdjust;		mes "The Item Prize amount has been changed to ^ff0000"+getitemname($KoEItemPrize4)+"^000000[^ff0000"+$KoEItemPrize4+"^000000].";		next;		mes "[GM Menu]";		mes "The current Item Prize Amount is ^ff0000"+$KoEItemAmount4+"^000000.";		mes "NOTE: If it says 'NULL' or '0' then that value has not been set.";		mes "Enter what you want the new Item Prize Amount to be.";		input .@GMAdjust;		if(.@GMAdjust<1) { next; mes "[GM Menu]"; mes "The Item Prize Amount cannot be less than 1."; next; goto GMEmpMenu; end; }		next;		mes "[GM Menu]";		set .@RandomFinalize,rand(100,999);		mes "Are you sure you want to modify the Item Prize Amount to ^ff0000"+.@GMAdjust+"^000000 "+getitemname($KoEItemPrize4)+"? To finalize the change in Item Prize type the number ^0000FF"+.@RandomFinalize+"^000000.";		input .@Finalize;		if(.@Finalize!=.@RandomFinalize) { next; mes "[GM Menu]"; mes "It is probably for the best that you don't adjust the Item Prize!"; next; goto GMEmpMenu; end; }		next;		mes "[GM Menu]";		set $KoEItemAmount4,.@GMAdjust;		mes "The Item Prize amount has been changed to ^ff0000"+$KoEItemAmount4+"^000000 ^ff0000"+getitemname($KoEItemPrize4)+"^000000.";		close2;		goto GMEmpMenu;		end;			case 10:		next;		if($KoEStatus==1) { mes "[GM Menu]"; mes " "; mes " "; mes " "; mes " "; mes "You cannot adjust the Item Prize at this time."; close2; goto GMEmpMenu; end; }		mes "[GM Menu]";		mes "From this menu you can adjust the item prize. The current Reward is: ^ff0000"+$KoEItemAmount5+"^000000 ^ff0000"+getitemname($KoEItemPrize5)+"^000000.";		mes "NOTE: If it says 'NULL' or '0' then that value has not been set.";		mes " ";		mes "Enter what you want the new Item Prize to be. WARNING: If you input an invalid itemID it will error everytime a player tries to recieve it!";		input .@GMAdjust;		next;		set $KoEItemPrize5,.@GMAdjust;		mes "The Item Prize amount has been changed to ^ff0000"+getitemname($KoEItemPrize5)+"^000000[^ff0000"+$KoEItemPrize5+"^000000].";		next;		mes "[GM Menu]";		mes "The current Item Prize Amount is ^ff0000"+$KoEItemAmount5+"^000000.";		mes "NOTE: If it says 'NULL' or '0' then that value has not been set.";		mes "Enter what you want the new Item Prize Amount to be.";		input .@GMAdjust;		if(.@GMAdjust<1) { next; mes "[GM Menu]"; mes "The Item Prize Amount cannot be less than 1."; next; goto GMEmpMenu; end; }		next;		mes "[GM Menu]";		set .@RandomFinalize,rand(100,999);		mes "Are you sure you want to modify the Item Prize Amount to ^ff0000"+.@GMAdjust+"^000000 "+getitemname($KoEItemPrize5)+"? To finalize the change in Item Prize type the number ^0000FF"+.@RandomFinalize+"^000000.";		input .@Finalize;		if(.@Finalize!=.@RandomFinalize) { next; mes "[GM Menu]"; mes "It is probably for the best that you don't adjust the Item Prize!"; next; goto GMEmpMenu; end; }		next;		mes "[GM Menu]";		set $KoEItemAmount5,.@GMAdjust;		mes "The Item Prize amount has been changed to ^ff0000"+$KoEItemAmount5+"^000000 ^ff0000"+getitemname($KoEItemPrize5)+"^000000.";		close2;		goto GMEmpMenu;		end;	case 11:		next;		goto EmpAssStart;		end;	case 255:		goto EmpAssStart;		end;	}}-	script	KingOfEmperium	-1,{	end;OnInit:bindatcmd("koestart",strnpcinfo(0)+"::OnKoEStart");bindatcmd("koeend",strnpcinfo(0)+"::OnKoEEnd");set $GvGPvP,0;	//Set to 0 for GvG and 1 for PvPset $KoEStatus,0;OnMinute00:	set .KoE,0;	StartLoop:	if(gettime(4)==$KoEEndDay[.KoE]&&gettime(3)==$KoEEndTime[.KoE]) { goto KoEActualEnd; end; }	if(gettime(4)==$KoEStartDay[.KoE]&&gettime(3)>=$KoEStartTime[.KoE]&&(gettime(3)<$KoEEndTime[.KoE] || $KoEStartDay[.KoE]!=$KoEEndDay[.KoE])) { goto KoEActualStart; end; }	set .KoE,.KoE+1;	if(.KoE>7) { goto StartLoopEnd; }	goto StartLoop;	end;KoEActualStart:	if($KoEStatus==1) { end; }	set $KoEStatus,1;	set $KoEPrizeTracker,0;	if($KOEGUILD!=0) { Announce "The King of Emperium Hill has begun! The King Of Emperium Hill is the ["+GetGuildName($KOEGUILD)+"] guild.",bc_all|bc_WoE; } else { Announce "King Of Emperium Hill has began! Which guild will prove their worth?",bc_all|bc_WoE; }	if(getmapusers("guild_vs1")>0) { MapRespawnGuildID "guild_vs1",$KOEGUILD,6; }	if($GvGPvP==0) { gvgon "guild_vs1"; } else { pvpon "guild_vs1"; }	monster "guild_vs1",50,50,"EMPERIUM",1288,1,"KingOfEmperium::OnEmperiumBreak";	end;StartLoopEnd:	set .KoE,0;	EndLoop:	if((gettime(4)==$KoEEndDay[.KoE])&&(gettime(3)==$KoEEndTime[.KoE])) { goto KoEActualEnd; end; }	if($KoEEndDay[.KoE]==0&&$KoEStartTime[.KoE]==0&&$KoEEndTime[.KoE]==0) { end; }	set .KoE,.KoE+1;	if(.KoE>7) { end; }		goto EndLoop;	end;KoEActualEnd:	if($KoEStatus==0) { end; }	set $KoEStatus,0;	if($GvGPvP==0) { gvgoff "guild_vs1"; } else { pvpoff "guild_vs1"; }	if(getmapusers("guild_vs1")>0) { MapRespawnGuildID "guild_vs1",$KOEGUILD,7; }	killmonsterall "guild_vs1",0;	set .@name$,GetGuildMaster($KOEGUILD);	if($KOEGUILD!=0) { Announce "The King of Emperium Hill has ended! The King Of Emperium Hill is the ["+GetGuildName($KOEGUILD)+"] guild.",bc_all|bc_WoE; } else { Announce "The King of Emperium Hill has ended! No guild has proven themselves King Of Emperium Hill!",bc_all|bc_WoE; }	end;OnEmperiumBreak:	if(getskilllv(10000)!=1) { announce "Only a guild with the Guild Approval skill can kill the Emperium!",bc_self; monster "guild_vs1",50,50,"EMPERIUM",1288,1,"KingOfEmperium::OnEmperiumBreak"; end; }	killmonsterall "guild_vs1",0;	set $KOEGUILD,getcharid(2);        donpcevent "KoEFlag::OnChangeKoE";	mapannounce "guild_vs1",""+strcharinfo(0)+" has broken the emperium for the ["+GetGuildName($KOEGUILD)+"] guild.",bc_map|bc_WoE,"0x00CCFF",FW_NORMAL,12;	sleep 2000;	if(getmapusers("guild_vs1")>0) { MapRespawnGuildID "guild_vs1",$KOEGUILD,6; }	announce "The ["+getguildName($KOEGUILD)+"] guild has became the King Of Emperium Hill!",bc_all|bc_WoE;	sleep 5000;	if($KoEStatus==1) { monster "guild_vs1",50,50,"EMPERIUM",1288,1,"KingOfEmperium::OnEmperiumBreak"; }	end;OnKoEStart:	if(getgmlevel()<99) { end; }	if($KoEStatus==1) { dispbottom "KoE is already running."; end; }	goto KoEActualStart;	end;OnKoEEnd:	if(getgmlevel()<99) { end; }	if($KoEStatus==0) { dispbottom "KoE is currently not running."; end; }	goto KoEActualEnd;	end;}//==================================================================================//--------|King Of Emperium Hill Guild Protection|----------------------------------//==================================================================================-	script	KoEGuildProtection	-1,{OnInit: end;OnPCLoadMapEvent:if(getgmlevel()<20&&strcharinfo(3)=="guild_vs1"&&getcharid(2)==0) { announce "You must be in a guild to enter Emperium Hill!",bc_self; warp "SavePoint",0,0; end; }end;}//==================================================================================//--------|KoE Flag Script|---------------------------------------------------------//==================================================================================-	script	KoEFlag	723,-1,-1,{mes "[Emperium Hill]";mes " ";mes " ";mes " ";mes " ";if($KOEGUILD!=0) { mes "The King Of Emperium Hill is the ["+GetGuildName($KOEGUILD)+"] guild."; } else { mes "Only the strongest warriors should may over take Emperium Hill!"; }close;OnInit:OnChangeKoE:if($KOEGUILD==0) { end; }flagemblem $KOEGUILD;end;}guild_vs1,54,59,0	duplicate(KoEFlag)	Emperium Hill#EH1	722guild_vs1,45,59,0	duplicate(KoEFlag)	Emperium Hill#EH2	722guild_vs1,40,54,2	duplicate(KoEFlag)	Emperium Hill#EH3	722guild_vs1,40,45,2	duplicate(KoEFlag)	Emperium Hill#EH4	722guild_vs1,45,40,4	duplicate(KoEFlag)	Emperium Hill#EH5	722guild_vs1,54,40,4	duplicate(KoEFlag)	Emperium Hill#EH6	722guild_vs1,59,45,6	duplicate(KoEFlag)	Emperium Hill#EH7	722guild_vs1,59,54,6	duplicate(KoEFlag)	Emperium Hill#EH8	722//==================================================================================//--------|KoE Waper Script|--------------------------------------------------------//==================================================================================-	script	KoEWarper	723,-1,-1,{mes "Portal Emperium Hill.";mes " ";mes " ";mes " ";mes "Only the strongest warriors should pass through the portal to Emperium Hill";next;switch(prompt("Procede to the Emperium Hill:Nevermind")) {	case 1:		next;		if(getgmlevel()<20&&getcharid(2)==0) { mes "[Notice:]"; mes " "; mes "You must be in a guild to enter Emperium Hill!"; close; }		warp "guild_vs1",0,0;		close;	case 2:		close;	case 255:		close;}}prontera,147,204,0	duplicate(KoEWarper)	Emperium Hill#1	723prontera,147,203,0	duplicate(KoEWarper)	Emperium Hill#2	723prontera,164,204,0	duplicate(KoEWarper)	Emperium Hill#3	723prontera,164,203,0	duplicate(KoEWarper)	Emperium Hill#4	723guild_vs1,8,50,5	warp	KoEWarp#WP1	2,2,prontera,161,187guild_vs1,50,91,5	warp	KoEWarp#WP2	2,2,prontera,161,187guild_vs1,91,50,5	warp	KoEWarp#WP3	2,2,prontera,161,187guild_vs1,50,8,5	warp	KoEWarp#WP4	2,2,prontera,161,187//==================================================================================//--------|Map Flags|---------------------------------------------------------------//==================================================================================guild_vs1	mapflag	nobranchguild_vs1	mapflag	nomemoguild_vs1	mapflag	nopenaltyguild_vs1	mapflag	noreturnguild_vs1	mapflag	nosave	SavePointguild_vs1	mapflag	noteleportguild_vs1	mapflag	nowarpguild_vs1	mapflag	nowarptoguild_vs1	mapflag	loadevent

 

Share this post


Link to post
Share on other sites

4 answers to this question

Recommended Posts

  • 0

 

+OnMinute0:+	 if(gettime(3)%2) end;KoEActualStart:

 

The event will  automatically start  every 2hrs(2:00.. 4:00.. 6:00..8:00...)

were should i put that?

Share this post


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

×
×
  • Create New...

Important Information

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