Jump to content

  •  

Zalbahis

Member Since 25 Jun 2013
Offline Last Active Aug 07 2013 05:17 PM
-----

Topics I've Started

Help! with this Vending Control

23 July 2013 - 03:37 AM

[font="'trebuchet ms', helvetica, sans-serif;"]Hello Hercules!..[/font]

[font="'trebuchet ms', helvetica, sans-serif;"]So I am having problems regarding with the vending control script of Emistry from rA. Can someone point out me what is the problem with the script.. Btw, I am using the latest Hercules SVN..[/font]

 

[font="'trebuchet ms', helvetica, sans-serif;"]Map Server Image[/font]

Posted Image

 

[font="'trebuchet ms', helvetica, sans-serif;"]Vend Control Script[/font]

-	script	Vend Control	-1,{OnInit:sleep 1000;// Map for vendingset .map$,"rachel";setcell .map$,0,0,284,365,cell_novending,1;// x and y horizone ..setarray .x_line,142,147,152,157;setarray .y_line,166,170,174,178,182,186,190;set .x_line_size,getarraysize( .x_line );set .y_line_size,getarraysize( .y_line );set .count,1;for( set .@x,0; .@x < .x_line_size; set .@x,.@x + 1 )	for( set .@y,0; .@y < .y_line_size; set .@y,.@y + 1 )		if( checkcell( .map$,.x_line[.@x],.y_line[.@y],cell_chkpass ) ){			movenpc "#vend_slot"+.count,.x_line[.@x],.y_line[.@y];			setcell .map$,.x_line[.@x],.y_line[.@y],.x_lin[.@x],.y_line[.@y],cell_novending,0;			set .count,.count + 1;		}npctalk "Vending Spot : "+.count;donpcevent "::OnSetup";end;}-	script	vend_slot	-1,{getmapxy( .@map$,.@x,.@y,1 );if( !getskilllv("MC_VENDING") ){	mes "You dont have ^0055FFVending Skill^000000.";}else if( getareausers( .@map$,.@x,.@y,.@x,.@y ) ){	mes "Someone already selected this spot.";}else{	mes "Spot : ^FF0000Available^000000";	mes "^0055FF[ Vending Area Rules ]^000000";	mes "^FF0000~ Use proper Shop Name.^000000";	mes "^FF0000~ Never sell Junk/Gifts.^000000";	mes " ";	mes "^777777Player will failed to follow these will be punished.^000000";	if( select( "Select this Spot","Cancel" ) == 1 ){		warp .@map$,.@x,.@y;		hideonnpc strnpcinfo(0);	}}close;OnSetup:getmapxy( .@map$,.@x,.@y,1 );set .@npcname$,strnpcinfo(0);while( 1 ){	if( getareausers( .@map$,.@x,.@y,.@x,.@y ) ){		hideonnpc .@npcname$;	}else{		hideoffnpc .@npcname$;		// specialeffect 313;	}	sleep 5000;}end;}// Add more if needed.rachel,1,1,4	duplicate(vend_slot)	#vend_slot1	858rachel,1,1,4	duplicate(vend_slot)	#vend_slot2	858rachel,1,1,4	duplicate(vend_slot)	#vend_slot3	858rachel,1,1,4	duplicate(vend_slot)	#vend_slot4	858rachel,1,1,4	duplicate(vend_slot)	#vend_slot5	858rachel,1,1,4	duplicate(vend_slot)	#vend_slot6	858rachel,1,1,4	duplicate(vend_slot)	#vend_slot7	858rachel,1,1,4	duplicate(vend_slot)	#vend_slot8	858rachel,1,1,4	duplicate(vend_slot)	#vend_slot9	858rachel,1,1,4	duplicate(vend_slot)	#vend_slot10	858rachel,1,1,4	duplicate(vend_slot)	#vend_slot11	858rachel,1,1,4	duplicate(vend_slot)	#vend_slot12	858rachel,1,1,4	duplicate(vend_slot)	#vend_slot13	858rachel,1,1,4	duplicate(vend_slot)	#vend_slot14	858rachel,1,1,4	duplicate(vend_slot)	#vend_slot15	858rachel,1,1,4	duplicate(vend_slot)	#vend_slot16	858rachel,1,1,4	duplicate(vend_slot)	#vend_slot17	858rachel,1,1,4	duplicate(vend_slot)	#vend_slot18	858rachel,1,1,4	duplicate(vend_slot)	#vend_slot19	858rachel,1,1,4	duplicate(vend_slot)	#vend_slot20	858rachel,1,1,4	duplicate(vend_slot)	#vend_slot21	858rachel,1,1,4	duplicate(vend_slot)	#vend_slot22	858rachel,1,1,4	duplicate(vend_slot)	#vend_slot23	858rachel,1,1,4	duplicate(vend_slot)	#vend_slot24	858rachel,1,1,4	duplicate(vend_slot)	#vend_slot25	858rachel,1,1,4	duplicate(vend_slot)	#vend_slot26	858rachel,1,1,4	duplicate(vend_slot)	#vend_slot27	858rachel,1,1,4	duplicate(vend_slot)	#vend_slot28	858

Thank you in advance and more power to Hercules !


Auto Stop Disguise Event

20 July 2013 - 08:10 PM

This script is really buggy during the conflict of OnClock..

 

Example: this npc starts at this time..

OnClock0000:

OnClock0010:

Rounds: 5

 

Scenario

OnClock0000: The player just answered 1 - 4 round and leaves without finishing the Event will still count on the nxt time the npc trigger..

OnClock0010: Assuming that the previous player has answered 4 rounds and there's a lacking of 1 more round.

The NPC Start time still conflicting with the previous Time it starts [ OnClock0000 ]..

so OnClock0010 will only do 1 round..

 

so I would like to ask if there's a way of this script to be at only 15-30mins per Event, so it'll stop from conflicting from the previous Time it start..

 

Here's the customized script, credits to the creator of this script :)

//===== Hercules Script ======================================//= Disguise Event//===== By: ==================================================//= GmOcean//===== Current Version: =====================================//= 5.1//===== Compatible With: ===================================== //= Hercules//===== Additional Comments: =================================  //= Note: This script requires PCRE to run properly.//= 5.0 Last update by GmOcean.//= 5.1 Cleaned and standardized, mostly. [Euphy]//============================================================-	script	Disguise#Announcer	-1,{OnInit:	disablenpc "disguise#event";	disablenpc "Disguise Event";	end;OnClock0144:OnClock0147:	announce "Dice: We are going to have a Dice Event.",0;	enablenpc "disguise#event";	sleep2 10000;	announce "Dice: For those who wants to join, Please proceed to rachel,112,99 and enter the Warp Portal.",0;	sleep2 10000;	announce "Dice: After 1 Minute the Portal will close.",0;	sleep2 10000;	announce "Dice: So please go to rachel,112,99 and enter the Warp Portal now if you want to join.",0;	enablenpc "Disguise Event";	donpcevent "Disguise Event::OnEnable";	initnpctimer;	end;}gon_test,57,95,4	script	Disguise Event	795,{	set .@GMLevel,90;	// GM level required to access NPC.	set .@n$,"[^0000FFDisguise NPC^000000]";	if (getgmlevel()>=.@GMLevel) {		mes .@n$;		mes "Select an option.";		next;		switch(select("Turn ON/OFF Event:Event Settings")) {		case 1:			mes .@n$;			if (.EventON) {				mes "The Event is currently: [^0000FFON^000000]";				mes "Would you like to turn it OFF?";			} else {				mes "The Event is currently: [^FF0000OFF^000000]";				mes "Would you like to turn it ON?";			}			if(select("Yes:No")==2) close;			if (.EventON) {				set .EventON,0; set .Timer,0;				setnpctimer 0; stopnpctimer;				announce "A GM has decided to turn the Disguise Event off. As a result no further prizes will be given.",bc_map | bc_blue;				deletepset 1;				setnpcdisplay "Disguise Event",795;				close;			}			set .EventON,1; set .Timer,1; setnpctimer 0; initnpctimer;			set .ResetCounter,.ResetCounter+1;			announce "The Disguise Event will begin in 3 minutes.",bc_all | bc_blue;			announce "The Event is being held in Prontera.",bc_all | bc_blue;			close;		case 2:			mes .@n$;			mes "Pick a setting to modify.";			next;			switch(select("Monster Display:Number of Rounds:Prize Settings")) {			case 1:				setarray .@r$[0],"Disguise as all monsters.","Disguise as MVPs only.";				mes .@n$;				mes "Choose a disguise rule.";				next;				set .Rule, select(implode(.@r$,":"));				mes .@n$;				mes "The Disguise Rule has been set:";				mes "  > ^0055FF"+.@r$[.Rule-1]+"^000000";				close;			case 2:				mes .@n$;				mes "Input the number of rounds you want the event to last.";				mes "Current number: [^0000FF"+.Rounds+"^000000]";				next;				input .@Rounds;				set .Rounds,.@Rounds;				mes .@n$;				mes "The number of rounds has been changed to "+.Rounds+".";				close;			case 3:				mes .@n$;				mes "Input the Item ID of the prize given each round.";				mes "Current item: [^0000FF"+getitemname(.Prize)+"^000000] (ID #"+.Prize+")";				next;				input .@Prize;				mes .@n$;				if (getitemname(.@Prize)=="" || getitemname(.@Prize)=="null") {					mes "That item does not exist. Please try again.";					close;				}				set .Prize,.@Prize;				mes "Input the amount to be given.";				next;				input .@amount;				mes .@n$;				if (.@amount<=0 || .@amount>=10000) {					mes "That amount is invalid. Using default ammount of 1.";					set .@amount,1;					next;					mes .@n$;				}				set .PrizeAmt,.@amount;				mes "The Prize has been changed successfully.";				mes "Prize: "+.PrizeAmt+"x [^0000FF"+getitemname(.Prize)+"^000000]";				close;			}		}	}	if (.EventON) end;	mes .@n$;	mes "Welcome.";	mes "How may I be of assistance?";	if(select("Information:Nothing, just passing through.")==2) close;	next;	mes .@n$;	mes "This event is quite simple.";	mes "At the start of the event, I will";	mes "disguise myself as a random";	mes "monster. You have to shout";	mes "that monter's name out loud.";	next;	mes "If you are correct, you will receive";	mes "a prize. If not, keep trying!";	mes "That's all that there is to this event.";	close;OnInit:	set .EventON,0;	set .Wait,0;	set .Winner,0;	set .ResetCounter,0;	set .Rounds,5;	set .Prize,6418;	set .PrizeAmt,5;	set .Rule,1;	setarray .MVP[0],1038,1039,1046,1059,1086,1087,1112,1115,1147,1150,1157,1159,1190,1251,1252,1272,1312,1373,	                  1389,1399,1418,1492,1502,1511,1583,1623,1630,1646,1647,1648,1649,1650,1651,1658,1685,1688,				   1708,1719,1734,1751,1768,1779,1785,1802,1832,1871,1874,1885,1917,1980,2022,2068,2087,2131,				   2156,2165;	set .BlackList$, "1003,1006,1017,1021,1022,1027,1043,1075,1136,1137,1168," + 	    "1171,1172,1173,1181,1187,1210,1217,1218,1222,1223,1224,1225,1226,1227,1228," + 	    "1233,1284,1407,1411,1414,1495,1501,1900,1996,2000,2001,2002,2003,2004," + 	    "2005,2006,2007,2011,2012,2025,2028,2029,2030,2031,2032,2033,2034,2035," + 	    "2036,2037,2038,2039,2040,2041,2042,2043,2044,2045,2046,2047,2048,2049," + 	    "2050,2051,2052,2053,2054,2055,2056,2057,2058,2059,2060,2061,2062,2063," + 	    "2064,2065,2066,2067,2075,2076,2077,2078,2079,2080,2081,2083,2084,2085," + 	    "2086,2087,2088,2089,2090,2091,2092,2093,2094,2095,2096,2097,2098,2099," + 	    "2100,2101,2012,2103,2104,2105,2106,2107,2108,2109,2110,2111,2112,2113," + 	    "2114,2115,2116,2117,2118,2119,2120,2121,2123,2124,2125,1496,";	end;OnEnable:	set .ResetCounter,.ResetCounter+1;	set .EventON,1;	set .Timer,1;	set .Wait,1;	announce "The Disguise Event will begin in 1 minute.",bc_all | bc_blue;	setnpctimer 0;	initnpctimer;	end;OnTimer10000:	if (.Timer || .Change) end;	set .Wait,0;	goto iDisguise;	end;OnTimer30000:	if (.Timer) end;	set .Change,0;	setnpcdisplay "Disguise Event",795;	npctalk "You took too long to guess what I was. Please wait 10 seconds while I disguise again.";	specialeffect 725;	set $MonsterName$,"";	deletepset 1;	stopnpctimer;	setnpctimer 0;	initnpctimer;	end;OnTimer30001:	if (.Timer!=1) end;	announce "Dice: Last 30 seconds.",bc_all | bc_blue;	end;OnTimer50000:	if (.Timer!=1) end;	announce "Dice: Last 10 seconds.",bc_all | bc_blue;	end;OnTimer55000:	if (.Timer!=1) end;	announce "Dice: 5.",bc_all | bc_blue;	end;OnTimer56000:	announce "Dice: 4.",0;	end;	OnTimer57000:	announce "Dice: 3.",0;	end;	OnTimer58000:	announce "Dice: 2.",0;	end;	OnTimer59000:	announce "Dice: 1.",0;	end;	OnTimer60000:	announce "Dice: Time's up.",0;	end;	OnTimer61000:	disablenpc "disguise#event";	set .Timer,0; stopnpctimer;	setnpctimer 0; initnpctimer;	end;	OnTimer62000:	announce "Dice: Time's up. Portal will open again in 4 hours.",0;	end;iDisguise:	if (.Rule==1) {		set .Winner,0;		set .Monster,1000+rand(1,995);		if (compare(","+.BlackList$+"," , ","+.Monster+",")) goto iDisguise;		if (.Monster==.LastMonster) goto iDisguise;		set .LastMonster,.Monster;		set $MonsterName$,getmonsterinfo(.Monster,0);	}	if (.Rule==2) {		set .Winner,0;		set .Monster,rand(49);		set $MonsterName$,getmonsterinfo(.MVP[.Monster],0);	}	deletepset 1;	defpattern 1,"([^:]+):.s*"+$MonsterName$+".*", "iCorrect";	activatepset 1;	if (.Rule==1) setnpcdisplay "Disguise Event",.Monster;	if (.Rule==2) setnpcdisplay "Disguise Event",.MVP[.Monster];	set .Change,1;	setnpctimer 0;	end;iCorrect:	if (.Winner) {		dispbottom "Someone has already won this round.";		end;	}	set .Winner,1;	set .RoundCount,.RoundCount+1;	deletepset 1;	activatepset 1;	getitem .Prize,.PrizeAmt;	announce strcharinfo(0)+" is correct! I was disguised as: "+$MonsterName$+"",bc_map | bc_blue;	if (.RoundCount>=.Rounds) {		setnpcdisplay "Disguise Event",795;		set .RoundCount,0; set .Change,0; set .EventON,0;		setnpctimer 0; stopnpctimer;		npctalk "Thank you all for playing. That was the last round of the Disguise Event. Come play again later.";		end;	}	setnpcdisplay "Disguise Event",795;	set .Change,0;	setnpctimer 0;	end;}rachel,112,99,0	warp	disguise#event	1,1,gon_test,45,86

PS: Sorry for my bad explanation :(

Thanks in advance..


Hi!. Hercules..

19 July 2013 - 02:30 PM

Can Someone check this Poring Catcher why it isn't working or readable by Hercules Emulator..
I just dunu why.. and I haven't touch anything to it..

 

here's the script
 

//=========== PORING CATCHER MADE ==============//=== BY: SHOGS-GFX and RAGNAROK DEVELOPERS ====//= Please Report if you encounter some errors =//===== https://www.facebook.com/ShogsGfx ======//==============================================//==FUNCTIONS===================================/* GM Can start the event manualy   GM Can also stop the event manualyHOW: just PM this npc (npc:pcatch)The Next Guide Will Be Given by the Manager 	*///======= PLEASE DO NOT REMOVE CREDITS =========//==============================================//== MORE UPDATES TO COME FOR BETTER FUNCTION ==//===== https://www.facebook.com/ShogsGfx ======//==============================================//====LEVEL OF GM CAN CONTROL THE EVENT=========-	script	GMCONTROL	-1,{OnInit:set $gmcontrol,60;end;}//---------------END OF SETUP-------------------//================ON WHISPER=========================-	script	pcatch	-1,{//====LEVEL OF GM CAN CONTROL THE EVENT=========//OnInit://set $gmcontrol,60;//end;//---------------END OF SETUP-------------------OnWhisperGlobal:if(getgmlevel() >= $gmcontrol) {mes "^3399FF[Poring Catcher]^000000";	mes "Hello GameMaster!";mes "What do you want to do?";switch(select("Start Event:Stop Event:Nothing")){	case 1: 	{		next;		mes "^3399FF[Poring Catcher]^000000";		mes "Please confirm by typing START."; 		input .@confirm$;          		if (.@confirm$ == "START") 		{			donpcevent "Announcer2::OnGMStart"; 			close;		}		mes "Confirmation failed";		close;		break;	}	case 2:	{		next;		mes "^3399FF[Poring Catcher]^000000";		mes "Please confirm by typing STOP."; 		input .@confirm$;          		if (.@confirm$ == "STOP") 		{			donpcevent "Announcer2::OnGMStop";			close;		}		mes "Confirmation failed";		close;		break;			}						case 3:	{		next; mes "^3399FF[Poring Catcher]^000000";		mes "Good bye"; 		close;	}}}}//====================ANNOUNCER======================-	script	Announcer2	-1,{OnGMStart:	killmonster "poring_w01.gat","All";	announce "(Poring Manager) : A Gamemaster started a Poring Catcher Event now.",0;	sleep 3000;	announce "(Poring Manager) : If you want to join, come at the middle of Prontera, enter the warp portal.",0;	enablenpc "PoringCatcher";	sleep 2000;	announce "(Poring Manager) : Prize: will be TCG and Gold Coins",0;	sleep 2000;	announce "(Poring Manager) : The portal is going to close in one minute.",0;  	sleep 60000;	announce "(Poring Manager) : The portal has been closed.",0;	disablenpc "PoringCatcher";	if(getmapusers("poring_w01") == 0) 	{		disablenpc "Poring Banker";		announce "Event Poring Catcher didn't start because there's no players.",0;		end;	}	donpcevent "Poring Banker::OnEnable";	end;OnGMStop:	killmonster "poring_w01.gat","All";	announce "A Gamemaster has stopped the Poring Catcher Event",0;	mapwarp "poring_w01.gat","prontera.gat",155,173;	disablenpc "Poring Banker";	disablenpc "PoringCatcher";	end;OnClock1200:OnClock1100:OnClock1300:OnClock2300:	killmonster "poring_w01.gat","All";	announce "(Poring Manager) : Poring Catcher Event will start at the moment.",0;	sleep 3000;	announce "(Poring Manager) : If you want to join, come at the middle of Prontera, enter the warp portal.",0;	enablenpc "PoringCatcher";	sleep 2000;	announce "(Poring Manager) : Prize: will be TCG and Gold Coins",0;	sleep 2000;	announce "(Poring Manager) : The portal is going to close in one minute.",0;  	sleep 60000;	announce "(Poring Manager) : The portal has been closed.",0;	disablenpc "PoringCatcher";	if(getmapusers("poring_w01") == 0) 	{		disablenpc "Poring Banker";		announce "Event Poring Catcher didn't start because no players found in map.",0;		end;	}	donpcevent "Poring Banker::OnEnable";	end;OnInit:	disablenpc "Poring Banker";	disablenpc "PoringCatcher";}//---------All Job Registration----------------------------------------prontera,155,173,0	warp	PoringCatcher	2,2,poring_w01,105,128//---------------------------------------------------------------------//----------------------------------------------------------------------	script	Poring Banker	-1,{OnEnable:mapannounce "poring_w01","Poring Manager: The Poring Catcher Event will start shortly",0;sleep2 10000;mapannounce "poring_w01","Poring Manager: I will be summoning 100 porings with different names kill the real poring",0;sleep2 10000;mapannounce "poring_w01","Poring Manager: What are we waiting for?..Let's Catch some Porings!!...",0;sleep2 10000;goto L_Start;end;L_Start:	if(getmapusers("poring_w01") == 0) goto L_None;	if(getmapusers("poring_w01") >= 1) {	mapannounce "poring_w01","Poring Manager: Get ready at the count of 5 we will start!....",0;	sleep2 6000;	mapannounce "poring_w01","Poring Manager: 5",0;	sleep2 5000;	mapannounce "poring_w01","Poring Manager: 4",0;	sleep2 4000;	mapannounce "poring_w01","Poring Manager: 3",0;	sleep2 3000;	mapannounce "poring_w01","Poring Manager: 2",0;	sleep2 2000;	mapannounce "poring_w01","Poring Manager: 1",0;	donpcevent "Poringsummoner::OnSummon";	end;	}	L_None:	disablenpc "Poring Banker";	killmonster "poring_w01.gat","All";	end;}//==================SUMMONER OF PORINGS ======================-	script	Poringsummoner	-1,{OnSummon:   if(getmapusers("poring_w01") == 0) goto L_2None;   monster "poring_w01.gat",0,0,"Poring",1002,1,"poringwin::OnMobKilled";   monster "poring_w01.gat",0,0,"Pouring",1002,10,"poringlose::OnMobKilled";   monster "poring_w01.gat",0,0,"Proing",1002,10,"poringlose::OnMobKilled";   monster "poring_w01.gat",0,0,"Poirng",1002,10,"poringlose::OnMobKilled";   monster "poring_w01.gat",0,0,"Poing",1002,10,"poringlose::OnMobKilled";   monster "poring_w01.gat",0,0,"I'm not a Poring",1002,5,"poringlose::OnMobKilled";   monster "poring_w01.gat",0,0,"Gnirop",1002,1,"poringlose::OnMobKilled";   monster "poring_w01.gat",0,0,"Poring",1113,1,"poringlose::OnMobKilled";   monster "poring_w01.gat",0,0,"Poring",1062,1,"poringlose::OnMobKilled";   monster "poring_w01.gat",0,0,"Por|ng",1002,10,"poringlose::OnMobKilled";   monster "poring_w01.gat",0,0,"Por1ng",1002,10,"poringlose::OnMobKilled";   monster "poring_w01.gat",0,0,"Porong",1002,10,"poringlose::OnMobKilled";   monster "poring_w01.gat",0,0,"P0ring",1002,10,"poringlose::OnMobKilled";   monster "poring_w01.gat",0,0,"P@ring",1002,10,"poringlose::OnMobKilled";   monster "poring_w01.gat",0,0,"Porng",1002,1,"poringlose::OnMobKilled";end;L_2None:disablenpc "Poring Banker";killmonster "poring_w01.gat","All";end;}//==================REAL PORING FOR WIN======================-	script	poringwin	-1,{OnMobKilled:   killmonster "poring_w01.gat","All";   atcommand "@doommap";   getitem 7227,1;   getitem 671, 10;   announce "Poring Banker: We have a winner! well done " + strcharinfo(0) + ".",0;   warp "SavePoint",0,0;   end;}//==================DUMY PORINGS FOR LOSERS======================-	script	poringlose	-1,{OnMobKilled:   dispbottom "Your out of the game, You did not catch the right Poring !";   percentheal -99,-99;   warp "SavePoint",0,0;   end;}//==================Mapflags========================poring_w01	mapflag	nowarpporing_w01	mapflag	nowarptoporing_w01	mapflag	noteleportporing_w01	mapflag	nosaveporing_w01	mapflag	nomemoporing_w01	mapflag	nobranchporing_w01	mapflag	nolootporing_w01	mapflag	noskillporing_w01	mapflag	nopenalty

 

I also tested it on the past Hercules Emulator and still has the problem @_@..


R> MVP Hunting Points..

17 July 2013 - 01:13 PM

I'm requesting for a MVP Hunting Points..

Every MVP gives points to its killer depending on the MVP difficulty..

 

Example:

Phreeoni = 1 Point

Baphomet = 2 Points

Thanatos = 5 Points

etc....

 

I hope that, it explains well..

Thank you in advance and more power to Hercules Devs.

 

PS: Or just 1 Point per MVP kill if you don't have the script above ^_^..


Auto Team Balance

16 July 2013 - 10:27 AM

Can Anyone take a look of this, is there a way for this to be, Auto Team Balance upon Joining BG?.. or in Registration?..
Here's the script.. Originally from eAthena and seem to work on Hercules..

 

Original Script..

http://www.eathena.w...howtopic=255789

 

My Current Script, this is on Team Deathmatch Battleground..

// ==============================================================================// BattleGround System - Flavius TD - Flavius Team Deathmatch// ==============================================================================// By Suke / s4zuk3// ==============================================================================// Registration NPC's// *********************************************************************jupe_ele,39,57,4	script	Registration::Fl1R_Guillaume	418,{	end;OnInit:	waitingroom "Team Battle",4,"Flavius_BG1::OnGuillaumeJoin",1;	end;OnEnterBG:	set $@FlaviusBG1_id1, waitingroom2bg("bat_b01",390,10,"Flavius_BG1::OnGuillaumeQuit","");	end;}jupe_ele,46,57,4	script	Registration::Fl1R_Croix	414,{	end;OnInit:	waitingroom "Team Battle",4,"Flavius_BG1::OnCroixJoin",1;	end;OnEnterBG:	set $@FlaviusBG1_id2, waitingroom2bg("bat_b01",10,290,"Flavius_BG1::OnCroixQuit","");	end;}// Battleground Engine// *********************************************************************-	script	Flavius_BG1	-1,{	end;OnInit:	disablenpc "Guillaume Vintenar#fl1";	disablenpc "Croix Vintenar#fl1";	disablenpc "Therapist in battle#fl11";	disablenpc "Therapist in battle#fl12";	end;OnGuillaumeQuit:OnCroixQuit:    if($@FlaviusBG1 != 1) {end;}    if(Bat_Team == 2) {    for(set .@i,0; .@i < getarraysize($@bg_red$); set .@i,.@i+1){    if($@bg_red$[.@i] == strcharinfo(0)) {break;}    }    deletearray $@bg_red$[.@i],1;    set $@td_a,$@td_a-1;    end;    } else if(Bat_Team == 1) {    for(set .@i,0; .@i < getarraysize($@bg_blue$); set .@i,.@i+1){    if($@bg_blue$[.@i] == strcharinfo(0)) {break;}    }    deletearray $@bg_blue$[.@i],1;    set $@td_b,$@td_b-1;    end;    }    else { end; }	end;	OnGuillaumeJoin:OnCroixJoin:		if( $@FlaviusBG1 == 1 ){	if( $@Guill < 30 && $@Croi < 30){	set .@Guillaume, getwaitingroomstate(0,"Fl1R_Guillaume");	set .@Croix, getwaitingroomstate(0,"Fl1R_Croix");	if (.@Guillaume!=0 && .@Croix!=0){	set $@Guill, ($@Guill + 1);	set $@Croi, ($@Croi + 1);	waitingroom2bg_single($@FlaviusBG1_id1,"bat_b01",311,224,"Fl1R_Guillaume");	waitingroom2bg_single($@FlaviusBG1_id2,"bat_b01",87,75,"Fl1R_Croix");	mapannounce "jupe_ele","Battleground -- Team Deathmatch [80-99] G: " + $@Guill + "/30, C: " + $@Croi + "/30 in Progress!!",1,0x006400;		end;	}	}	}	if( $@FlaviusBG1 == 0 ){		donpcevent "Flavius_BG1::OnReadyCheck";		end;	}OnReadyCheck:	if( $@FlaviusBG1 )		end;	set .@Guillaume, getwaitingroomstate(0,"Fl1R_Guillaume");	set .@Croix, getwaitingroomstate(0,"Fl1R_Croix");	    	if( .@Guillaume < 3 || .@Croix < 3 ){		if( .@Guillaume >=4  && .@Croix >=4 && !agitcheck() && $@FLTD_Flood < gettimetick(2) )     {    announce "Battleground -- Team Deathmatch [ B ]: " + .@Guillaume + "/3, [ R ]: " + .@Croix + "/3",bc_all,0x006400;    set $@FLTD_Flood, gettimetick(2) + 15;     end;    }		mapannounce "jupe_ele","Battleground -- Team Deathmatch [ B ]: " + .@Guillaume + "/3, [ R ]: " + .@Croix + "/3",1,0x006400;		end;	}	//			// BG Variables	set $@FlaviusBG1, 1;	set $@FlaviusBG1_Victory, 0;	set .Guillaume_Score, 1;	set .Croix_Score, 1;	// Prepare NPC	donpcevent "#gfl1_respawn::OnBGStart";	donpcevent "#cfl1_respawn::OnBGStart";	enablenpc "Therapist in battle#fl11";	enablenpc "Therapist in battle#fl12";	disablenpc "Guillaume Vintenar#fl1";	disablenpc "Croix Vintenar#fl1";	// Build and Warp Teams	donpcevent "Fl1R_Guillaume::OnEnterBG";	donpcevent "Fl1R_Croix::OnEnterBG";	// Vamos contando :3	set $@Guill, 10;	set $@Croi, 10;	announce "Battleground -- Team Deathmatch has started!",0,0x006400;	initnpctimer;	// Death!!OnRoundStart:	if( $@FlaviusBG1 != 1 ) end;	bg_updatescore "bat_b01",.Guillaume_Score,.Croix_Score;	areapercentheal "bat_b01",382,2,397,17,100,100;	areapercentheal "bat_b01",2,282,17,297,100,100;	bg_warp $@FlaviusBG1_id1,"bat_b01",311,224;	bg_warp $@FlaviusBG1_id2,"bat_b01",87,75;	sleep 2000;	if( $@FlaviusBG1 != 1 ) end;	mapannounce "bat_b01","Team Deathmatch has begun!!",1,0x006400;	bg_updatescore "bat_b01",.Guillaume_Score,.Croix_Score;	end;OnPCDieEvent:	if( $@FlaviusBG1 == 1 )	{	    getmapxy (mapname$,.@mapx,.@mapy,0,strcharinfo(0));	    if ( mapname$ != "bat_b01") end;	     if( Bat_Team == 1) {	     set .Croix_Score, .Croix_Score -1;	     bg_updatescore "bat_b01",.Guillaume_Score,.Croix_Score;	     if (.Croix_Score < 1) donpcevent "Flavius_BG1::OnCroixTDWin";	     end;	     }	     if ( Bat_Team == 2) {         set .Guillaume_Score, .Guillaume_Score -1;         bg_updatescore "bat_b01",.Guillaume_Score,.Croix_Score;         if (.Guillaume_Score < 1) donpcevent "Flavius_BG1::OnGuillaumeTDWin";         end;         }    }end;OnGuillaumeTDWin:	set $@FlaviusBG1, 2;	set $@FlaviusBG1_Victory, 1;	mapannounce "bat_b01","The Blue Team has won the Team Deathmatch",1,0x0000FF;	stopnpctimer;	sleep 2000;	donpcevent "Flavius_BG1::OnMatchEnd";	end;	OnCroixTDWin:	set $@FlaviusBG1, 2;	set $@FlaviusBG1_Victory, 2;	mapannounce "bat_b01","The Red Team has won the Team Deathmatch",1,0xFF0000;	stopnpctimer;	sleep 2000;	donpcevent "Flavius_BG1::OnMatchEnd";	end;	OnTimer900000:    if ($@FlaviusBG1 != 1) end;	mapannounce "bat_b01","Team Deathmatch will ends in 5 minutes",1,0x006400;	end;OnTimer1140000:    if ($@FlaviusBG1 != 1) end;	mapannounce "bat_b01","Team Deathmatch will ends in 1 minute",1,0x006400;	end;OnTimer1200000:    if ($@FlaviusBG1 != 1) end;  	if( .Croix_Score > .Guillaume_Score )	{		mapannounce "bat_b01","The Croix army has won the Battle of Flavius Team Deathmatch!",1,0xFF0000;		donpcevent "Flavius_BG1::OnCroixTDWin";	}	else if( .Croix_Score < .Guillaume_Score )	{		mapannounce "bat_b01","The Guillaume army has won the Battle of Flavius Team Deathmatch!",1,0x0000FF;		donpcevent "Flavius_BG1::OnGuillaumeTDWin";	}	else	{		mapannounce "bat_b01","The Battle of Flavius Team Deathmatch is over. The time is out, this is a Tie",1,0x006400;		set $@FlaviusBG1, 2;		set $@FlaviusBG1_Victory, 3;		stopnpctimer;		sleep 2000;	}	OnMatchEnd:		donpcevent "#gfl1_respawn::OnBGStop";	donpcevent "#cfl1_respawn::OnBGStop";	disablenpc "Therapist in battle#fl11";	disablenpc "Therapist in battle#fl12";	enablenpc "Guillaume Vintenar#fl1";	enablenpc "Croix Vintenar#fl1";	bg_warp $@FlaviusBG1_id1,"bat_b01",390,10;	bg_warp $@FlaviusBG1_id2,"bat_b01",10,290;	deletearray $@bg_red$;    deletearray $@bg_blue$;    set $@td_a,0;    set $@td_b,0;	sleep 3000;	mapannounce "bat_b01","Battle of Flavius Team Deathmatch will close in 1 minute!",1,0x006400;	initnpctimer;	end;OnTimer30000:	if( $@FlaviusBG1 == 2 )		mapannounce "bat_b01","Battle of Flavius Team Deathmatch will close in 30 seconds!",1,0x006400;	end;OnTimer50000:	if( $@FlaviusBG1 == 2 )		mapannounce "bat_b01","Battle of Flavius Team Deathmatch will close in 10 seconds!",1,0x006400;	end;OnTimer60000:	if( $@FlaviusBG1 != 2 ) end;OnReset:	stopnpctimer;	set .Guillaume_Score, 99;	set .Croix_Score, 99;	set $@FlaviusBG1_Victory, 0;	// NPC's	disablenpc "Guillaume Vintenar#fl1";	disablenpc "Croix Vintenar#fl1";	disablenpc "Therapist in battle#fl11";	disablenpc "Therapist in battle#fl12";	if( $@FlaviusBG1_id1 ) { bg_destroy $@FlaviusBG1_id1; set $@FlaviusBG1_id1, 0; }	if( $@FlaviusBG1_id2 ) { bg_destroy $@FlaviusBG1_id2; set $@FlaviusBG1_id2, 0; }	sleep 1000;	mapwarp "bat_b01","bat_room",155,150;	sleep 2000;	bg_updatescore "bat_b01",.Guillaume_Score,.Croix_Score;	set $@FlaviusBG1, 0;	donpcevent "Flavius_BG1::OnReadyCheck";	end;}// View oponentes en el mapa <3-	script	viewtd	-,{end;OnPCLoadMapEvent:    if($@FlaviusBG1 != 1) {end;}    if(Bat_Team == 2) {    getmapxy .@MAPNAME$,.@X,.@Y,0,strcharinfo(0);    while(.@MAPNAME$ == "bat_b01"){    if($@FlaviusBG1 != 1) {end;}    getmapxy .@MAPNAME$,.@X,.@Y,0,strcharinfo(0);    if(.@MAPNAME$ != "bat_b01") { end;}    for(set .@i,0; .@i < getarraysize($@bg_red$); set .@i,.@i+1){    if($@bg_red$[.@i] == strcharinfo(0)) { set .@ontd,1; break;}    }    if(.@ontd != 1) {    setarray $@bg_red$[$@td_a],strcharinfo(0);    set $@td_a,$@td_a+1; }    set .@j,0;    for (set .@i,0; .@i < getarraysize($@bg_blue$); set .@i,.@i+1){        set .@j,.@j+1;        getmapxy(.mapES$, .xI, .yI,0,$@bg_blue$[.@i]);        viewpoint 1,.xI,.yI,.@j,0x0000ff;    } // cierre for    sleep2 1000;    } // cierre while    } else if(Bat_Team == 1) {    getmapxy .@MAPNAME$,.@X,.@Y,0,strcharinfo(0);    while(.@MAPNAME$ == "bat_b01"){    if($@FlaviusBG1 != 1) {end;}    getmapxy .@MAPNAME$,.@X,.@Y,0,strcharinfo(0);    if(.@MAPNAME$ != "bat_b01") { end;}    for(set .@i,0; .@i < getarraysize($@bg_blue$); set .@i,.@i+1){    if($@bg_blue$[.@i] == strcharinfo(0)) { set .@ontd,1; break;}    }    if(.@ontd != 1) {    setarray $@bg_blue$[$@td_b],strcharinfo(0);    set $@td_b,$@td_b+1; }    set .@j,0;    for (set .@i,0; .@i < getarraysize($@bg_red$); set .@i,.@i+1){        set .@j,.@j+1;        getmapxy(.mapES$, .xE, .yE,0,$@bg_red$[.@i]);        viewpoint 1,.xE,.yE,.@j,0xff0000;    } // cierre for    sleep2 1000;    } // cierre while    }    else { end; }    }// Battleground rewards// *********************************************************************bat_b01,390,13,5	script	Guillaume Vintenar#fl1	419,{	if( $@FlaviusBG1_Victory )	{		if( $@FlaviusBG1_Victory == Bat_Team )		{ // Victory			mes "[Swandery]";			mes "Blessed Guillaume!!";			mes "Let's enjoy our glorious victory!";			mes "" + strcharinfo(0) + ", its a sign reflecting victory";			close2;			set .@Reward,18;		}		else		{ // Derrota			mes "[Swandery]";			mes "You lost, but you're dedicated to this battle.";			mes "This is a reward for your great dedication by Guillaume Marollo!";			mes "Just take this defeat a lesson, and later you would definitely learn.";			close2;			set .@Reward,6;		}		set Flavius_BG_Tick, gettimetick(2) + 300;  //setquest 2070;		getitem 7829, .@Reward;		set .@ontd,0;		bg_leave;		warp "bat_room",155,150;		end;	}	end;}bat_b01,10,293,5	script	Croix Vintenar#fl1	415,{	if( $@FlaviusBG1_Victory )	{		if( $@FlaviusBG1_Victory == Bat_Team )		{ // Victory			mes "[Swandery]";			mes "Blessed Croax!!";			mes "Let's enjoy our glorious victory!";			mes "" + strcharinfo(0) + ", its a sign reflecting victory";			close2;			set .@Reward, 18;		}		else		{ // Derrota			mes "[Swandery]";			mes "Oh, " + strcharinfo(0) + ". Don't be sad.";			mes "Even though we didn't win, we did our best.";			mes "This is a Royal gift from Croix, and please don't forget this battle. We can win the next.";			close2;			set .@Reward, 6;		}		set Flavius_BG_Tick, gettimetick(2) + 300; //setquest 2070;		getitem 7829, .@Reward;		set .@ontd,0;		bg_leave;		warp "bat_room",155,150;		end;	}	end;}// Battleground Therapist// *********************************************************************bat_b01,390,13,5	script	Therapist in battle#fl12	95,{	OnHeal:	if((@h_last) && (getnpctimer(1))) end;		set @h_last,1;	percentheal 100,100;	repair 1101;	skilleffect 34,0; sc_start SC_BLESSING,240000,5;	skilleffect 29,0; sc_start SC_INC_AGI,240000,5;	dispbottom "HP/SP fully restored.";	if(!getnpctimer(1)){setnpctimer 0; attachnpctimer(strcharinfo(1)); startnpctimer;}	while(getbrokenid(1)){	repair(1);{		set .@i, .@i +1;    }	if (.@i) dispbottom .@i + " Item(s) Repaired.";}	end;	OnTimer5000:	set @h_last,0;	stopnpctimer;	end;		OnInit:	defpattern 1, "heal","OnHeal";	activatepset 1;	end;}bat_b01,10,293,5	script	Therapist in battle#fl11	95,{			OnHeal:	if((@h_last) && (getnpctimer(1))) end;		set @h_last,1;	percentheal 100,100;	repair 1101;	skilleffect 34,0; sc_start SC_BLESSING,240000,5;	skilleffect 29,0; sc_start SC_INC_AGI,240000,5;	dispbottom "HP/SP fully restored.";	if(!getnpctimer(1)){setnpctimer 0; attachnpctimer(strcharinfo(0)); startnpctimer;}	while(getbrokenid(1)){	repair(1);{		set .@i, .@i +1;    }	if (.@i) dispbottom .@i + " Item(s) Repaired.";}	end;	OnTimer5000:	set @h_last,0;	stopnpctimer;	end;		OnInit:	defpattern 1, "heal","OnHeal";	activatepset 1;	end;}// Battleground Respawn and Regroup// *********************************************************************bat_b01,390,10,0	script	#gfl1_respawn	139,{	end;OnBGStart:	initnpctimer;	end;OnBGStop:	stopnpctimer;	end;OnTimer9000:	misceffect 83;	end;OnTimer10000:	areapercentheal "bat_b01",382,2,397,17,100,100;	set .@mapx,rand(309,327);	set .@mapy,rand(141,159);	areawarp "bat_b01",382,2,397,17,"bat_b01",.@mapx,.@mapy;	initnpctimer;	end;}bat_b01,10,290,0	script	#cfl1_respawn	139,{	end;OnBGStart:	initnpctimer;	end;OnBGStop:	stopnpctimer;	end;OnTimer9000:	misceffect 83;	end;OnTimer10000:	areapercentheal "bat_b01",2,282,17,297,100,100;	set .@mapx,rand(72,91);	set .@mapy,rand(141,159);	areawarp "bat_b01",2,282,17,297,"bat_b01",.@mapx,.@mapy;	initnpctimer;	end;}// MapFlags// *********************************************************************bat_b01	mapflag	battleground	2bat_b01	mapflag	nomemobat_b01	mapflag	nosave	SavePointbat_b01	mapflag	noteleportbat_b01	mapflag	nowarpbat_b01	mapflag	nowarptobat_b01	mapflag	noreturnbat_b01	mapflag	nobranchbat_b01	mapflag	nopenaltybat_b01	mapflag	loadevent// ***********************************************************************

 

Thank you in advance <3

 

Kindly Move this Post, I accidentally posted it here, and it supposed to be on "Script Support Section" Thanks..