Jump to content

MikZ

Members
  • Content Count

    461
  • Joined

  • Last visited

Posts posted by MikZ


  1. Good day!
    I found this timely gvg event in rathena. 
    May I request to convert to Hercules please.
    Got error on below which cant test the script correctly. thank you!

    image.png.d502e4b3bfcd9cf6ac45415b55c6c283.png

    Spoiler
    
    // Automated GvG Event 2.0 Beta version
    // Event runs every hour via OnMinute timer.
    // Feel free to edit as you wish
    // By : Mabuhay
    // Free release
    // Dont remove credit
    // Updated to v 2.0
    /*
    	- Added gepard support and check to every members
    	- More flexible options
    	- Can set cash, members, timer, and winpoints if gm starts the command.
    	
    	New mechanics.
    	
    	- When using @gvgeventjoin, all your members must be around you by 5x5 cell.
    	
    	NOTE:
    		item rewards are only to be set here in script because adding them
    		in the GM option would be quite troublesome for me :D
    */
    //
    -	script	gvg_event	-1,{
    OnInit:
    	// Enable gepard check?
    	// set to true to enable
    	.gepard = true;
    
    	// How many guild members are required?
    	// 3 = 3v3
    	// 5 = 5v5
    	// etc..
    	// only to be set once..
    	if ( !$gvgevent_mem ) $gvgevent_mem = 2; 
    	
    	// registration timer in mins.
    	// only to be set once..
    	if ( !$gvgevent_time ) $gvgevent_time = 1; 
    	
    	// how much points to win? Points is earned per kill
    	// only to be set once..
    	if ( !$gvgevent_winpts ) $gvgevent_winpts = 2; 
    	
    	// item reward
    	// <item_id>, <amount>
    	setarray .item,
    		501, 10,
    		502, 5;
    	
    	// how much cash points earned
    	// set to 0 to disable
    	if ( !$gvgevent_cash ) $gvgevent_cash = 100; 
    	
    	.size = getarraysize(.item);
    	bindatcmd "gvgeventstart", strnpcinfo(0)+"::OnStartEvent",60,60;
    	bindatcmd "gvgeventend", strnpcinfo(0)+"::OnEndEvent",60,60;
    	bindatcmd "gvgeventjoin", strnpcinfo(0)+"::OnJoinEvent";
    	end;
    	
    OnStartEvent:
    	mes "Hi GM, what do you want to do?";
    	mes "Current settings :";
    	mes "Member count : "+ $gvgevent_mem;
    	mes "Registration time : "+ $gvgevent_time;
    	mes "Win points : "+ $gvgevent_winpts;
    	mes "Cashpoint reward : "+ $gvgevent_cash;
    	next;
    	switch(select("Start Event:Set Mem Count:Set Reg timer:Set Win Points:Set Cashpoint Reward")) {
    	case 1:
    		mes "Starting event..";
    		close2;
    		break;
    	case 2: 
    		mes "Enter member count value";
    		mes "current : "+ $gvgevent_mem;
    		next;
    		input .@amt, 1;
    		mes "Do you want to set member count to "+ .@amt +"?";
    		next;
    		select("Yes");
    		mes "Done!";
    		close2;
    		$gvgevent_mem = .@amt;
    		end;
    	case 3:
    		mes "Enter registration time value";
    		mes "current : "+ $gvgevent_time;
    		next;
    		input .@amt, 1;
    		mes "Do you want to set registration time to "+ .@amt +"?";
    		next;
    		select("Yes");
    		mes "Done!";
    		close2;
    		$gvgevent_time = .@amt;
    		end;
    	case 4:
    		mes "Enter win points value";
    		mes "current : "+ $gvgevent_winpts;
    		next;
    		input .@amt, 1;
    		mes "Do you want to set win points to "+ .@amt +"?";
    		next;
    		select("Yes");
    		mes "Done!";
    		close2;
    		$gvgevent_winpts = .@amt;
    		end;
    	case 5:
    		mes "To disable, set to zero (0)";
    		mes "current : "+ $gvgevent_cash;
    		next;
    		input .@amt;
    		mes "Do you want to set cashpoints to "+ .@amt +"?";
    		next;
    		select("Yes");
    		mes "Done!";
    		close2;
    		$gvgevent_cash = .@amt;
    		end;
    	}
    OnMinute00: // runs every hour..
    	if ( .start ) end;
    	.start = 1;
    	.@m = $gvgevent_mem;
    	gvgoff "guild_vs1";
    	for ( .@j = 1; .@j < 9; .@j++ )
    		enablenpc "#bari0"+.@j;
    	setwall "guild_vs1", 12, 48, 4, DIR_NORTH, 0, "wonderwall_1";
    	setwall "guild_vs1", 87, 48, 4, DIR_NORTH, 0, "wonderwall_2";
    	for ( .@i = $gvgevent_time; .@i > 0; .@i-- ) {
    		if ( .start < 2 ) {
    			announce "<"+.@m+"v"+.@m+" Guild Event> Event start in "+.@i+" min(s) until slots are taken. Register now.", bc_all;
    			sleep 60000;
    		}
    	}
    	if ( !.slot1 || !.slot2 ) {
    		announce "<"+.@m+"v"+.@m+" Guild Event> Event is cancelled. Not enough participants.", bc_all; 
    		donpcevent strnpcinfo(0)+"::OnEndEvent";
    		end;
    	}
    	announce "<"+.@m+"v"+.@m+" Guild Event> Guild ["+getguildinfo(GUILDINFO_NAME,.slot1)+"] vs Guild ["+getguildinfo(GUILDINFO_NAME,.slot2)+"].", bc_all;
    	end;
    
    OnJoinEvent:
    	.@GID = getcharid(2);
    	if (.@GID == 0) {
    		mes "Sorry, you are not in a guild.";
    		close;
    	}
    	if (getguildinfo(GUILDINFO_MASTER_CID,.@GID)) {
    		mes "Sorry, only your guild master can register.";
    		close;
    	}
    	if ( !.start ) {
    		mes "Event has not started.";
    		close;
    	} else if ( .start == 2 ) {
    		mes "Event is still on-going.";
    		close;
    	} else {
    		if ( .slot1 && .slot2 ) {
    			mes "All slots has been taken.";
    			close;
    		}
    		if ( !.slot1 ) .@slot = 1;
    		else if ( !.slot2) .@slot = 2;
    		if ( .slot1 == .@GID ) {
    			mes "You're guild has already registered.";
    			close;
    		}
    		getmapxy(.@map$, .@x, .@y, BL_PC);
    		getareaunits(BL_PC,.@map$,.@x+5,.@y+5,.@x-5,.@y-5,.@char_name$[0]);
    		freeloop(true);
    		for(.@i=0;.@i<getarraysize(.@char_name$);.@i++)
    		if ( getcharid(2, .@char_name$[.@i] ) == .@GID ) {
    			if ( .gepard ) {
    				query_sql("SELECT `last_unique_id` FROM `login` WHERE `account_id` = '"+ getcharid(3, .@char_name$[.@i] ) +"'", .@unique_id$);
    				.@gvg_gepard$[.@gsize++] = .@unique_id$;
    				if ( countinarray( .@gvg_gepard$[0], .@unique_id$ ) > 1 ) .@duplicate++;
    			}
    			.@current_mem++;
    			.@aid[.@size++] = convertpcinfo(.@char_name$[.@i], CPC_ACCOUNT);
    			.@validmem$[.@size2++] = .@char_name$[.@i];
    		}
    		freeloop(false);	
    		if ( .@current_mem < $gvgevent_mem ) {
    			mes "You need at least "+$gvgevent_mem+" guild members around you"+(.gepard ? " with unique gepard id":"")+".";
    			close;
    		}
    		if ( .@current_mem > $gvgevent_mem ) {
    			mes "You need only need "+$gvgevent_mem+" guild members around you"+(.gepard ? " with unique gepard id":"")+".";
    			close;
    		}
    		if ( .gepard && .@duplicate ) {
    			mes "Gepard ID duplicate detected.";
    			mes "A member around you is using dual account.";
    			close;
    		}
    		mes "Participating members are :";
    		for ( .@i = 0; .@i < .@size2; .@i++)
    			mes "~ "+ .@validmem$[.@i];
    		next;
    		mes "Are you ready ?";
    		next; 
    		select("Yes");
    		switch ( .@slot ) {
    			case 1: .slot1 = .@GID; break;
    			case 2: .slot2 = .@GID; break;
    		}
    		for ( .@j = 0; .@j < .@size; .@j++ ) {
    			attachrid(.@aid[.@j]);
    			.@gid = getcharid(2);
    			sc_end SC_ALL; // remove all status buffs
    			percentheal 100,100; // heals before warp
    			warp "guild_vs1", ( .slot1 == .@gid ) ? 7 : 92, 50;
    		}
    		detachrid;
    		if ( .slot1 && .slot2 ) {
    			.start = 2;
    			awake strnpcinfo(0);
    			sleep 3000;
    			mapannounce "guild_vs1", "Get ready !~", bc_blue;
    			sleep 2000;
    			for ( .@i = 5; .@i > 0; --.@i ) {
    				mapannounce "guild_vs1", .@i +" !~", bc_blue;
    				sleep 1000;
    			}
    			mapannounce "guild_vs1", "Start !~", bc_blue;
    			gvgon "guild_vs1";
    			for ( .@j = 1; .@j < 9; .@j++ )
    				disablenpc "#bari0"+.@j;
    			delwall "wonderwall_1";
    			delwall "wonderwall_2";
    		}
    	}
    	end;
    	
    OnPCKillEvent:
    	if ( .start && strcharinfo(3) == "guild_vs1" ) {
    		.@GID = getcharid(2);
    		if ( .@GID == .slot1 ) .guild1_score++;
    		else if ( .@GID == .slot2 ) .guild2_score++;
    		mapannounce "guild_vs1", strcharinfo(0) +" of Guild ["+getguildinfo(GUILDINFO_NAME,.@GID)+"] has pawned "+ rid2name(killedrid), bc_blue;
    		mapannounce "guild_vs1", "Guild ["+getguildinfo(GUILDINFO_NAME,.slot1)+"] - "+.guild1_score+" || Guild ["+getguildinfo(GUILDINFO_NAME,.slot2)+"] - "+.guild2_score+"", bc_blue;
    		if ( .guild1_score == $gvgevent_winpts || .guild2_score == $gvgevent_winpts ) {
    			gvgoff "guild_vs1";
    			if ( .guild1_score > .guild2_score ) { .winner = .slot1; .loser = .slot2; }
    			else { .winner = .slot2; .loser = .slot1; }
    			.@m = $gvgevent_mem;
    			announce "<"+.@m+"v"+.@m+" Guild Event> Guild ["+getguildinfo(GUILDINFO_NAME,.winner)+"] is victorious against Guild ["+getguildinfo(GUILDINFO_NAME,.loser)+"] !", bc_all;
    			mapannounce "guild_vs1", "Rewards will be delivered in few seconds before warping out.", bc_blue;
    			sleep 8000; // 8 sec pause so participating members can re-warp if dead
    			getmapunits(BL_PC, "guild_vs1", .@aid[0]);
    			for(.@i=0;.@i<getarraysize(.@aid);.@i++) {
    				attachrid(.@aid[.@i]);
    				if ( getcharid(2) == .winner ) { // if winner
    					for ( .@j = 0; .@j < .size; .@j+=2 )
    						getitem .item[.@j], .item[.@j+1]; 
    					if ( $gvgevent_cash ) {
    						#CASHPOINTS += $gvgevent_cash;
    						dispbottom "You have gained "+$gvgevent_cash+" cashpoints. Total : "+ #CASHPOINTS;
    					}
    				} else if ( getcharid(2) == .loser ) { // if loser
    					dispbottom "Thank you for participating GvG Event."; 
    				}
    			}			
    			detachrid;
    			sleep 2000; // 2 sec pause..
    			donpcevent strnpcinfo(0)+"::OnEndEvent";
    			end;
    		}
    		attachrid( killedrid );
    		.@GID = getcharid(2);
    		if ( .@GID == .slot1 || .@GID == .slot2 ) {
    			dispbottom "You will be warped back to the battle area in few secs.";
    			sleep2 4000; // return to battle in 5 sec
    			warp "guild_vs1", (.@GID == .slot1) ? 7:(.@GID == .slot2) ? 92:50, 50;
    			sleep2 1000; // heal in 1 sec
    			percentheal 100,100;
    		}
    	}
    	end;
    	
    OnEndEvent:
    	if ( !.start ) end;
    	.start = .slot1 = .slot2 = .loser = .winner = .guild1_score = .guild2_score = false;
    	mapwarp "guild_vs1", "prontera", 150, 180;
    	end;
    }
    
    // Barricades
    guild_vs1,12,48,0	script	#bari01	1906,{ end; OnInit: disablenpc strnpcinfo(0); }
    guild_vs1,12,49,0	script	#bari02	1906,{ end; OnInit: disablenpc strnpcinfo(0); }
    guild_vs1,12,50,0	script	#bari03	1906,{ end; OnInit: disablenpc strnpcinfo(0); }
    guild_vs1,12,51,0	script	#bari04	1906,{ end; OnInit: disablenpc strnpcinfo(0); }
    guild_vs1,87,48,0	script	#bari05	1906,{ end; OnInit: disablenpc strnpcinfo(0); }
    guild_vs1,87,49,0	script	#bari06	1906,{ end; OnInit: disablenpc strnpcinfo(0); }
    guild_vs1,87,50,0	script	#bari07	1906,{ end; OnInit: disablenpc strnpcinfo(0); }
    guild_vs1,87,51,0	script	#bari08	1906,{ end; OnInit: disablenpc strnpcinfo(0); }

     

     


  2. 19 minutes ago, Samuel said:

    Did you include the array_find function? It's a custom function so you need to copy the function script and include it either inside the script or any script that will make the function load.

    Hi Samuel,

    I see. wait let me try.


  3. Good day!

    Requesting to convert this to Hercules please.}

    error found in this line script inarray

    if(inarray(.blackList[0],.@potion) != -1){ 

    Full script below. thanks!

    //===== rAthena Script =======================================
    //= Auto-Potion
    //===== Description: =========================================
    //= Provides an @autopot command to automatically use potions.
    //===== Changelogs: ==========================================
    //= 1.0 First version. [Euphy]
    //= 2.0 rewrite and adding SP option. [sader1992]
    //============================================================
    -	script	#autopot	-1,{
    OnInit:
    	.HP_Option = true;	//Allow HP option
    	.SP_Option = true;	//Allow SP option
    	.MinDelay = 100;	//Minimum Delay Allowed in milliseconds (Default and Recommended: 100) [lower values will increase server strain]
    	setarray .blackList[0],0;	//Array of black listed item ID
    
    	if(!.HP_Option && !.SP_Option){
    		debugmes "Warning: @autopot both hp and sp are Disabled";
    		debugmes "Warning: @autopot script has been Disabled!";
    		end;
    	}
    	bindatcmd("autopot",strnpcinfo(0)+"::OnCommand",0,99);
    end;
    
    L_Help:
    	dispbottom "Available commands:";
    	if(.HP_Option && .SP_Option){
    		dispbottom "    @autopot <hp|sp> <item id> {<min hp|sp % [1..100]> {<delay [" + .MinDelay + "..1000]>}}";
    		dispbottom "    @autopot <hp|sp> list";
    		dispbottom "    @autopot <hp|sp> <on|off>";
    	}else{
    		dispbottom "    @autopot <" + (.HP_Option?"hp":"sp") + "> <item id> {<min " + (.HP_Option?"hp":"sp") + " % [1..100]> {<delay [" + .MinDelay + "..1000]>}}";
    		dispbottom "    @autopot <" + (.HP_Option?"hp":"sp") + "> list";
    		dispbottom "    @autopot <" + (.HP_Option?"hp":"sp") + "> <on|off>";
    	}
    	dispbottom "    @autopot info";
    	dispbottom "    @autopot help";
    	dispbottom "    @autopot blacklist";
    	return;
    
    L_Info:
    	dispbottom "----------Auto-Potion Information-----------";
    	if(.HP_Option){
    		dispbottom "HP POTION:  " + getitemname(@autopot_hp_ID) + " (" + @autopot_hp_ID + ")";
    		dispbottom "MIN HP:   " + @autopot_hp_Min + " %";
    	}
    	if(.SP_Option){
    		dispbottom "SP POTION:  " + getitemname(@autopot_sp_ID) + " (" + @autopot_sp_ID + ")";
    		dispbottom "MIN SP:   " + @autopot_sp_Min + " %";
    	}
    	dispbottom "DELAY:    " + @autopot_delay + " ms";
    	dispbottom "---------------------------------------------";
    	return;
    
    L_Start:
    	deltimer strnpcinfo(3) + "::OnStart";
    	.@type$  = getarg(0,0);
    	.@potion = getarg(1,0);
    	setd "@autopot_" + .@type$ + "_Min",getarg(2,0);
    	@autopot_delay = getarg(3,0);
    
    	if (getd("@autopot_" + .@type$ + "_Min")   < 1  || getd("@autopot_" + .@type$ + "_Min") > 100)  setd "@autopot_" + .@type$ + "_Min",90;
    	if (@autopot_delay < 50 || @autopot_delay > 1000) @autopot_delay = .MinDelay;
    	if (getiteminfo(.@potion,2) != IT_HEALING) {
    		dispbottom getitemname(.@potion) + " is not a healing item.";
    		end;
    	}
    	if(inarray(.blackList[0],.@potion) != -1){
    		message strcharinfo(0), "'" + getitemname(.@potion) + "' is black listed and cannot be used.";
    		end;
    	}
    	if (BaseLevel < getiteminfo(.@potion,12)) {
    		message strcharinfo(0), "Your base level is too low to use '" + getitemname(.@potion) + "'.";
    		end;
    	}
    	setd "@autopot_" + .@type$ + "_ID",.@potion;
    	setd "@autopot_" + .@type$ + "_Active",true;
    	addtimer .@delay,strnpcinfo(3) + "::OnStart";
    	message strcharinfo(0), "Auto-Potion " + strtoupper(.@type$) + " enabled.";
    	callsub L_Info;
    	return;
    
    OnCommand:
    	if (!getarraysize(.@atcmd_parameters$)) {
    		message strcharinfo(0), "Invalid syntax.";
    		callsub L_Help;
    		end;
    	}
    	.@command$[0] = strtolower(.@atcmd_parameters$[0]);
    	.@command$[1] = strtolower(.@atcmd_parameters$[1]);
    	
    	if(.@command$[0] == "hp" || .@command$[0] == "sp"){
    		if((!.HP_Option && .@command$[0] == "hp") || (!.SP_Option && .@command$[0] == "sp")){
    			message strcharinfo(0), "Auto-Potion " + strtoupper(.@command$[0]) + " is Disabled from The Server.";
    			end;
    		}
    		if(.@command$[1] == "on"){
    			if(getd("@autopot_" + .@command$[0] + "_Active")){
    				message strcharinfo(0), "Auto-Potion " + strtoupper(.@command$[0]) + " is already on.";
    				end;
    			}
    			if(!getd("@autopot_" + .@command$[0] + "_ID")){
    				dispbottom "You need to set a " + strtoupper(.@command$[0]) + " Potion to be used.";
    				callsub L_Help;
    				end;
    			}
    			callsub L_Start,.@command$[0],getd("@autopot_" + .@command$[0] + "_ID");
    			end;
    		}
    		if(.@command$[1] == "off"){
    			message strcharinfo(0), "Auto-Potion " + strtoupper(.@command$[0]) + " disabled.";
    			setd "@autopot_" + .@command$[0] + "_Active",false;
    			if(!@autopot_hp_Active || !@autopot_sp_Active)
    				deltimer strnpcinfo(3) + "::OnStart";
    			end;
    		}
    		if(.@command$[1] == "list"){
    			getinventorylist;
    			for(.@i = 0;.@i < @inventorylist_count;.@i++){
    				if (getiteminfo(@inventorylist_id[.@i],2) == IT_HEALING) {
    					.@items[.@count] = @inventorylist_id[.@i];
    					.@menu$ = .@menu$ + sprintf("~ ^0055FF%s^000000 (%dx)" + (inarray(.blackList[0],@inventorylist_id[.@i]) != -1? " ^364022Black Listed^000000":"") + (BaseLevel < getiteminfo(@inventorylist_id[.@i],12)? " ^E82C0CNeed Higher Level^000000":"") + ":", getitemname(@inventorylist_id[.@i]), countitem(@inventorylist_id[.@i]));
    					.@count++;
    				}
    			}
    			if(.@count){
    				mes "[ Auto-Potion ]";
    				mes "Select a " + strtoupper(.@command$[0]) + " item.";
    				.@select = select(.@menu$ + "   ^777777Cancel^000000") - 1;
    				if (.@select != .@count)
    					callsub L_Start,.@command$[0],.@items[.@select];
    				close2;
    			}else{
    				message strcharinfo(0), "There are no healing items in your inventory.";
    			}
    			end;
    		}
    		.@potion = atoi(.@command$[1]);
    		.@percent = atoi(.@atcmd_parameters$[2]);
    		.@delay = atoi(.@atcmd_parameters$[3]);
    		if(getitemname(.@potion) != "null"){
    			callsub L_Start,.@command$[0],.@potion,.@percent,.@delay;
    			end;
    		}
    		message strcharinfo(0), "Auto-Potion : something went wrong!";
    		callsub L_Help;
    		end;
    	}
    	if(.@command$[0] == "blacklist"){
    		dispbottom "--------------Black Listed Items--------------";
    		for(.@i=0;.@i<getarraysize(.blackList);.@i++){
    			dispbottom "    " + getitemname(.blackList[.@i]) + " (" + .blackList[.@i] + ")";
    		}
    		dispbottom "---------------------------------------------";
    		end;
    	}
    	if(.@command$[0] == "info"){
    		if(@autopot_hp_Active || @autopot_sp_Active){
    			message strcharinfo(0), "Auto-Potion information is displayed below.";
    			callsub L_Info;
    		}else{
    			message strcharinfo(0), "Auto-Potion is not enabled.";
    		}
    		end;
    	}
    	if(.@command$[0] == "help"){
    		message strcharinfo(0), "List of commands is displayed below.";
    		callsub L_Help;
    		end;
    	}
    	
    	message strcharinfo(0), "Invalid syntax.";
    	callsub L_Help;
    end;
    
    OnStart:
    	if (!getstatus(SC_BERSERK) && !getstatus(SC_SATURDAYNIGHTFEVER) && !getstatus(SC_GRAVITATION) &&
    	    !getstatus(SC_TRICKDEAD) && !getstatus(SC_HIDING) && !getstatus(SC__SHADOWFORM) && !getstatus(SC__INVISIBILITY) &&
    	    !getstatus(SC__MANHOLE) && !getstatus(SC_KAGEHUMI) && !getstatus(SC_HEAT_BARREL_AFTER) &&
    		!getstatus(SC_STONE) && !getstatus(SC_FREEZE) && !getstatus(SC_STUN) && !getstatus(SC_SLEEP))
    		{
    		if(Hp){
    			if(@autopot_hp_Active && Hp * 100 / MaxHp < @autopot_hp_Min) {
    				if (countitem(@autopot_hp_ID)) {
    					delitem @autopot_hp_ID,1;
    					consumeitem @autopot_hp_ID;
    					specialeffect2 207;
    				}
    			}
    			if(@autopot_sp_Active && Sp * 100 / MaxSp < @autopot_sp_Min) {
    				if (countitem(@autopot_sp_ID)) {
    					delitem @autopot_sp_ID,1;
    					consumeitem @autopot_sp_ID;
    					specialeffect2 208;
    				}
    			}
    		}
    	}
    	if(@autopot_hp_Active || @autopot_sp_Active)
    		addtimer @autopot_delay,strnpcinfo(3) + "::OnStart";
    end;
    }

     


  4. Good day!

    May I request assistance please.
    I have training dummy script but I also have hourly event like treasure box that has command @killmonster2 command. So everytime the event find the treasure enable the training dummy will be forever gone. how can I have the training dummy back after command @killmonster2?

    -	script	Punching Bag	FAKE_NPC,{
    OnInit:
    	setmapflag( "prontera",mf_monster_noteleport );
    OnDummyKill:
    	 monster "prontera",208,182,"Punching Bag",1905,1,"Punching Bag::OnDummyKill";
    	 end;
    OnPCAttackEvent:
    	if ( !@test_punch ) end;
    	@dps_damage += @damage;
    	end;
    }
    -	script	Punching Bag2	FAKE_NPC,{
    OnInit:
    	setmapflag( "prontera",mf_monster_noteleport );
    OnDummyKill2:
    	 monster "prontera",208,171,"Punching Bag",1905,1,"Punching Bag2::OnDummyKill2";
    	 end;
    OnPCAttackEvent:
    	if ( !@test_punch ) end;
    	@dps_damage += @damage;
    	end;
    }

    Treasure Chest Event:

    // --- Exteria Ragnarok Online [ExRO] 's Property ---
    // ---   Please visit http://www.exteriaro.com    ---
    // ---           Scripted By: ARTHistic           ---
    // ---         Do Not Revomed the Credits         ---
    
    prontera,183,172,5	script	Treasure Box Summoner::Tbox	4_M_JOB_WIZARD,{
    //prontera,165,142,3	script	Treasure Box Summoner::Tbox	4_M_JOB_WIZARD,{
    	mes "[^0000FFTreasure Hunt Event^000000]";
    	mes "Hello, I'm a new mage here in Midgard. Every hour, I tried to cast my summoning spells and there a chance that i can summon a Treasure Box that will give you items once you destroy it. I only cast my spell on main city and I immediately announce to everyone once I perfectly cast my spells. Anyways, I will give you a little hint...";
            if( $@tboxevent == 0 ){
            	mes "I ^ff0000failed^000000 to summoned the Treasure Box last time.^000000";
    	}else {
    		mes " ";
            	mes "^I successfully summoned the Treasure Box last time.";
    	}
    	close;
    
    OnStartTbox:
    	set $@tboxevent,1;
    		announce "[Treasure Chest Event: Treasure Chest Event 'I perfectly cast my summoning skills'.]",0,0x00FFFF;
    		sleep2 5000;
    		announce "[Treasure Chest Event: 2 rare Treasure Box will be spawned in 30 seconds at Prontera.]",0,0x00FFFF;
    		sleep2 10000;
    		announce "[Treasure Chest Event: Every Treasure Box gives you 5 Event Coins and a chance to drop 1 TCG.]",0,0x00FFFF;
    		sleep2 20000;
    		announce "[Treasure Chest Event: 2 rare Treasure Box has spawned in Prontera and will disappear in 45 minutes.]",0,0x00FFFF;
    		monster "prontera",0,0,"Treasure Box",1344,2,"Tbox::OnTBoxKilled";
    		initnpctimer;
    		end;
    OnTimer1800000:
    	stopnpctimer;
    	killmonster .eventMapTbox$,"all";
    	set $@tboxevent,0;
    	announce "[Treasure Chest Event: Rare Treasure Chest has disappear.]",0,0x00FFFF;
    	end;
    
    OnTBoxKilled:
    	announce "[Treasure Chest Event: The rare Treasure Box has been found and destroyed by "+strcharinfo(0)+"!]", bc_all,0x00FFFF;
    	set $@tboxevent,0;
    	if( rand( 100 ) < .tboxrate ){ 
    	getmapxy( .@map$,.@x,.@y,0 );
    	makeitem 7227,2,.@map$,.@x,.@y;
    	}else{
    	getmapxy( .@map$,.@x,.@y,0 );
    	makeitem 25046,10,.@map$,.@x,.@y;
    }
    end;
    
    OnInit:
    // craft settings
    .tboxrate = 70;
    set .eventMapTbox$, "prontera";
    waitingroom "[Treasure Box Summoner]",0;
    end;
    
    }

     


  5. 4 minutes ago, 4144 said:

    what kind of plugins you using?

    i cant find this strings in hercules

    I'm using these:

     

        "HPMHooking",
        "db2sql",
        "koe",
        "ExtendedBG",
        "ExtendedBG-char",
        //"sample",
        //"other",
        "mapcache",
        "costumeitem",
        "security",
        "restock",
    //    "hit-delay",
    //    "noinvitation",
        "sleep",
        "whosell",
     

×
×
  • Create New...

Important Information

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