Jump to content

minx123

Members
  • Posts

    42
  • Joined

  • Last visited

Posts posted by minx123

  1. maybe u can try this one.

     

    function	script	Time2Str	{
    	set .@Time_Left, getarg(0) - gettimetick(2);
    	
    	set .@Days, .@Time_Left / 86400;
    	set .@Time_Left, .@Time_Left - (.@Days * 86400);
    	set .@Hours, .@Time_Left / 3600;
    	set .@Time_Left, .@Time_Left - (.@Hours * 3600);
    	set .@Minutes, .@Time_Left / 60;
    	set .@Time_Left, .@Time_Left - (.@Minutes * 60);
    	
    	set .@Time$, "";
    	if( .@Days > 1 )
    		set .@Time$, .@Time$ + .@Days + " days, ";
    	else if( .@Days > 0 )
    		set .@Time$, .@Time$ + .@Days + " day, ";
    
    	if( .@Hours > 1 )
    		set .@Time$, .@Time$ + .@Hours + " hours, ";
    	else if( .@Hours > 0 )
    		set .@Time$, .@Time$ + .@Hours + " hour, ";
    
    	if( .@Minutes > 1 )
    		set .@Time$, .@Time$ + .@Minutes + " minutes, ";
    	else if( .@Minutes > 0 )
    		set .@Time$, .@Time$ + .@Minutes + " minute, ";
    
    	if( .@Time_Left > 1 || .@Time_Left == 0 )
    		set .@Time$, .@Time$ + .@Time_Left + " seconds";
    	else if( .@Time_Left == 1 )
    		set .@Time$, .@Time$ + .@Time_Left + " second";
    	
    	return .@Time$;
    }
    
    function	script	F_InsertComma	{
    	set .@str$, getarg(0);
    	for (set .@i,getstrlen(.@str$)-3; .@i>0; set .@i,.@i-3)
    		set .@str$, insertchar(.@str$,",",.@i);
    	return .@str$;
    }
    
    function	script	F_GetPlural	{
    	set .@str$, getarg(0);
    
    	if (countstr(.@str$," ")) {  // multiple words
    		explode(.@tmp$,.@str$," ");
    		set .@size, getarraysize(.@tmp$);
    
    		// if format is "... of|in|on ...", pluralize preceding word; else pluralize last word
    		if (compare(.@str$," of ") || compare(.@str$," in ") || compare(.@str$," on ")) {
    			for (set .@i,1; .@i<.@size; set .@i,.@i+1) {
    				if (getstrlen(.@tmp$[.@i]) == 2 && compare("of|in|on",.@tmp$[.@i]))
    					break;
    				set .@index, .@index + 1;
    			}
    		} else
    			set .@index, .@size - 1;
    
    		set .@str$, .@tmp$[.@index];
    		set .@tmp$[.@index],"%s";
    		set .@format$, implode(.@tmp$," ");
    	} else
    		set .@format$, "%s";
    
    	set .@strlen, getstrlen(.@str$);
    	if (.@strlen < 3)  // prevent errors
    		return ((getarg(1,0)) ? strtoupper(sprintf(.@format$,.@str$)) : sprintf(.@format$,.@str$));
    
    	setarray .@suffix$[0], charat(.@str$,.@strlen - 1), substr(.@str$,.@strlen - 2,.@strlen - 1);
    	if (!compare("abcdefghijklmnopqrstuvwxyz",.@suffix$[0])) {  // last character is not a letter
    		set .@result$, .@str$;
    	}
    
    	// common exceptions --> singular form == plural form
    	else if (compare("fish|glasses|sunglasses|clothes|boots|shoes|greaves|sandals|wings|ears",.@str$)) {
    		set .@result$, .@str$;
    	}
    
    	// ends in -s, -x, -z, -ch, -sh --> add -es
    	else if (.@suffix$[0] == "s" || .@suffix$[0] == "x" || .@suffix$[0] == "z" ||
    	    .@suffix$[1] == "ch" || .@suffix$[1] == "sh") {
    		set .@result$, .@str$ + "es";
    	}
    
    	// ends in -f, -fe --> remove -f, -fe --> add -ves
    	else if ((.@suffix$[0] == "f" || .@suffix$[1] == "fe") && .@suffix$[1] != "ff") {
    		if (compare("belief|cliff|chief|dwarf|grief|gulf|proof|roof",.@str$))
    			set .@result$, .@str$ + "s";  // exceptions --> add -s
    		else
    			set .@result$, substr(.@str$,0,.@strlen - 2 - (.@suffix$[1] == "fe")) + "ves";
    	}
    	
    	// ends in consonant + -y --> remove -y --> add -ies
    	else if (.@suffix$[0] == "y" && !compare("aeiou",charat(.@suffix$[1],0))) {
    		set .@result$, delchar(.@str$,.@strlen - 1) + "ies";
    	}
    
    	// ends in -o --> exceptions --> add -es
    	else if (.@suffix$[0] == "o" &&
    	         compare("buffalo|domino|echo|grotto|halo|hero|mango|mosquito|potato|tomato|tornado|torpedo|veto|volcano",.@str$)) {
    		set .@result$, .@str$ + "es";
    	}
    
    	// default --> add -s
    	else {
    		set .@result$, .@str$ + "s";
    	}
    
    	return ((getarg(1,0)) ? strtoupper(sprintf(.@format$,.@result$)) : sprintf(.@format$,.@result$));
    }
    function	script	F_InsertPlural	{
    	return sprintf(getarg(3,"%d %s"), getarg(0), ((getarg(0) == 1) ? getarg(1) : callfunc("F_GetPlural",getarg(1),getarg(2,0))));
    }
    
    
    
    //===== rAthena Script =======================================
    //= Private MVP & Branch Room
    //===== By: ==================================================
    //= AnnieRuru
    //===== Current Version: =====================================
    //= 1.0
    //===== Compatible With: =====================================
    //= rAthena Project
    //===== Description: =========================================
    //= Allows players to rent an MVP room for personal use,
    //= or for a party or guild.
    //===== Additional Comments: =================================
    //= 1.0 First version, edited. [Euphy]
    //============================================================
    
    prontera,148,174,5	script	Private MVP Room	100,{
    	mes "[Private MVP Room]";
    	mes "Please select a private MVP room.";
    	if ( getvariableofnpc( .rentcost, "MVP Summoner" ) )
    		mes "The cost to rent a room for "+ getvariableofnpc( .timeout, "MVP Summoner" ) +" minutes is "+ callfunc("F_InsertComma", getvariableofnpc( .rentcost, "MVP Summoner" ) ) +" zeny.";
    	else
    		mes "You can only use the room for only "+ getvariableofnpc( .timeout, "MVP Summoner" ) +" minutes.";
    	mes " ";
    	for ( .@i = 1; .@i <= 8; .@i++ )
    		if ( getvariableofnpc( .renttime[.@i], "MVP Summoner" ) )
    			mes "Room #"+ .@i +" = "+ .color$[ .type[.@i] ] + .whoinuse$[.@i] +"^000000";
    	next;
    	.@room = select(
    		"MVP Room 1 ["+ getmapusers("06guild_01") +"]",
    		"MVP Room 2 ["+ getmapusers("06guild_02") +"]",
    		"MVP Room 3 ["+ getmapusers("06guild_03") +"]",
    		"MVP Room 4 ["+ getmapusers("06guild_04") +"]",
    		"MVP Room 5 ["+ getmapusers("06guild_05") +"]",
    		"MVP Room 6 ["+ getmapusers("06guild_06") +"]",
    		"MVP Room 7 ["+ getmapusers("06guild_07") +"]",
    		"MVP Room 8 ["+ getmapusers("06guild_08") +"]");
    	if ( getvariableofnpc( .renttime[.@room], "MVP Summoner" ) ) {
    		if ( .inuseid[.@room] == getcharid( .type[.@room] ) ) {
    			warp "06guild_0"+ .@room, 0,0;
    			close;
    		} else {
    			mes "[Private MVP Room]";
    			mes "This room is reserved for ";
    			mes .color$[ .type[.@room] ] + .whoinuse$[.@room] +"^000000.";
    			mes "Please select another.";
    			close;
    		}
    	}
    	mes "[Private MVP Room]";
    	mes "Reserve this room for...";
    	next;
    	set .@type, select( "For my party members", "For my guild members", "For personal account use" );
    	if ( !getcharid(.@type) ) {
    		mes "[Private MVP Room]";
    		mes "You do not own a "+( ( .@type == 1 )? "Party" : "Guild" )+".";
    		close;
    	}
    	else if ( Zeny < getvariableofnpc( .rentcost, "MVP Summoner" ) ) {
    		mes "You don't have enough zeny to rent a room.";
    		close;
    	}
    	else if ( getvariableofnpc( .renttime[.@room], "MVP Summoner" ) ) {
    		mes "[Private MVP Room]";
    		mes "I'm sorry, somebody else has already registered this room faster than you.";
    		close;
    	}
    	for ( .@i = 1; .@i <= 8; .@i++ ) {
    		if ( ( getvariableofnpc( .renttime[.@i], "MVP Summoner" ) ) && .@type == .type[.@i] && getcharid(.@type) == .inuseid[.@i] ) {
    			mes "[Private MVP Room]";
    			mes "You already rented Room#"+ .@i +". Use that room instead.";
    			close;
    		}
    	}
    	set .type[.@room], .@type;
    	set .inuseid[.@room], getcharid(.@type);
    	set .whoinuse$[.@room], strcharinfo( ( .@type == 3 )? 0 : .@type );
    	Zeny -= getvariableofnpc( .rentcost, "MVP Summoner" );
    	warp "06guild_0"+ .@room, 0,0;
    	killmonsterall "06guild_0"+ .@room;
    	donpcevent "MVP Summoner#"+ .@room +"::OnEnterMap";
    	close;
    OnInit:
    	.color$[1] =  "^EE8800"; // party color
    	.color$[2] =  "^70CC11"; // guild color
    	.color$[3] =  "^0000FF"; // account color
    	end;
    }
    
    -	script	MVP Summoner	-1,{
    	mes "[MVP Summoner]";
    	mes "Time left: " + callfunc( "Time2Str", .renttime[ atoi( strnpcinfo(2) ) ] + .timeout * 60 );
    	mes "Hi, what can I do for you?";
    	next;
    	switch ( select(.menu$) ) {
    	case 1:
    		mes "[MVP Summoner]";
    		if ( mobcount( "this", strnpcinfo(3)+"::OnMobDead" ) ) {
    			mes "I cannot offer heal service when there are monsters around.";
    			close;
    		}
    		sc_end SC_STONE;
    		sc_end SC_SLOWDOWN;
    		sc_end SC_FREEZE;
    		sc_end SC_SLEEP;
    		sc_end SC_CURSE;
    		sc_end SC_SILENCE;
    		sc_end SC_CONFUSION;
    		sc_end SC_BLIND;
    		sc_end SC_BLEEDING;
    		sc_end SC_DECREASEAGI;
    		sc_end SC_POISON;
    		sc_end SC_HALLUCINATION;
    		sc_end SC_STRIPWEAPON;
    		sc_end SC_STRIPARMOR;
    		sc_end SC_STRIPHELM;
    		sc_end SC_STRIPSHIELD;
    		sc_end SC_CHANGEUNDEAD;
    		sc_end SC_ORCISH;
    		sc_end SC_BERSERK;
    		sc_end SC_SKE;
    		sc_end SC_SWOO;
    		sc_end SC_SKA;
    		percentheal 100,100;
    		specialeffect2 EF_HEAL;
    		mes "You are completely healed.";
    		close;
    	case 2:
    		if ( mobcount( "this", strnpcinfo(3)+"::OnMobDead" ) ) {
    			mes "[MVP Summoner]";
    			mes "I cannot summon another MVP when there are monsters around.";
    			close;
    		} else if ( .mvpcost ) {
    			mes "[MVP Summoner]";
    			mes "The cost to summon an MVP is "+ callfunc( "F_InsertComma", .mvpcost ) +" zeny.";
    			next;
    			set .@menu, select(.mvpid_menu$) -1;
    			mes "[MVP Summoner]";
    			if ( Zeny < .mvpcost ) {
    				mes "You don't have enough zeny to summon an MVP.";
    				close;
    			}
    		} else {
    			set .@menu, select(.mvpid_menu$) -1;
    			mes "[MVP Summoner]";
    		}
    		mes "Please get ready.";
    		close2;
    		if ( Zeny < .mvpcost ) end;
    		Zeny -= .mvpcost;
    		monster "this", 0, 0, "--ja--", .mvpid[.@menu], 1, strnpcinfo(3)+"::OnMobDead";
    		end;
    	case 3:
    		if ( mobcount( "this", strnpcinfo(3)+"::OnMobDead" ) ) {
    			mes "[MVP Summoner]";
    			mes "I cannot summon another mini-boss when there are monsters around.";
    			close;
    		} else if ( .bosscost ) {
    			mes "[MVP Summoner]";
    			mes "The cost to summon a mini-boss is "+ callfunc( "F_InsertComma", .bosscost ) +" zeny.";
    			next;
    			set .@menu, select(.bossid_menu$) -1;
    			mes "[MVP Summoner]";
    			if ( Zeny < .bosscost ) {
    				mes "You doesn't have enough zeny to summon a mini-boss.";
    				close;
    			}
    		} else {
    			set .@menu, select(.bossid_menu$) -1;
    			mes "[MVP Summoner]";
    		}
    		mes "Please get ready.";
    		close2;
    		if ( Zeny < .bosscost ) end;
    		Zeny -= .bosscost;
    		monster "this", 0, 0, "--ja--", .bossid[.@menu], 1, strnpcinfo(3)+"::OnMobDead";
    		end;
    	case 4:
    		if ( mobcount( "this", strnpcinfo(3)+"::OnMobDead" ) > 0 ) {
    			mes "[MVP Summoner]";
    			mes "I cannot offer this service when there are monsters around.";
    			close;
    		}
    		close2;
    		callshop "MVP room#branch", 1;
    		end;
    	case 5:
    		mes "[MVP Summoner]";
    		mes "Are you sure you want to leave this room?";
    		next;
    		if ( select( "Yes:No") == 1 )
    			warp .respawnmap$, .respawnx, .respawny;
    		close;
    	case 6:
    		mes "[MVP Summoner]";
    		if ( getmapusers( strcharinfo(3) ) > 1 ) {
    			mes "There are still some players in this room. Make sure you are the last member in this room to use this option.";
    			close;
    		}
    		mes "Are you sure you want to give up this room?";
    		if ( .rentcost )
    			mes "You will need to pay again to enter this room.";
    		next;
    		if ( select( "Yes", "No" ) == 2 ) close;
    		awake strnpcinfo(0);
    		end;
    	}
    	close;
    
    OnMobDead:
    	end;
    
    OnEnterMap:
    	.@id = atoi( strnpcinfo(2) );
    	.renttime[.@id] = gettimetick(2);
    	sleep .timeout * 60000;
    	mapwarp strnpcinfo(4), .respawnmap$, .respawnx, .respawny;
    	.renttime[.@id] = 0;
    	killmonsterall strnpcinfo(4);
    	end;
    
    OnInit:
    	if ( !getstrlen( strnpcinfo(2) ) ) {
    
    //	Config ---------------------------------------------------------------------------------------
    
    	// Room rental time, in minutes.
    	// When time runs out, all players inside the room will be kicked out.
    	// Do NOT set this to zero!
    	set .timeout, 60;
    
    	set .rentcost, 100000;	// Zeny cost for renting a room (0 = free)
    	set .mvpcost, 100000;	// Zeny cost to summon an MVP (0 = free)
    	set .bosscost, 50000;	// Zeny cost to summon a boss monster (0 = free)
    
    	//	Options setting inside MVP room
    	set .@menu[1], 1;	// Turn Heal option On/Off
    	set .@menu[2], 1;	// Turn MVP Summoning On/Off
    	set .@menu[3], 1;	// Turn Mini boss Summoning On/Off
    	set .@menu[4], 0;	// Sell items (branches) On/Off (see shop below, before the mapflags)
    
    	// Respawn point when players leave the room
    	set .respawnmap$, "prontera";
    	set .respawnx, 150;
    	set .respawny, 174;
    
    	setarray .mvpid[0],
    		1511,//	Amon Ra
    		1647,// Assassin Cross Eremes
    		1785,//	Atroce
    		1630,//	Bacsojin
    		1039,//	Baphomet
    		1874,//	Beelzebub
    		1272,//	Dark Lord
    		1719,//	Datale
    		1046,//	Doppelgangger
    		1389,//	Dracula
    		1112,//	Drake
    		1115,//	Eddga
    		1418,//	Evil Snake Lord
    		1871,//	Fallen Bishop
    		1252,//	Garm
    		1768,//	Gloom Under Night
    		1086,//	Golden Thief Bug
    		1885,//	Gopinich
    		1649,// High Priest Magaleta
    		1651,// High Wizard Katrinn
    		1832,//	Ifrit
    		1492,//	Incantation Samurai
    		1734,//	Kiel D-01
    		1251,//	Knight of Windstorm
    		1779,//	Ktullanux
    		1688,//	Lady Tanee
    		1646,// Lord Knight Seyren
    		1373,//	Lord of Death
    		1147,//	Maya
    		1059,//	Mistress
    		1150,//	Moonlight Flower
    		1087,//	Orc Hero
    		1190,//	Orc Lord
    		1038,//	Osiris
    		1157,//	Pharaoh
    		1159,//	Phreeoni
    		1623,//	RSX 0806
    		1650,// Sniper Shecil
    		1583,//	Tao Gunka
    		1708,//	Thanatos
    		1312,//	Turtle General
    		1751,//	Valkyrie Randgris
    		1685,// Vesper
    		1648,// Whitesmith Harword
    		1917,// Wounded Morroc
    		1658;//	Ygnizem
    
    	setarray .bossid[0],
    		1096,// Angeling
    		1388,// Archangeling
    		1795,// Bloody Knight
    		1830,// Bow Guardian
    		1839,// Byorgue
    		1309,// Cat O' Nine Tail
    		1283,// Chimera
    		1302,// Dark Illusion
    		1198,// Dark Priest
    		1582,// Deviling
    		1091,// Dragon Fly
    		1093,// Eclipse
    		1205,// Executioner
    		1783,// Galion
    		1592,// Gangster
    		1120,// Ghostring
    		1259,// Gryphon
    		1720,// Hydro
    		1090,// Mastering
    		1289,// Maya Purple
    		1262,// Mutant Dragon
    		1203,// Mysteltainn
    		1870,// Necromancer
    		1295,// Owl Baron
    		1829,// Sword Guardian
    		1204,// Tirfing
    		1089,// Toad
    		1092,// Vagabond Wolf
    		1765;// Valkyrie
    
    //	Config Ends ------------------------------------------------------------------------
    
    		if ( !.timeout ) set .timeout, 60;
    		.menu$ = ( .@menu[1] ? "Heal" : "" ) +":" ;
    		.menu$ = .menu$ + ( .@menu[2] ? "Summon MVP" : "" ) +":";
    		.menu$ = .menu$ + ( .@menu[3] ? "Summon Mini-boss" : "" ) +":";
    		.menu$ = .menu$ + ( .@menu[4] ? "Buy branches" : "" ) +":";
    		.menu$ = .menu$ + "Leave this room:Give up this room";
    		if ( .@menu[2] ) {
    			.@size = getarraysize( .mvpid );
    			for ( .@i = 0; .@i < .@size; .@i++ )
    				.mvpid_menu$ = .mvpid_menu$ + getmonsterinfo( .mvpid[.@i], MOB_NAME ) +":";
    		}
    		if ( .@menu[3] ) {
    			.@size = getarraysize( .bossid );
    			for ( .@i = 0; .@i < .@size; .@i++ )
    				.bossid_menu$ = .bossid_menu$ + getmonsterinfo( .bossid[.@i], MOB_NAME ) +":";
    		}
    	}
    	else {
    		mapannounce strnpcinfo(4), "An administrator has refreshed the server. Please re-register this room.", bc_map;
    		mapwarp strnpcinfo(4), .respawnmap$, .respawnx, .respawny;
    	}
    	end;
    }
    
    -	shop	MVP room#branch	-1,604:100000,12103:1000000
    
    06guild_01,49,49,4	duplicate(MVP Summoner)	MVP Summoner#1	116
    06guild_02,49,49,4	duplicate(MVP Summoner)	MVP Summoner#2	116
    06guild_03,49,49,4	duplicate(MVP Summoner)	MVP Summoner#3	116
    06guild_04,49,49,4	duplicate(MVP Summoner)	MVP Summoner#4	116
    06guild_05,49,49,4	duplicate(MVP Summoner)	MVP Summoner#5	116
    06guild_06,49,49,4	duplicate(MVP Summoner)	MVP Summoner#6	116
    06guild_07,49,49,4	duplicate(MVP Summoner)	MVP Summoner#7	116
    06guild_08,49,49,4	duplicate(MVP Summoner)	MVP Summoner#8	116
    
    06guild_01	mapflag	nowarpto
    06guild_02	mapflag	nowarpto
    06guild_03	mapflag	nowarpto
    06guild_04	mapflag	nowarpto
    06guild_05	mapflag	nowarpto
    06guild_06	mapflag	nowarpto
    06guild_07	mapflag	nowarpto
    06guild_08	mapflag	nowarpto
    06guild_01	mapflag	nomemo
    06guild_02	mapflag	nomemo
    06guild_03	mapflag	nomemo
    06guild_04	mapflag	nomemo
    06guild_05	mapflag	nomemo
    06guild_06	mapflag	nomemo
    06guild_07	mapflag	nomemo
    06guild_08	mapflag	nomemo
    06guild_01	mapflag	noteleport
    06guild_02	mapflag	noteleport
    06guild_03	mapflag	noteleport
    06guild_04	mapflag	noteleport
    06guild_05	mapflag	noteleport
    06guild_06	mapflag	noteleport
    06guild_07	mapflag	noteleport
    06guild_08	mapflag	noteleport
    06guild_01	mapflag	nosave	SavePoint
    06guild_02	mapflag	nosave	SavePoint
    06guild_03	mapflag	nosave	SavePoint
    06guild_04	mapflag	nosave	SavePoint
    06guild_05	mapflag	nosave	SavePoint
    06guild_06	mapflag	nosave	SavePoint
    06guild_07	mapflag	nosave	SavePoint
    06guild_08	mapflag	nosave	SavePoint
    06guild_01	mapflag	nopenalty
    06guild_02	mapflag	nopenalty
    06guild_03	mapflag	nopenalty
    06guild_04	mapflag	nopenalty
    06guild_05	mapflag	nopenalty
    06guild_06	mapflag	nopenalty
    06guild_07	mapflag	nopenalty
    06guild_08	mapflag	nopenalty
    06guild_01	mapflag	monster_noteleport
    06guild_02	mapflag	monster_noteleport
    06guild_03	mapflag	monster_noteleport
    06guild_04	mapflag	monster_noteleport
    06guild_05	mapflag	monster_noteleport
    06guild_06	mapflag	monster_noteleport
    06guild_07	mapflag	monster_noteleport
    06guild_08	mapflag	monster_noteleport

     

  2. hi. i need some help to change this script

     

    1 - player can enter twice a day to gold room lock by ID not char.

    2- player can farm with time limit 15min.

     

    //*********************************************************************************************************************************************************************************
      //***--Topic Link :		***\( ^ ~ ^ )/***
      //***
      //***
      //*********************************************************************************************************************************************************************************
      //***-- Script by :		***\( ^ ~ ^ )/***
      //***-- Emistry
      //***
      //*********************************************************************************************************************************************************************************
      //***-- Contact Info :	***\( ^ ~ ^ )/***
      //***-- My Email : [email protected]
      //***
      //*********************************************************************************************************************************************************************************
      //***-- Messages :		***\( ^ ~ ^ )/***
      //***-- Drop me a private message or email if you are looking for my helps ^^.
      //***-- Beside that, I am looking for a Server to work with ^^ .  
      //***-- I will do my best to help you ^^.
      //***-- More Details ? PM Me ^^.
      //***
      //*********************************************************************************************************************************************************************************
      //***Although these scripts might not suit or follow with what you have requested completely. But i still wish you can give it a try before reject the works.
      //***
      //*********************************************************************************************************************************************************************************
    
    
    
      //-------------------------NPC [ Warper + Exchanger  ]  --------------------------------------------------------------------
    
      prontera,150,164,3	script	Gold Room Manager	100,{
      
      	mes "[ Gold Room Manager ]";
      	mes "How may I serve for you ?";
      	mes "I can warp you to a Gold Mine.";
      	next;
      	mes "[ Gold Room Manager ]";
      	mes "I need you to give me";
      	mes "100,000 Zeny to Enter.";
      	next;
      	switch(select("Enter to Gold Room:Cancel")) {
      case 1:
      	if(Zeny < 10000) goto nomoney;
      	set .@a,rand(50);
      	set .@b,rand(50);
      	mes "[Gold Room]";
      	mes "Before you enter, you need to answer the question  ";
      	mes "for security check.";
      	mes "If A = "+.@a+"   B = "+.@b;
      	switch( rand(1) ){
      	set .@answer,.@a + .@b;
      	mes "How many is A + B ?";
      			next;
      			input .@input;	
      			next;
      		if( .@input!=.@answer ) {
      		atcommand "@kick " + strcharinfo(0);
      		close;
      		break;
      		}
      		else if (.@input==.@answer) {
      			set Zeny,Zeny-10000;		
      			warp "ordeal_3-2",0,0; 	
      			close;
      			}
      		end;
      		}
      case 2:
      			mes "[ Gold Room Manager ]";	
      			mes "Owh....";
      			mes "Nevermind..since it is your decision.";
      			mes "It is all up to you.";
      			mes "Come back to me if you changed your mind.";
      			close;
      	}
      	nomoney:
      		mes "[Gold Room Manager]";
      		mes "Sorry you need 100,000z to enter";
      		close;
      }
      //-------------------------MONSTER SPAWN--------------------------------------------------------------------
    
    
      // Duplicados Warps v1.0
      ordeal_3-2.gat,130,193,0	warp	goldroomwrp#1	3,3,ordeal_3-2.gat,154,154
      ordeal_3-2.gat,106,154,0	warp	goldroomwrp#2	3,3,ordeal_3-2.gat,154,154
      ordeal_3-2.gat,201,129,0	warp	goldroomwrp#3	3,3,ordeal_3-2.gat,154,154
      ordeal_3-2.gat,177,193,0	warp	goldroomwrp#4	3,3,ordeal_3-2.gat,154,154
      //ordeal_3-2,24,228,0	warp	prontera	1,1,prontera,156,172;
      //ordeal_3-2,25,58,0	warp	prontera	1,1,prontera,156,172;
      //ordeal_3-2,289,130,0	warp	prontera	1,1,prontera,156,172;
      //ordeal_3-2,283,230,0	warp	prontera	1,1,prontera,156,172;
      //ordeal_3-2,210,203,0	warp	prontera	1,1,prontera,156,172;
    
      // Natural Monsters v1.0
      ordeal_3-2,154,154,0,0	monster	Gold Savage	1840,15,0,0,0
      ordeal_3-2,0,0,0,0	monster	Gold Savage	1840,50,0,0,0
      ordeal_3-2,0,0,0,0	monster	Gold Savage	1840,50,0,0,0
      ordeal_3-2,0,0,0,0	monster	Gold Savage	1840,50,0,0,0
    
      // Map Flags v1.0
      ordeal_3-2	mapflag	nowarp
      ordeal_3-2	mapflag	nobranch
      ordeal_3-2	mapflag	nomemo
      ordeal_3-2	mapflag	nowarpto
      ordeal_3-2	mapflag	nopenalty
      ordeal_3-2	mapflag	pvp_noparty
      ordeal_3-2	mapflag	noskill
      ordeal_3-2	mapflag	nosave
      ordeal_3-2	mapflag	novending
      ordeal_3-2	mapflag	noteleport

     

  3. Hi I have a problem with donations.

    Basically I added this Theme (https://rathena.org/board/files/file/2991-green-fluxcp-theme/), copying and pasting it into the Theme folder. And up there I had no problems. The problem happens when a player tries to Donate, in practice the money is added to my paypal account, but not on FluxCP credits donations are added. (I think it's a problem of the topic)

     

     

    have u check at paypal transaction under cp log? u can check over there if the crdt already get or not

  4.  

    please try this

    //===== Hercules Script ===========================================
    //= King of Emperium Hill
    //===== By: =======================================================
    //= AnnieRuru
    //===== Current Version: ==========================================
    //= 1.1
    //===== Compatible With: ==========================================
    //= hercules 2015-12-19
    //===== Description: ==============================================
    //= defends the emperium in the middle of the map until times up
    //===== Topic =====================================================
    //= http://hercules.ws/board/topic/4495-gvg-king-of-emperium-hill/
    //===== Additional Comments: ======================================
    //= Finally there is a topic for this !
    //=================================================================
    
    -	script	KoE	FAKE_NPC,{
    OnInit:
    	disablenpc "The King#KoE";
    	disablenpc "Exit#KoE";
    	bindatcmd "koe", strnpcinfo(0)+"::OnCommand", 99,100;
    	// Rewards
    	.include_offline = 0; // Include offline guild members? ( 1 = Enabled | 0 = Disabled )
    	setarray .Items[0],7779,1; // Item Id, Item Amount
    	end;
    OnCommand:
    	if ( compare( .@atcmd_parameters$, "on" ) ) goto L_Start;
    	else if ( compare( .@atcmd_parameters$, "off" ) ) goto L_End;
    	else {
    		dispbottom "type - '@koe on' to start the event";
    		dispbottom "type - '@koe off' to end the event";
    	}
    	end;
    L_Start:
    OnClock2015: // everyday 8pm starts
    	if ( .start ) end;
    	gvgon "guild_vs1";
    	announce "The King of Emperium Hill has begun!", bc_all;
    	.start = true;
    	enablenpc "The King#KoE";
    	disablenpc "Exit#KoE";
    	$koegid = 0;
    	donpcevent "::OnRevKoE";
    	maprespawnguildid "guild_vs1", $koegid, 3;
    	killmonster "guild_vs1", "KoE::OnEmpDead";
    	monster "guild_vs1",49,49, "EMPERIUM", EMPELIUM, 1, "KoE::OnEmpDead";
    	end;
    L_End:
    OnClock2045: // everyday 8:30pm ends
    	gvgoff "guild_vs1";
    	announce "The King of Emperium Hill is over!", bc_all;
    	.start = 0;
    	enablenpc "Exit#KoE";
    	disablenpc "The King#KoE";
    	killmonster "guild_vs1", "KoE::OnEmpDead";
    //	maprespawnguildid "guild_vs1", $koegid, 2; // uncomment this line to kick non-owner off the map when event ends
    
    	query_sql "SELECT `account_id`, `char_id` FROM `guild_member` WHERE `guild_id` = '" +  $koegid + "'",.@aid,.@cid;
    	for ( .@i = 0; .@i < getarraysize( .@aid ); .@i++ ) {
    		if ( isloggedin( .@aid[ .@i ], .@cid[ .@i ] ) ) {
    			if ( attachrid( .@aid[ .@i ] ) ) {
    				if ( !checkvending() ) {
    					for ( .@x = 0; .@x < getarraysize( .Items ); .@x+=2 ) 
    						getitem .Items[ .@x ], .Items[ .@x + 1 ];
    				}
    			}
    		}
    		if ( .include_offline ) {
    			for ( .@x = 0; .@x < getarraysize( .Items ); .@x+=2 ) {
    				if ( query_sql( "SELECT `nameid` FROM `inventory` WHERE `char_id` = '" + .@cid[ .@i ] + "' AND `nameid` = '" +.Items[ .@x ]+ "'" ) )
    					query_sql "UPDATE `inventory` SET `amount` = `amount` + " + .Items[ .@x + 1 ] + " WHERE `char_id` = '" + .@cid[ .@i ] + "' AND `nameid` = '" +.Items[ .@x ]+ "'";
    				else 
    					query_sql "INSERT INTO `inventory` ( `char_id`, `nameid`, `amount`, `identify` ) VALUES ( '" +.@cid[ .@i ]+ "' , '" +.Items[ .@x ]+ "', '" +.Items[ .@x + 1 ]+ "', '1')";
    			}
    		}
    	}	
    	end;
    OnEmpDead:
    	$koegid = getcharid(2);
    	announce "The current King of Emperium Hill is the ["+ strcharinfo(2) +"] guild.", bc_all;
    	donpcevent "::OnRevKoE";
    	maprespawnguildid "guild_vs1", $koegid, 2;
    	killmonster "guild_vs1", "KoE::OnEmpDead";
    	sleep 500;
    	if ( .start )
    		monster "guild_vs1",49,49, "EMPERIUM", EMPELIUM, 1, "KoE::OnEmpDead";
    	end;
    }
    
    // KoE Entrance
    doubrius,86,112,4	script	The King#KoE	4_M_CHNGENERL,{
    	mes "[The King]";
    	if ( !getcharid(2) ) {
    		mes "You must have a guild to participate in the ^FF0000King of Emperium Hill Tournament^000000.";
    		close;
    	}
    	mes "Hello.";
    	mes "Would you like to participate in the ^FF0000King of Emperium Hill Tournament^000000?";
    	if ( select ( "Yes", "No" ) == 2 ) close;
    	if ( !getvariableofnpc( .start, "KoE" ) ) close;
    	switch( rand(1,4) ){
    	case 1:	warp "guild_vs1", 50, 88; end;
    	case 2:	warp "guild_vs1", 88, 50; end;
    	case 3:	warp "guild_vs1", 50, 11; end;
    	case 4:	warp "guild_vs1", 11, 50; end;
    	}
    }
    
    // KoE Exit
    guild_vs1,49,56,5	script	Exit#KoE	1_M_BARD,{
    	mes "[Exit]";
    	mes "See ya.";
    	if ( getcharid(2) == $koegid )
    		getitem 20032,2;
    		getitem 14232,3;
    		getitem 20033,1;
    		getitem 20034,3;
    		getitem 7227,10; // configure prize here
    	close2;
    	warp "Save",0,0;
    	end;
    }
    
    // Flags
    doubrius,77,108,5	script	King of Emperium Hill#1::koe_flag	GUILD_FLAG,{
    	if ( !$koegid ) end;
    	mes "[King of Emperium Hill]";
    	mes "The Current King of Emperium Hill is the ["+ getguildname($koegid) +"] guild.";
    	close;
    //OnInit: // Uncomment this line to make the emblem stay after @reloadscript
    OnRevKoE:
    	flagemblem $koegid;
    	end;
    }
    
    
    
    guild_vs1,61,49,6	duplicate(koe_flag)	King of Emperium Hill#2	GUILD_FLAG
    guild_vs1,38,49,2	duplicate(koe_flag)	King of Emperium Hill#3	GUILD_FLAG
    guild_vs1,49,61,0	duplicate(koe_flag)	King of Emperium Hill#4	GUILD_FLAG
    
    guild_vs1	mapflag	nobranch
    guild_vs1	mapflag	nomemo
    guild_vs1	mapflag	nopenalty
    guild_vs1	mapflag	noreturn
    guild_vs1	mapflag	nosave	SavePoint
    guild_vs1	mapflag	noteleport
    guild_vs1	mapflag	gvg_noparty
    guild_vs1	mapflag	nowarp
    guild_vs1	mapflag	nowarpto
    guild_vs1	mapflag	guildlock
    

    thank you so much..

    its work..

  5. Update Hexed im not sure if can or not but u can read at guide in hashield website.

     

    location to update hashield in plist.txt

     

    138 patch_2-4-2016-11-11-35-PM.gpf => adata.grf

     

    NumberUpdate namefile.gpf => yourname.grf

     

    if i not mistake, if u grf update or data.grf update is more than 3mb or something u need add manual at location Hashield/Patch

     

    /public_html/HashieldPublicPatches

  6. can you post your KoE script?

    //===== Hercules Script ===========================================
    //= King of Emperium Hill
    //===== By: =======================================================
    //= AnnieRuru
    //===== Current Version: ==========================================
    //= 1.1
    //===== Compatible With: ==========================================
    //= hercules 2015-12-19
    //===== Description: ==============================================
    //= defends the emperium in the middle of the map until times up
    //===== Topic =====================================================
    //= http://hercules.ws/board/topic/4495-gvg-king-of-emperium-hill/
    //===== Additional Comments: ======================================
    //= Finally there is a topic for this !
    //=================================================================
    
    -	script	KoE	FAKE_NPC,{
    OnInit:
    	disablenpc "The King#KoE";
    	disablenpc "Exit#KoE";
    	bindatcmd "koe", strnpcinfo(0)+"::OnCommand", 99,100;
    	end;
    OnCommand:
    	if ( compare( .@atcmd_parameters$, "on" ) ) goto L_Start;
    	else if ( compare( .@atcmd_parameters$, "off" ) ) goto L_End;
    	else {
    		dispbottom "type - '@koe on' to start the event";
    		dispbottom "type - '@koe off' to end the event";
    	}
    	end;
    L_Start:
    OnClock2015: // everyday 8pm starts
    	if ( .start ) end;
    	gvgon "guild_vs1";
    	announce "The King of Emperium Hill has begun!", bc_all;
    	.start = true;
    	enablenpc "The King#KoE";
    	disablenpc "Exit#KoE";
    	$koegid = 0;
    	donpcevent "::OnRevKoE";
    	maprespawnguildid "guild_vs1", $koegid, 3;
    	killmonster "guild_vs1", "KoE::OnEmpDead";
    	monster "guild_vs1",49,49, "EMPERIUM", EMPELIUM, 1, "KoE::OnEmpDead";
    	end;
    L_End:
    OnClock2045: // everyday 8:30pm ends
    	gvgoff "guild_vs1";
    	announce "The King of Emperium Hill is over!", bc_all;
    	.start = 0;
    	enablenpc "Exit#KoE";
    	disablenpc "The King#KoE";
    	killmonster "guild_vs1", "KoE::OnEmpDead";
    //	maprespawnguildid "guild_vs1", $koegid, 2; // uncomment this line to kick non-owner off the map when event ends
    	end;
    OnEmpDead:
    	$koegid = getcharid(2);
    	announce "The current King of Emperium Hill is the ["+ strcharinfo(2) +"] guild.", bc_all;
    	donpcevent "::OnRevKoE";
    	maprespawnguildid "guild_vs1", $koegid, 2;
    	killmonster "guild_vs1", "KoE::OnEmpDead";
    	sleep 500;
    	if ( .start )
    		monster "guild_vs1",49,49, "EMPERIUM", EMPELIUM, 1, "KoE::OnEmpDead";
    	end;
    }
    
    // KoE Entrance
    doubrius,86,112,4	script	The King#KoE	4_M_CHNGENERL,{
    	mes "[The King]";
    	if ( !getcharid(2) ) {
    		mes "You must have a guild to participate in the ^FF0000King of Emperium Hill Tournament^000000.";
    		close;
    	}
    	mes "Hello.";
    	mes "Would you like to participate in the ^FF0000King of Emperium Hill Tournament^000000?";
    	if ( select ( "Yes", "No" ) == 2 ) close;
    	if ( !getvariableofnpc( .start, "KoE" ) ) close;
    	switch( rand(1,4) ){
    	case 1:	warp "guild_vs1", 50, 88; end;
    	case 2:	warp "guild_vs1", 88, 50; end;
    	case 3:	warp "guild_vs1", 50, 11; end;
    	case 4:	warp "guild_vs1", 11, 50; end;
    	}
    }
    
    // KoE Exit
    guild_vs1,49,56,5	script	Exit#KoE	1_M_BARD,{
    	mes "[Exit]";
    	mes "See ya.";
    	if ( getcharid(2) == $koegid )
    		getitem 20032,2;
    		getitem 14232,3;
    		getitem 20033,1;
    		getitem 20034,3;
    		getitem 7227,10; // configure prize here
    	close2;
    	warp "Save",0,0;
    	end;
    }
    
    // Flags
    doubrius,77,108,5	script	King of Emperium Hill#1::koe_flag	GUILD_FLAG,{
    	if ( !$koegid ) end;
    	mes "[King of Emperium Hill]";
    	mes "The Current King of Emperium Hill is the ["+ getguildname($koegid) +"] guild.";
    	close;
    //OnInit: // Uncomment this line to make the emblem stay after @reloadscript
    OnRevKoE:
    	flagemblem $koegid;
    	end;
    }
    
    
    
    guild_vs1,61,49,6	duplicate(koe_flag)	King of Emperium Hill#2	GUILD_FLAG
    guild_vs1,38,49,2	duplicate(koe_flag)	King of Emperium Hill#3	GUILD_FLAG
    guild_vs1,49,61,0	duplicate(koe_flag)	King of Emperium Hill#4	GUILD_FLAG
    
    guild_vs1	mapflag	nobranch
    guild_vs1	mapflag	nomemo
    guild_vs1	mapflag	nopenalty
    guild_vs1	mapflag	noreturn
    guild_vs1	mapflag	nosave	SavePoint
    guild_vs1	mapflag	noteleport
    guild_vs1	mapflag	gvg_noparty
    guild_vs1	mapflag	nowarp
    guild_vs1	mapflag	nowarpto
    guild_vs1	mapflag	guildlock
    

    here my script koe

  7. hello..

    i need some help to change script from woe auto reward to koe auto reward.

    script from this link

     

    https://rathena.org/board/topic/97753-annierurus-koe-script/?p=267586

     

    script autoreward here

    -	script	Sample	-1,{
    	OnAgitEnd:
    		query_sql "SELECT `account_id`, `char_id` FROM `guild_member` WHERE `guild_id` = '" + getcastledata( "prtg_cas01", 1 ) + "'",.@aid,.@cid;
    		for ( .@i = 0; .@i < getarraysize( .@aid ); .@i++ ) {
    			if ( isloggedin( .@aid[ .@i ], .@cid[ .@i ] ) ) {
    				if ( attachrid( .@aid[ .@i ] ) ) {
    					if ( !checkvending() ) {
    						for ( .@x = 0; .@x < getarraysize( .Items ); .@x+=2 ) 
    							getitem .Items[ .@x ], .Items[ .@x + 1 ];
    					}
    				}
    			}
    			if ( .include_offline ) {
    				for ( .@x = 0; .@x < getarraysize( .Items ); .@x+=2 ) {
    					if ( query_sql( "SELECT `nameid` FROM `inventory` WHERE `char_id` = '" + .@cid[ .@i ] + "' AND `nameid` = '" +.Items[ .@x ]+ "'" ) )
    						query_sql "UPDATE `inventory` SET `amount` = `amount` + " + .Items[ .@x + 1 ] + " WHERE `char_id` = '" + .@cid[ .@i ] + "' AND `nameid` = '" +.Items[ .@x ]+ "'";
    					else 
    						query_sql "INSERT INTO `inventory` ( `char_id`, `nameid`, `amount`, `identify` ) VALUES ( '" +.@cid[ .@i ]+ "' , '" +.Items[ .@x ]+ "', '" +.Items[ .@x + 1 ]+ "', '1')";
    				}
    			}
    		}	
    		end;
    	
    	OnInit:
    		.include_offline = 0; // Include offline guild members? ( 1 = Enabled | 0 = Disabled )
    		setarray .Items[0],7779,1; // Item Id, Item Amount
    		end;
    }
    

    Up
  8. //===== rAthena Script =======================================
    //= Monster Invasion
    //===== By ===================================================
    //= llchrisll
    //===== Version ==============================================
    //= 1.0 - Initial Release
    //===== Compatible With ======================================
    //= Every Athena SQL SVN 
    //===== Tested With ==========================================
    //= rAthena 17267 SQL Trunk 
    //===== Description ==========================================
    //= There are 2 Invasion Types:
    //  - Single
    //  - Multiply
    //= Each can be seperatly customized, but can not be switched via ingame.
    //= Changing settings means to restart/reload the server for them to become active
    //= Also there is an "Invasion Rewarder" available after the Invasion,
    //  which can be turned on or off
    //  To change the reward itself, scroll down to the bottom of the file
    //  where the NPC is located. There are extra settings.
    //= See "OnInit:" for the main settings
    //===== Comments =============================================
    //= None yet... 
    //===== ToDo List ============================================
    //= Adding an Custom Shop for the Invasion Points in the Invasion Rewarder
    //===========================================================
    -	script	MobInvaInit	-1,{
    function	DELAY;
    
    OnTimer1000: // Every Second
    stopnpctimer;
    set .s,.s + 1;
    if(.debug) 
    	// Showing Debug every minute only.
    	if(.s%60 == 0) debugmes .n$+": Delay Timer: "+.s+" seconds (Minutes: "+(.s/60)+"), Delay Function returns: "+DELAY(.delay_type,.delay_pos,1)+", Invasion Re-/Starts: "+.time[.delay_pos]+" (in seconds), Force End: "+.inva_fend+" (in seconds)";
    if(.delay == 1 && .s == DELAY(.delay_type,.delay_pos,1) ) 
    	donpcevent strnpcinfo(0)+"::OnInvaInit";
    else if( .s == .inva_fend && .inva_status) 
    	donpcevent strnpcinfo(0)+"::OnInvaForceEnd";
    initnpctimer;
    end;
    
    
    OnClock1300: // 1 p.m.
    if(.delay == 1) // Delay Usage active
    	end;
    	
    OnInvaInit:
    if(.inva_status) end;
    
    if(getvariableofnpc(.rew_type,"Invasion Rewarder") > 0) 
    	disablenpc "Invasion Rewarder";
    
    switch(.inva_type) {
    	
    	// Single Town Invasion
    	case 1:
    	if(!.s_inva_spec) { // No Map Specification > Random
    	
    		if(rand(1,10) <= 5) { // 50% chance to use either a big city or a small one
    			set .t,rand(getarraysize(.map_b$));
    			set .map_use,1; // Use big Maps
    		} else {
    			set .t,rand(getarraysize(.map_s$));
    			set .map_use,2; // Use small Maps
    		}
    	} else {
    		set .map_use,.s_inva_spec;
    		set .t,.s_inva_pos;
    	}
    	if(.map_use == 1) {
    		for ( set .@m,0; .@m < getarraysize(getd(".mob_"+.map_post_b$[.t])); set .@m,.@m + 1) {
    			monster .map_b$[.t],0,0,""+getmonsterinfo(getd(".mob_"+.map_post_b$[.t]+"["+.@m+"]"),0),getd(".mob_"+.map_post_b$[.t]+"["+.@m+"]"),getd(".mam_"+.map_post_b$),strnpcinfo(0)+"::OnMobSingleKilled";
    			set .MobSKilled,.MobSKilled + getd(".mam_"+.map_post_b$);
    		}
    		announce .n$+": The town "+.map_b$[.t]+" is being invaded by "+.MobSKilled+" monsters, please help use to defend it.",0;
    	
    	} else if(.map_use == 2) {
    		for ( set .@m,0; .@m < getarraysize(getd(".mob_"+.map_post_s$[.t])); set .@m,.@m + 1) {
    			monster .map_s$[.t],0,0,""+getmonsterinfo(getd(".mob_"+.map_post_s$[.t]+"["+.@m+"]"),0),getd(".mob_"+.map_post_s$[.t]+"["+.@m+"]"),getd(".mam_"+.map_post_s$),strnpcinfo(0)+"::OnMobSingleKilled";
    			set .MobSKilled,.MobSKilled + getd(".mam_"+.map_post_s$);
    		}
    		announce .n$+": The town "+.map_s$[.t]+" is being invaded by "+.MobSKilled+" monsters, please help use to defend it.",0;
    	}
    	break;
    	
    	// Multiply Town Invasion
    	case 2:
    	if( .inva_spawn == 1) {
    		for ( set .@t,0; .@t < getarraysize(.map_b$); set .@t,.@t + 1) {
    			for ( set .@m,0; .@m < getarraysize(getd(".mob_"+.map_post_b$[.@t])); set .@m,.@m + 1) {
    				monster .map_b$[.@t],0,0,""+getmonsterinfo(getd(".mob_"+.map_post_b$[.@t]+"["+.@m+"]"),0),getd(".mob_"+.map_post_b$[.@t]+"["+.@m+"]"),getd(".mam_"+.map_post_b$[.@t]),strnpcinfo(0)+"::OnMobMultiKilled";
    				setd(".Mob_"+.map_post_b$[.@t]+"_Killed"),getd(".Mob_"+.map_post_b$[.@t]+"_Killed") + getd(".mam_"+.map_post_b$[.@t]);
    			}
    			announce .n$+": The town "+.map_b$[.@t]+" is being invaded by "+getd(".Mob_"+.map_post_b$[.@t]+"_Killed")+" monsters, please help use to defend it.",0;
    		}
    		
    		sleep 500;
    		
    		for ( set .@t,0; .@t < getarraysize(.map_s$); set .@t,.@t + 1) {
    			for ( set .@m,0; .@m < getarraysize(getd(".mob_"+.map_post_s$[.@t])); set .@m,.@m + 1) {
    				monster .map_s$[.@t],0,0,""+getmonsterinfo(getd(".mob_"+.map_post_s$[.@t]+"["+.@m+"]"),0),getd(".mob_"+.map_post_s$[.@t]+"["+.@m+"]"),getd(".mam_"+.map_post_s$[.@t]),strnpcinfo(0)+"::OnMobMultiKilled";
    				setd(".Mob_"+.map_post_s$[.@t]+"_Killed"),getd(".Mob_"+.map_post_s$[.@t]+"_Killed") + getd(".mam_"+.map_post_s$[.@t]);
    			}
    			announce .n$+": The town "+.map_s$[.@t]+" is being invaded by "+getd(".Mob_"+.map_post_s$[.@t]+"_Killed")+" monsters, please help use to defend it.",0;
    		}
    	// * Spawn Option - Specific Maps
    	} else if( .inva_spawn == 2) {
    		
    		set .@map_am,.inva_maps; // Copying Map Quantity
    		
    		if(.debug)
    			debugmes .n$+": Map Quantity - .inva_maps: "+.inva_maps+" > .@map_am";
    		// * Map Size - Big Maps 
    		if( .inva_size == 1) {
    		
    			// - Checking if .map_am exceeds the size of the map array, or is 0
    			if( .@map_am > getarraysize(.map_b$) || .@map_am == 0)
    				set .@map_am,getarraysize(.map_b$);
    				
    			if(.debug) 
    				debugmes .n$+": Map Quantity - Check: .@map_am: "+.@map_am;
    				
    			// * Map Randomness - Yes
    			if( .inva_rand == 1) {
    			
    				if(.debug) 
    					debugmes .n$+": Map Randomness: Yes";
    					
    				while ( .@c < .@map_am ) {
    					if(.debug) 
    						debugmes .n$+": Big Maps - Counter: "+.@c+", Map Index: "+.@t;
    				
    					set .@t,rand(.@map_am);
    					set .@f,0;
    						
    					for ( set .@e,0; .@e < getarraysize(.@t_c); set .@e,.@e + 1) 
    						if((.@t+1) == .@t_c[.@e]) {
    							set .@f,1;
    							break;
    						}
    						
    					if(.@f == 1) continue;
    					
    					if(.debug) {
    						debugmes .n$+": Big Maps - Map Index: "+.@t+", Map Name: "+.map_b$[.@t];
    						debugmes .n$+": Big Maps - Mob Array Size: "+getarraysize(getd(".mob_"+.map_post_b$[.@t]));
    					}
    					
    					for ( set .@m,0; .@m < getarraysize(getd(".mob_"+.map_post_b$[.@t])); set .@m,.@m + 1) {
    						monster .map_b$[.@t],0,0,""+getmonsterinfo(getd(".mob_"+.map_post_b$[.@t]+"["+.@m+"]"),0),getd(".mob_"+.map_post_b$[.@t]+"["+.@m+"]"),getd(".mam_"+.map_post_b$[.@t]),strnpcinfo(0)+"::OnMobMultiKilled";
    						setd(".Mob_"+.map_post_b$[.@t]+"_Killed"),getd(".Mob_"+.map_post_b$[.@t]+"_Killed") + getd(".mam_"+.map_post_b$[.@t]);
    						if(.debug) {
    							debugmes .n$+": Big Maps - Map Index: "+.@t+", Mob Index: "+.@m+", Map Name: "+.map_b$[.@t]+", Mob ID + Name: "+getd(".mob_"+.map_post_b$[.@t]+"["+.@m+"]")+"; "+getmonsterinfo(getd(".mob_"+.map_post_b$[.@t]+"["+.@m+"]"),0);
    							debugmes .n$+": Total Mob Amount - Map Index: "+.@t+": "+getd(".Mob_"+.map_post_b$[.@t]+"_Killed")+", Spawn Amount per Mob: "+getd(".mam_"+.map_post_b$[.@t]);
    						}
    					}
    					announce .n$+": The town "+.map_b$[.@t]+" is being invaded by "+getd(".Mob_"+.map_post_b$[.@t]+"_Killed")+" monsters, please help use to defend it.",0;
    					setarray .@t_c[getarraysize(.@t_c)],(.@t+1); // Copying already use maps.
    					set .@c,.@c + 1;
    				}
    					
    			// * Map Randomness - No
    			} else if( .inva_rand == 0) {
    			
    				if(.debug) 
    					debugmes .n$+": Map Randomness: No";
    				
    				for ( set .@t,0; .@t < .@map_am; set .@t,.@t + 1) {
    					if(.debug) {
    						debugmes .n$+": Big Maps - Map Index: "+.@t+", Map Name: "+.map_b$[.@t];
    						debugmes .n$+": Big Maps - Mob Array Size: "+getarraysize(getd(".mob_"+.map_post_b$[.@t]));
    					}
    					for ( set .@m,0; .@m < getarraysize(getd(".mob_"+.map_post_b$[.@t])); set .@m,.@m + 1) {
    						monster .map_b$[.@t],0,0,""+getmonsterinfo(getd(".mob_"+.map_post_b$[.@t]+"["+.@m+"]"),0),getd(".mob_"+.map_post_b$[.@t]+"["+.@m+"]"),getd(".mam_"+.map_post_b$[.@t]),strnpcinfo(0)+"::OnMobMultiKilled";
    						setd(".Mob_"+.map_post_b$[.@t]+"_Killed"),getd(".Mob_"+.map_post_b$[.@t]+"_Killed") + getd(".mam_"+.map_post_b$[.@t]);
    						if(.debug) {
    							debugmes .n$+": Big Maps - Map Index: "+.@t+", Mob Index: "+.@m+", Map Name: "+.map_b$[.@t]+", Mob ID + Name: "+getd(".mob_"+.map_post_b$[.@t]+"["+.@m+"]")+"; "+getmonsterinfo(getd(".mob_"+.map_post_b$[.@t]+"["+.@m+"]"),0);
    							debugmes .n$+": Total Mob Amount - Map Index: "+.@t+": "+getd(".Mob_"+.map_post_b$[.@t]+"_Killed")+", Spawn Amount per Mob: "+getd(".mam_"+.map_post_b$[.@t]);
    						}
    					}
    					announce .n$+": The town "+.map_b$[.@t]+" is being invaded by "+getd(".Mob_"+.map_post_b$[.@t]+"_Killed")+" monsters, please help use to defend it.",0;
    				}
    			}
    			
    		// * Map Size - Small Maps 
    		} else if( .inva_size == 2) {
    		
    			// - Checking if .map_am exceeds the size of the map array, or is 0
    			if( .@map_am > getarraysize(.map_s$) || .@map_am == 0)
    				set .@map_am,getarraysize(.map_s$);
    			
    			if(.debug) 
    				debugmes .n$+": Map Quantity - Check: .@map_am: "+.@map_am;
    			
    			// * Map Randomness - Yes
    			if( .inva_rand == 1) {
    				while ( .@c < .@map_am ) {
    					
    					set .@t,rand(.@map_am);
    					set .@f,0;
    						
    					for ( set .@e,0; .@e < getarraysize(.@t_c); set .@e,.@e + 1) 
    						if(.@t == .@t_c[.@e]) {
    							set .@f,1;
    							break;
    						}
    						
    					if(.@f == 1) continue;
    					
    					if(.debug) {
    						debugmes .n$+": Small Maps - Map Index: "+.@t+", Map Name: "+.map_s$[.@t];
    						debugmes .n$+": Small Maps - Mob Array Size: "+getarraysize(getd(".mob_"+.map_post_s$[.@t]));
    					}
    					
    					for ( set .@m,0; .@m < getarraysize(getd(".mob_"+.map_post_s$[.@t])); set .@m,.@m + 1) {
    						monster .map_s$[.@t],0,0,""+getmonsterinfo(getd(".mob_"+.map_post_s$[.@t]+"["+.@m+"]"),0),getd(".mob_"+.map_post_s$[.@t]+"["+.@m+"]"),getd(".mam_"+.map_post_s$),strnpcinfo(0)+"::OnMobMultiKilled";
    						setd(".Mob_"+.map_post_s$[.@t]+"_Killed"),getd(".Mob_"+.map_post_s$[.@t]+"_Killed") + getd(".mam_"+.map_post_s$[.@t]);
    						if(.debug) {
    							debugmes .n$+": Small Maps - Map Index: "+.@t+", Mob Index: "+.@m+", Map Name: "+.map_s$[.@t]+", Mob ID + Name: "+getd(".mob_"+.map_post_s$[.@t]+"["+.@m+"]")+"; "+getmonsterinfo(getd(".mob_"+.map_post_s$[.@t]+"["+.@m+"]"),0);
    							debugmes .n$+": Total Mob Amount - Map Index: "+.@t+": "+getd(".Mob_"+.map_post_s$[.@t]+"_Killed")+", Spawn Amount per Mob: "+getd(".mam_"+.map_post_s$[.@t]);
    						}
    					}
    					announce .n$+": The town "+.map_s$[.@t]+" is being invaded by "+getd(".Mob_"+.map_post_s$[.@t]+"_Killed")+" monsters, please help use to defend it.",0;
    					setarray .@t_c[getarraysize(.@t_c)],.@t; // Copying already use maps.
    				}
    					
    			// * Map Randomness - No
    			} else if( .inva_rand == 0) {
    				
    				if(.debug) 
    					debugmes .n$+": Map Randomness: No";
    				
    				for ( set .@t,0; .@t < .map_am; set .@t,.@t + 1) {
    					if(.debug) {
    						debugmes .n$+": Small Maps - Map Index: "+.@t+", Map Name: "+.map_s$[.@t];
    						debugmes .n$+": Small Maps - Mob Array Size: "+getarraysize(getd(".mob_"+.map_post_s$[.@t]));
    					}
    					for ( set .@m,0; .@m < getarraysize(getd(".mob_"+.map_post_s$[.@t])); set .@m,.@m + 1) {
    						monster .map_s$[.@t],0,0,""+getmonsterinfo(getd(".mob_"+.map_post_s$[.@t]+"["+.@m+"]"),0),getd(".mob_"+.map_post_s$[.@t]+"["+.@m+"]"),getd(".mam_"+.map_post_s$[.@t]),strnpcinfo(0)+"::OnMobMultiKilled";
    						setd(".Mob_"+.map_post_s$[.@t]+"_Killed"),getd(".Mob_"+.map_post_s$[.@t]+"_Killed") + getd(".mam_"+.map_post_s$[.@t]);
    						if(.debug) {
    							debugmes .n$+": Small Maps - Map Index: "+.@t+", Mob Index: "+.@m+", Map Name: "+.map_s$[.@t]+", Mob ID + Name: "+getd(".mob_"+.map_post_s$[.@t]+"["+.@m+"]")+"; "+getmonsterinfo(getd(".mob_"+.map_post_s$[.@t]+"["+.@m+"]"),0);
    							debugmes .n$+": Total Mob Amount - Map Index: "+.@t+": "+getd(".Mob_"+.map_post_s$[.@t]+"_Killed")+", Spawn Amount per Mob: "+getd(".mam_"+.map_post_s$[.@t]);
    						}
    					}
    					announce .n$+": The town "+.map_s$[.@t]+" is being invaded by "+getd(".Mob_"+.map_post_s$[.@t]+"_Killed")+" monsters, please help use to defend it.",0;
    				}
    			}
    		}
    	}
    	break;
    	
    }
    set .inva_status,1;
    end;
    
    
    OnMobSingleKilled:
    if(!.inva_status) end; // Shouldn't be possible
    if(getvariableofnpc(.rew_type,"Invasion Rewarder") > 0) 
    	set InvaKill,InvaKill + 1; // Kill Counter for Reward
    set .MobSKilled,.MobSKilled - 1;
    switch(.MobSKilled) {
    	case 0:
    	announce .n$+": Congratulation to ["+strcharinfo(0)+"] who delivered the final blow!!! Nicely Done!!!",0;
    	if(.inva_final) {
    		announce .n$+": You also get an \"Final Kill Reward\", just take a look in the Chat Box. See ya next time *g*",bc_self;
    		dispbottom .n$+": You have been rewarded with:";
    		if(.inva_f_id == 1) {
    			set Zeny,Zeny + .inva_f_am;
    			dispbottom .n$+": "+.inva_f_am+" Zeny.";
    		} else if(.inva_f_id == 2) {
    			set #CASHPOINTS,#CASHPOINTS + .inva_f_am;
    			dispbottom .n$+": "+.inva_f_am+" Cash Points. New Balance is "+#CASHPOINTS+".";
    		} else if(.inva_f_id >= 512) {
    			getitem .inva_f_id,.inva_f_am;
    			dispbottom .n$+": "+.inva_f_am+"x "+getitemname(.inva_f_id)+".";
    		}
    	}
    	sleep 10000;
    	donpcevent strnpcinfo(0)+"::OnInvaEnd";
    	break;
    	
    	case 1:
    	mapannounce strcharinfo(3),.n$+": JUST "+.MobSKilled+" MONSTER is left!!!! FINAL BLOW, GO GO!!!",bc_yellow;
    	break;
    	
    	case 2:
    	case 3:
    	case 4:
    	mapannounce strcharinfo(3),.n$+": Only "+.MobSKilled+" monsters are left!!!! We can do it!!!",bc_yellow;
    	break;
    
    	case 5:
    	mapannounce strcharinfo(3),.n$+": LAST "+.MobSKilled+"!!!! We can do it!!!",bc_yellow;
    	break;
    	
    	default:
    	mapannounce strcharinfo(3),.n$+": "+.MobSKilled+" monsters are left!!!! Good work !!!",bc_yellow;
    	break;
    }
    end;
    
    OnMobMultiKilled:
    if(!.inva_status) end; // Shouldn't be possible
    if(getvariableofnpc(.rew_type,"Invasion Rewarder") > 0)
    	set InvaKill,InvaKill + 1; // Kill Counter for Reward
    set @loc,0;
    for ( set .@l,0; .@l < getarraysize(.map_b$); set .@l,.@l + 1) 
    	if(strcharinfo(3) == .map_b$[.@l]) {
    		set @loc,1;
    		set @map,.@l;
    		break;
    	}
    	
    for ( set .@l,0; .@l < getarraysize(.map_s$); set .@l,.@l + 1) 
    	if(strcharinfo(3) == .map_s$[.@l]) {
    		set @loc,2;
    		set @map,.@l;
    		break;
    	}
    
    OnMMobKilled:
    if(.debug) 
    	debugmes .n$+": 2nd Loc Check: @Loc; "+@loc+", @map: "+@map;
    switch( @loc ) {
    	
    	case 1: 
    	setd(".Mob_"+.map_post_b$[@map]+"_Killed"),getd(".Mob_"+.map_post_b$[@map]+"_Killed") - 1; 
    	debugmes .n$+": Mobs: "+mobcount(.map_b$[@map],strnpcinfo(0)+"::OnMobMultiKilled")+", Variable: "+getd(".Mob_"+.map_post_b$[@map]+"_Killed");
    	if(getd(".Mob_"+.map_post_b$[@map]+"_Killed") > 0) 
    		mapannounce strcharinfo(3),.n$+": The player ["+strcharinfo(0)+"] has killed another monster, "+getd(".Mob_"+.map_post_b$[@map]+"_Killed")+" monsters are left!!!! Good work !!!",0;
    	else {
    		announce .n$+": Every Monster in "+.map_s$[@map]+" has been defeated, thank you guys!!!",0;
    		donpcevent strnpcinfo(0)+"::OnOtherTown";
    	}
    	break;
    	
    	case 2: 
    	setd(".Mob_"+.map_post_s$[@map]+"_Killed"),getd(".Mob_"+.map_post_s$[@map]+"_Killed") - 1; 
    	debugmes .n$+": Mobs: "+mobcount(.map_s$[@map],strnpcinfo(0)+"::OnMobMultiKilled")+", Variable: "+getd(".Mob_"+.map_post_s$[@map]+"_Killed");
    	if(getd(".Mob_"+.map_post_s$[@map]+"_Killed") > 0) 
    		mapannounce strcharinfo(3),.n$+": The player ["+strcharinfo(0)+"] has killed another monster, "+getd(".Mob_"+.map_post_s$[@map]+"_Killed")+" monsters are left!!!! Good work !!!",0;
    	else {
    		announce .n$+": Every Monster in "+.map_s$[@map]+" has been defeated, thank you guys!!!",0;
    		donpcevent strnpcinfo(0)+"::OnOtherTown";
    	}
    	break;
    }
    end;
    
    OnOtherTown:
    for ( set .@t,0; .@t < getarraysize(.map_b$); set .@t,.@t + 1) 
    	if(getd(".Mob_"+.map_post_b$[.@m]+"_Killed") > 0) 
    		set .@mapb_left$,.@mapb_left$ + .map_b$[.@m]+ ( (.map_b$[.@m+1] != "")?", ":"");
    
    for ( set .@t,0; .@t < getarraysize(.map_s$); set .@t,.@t + 1) 
    	if(getd(".Mob_"+.map_post_s$[.@m]+"_Killed") > 0) 
    		set .@maps_left$,.@maps_left$ + .map_s$[.@m]+ ( (.map_s$[.@m+1] != "")?", ":"");
    
    if(.@maps_left$ == "" && .@mapb_left$ == "")
    	donpcevent strnpcinfo(0)+"::OnInvaEnd";
    
    announce .n$+": In the "+ ( (.@mapb_left$ != "")?"big towns "+.@mapb_left$+ ( (.@maps_left$ != "")?" and small towns "+.@maps_left$:""):"small towns "+.@maps_left$)+" are still Monsters, please help use to defeat them!!!",0;
    end;
    
    OnInvaEnd:
    announce .n$+": Thank you guys for your help in defeating the invaders, we will counting on you for the next time as well.",0;
    donpcevent strnpcinfo(0)+"::OnInvaRestart";
    end;
    
    OnInvaForceEnd:
    announce .n$+": NOOOOO!!! The monsters successfully invaded the towns, RETREAT GUARDS!!!",0;
    sleep 10000;
    announce .n$+": Brave Fighters, I thank you for your support, but we failed!!",0;
    sleep 10000;
    announce .n$+": Let's regroup and let's try again, I will inform you when we are ready!!",0;
    
    OnInvaRestart:
    DELAY(.delay_type,.delay_pos,2);
    // Removing Mobs which kinda survived
    if(.inva_type == 1) // Single Town
    	if(.map_use == 1) killmonster .map_b$[.t],strnpcinfo(0)+"::OnMobSingleKilled";
    	else killmonster .map_s$[.t],strnpcinfo(0)+"::OnMobSingleKilled";
    	
    else if(.inva_type == 2) { // Multi Town
    	for ( set .@t,0; .@t < getarraysize(.map_b$); set .@t,.@t + 1) 
    		killmonster .map_b$[.@t],strnpcinfo(0)+"::OnMobMultiKilled";
    		
    	for ( set .@t,0; .@t < getarraysize(.map_s$); set .@t,.@t + 1)
    		killmonster .map_s$[.@t],strnpcinfo(0)+"::OnMobMultiKilled";
    	}
    set .inva_status,0;
    if(.delay == 1) set .s,0; // Reseting Delay Counter
    if(getvariableofnpc(.rew_type,"Invasion Rewarder") > 0) {
    	enablenpc "Invasion Rewarder";
    	announce .n$+": Visit the \"Invasion Rewarder\" to recieve rewards for your kills. But hurry, he will disappear in "+getvariableofnpc(.rew_dis,"Invasion Rewarder")+" minutes.",0;
    	donpcevent strnpcinfo(0)+"::OnRewardDisable";
    }
    end;
    
    // Auto Disable Reward NPC
    OnRewardDisable:
    while( .m < getvariableofnpc(.rew_dis,"Invasion Rewarder") ) {
    	switch(.m) {
    		case 1: announce .n$+": The \"Invasion Rewarder\" will disappear in 4 minutes.",0; break;
    		case 2: announce .n$+": The \"Invasion Rewarder\" will disappear in 3 minutes.",0; break;
    		case 3: announce .n$+": The \"Invasion Rewarder\" will disappear in 2 minutes.",0; break;
    		case 4: announce .n$+": HURRY, the \"Invasion Rewarder\" will disappear in 1 minute.",0; break;
    	}
    	set .m,.m + 1;
    	sleep 60000;
    }	
    announce "Invasion Rewarder: Okay, I'm done here. See ya next time!!!",0;
    set .m,0;
    disablenpc "Invasion Rewarder";
    end;
    
    OnPCLoginEvent:
    if(.inva_status == 0) end;
    announce .n$+": The Monster Invasion Event is currently running, please hurry and help us!!",bc_self;
    sleep2 2000;
    if(.inva_type == 1) 
    	set .@map_left$,( (.map_use == 1) ? .map_b$[.t]:.map_s$[.t]);
    else if(.inva_type == 2) {
    	for ( set .@m,0; .@m < getarraysize(.map_b$); set .@m,.@m + 1) 
    		if(getd(".Mob_"+.map_post_b$[.@m]+"_Killed") > 0) 
    			set .@map_left$,.@map_left$ + .map_b$[.@m]+ ( (.map_b$[.@m+1] != "")?", ":"");
    			
    	for ( set .@m,0; .@m < getarraysize(.map_s$); set .@m,.@m + 1) 
    		if(getd(".Mob_"+.map_post_s$[.@m]+"_Killed") > 0) 
    			set .@map_left$,.@map_left$ +" and "+ .map_s$[.@m]+ ( (.map_s$[.@m+1] != "")?", ":"");
    }
    announce .n$+": We are defending at "+ .@map_left$+"!!!",bc_self;
    end;
    
    OnInit:
    set .n$,"[Ragnarok Guard]";
    // Debug Mode - See Map Server Console for Debug messages
    set .debug,0;
    // ======= Invasion Type =======
    // - 1: Single
    // - 2: Multiply
    set .inva_type,1;
    // ====== Single Invasion Settings =========
    if(.inva_type == 1) {
    	// * Specific Map Usage
    	// - 0 = Random
    	// - 1 = Big Maps
    	// - 2 = Small Maps
    	set .s_inva_spec,1;
    
    	if(.s_inva_spec > 0) {
    		// * Map Index
    		// X = Array Index of the Map Array
    		set .s_inva_pos,0;
    	}
    // ======= Multiply Invasion Settings ========
    } else if(.inva_type == 2) {
    	// * Spawn Option
    	// - 1: All Maps
    	// - 2: Specific Maps
    	set .inva_spawn,2;
    
    	if(.inva_spawn == 2) {
    		// * Map Usage:
    		// - 1: Big Maps
    		// - 2: Small Maps
    		set .inva_size,1;
    		
    		// * Map Amount:
    		// - 0: All Maps from .inva_size above
    		// - 1+: ...
    		// Note: If this value exceeds the size of the map array, 
    		// then it will use all maps of .inva_size.
    		set .inva_maps,0;
     
    		if(.inva_maps > 0 && .inva_maps < ( (.inva_size == 1)?getarraysize(.map_b$):getarraysize(.map_s$) ) ) 
    		// * Map Randoming:
    		// - 0: No
    		// - 1: Yes
    		// Note: Map Randoming is only possible when not all maps are wanted
    		// It would be ineffective to make map randoming when there are all maps active :I
    		set .inva_rand,1;
    	}
    }
    // * Invasion on Server Start
    // - 0: No
    // - 1: Yes
    set .inva_statusinit,1;
    // * Invasion Force End
    // - 0: Not used
    // - 1+: ...
    // Note: The Event will automatically end after this value has passed (in seconds)
    set .inva_fend,3600; // 1 Hour
    // =======*======= DELAY SETTINGS =======*=======
    // * Delay Usage
    // - 0: Off - OnClockXXXX will be used
    // - 1: On
    set .delay,1;
    // * Delay Type
    // - 1: Random (Default)
    // - 2: Fixed Delay
    // - 3: Ranged Delay
    set .delay_type,1;
    
    // ---- Fixed Delay ----
    // Array Position in ".time"
    if(.delay_type == 2) 
    	set .delay_pos,0;
    // ---- Ranged Delay ----
    // Array Position for start index
    if(.delay_type == 3) 
    	set .delay_pos,3;
    
    // * Delay Times
    setarray .time[0],
    // In Seconds  -  is equal to  -  Array Position
    		10800, // 3 Hours      -  0
    		14400, // 4 Hours      -  1
    		21600, // 6 Hours      -  2
    		86400, // 1 Day        -  3
    		172800, // 2 Days      -  4	
    		259200; // 3 Days      -  5
    
    // =======*======= MONSTER SETTINGS =======*=======
    // * Mob Quantity Limit depending on the map size
    // - Big Maps
    set .m_limit_b,100;
    // - Small Maps
    set .m_limit_s,30;
    
    // * Maps List
    // - Big Maps 
    setarray .map_b$[0],"prontera","geffen","payon","morocc","aldebaran","alberta";
    // For every map you have to add an postfix in the same order,
    // which has been put in the array for the Maps
    // After this, just set an array with the Mob IDs where the
    // array name contains the postfix you set-up, see the examples
    setarray .map_post_b$[0],"pron","gef","pay","mor","alde","alb";
    // - Small Maps
    setarray .map_s$[0],"izlude";
    setarray .map_post_s$[0],"izl";
    // ======= Monster ID's =======
    // ------ Big Maps ------
    // * Prontera - Mantis, Thief Bug Male, Argos, Side Winder
    setarray .mob_pron[0],1139,1054,1100,1037;
    // * Geffen - Poison Spore, Ghoul, Jakk, High Orc
    setarray .mob_gef[0],1855,1036,1130,1213;
    // * Payon - Zombie, Elder Willow, Munak, Nine Tail, Drainliar
    setarray .mob_pay[0],1015,1033,1026,1180,1111;
    // * Morocc - Requiem, Isis, Mummy, Minorous
    setarray .mob_mor[0],1164,1029,1041,1149;
    // * Aldebaran - Cramp, Penomena, Punk, Orc Archer, Bathory
    setarray .mob_alde[0],1209,1029,1199,1189,1102;
    // * Alberta - Pirate Skeleton, Penomena, Poison Spore, Whisper, Mimic
    setarray .mob_alb[0],1071,1029,1077,1179,1191;
    // ------ Small Maps ------
    // * Izlude - Obeaune, Merman, Swordfish, Strouf
    setarray .mob_izl[0],1044,1264,1069,1065;
    
    // ------ Mob Amount Calculation for Big Maps ------
    for ( set .@c,0; .@c < getarraysize(.map_post_b$); set .@c,.@c + 1) 
    	setd(".mam_"+.map_post_b$[.@c]),( .m_limit_b/getarraysize(getd(".mob_"+.map_post_b$)) );
    	
    // ------ Mob Amount Calculation for Small Maps ------
    for ( set .@c,0; .@c < getarraysize(.map_post_s$); set .@c,.@c + 1)
    	setd(".mam_"+.map_post_s$[.@c]),( .m_limit_s/getarraysize(getd(".mob_"+.map_post_s$)) );
    
    // ======= Final Kill Settings =======
    // * Will the player who gets the final kill be rewarded?
    // Only working during a Single Invasion
    // - 1: Yes
    // - 0: No
    set .inva_final,1;
    
    if(.inva_final == 1) {
    	// * Reward Type:
    	// - 1: Zeny
    	// - 2: Cash Points
    	// - 512+: Item ID (the Value is already the Item ID)
    	set .inva_f_id,1;
    	// * Reward Amount:
    	set .inva_f_am,10000;
    }
    // =======*======= END of SETTINGS =======*=======
    // Even if .delay is 0, its required to start the timer for force ending the event :I
    initnpctimer;
    if(.debug) {
    	debugmes .n$+": .inva_delay: "+.inva_delay;
    	debugmes .n$+": gettimetick(2): "+gettimetick(2);
    }
    if(.delay == 1 && DELAY(.delay_type,.delay_pos,1) < 1) // If the delay value is empty, set it!!
    	DELAY(.delay_type,.delay_pos,2);
    	
    if(.debug) 
    	debugmes .n$+": .inva_delay: "+.inva_delay;
    
    if(.inva_statusinit == 1) // Starting Invasion on Server Start
    	donpcevent strnpcinfo(0)+"::OnInvaInit";
    end;
    
    function	DELAY	{
    // Format: DELAY(.delay_type,.delay_pos,1/2);
    // getarg(0) = Delay Type
    // * 1: Random
    // * 2: Fixed Delay
    // * 3: Ranged Delay
    // getarg(1) = Array Position if getarg(0) == 2 || 3
    // getarg(2): Read/Write
    // * 1: Read
    // * 2: Write
    if(getarg(2) == 1) 
    	return (.inva_delay - gettimetick(2));
    	
    switch(getarg(0)) {
    	case 1:	set .@new_inva,.time[rand(getarraysize(.time))]; break;
    	case 2: set .@new_inva,.time[getarg(1)]; break; 
    	case 3: set .@new_inva,.time[rand(getarg(1),getarraysize(.time) - 1)]; break;
    }
    set .inva_delay,gettimetick(2) + .@new_inva;
    return .@new_inva;	
    }
    
    }
    invek,107,202,4	script	Invasion Rewarder	110,{
    
    mes .n$;
    mes "Hello, "+strcharinfo(0)+"!";
    mes "So you want to be rewarded from the Mob Invasion Event, huh?";
    mes "Let me take a look at your battle record.";
    next;
    mes .n$;
    if(!InvaKill) {
    	mes "It seems like you didn't participated at all or you got your reward already.";
    	mes "So I can't give you any kind of reward.";
    	mes "Try your best next time.";
    	close;
    }
    mes "You haved killed "+InvaKill+" monsters, good job there.";
    next;
    mes .n$;
    set .@rew_am,InvaKill*.rew_am;
    set .@rew_bonus, ( (.rew_bonus > 0)?(InvaKill*.rew_bonus):.rew_bonus);
    set .@total,.@rew_am + .@rew_bonus;
    
    if(.rew_type == 1) {
    	mes "You have recieved "+.@total+"x "+( (.rew_bonus == 1)?"(Bonus: +"+.@rew_bonus+") ":"") + getitemname(.rew_id)+".";
    	getitem .rew_id,.@total;
    } else if(.rew_type == 2) {
    	mes "You have recieved "+.@total+"x "+( (.rew_bonus == 1)?"(Bonus: +"+.@rew_bonus+") ":"") + .rew_vname$+".";
    	if(.rew_bound == 0) // Character Based
    		setd(""+.rew_var$),getd(""+.rew_var$) + (.rew_am+.rew_bonus);
    	else if(.rew_bound == 1) // Account Based
    		setd("#"+.rew_var$),getd("#"+.rew_var$) + (.rew_am+.rew_bonus);
    }
    set InvaKill,0;
    close;
    
    OnInit:
    set .n$,"["+strnpcinfo(0)+"]";
    // =======*======= REWARD SETTINGS =======*=======
    // * Reward Type:
    // - 0: None
    // - 1: Item
    // - 2: Variable
    // - 3: Cash Points
    set .rew_type,1;
    
    // * Reward Bonus
    // - 0: Off
    // - 1 and higher: On
    // = This bonus will be given to the kill additionally.
    set .rew_bonus,0;
    // ----- Item -----
    if(.rew_type == 1) 
    	set .rew_id,512; // Item ID
    // ----- Variable Name -----
    else if(.rew_type == 2) {
    	set .rew_var$,"InvaPoints";
    	set .rew_vname$,"Invasion Points";
    
    	// Variable Type:
    	// 0: Character Based
    	// 1: Account Based
    	set .rew_bound,0;
    }	
    // ----- Reward Quantity -----
    set .rew_am,10; // Amount per Kill
    // ----- NPC Auto Disable -----
    // After how many minutes will the NPC be disabled again:
    set .rew_dis,5;
    disablenpc strnpcinfo(0);
    end;
    }
    

    i need to change each 10 mob kill will get 1 7227 item.

    how to do that?

  9. teach me how to use code to put inside sql?

    //SQL Table for Ghost's PvP System
    CREATE TABLE IF NOT EXISTS `pvp_rank` (
     `char_id` int(11) NOT NULL,
     `account_id` int(11) NOT NULL,
     `char` varchar(30) NOT NULL,
     `kill` int(11) NOT NULL,
     `death` int(11) NOT NULL,
     `kdr` varchar(30) NOT NULL,
     `killingstreak` int(11) NOT NULL,
     `multikill` int(11) NOT NULL,
     `killingspree` int(11) NOT NULL,
     `dominating` int(11) NOT NULL,
     `megakill` int(11) NOT NULL,
     `unstoppable` int(11) NOT NULL,
     `wickedsick` int(11) NOT NULL,
     `monsterkill` int(11) NOT NULL,
     `godlike` int(11) NOT NULL,
     `beyondgodlike` int(11) NOT NULL,
     `doublekill` int(11) NOT NULL,
     `triplekill` int(11) NOT NULL,
     `ultrakill` int(11) NOT NULL,
     `rampage` int(11) NOT NULL,
     `ownage` int(11) NOT NULL,
     `nemesiskill` int(11) NOT NULL,
     `feedcount` int(11) NOT NULL,
     PRIMARY KEY (`char_id`)
    ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
    
  10.  

    if your posting in the request section i suggest you put in more details

     

    as for what you asked

    if(#questvar == .@var){
    	switch(select("50 Zeny:Red Potion")){
    		case 1:	set Zeny,Zeny + 50;	break;
    		case 2: getitem,501,1;	break;
    	}
    set #questvar,#questvar + 1;
    }
    

    ops.. sorry.. i need script like this.. player will farm quest item that i list. after done collect all item.. they can choose any reward in npc reward. same like 1 quest can choose any reward.

  11.  

     

    unless you able to break the encryption did by the SecureGRF or else...just forget it...you are no longer able to get it back =P

     

    this hosting like hell not helping.. 1 month without reply our pm. we send pm in whatsapp double blue tick got he read the msg no reply.. stupid hoster... if i can tell the name of this shit, some of people on this forum maybe know him.

     

    You may write a review about that hosting in the paid services forum if they have a topic there.

     

    Sharing information at the Off-Topic section would be fine as long as forum rules is followed.

     

    oh. i see.. i can do that.. thank you.

  12. unless you able to break the encryption did by the SecureGRF or else...just forget it...you are no longer able to get it back =P

     

    this hosting like hell not helping.. 1 month without reply our pm. we send pm in whatsapp double blue tick got he read the msg no reply.. stupid hoster... if i can tell the name of this shit, some of people on this forum maybe know him.

  13. -	script	killboss	-1,{
    
    	OnInit:
    		// Desired maps to clear
    		setarray .map$[0],	"abbey02",	// Fallen Bishop Hibram
    							"abbey03",	// Beelzebub
    							"abyss_03",	// Detale
    							"ama_dun03",	// Samurai Specter
    							"anthell02",	// Maya
    							"ayo_dun02",	// Lady Tanee
    							"beach_dun",	// Tao Gunka
    							"ein_dun02",	// RSX-0806
    							"gef_dun01",	// Dracula
    							"gef_dun02",	// Doppelganger
    							"gef_fild02",	// Orc Hero
    							"gef_fild10",	// Orc Lord
    							"gef_fild14",	// Orc Hero
    							"gl_chyard",	// Dark Lord
    							"gld_dun01",	// Eddga
    							"gld_dun02",	// Doppelganger
    							"gld_dun03",	// Maya
    							"gld_dun04",	// Dark Lord
    							"gon_dun03",	// Evil Snake Lord
    							// "ice_dun03",	// Ktullanux
    							"in_sphinx5",	// Pharaoh
    							"jupe_core",	// Vesper
    							"kh_dun02",	// Kiel D-01
    							"lhz_dun02",	// Egnigem Cenia
    							// "lhz_dun03",	// Assassin Cross Eremes, High Priest Margaretha, High Wizard Kathryne, Lord Knight Seyren, Sniper Cecil, Whitesmith Howard
    							"lou_dun03",	// White Lady
    							"mjolnir_04",	// Mistress
    							"moc_fild17",	// Phreeoni
    							"moc_pryd04",	// Osiris
    							"moc_pryd06",	// Amon Ra
    							"mosk_dun03",	// Zmey Gorynych
    							// "niflheim",	// Lord of Death
    							"odin_tem03",	// Valkyrie Randgris
    							"pay_dun04",	// Moonlight Flower
    							"pay_fild11",	// Eddga
    							"prt_maze03",	// Baphomet
    							"prt_sewb4",	// Golden Thief Bug
    							"ra_fild02",	// Atroce
    							"ra_fild03",	// Atroce
    							"ra_fild04",	// Atroce
    							"ra_san05",	// Gloom Under Night
    							"thor_v03",	// Ifrit
    							"treasure02",	// Drake
    							"tur_dun04",	// Turtle General
    							"ve_fild01",	// Atroce
    							"ve_fild02",	// Atroce
    							"xmas_dun02",	// Stormy Knight
    							"xmas_fild01";	// Garm
    							
    		// Execution offset (in ms) to reduce server load
    		.delay = 50;
    		
    		// Create atcommand @killboss
    		bindatcmd "killboss", strnpcinfo(3) +"::OnKillBoss", 99, 99;
    		end;
    
    	OnKillBoss:
    		// Loop through all maps
    		for (.@i = 0; .@i < getarraysize(.map$); .@i++) {
    			// Kill all monsters on current map
    			killmonsterall .map$[.@i];
    			
    			// Slow down script execution (reduces load)
    			sleep2 .delay;
    		}
    		
    		message strcharinfo(0), "at last"+.@i +" boss maps have been cleared.";
    		end;
    	
    }
    

    how can u work? i test cant work. error same and cant @killboss..

  14. what if you put comma after "kh_dun02"

     

    i think you should use the first script you already had, but look at this line

    bindatcmd "killboss", strnpcinfo(3) +"::OnKillBoss", 99, 99;
    

    Look at rathena wiki syntax

        bindatcmd "command","<NPC object name>::<event label>"{,<atcommand level>,<charcommand level>}; 
    

    at the end of the line 99,99 means that this command will be lv99 atcommand and it's authorized for character or gm grouplv99,

    So from what i saw in the script, you just need to change only atcommand level and charcommand level then it'll be fine.

    the 1st code error is nothing happen.. cant use @killboss command.

     

    put comma after "kh_dun02" and on this line

    sleep .delay;
    
    //change it to
    
    sleep2 .delay;
    

    it works for me

    can u gv me full code.. i try it but noting happen.

    
    -	script	killboss	-1,{
    
    	OnInit:
    		// Desired maps to clear
    		setarray .map$[0],	"abbey02",	// Fallen Bishop Hibram
    							"abbey03",	// Beelzebub
    							"abyss_03",	// Detale
    							"ama_dun03",	// Samurai Specter
    							"anthell02",	// Maya
    							"ayo_dun02",	// Lady Tanee
    							"beach_dun",	// Tao Gunka
    							"ein_dun02",	// RSX-0806
    							"gef_dun01",	// Dracula
    							"gef_dun02",	// Doppelganger
    							"gef_fild02",	// Orc Hero
    							"gef_fild10",	// Orc Lord
    							"gef_fild14",	// Orc Hero
    							"gl_chyard",	// Dark Lord
    							"gld_dun01",	// Eddga
    							"gld_dun02",	// Doppelganger
    							"gld_dun03",	// Maya
    							"gld_dun04",	// Dark Lord
    							"gon_dun03",	// Evil Snake Lord
    							// "ice_dun03",	// Ktullanux
    							"in_sphinx5",	// Pharaoh
    							"jupe_core",	// Vesper
    							"kh_dun02",	// Kiel D-01
    							"lhz_dun02",	// Egnigem Cenia
    							// "lhz_dun03",	// Assassin Cross Eremes, High Priest Margaretha, High Wizard Kathryne, Lord Knight Seyren, Sniper Cecil, Whitesmith Howard
    							"lou_dun03",	// White Lady
    							"mjolnir_04",	// Mistress
    							"moc_fild17",	// Phreeoni
    							"moc_pryd04",	// Osiris
    							"moc_pryd06",	// Amon Ra
    							"mosk_dun03",	// Zmey Gorynych
    							// "niflheim",	// Lord of Death
    							"odin_tem03",	// Valkyrie Randgris
    							"pay_dun04",	// Moonlight Flower
    							"pay_fild11",	// Eddga
    							"prt_maze03",	// Baphomet
    							"prt_sewb4",	// Golden Thief Bug
    							"ra_fild02",	// Atroce
    							"ra_fild03",	// Atroce
    							"ra_fild04",	// Atroce
    							"ra_san05",	// Gloom Under Night
    							"thor_v03",	// Ifrit
    							"treasure02",	// Drake
    							"tur_dun04",	// Turtle General
    							"ve_fild01",	// Atroce
    							"ve_fild02",	// Atroce
    							"xmas_dun02",	// Stormy Knight
    							"xmas_fild01";	// Garm
    							
    		// Execution offset (in ms) to reduce server load
    		.delay = 50;
    		
    		// Create atcommand @killboss
    		bindatcmd "killboss", strnpcinfo(3) +"::OnKillBoss", 99, 99;
    		end;
    
    	OnKillBoss:
    		// Loop through all maps
    		for (.@i = 0; .@i < getarraysize(.map$); .@i++) {
    			// Kill all monsters on current map
    			killmonsterall .map$[.@i];
    			
    			// Slow down script execution (reduces load)
    			sleep2 .delay;
    		}
    	
    		message strcharinfo(0), .@i +" boss maps have been cleared.";
    		end;
    	
    }
    
  15. i think you should use the first script you already had, but look at this line

    bindatcmd "killboss", strnpcinfo(3) +"::OnKillBoss", 99, 99;
    

    Look at rathena wiki syntax

        bindatcmd "command","<NPC object name>::<event label>"{,<atcommand level>,<charcommand level>}; 
    

    at the end of the line 99,99 means that this command will be lv99 atcommand and it's authorized for character or gm grouplv99,

    So from what i saw in the script, you just need to change only atcommand level and charcommand level then it'll be fine.

    the 1st code error is nothing happen.. cant use @killboss command.

×
×
  • Create New...