Jump to content

Helly

Members
  • Posts

    258
  • Joined

  • Last visited

  • Days Won

    7

Posts posted by Helly

  1. Well im Trying to use this scrip, work fine but i thing is ignoring this set, cause i can use it again an again without time limit, ty in advice:

    set .intervalmavis, 3000; 
    

    Here the full script: 

    /*(¯`º¤ø,¸¸,ø¤°¯`º¤ø,¸¸,ø¤°¯`º¤ø,¸¸,ø¤°¯º¤ø,¸¸,ø¤º´¯)
      |                                                 |
      | rAthena Script                                  |
      |                                                 |
      | Skill Matching Game                             |
      | By:                                             |
      | Viole                                           |
      |                                                 |
      | Current Version                                 |
      | 1.4                                             |
      |                                                 |
      | Description:                                    |
      | Just like a normal matching/memory game.        |
      | Here, you need to match skill effects with      |
      | the same skill effect by clicking the eggs.     |
      | If 1 pair is matched, the pair disappears       |
      | and gives a prize. If all are matched,          |
      | npc gives another prize for completing          |
      | the game. Depends on what prizes are set        |
      | by the GM. ( In-game set )                      |
      | If prizes are not set, default prize are        |
      | distributed instead. 3 Minutes Game Duration.   |
      |                                                 |
      | Changelogs:                                     |
      | 1.0 Skill Matching Game ( Special Effects )     |
      | 1.1 Removed Timer (I'll add another timer soon) |
      | 1.2 Fixed Attempts Bug                          |
      | 1.2 Added Setwall in Event Room                 |
      | 1.3 Added time interval before you can          |
      |     join the event again.                       |
      |     (Finish/Failed/AFK/Timer's up)              |
      | 1.3 Set if Char/Account Based Time Interval     |
      | 1.3 Added AFK Check ( Read note line 601 )      |
      | 1.4 Fixed minor mistake (Thanks to Emistry)     |
      | 1.4 Changed few lines in time interval (cadz)   |
      |                                                 |
      | Credits:                                        |
      | Noobita for explaining *atoi                    |
      | Quinn for giving the eggs idea lol              |
      |                                                 |
      | Edit things under : ( Added set timer )         |
      | C O N F I G U R A T I O N (line 448)            |
      |                                                 | 
      ´¯`º¤ø,¸¸,ø¤°¯`º¤ø,¸¸,ø¤°¯`º¤ø,¸¸,ø¤°¯º¤ø,¸¸,ø¤º´¯´*/
    
    
    prontera,164,172,2	script	Mavis Vermillion	437,{
    
    	if( .gameon != 0 )
    	{
    		mes .n$;
    		mes "Looks like someone is playing the game, wait until it ends.";
    		close;
    	}
    	
    	if( $skillmatchgame_based == 0 )
    	{
    		if( #Already_Played > gettimetick(2) )
    		{
    			mes .n$;
    			mes "Sorry, you have to wait "+ .intervalmavis / 60 +"minutes before joining the event again!";
    			close;
    		}
    	}
    	
    	if( $skillmatchgame_based == 1 )
    	{
    		if( Already_Played > gettimetick(2) )
    		{
    			mes .n$;
    			mes "Sorry, you have to wait "+ .intervalmavis / 60 +"minutes before joining the event again!";
    			close;
    		}
    	}
    		
    		
    Player_Menu:
    	specialeffect 75;
    	specialeffect 312;
    	specialeffect 42;
    	specialeffect 40;
    	mes .n$;
    	mes "Welcome, ^008000"+strcharinfo(0)+"^000000, want to play?";
    	mes "Cost is ^0000FF"+.zeny+"^000000 zeny.";
    	mes "If you don't have zeny.";
    	mes "You can pay ^FF0000"+.payamount+" "+getitemname(.payitem)+"s^000000 instead.";
    	next;
    	switch( select("^FFA500Please warp me now!^000000:^0000FFI've changed my mind!^000000",
    		( getgmlevel() < .gmlvl )?"":"Admin Configuration"))
    	{
    	case 1:
    		if((countitem(.payitem) < .payamount ) && ( Zeny < .zeny ))
    		{
    			mes .n$;
    			mes "It seems you don't have enough zeny. Or even "+.payamount+" "+getitemname(.payitem)+"s.";
    			mes "Poor little guy..";
    			close;
    		}
    		else
    		{
    			mes .n$;
    			mes "Goodluck in your game!~";
    			if((countitem(.payitem) >= .payamount))
    				delitem .payitem, .payamount;
    			else
    				set Zeny, Zeny - .zeny;
    			close2;
    			goto Game_On;
    		}
    		
    Game_On:
    	set .gameon, 1;
    	set .attempt, .attempts;	
    	set .Char_Name$, strcharinfo(0);
    	set .Char_ID, getcharid(3);
    	attachnpctimer;
    	warp .mapname$,.warpx,.warpy;
    	sleep 5000;
    	areaannounce .mapname$,.areax1,.areay1,.areax2,.areay2,"Mavis Vermillion : The game will start in 10 seconds.",8;
    	sleep 2000;
    			
    	stopnpctimer;
    	donpcevent "::OnShowTogepi";
    	set .gameon, 1;
    
    	deletearray .@special_effects[0],127;
    	
    	//•••••Special Effects•••••//
    	// You can change special effects #s here, remember to always have a pair # (Note: The same count with array .@npc_size)
    	setarray .@special_effects[0],312,312,470,470,8,8,9,9,15,15,468,468,17,17,226,226,409,409,252,252,471,471,336,336,635,635,27,27,28,28,467,467,30,30,637,637;
    
    	set .@seffect_size, getarraysize(.@special_effects);
    	deletearray .skill_effects[0],127;
    	set .@seffects, .@seffect_size;
    
    	for( set .@i, 0; .@i < .@seffect_size; set .@i, .@i + 1 )
    	{
    		set .@rand_seffects, rand(.@seffects);
    		set .skill_effects[.@i], .@special_effects[.@rand_seffects];
    		deletearray .@special_effects[.@rand_seffects], 1;
    		set .@seffects, .@seffects - 1;
    	}
    
    	set .event_showeffect, -1;
    	set .attempt, .attempt + 1;
    	set .gamepair, 0;
    	areaannounce .mapname$,.areax1,.areay1,.areax2,.areay2,"Mavis Vermillion : See the Togepi's astonishing skill effects!",8;
    	sleep 2000;
    	
    	deletearray .@npc_size[0],127;
    	
    	// NPC Count
    	setarray .@npc_size[0],0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,33,34,35,36;
    
    	set .@seffect_size, getarraysize(.@npc_size);
    	deletearray .@show_seffects[0],127;
    	set .@seffects, .@seffect_size;
    
    	for( set .@i, 0; .@i < .@seffect_size; set .@i, .@i + 1 )
    	{
    		set .@rand_seffects, rand(.@seffects);
    		set .@show_seffects[.@i], .@npc_size[.@rand_seffects];
    		deletearray .@npc_size[.@rand_seffects], 1;
    		set .@seffects, .@seffects - 1;
    	}
    
    	for( set .@i, 0; .@i < 36; set .@i, .@i + 2 )
    	{
    		donpcevent "SkillEffect" + .@show_seffects[.@i] + "::OnShowSkillEffects";
    		donpcevent "SkillEffect" + .@show_seffects[.@i + 1] + "::OnShowSkillEffects";
    		sleep 200;
    	}
    
    	sleep 1600;
    	areaannounce .mapname$,.areax1,.areay1,.areax2,.areay2,"Mavis Vermillion : You only have " + .attempt + " attempts.",8;
    	sleep 2000;
    	areaannounce .mapname$,.areax1,.areay1,.areax2,.areay2,"Mavis Vermillion : Starting in 3..",8;
    	sleep 1000;
    	areaannounce .mapname$,.areax1,.areay1,.areax2,.areay2,"Mavis Vermillion : 2..",8;
    	sleep 1000;
    	areaannounce .mapname$,.areax1,.areay1,.areax2,.areay2,"Mavis Vermillion : 1..",8;
    	sleep 1000;
    	areaannounce .mapname$,.areax1,.areay1,.areax2,.areay2,"Mavis Vermillion : Go! Find pairs of skill effects now. You only got 3 minutes!",8;
    	set .gameon, 2;
    	initnpctimer;
    	end;
    
    OnDoingGood:
    	switch( rand(4) )
    	{
    		case 0: areaannounce .mapname$,.areax1,.areay1,.areax2,.areay2,"Mavis Vermillion : Well, lucky guy...",8; break;
    		case 1: areaannounce .mapname$,.areax1,.areay1,.areax2,.areay2,"Mavis Vermillion : Great...",8; break;
    		case 2: areaannounce .mapname$,.areax1,.areay1,.areax2,.areay2,"Mavis Vermillion : You're doing good!",8; break;
    		case 3: areaannounce .mapname$,.areax1,.areay1,.areax2,.areay2,"Mavis Vermillion : Nice! Just keep looking..!",8; break;
    	}
    	end;
    
    OnDoingBad:
    	switch( rand(4) )
    	{
    		case 0: areaannounce .mapname$,.areax1,.areay1,.areax2,.areay2,"Mavis Vermillion : Wrong egg! (" + .attempt + " lives)",8; break;
    		case 1: areaannounce .mapname$,.areax1,.areay1,.areax2,.areay2,"Mavis Vermillion : Sucks being you, I guess? (" + .attempt + " lives)",8; break;
    		case 2: areaannounce .mapname$,.areax1,.areay1,.areax2,.areay2,"Mavis Vermillion : Too bad! (" + .attempt + " lives)",8; break;
    		case 3: areaannounce .mapname$,.areax1,.areay1,.areax2,.areay2,"Mavis Vermillion : Drink Memory Plus! (" + .attempt + " lives)",8; break;
    	}
    	end;
    
    
    OnWinner:
    	stopnpctimer;
    	donpcevent "::OnHideTogepi";
    	areaannounce .mapname$,.areax1,.areay1,.areax2,.areay2,"Mavis Vermillion : YOU DID IT!!",8;
    	set .gameon, 0;
    	sleep 2000;
    	mapwarp .mapname$,.maintown$,.mainx,.mainy;
    	end;
    	
    OnLose:
    	stopnpctimer;
    	donpcevent "::OnHideTogepi";
    	areaannounce .mapname$,.areax1,.areay1,.areax2,.areay2,"Mavis Vermillion : No more attempts. Sucks being you, I guess.",8;
    	set .gameon, 0;
    	sleep 2000;
    	mapwarp .mapname$,.maintown$,.mainx,.mainy;
    	end;
    
    OnTimer60000:
    	areaannounce .mapname$,.areax1,.areay1,.areax2,.areay2,"Mavis Vermillion : 2 minutes remaining.",8;
    	end;
    OnAfk:
    	stopnpctimer;
    	detachnpctimer;
    	donpcevent "::OnHideTogepi";
    	end;
    OnTimer120000:
    	areaannounce .mapname$,.areax1,.areay1,.areax2,.areay2,"Mavis Vermillion : 1 minute remaining.",8;
    	end;
    OnTimer150000:
    	areaannounce .mapname$,.areax1,.areay1,.areax2,.areay2,"Mavis Vermillion : Last 30 seconds.",8;
    	end;
    OnTimer170000:
    	areaannounce .mapname$,.areax1,.areay1,.areax2,.areay2,"Mavis Vermillion : HURRY! Last 10 seconds.",8;
    	end;
    OnTimer175000:
    	areaannounce .mapname$,.areax1,.areay1,.areax2,.areay2,"Mavis Vermillion : 5..",8;
    	end;
    OnTimer176000:
    	areaannounce .mapname$,.areax1,.areay1,.areax2,.areay2,"Mavis Vermillion : 4..",8;
    	end;
    OnTimer177000:
    	areaannounce .mapname$,.areax1,.areay1,.areax2,.areay2,"Mavis Vermillion : 3..",8;
    	end;
    OnTimer178000:
    	areaannounce .mapname$,.areax1,.areay1,.areax2,.areay2,"Mavis Vermillion : 2..",8;
    	end;
    OnTimer179000:
    	areaannounce .mapname$,.areax1,.areay1,.areax2,.areay2,"Mavis Vermillion : 1..",8;
    	end;
    OnTimer180000:
    	stopnpctimer;
    	donpcevent "::OnHideTogepi";
    	areaannounce .mapname$,.areax1,.areay1,.areax2,.areay2,"Mavis Vermillion : Time's up. You did not make it.",8;
    	if ( getareausers(.mapname$,.areax1,.areay1,.areax2,.areay2) > 0 )
    	{
    		if ( $skillmatchgame_based == 0 )
    		{
    			set #Already_Played, strcharinfo(0);
    			set #Already_Played, gettimetick(2)+.intervalmavis;
    			detachnpctimer;
    		}
    		if ( $skillmatchgame_based == 1 )
    		{
    			set Already_Played, strcharinfo(0);
    			set Already_Played, gettimetick(2)+.intervalmavis;
    			detachnpctimer;
    		}
    	}
    	set .gameon, 0;
    	sleep 2000;
    	mapwarp .mapname$,.maintown$,.mainx,.mainy;
    	end;
    	
    	case 2:
    		close;
    	case 3:
    	Admin_Menu:
    		next;
    		mes .n$;
    		mes "Welcome back GM ^FF0000"+strcharinfo(0)+"^000000.";
    		mes "What do you want to do today?";
    		next;
    		switch(select("Player Menu:Set Payment:Set Prize:Just dropping by!"))
    		{
    		case 1:
    			next;
    			goto Player_Menu;
    		case 2:
    		current_payment:
    			next;
    			mes .n$;
    			mes "Current Item Payment:";
    			mes "^008000"+.payamount+" "+getitemname(.payitem)+"s^000000";
    			mes " ";
    			mes "Current Zeny Payment:";
    			mes "^008000"+.zeny+"^000000 zeny";
    			next;
    			switch(select("Set Item Payment:Set Zeny Payment:Go back to menu"))
    			{
    			case 1:
    				next;
    				mes .n$;
    				mes "Ok, please input the item # to be the payment for joining the game.";
    				next;
    				input .@itemid;
    				if (getitemname(.@itemid) == "null" || getitemname(.@itemid) == "") {next; mes .n$; mes "This item doesn't exists in the database.."; next; goto current_payment; }
    				set .payitem, .@itemid;
    				next;
    				mes .n$;
    				mes "How many "+getitemname(.payitem)+"s should players pay?";
    				next;
    				input .@itemamount;
    				if(.@itemamount <= 0){next; mes .n$; mes "Please input a # greater than 0!"; next; goto current_payment; }
    				set .payamount, .@itemamount;
    				next;
    				mes "So, the item payment for the entering the game:";
    				mes "^008000"+.payamount+" "+getitemname(.payitem)+"s";
    				next;
    				goto current_payment;
    			case 2:
    				next;
    				mes .n$;
    				mes "Ok, please input how much zeny players should pay for entering the game.";
    				next;
    				input .@payzeny;
    				if(.@payzeny <= 0){next; mes .n$; mes "Please input a # greater than 0!"; next; goto current_payment; }
    				set .zeny, .@payzeny;
    				next;
    				mes "So, the zeny payment for the entering the game:";
    				mes "^008000"+.zeny+" zeny.";
    				next;
    				goto current_payment;
    			case 3:
    				next;
    				goto Admin_Menu;
    			}
    		case 3:
    		current_prize:
    			next;
    			mes .n$;
    			mes "Current Normal Prize:";
    			mes "^008000"+.rewardamount+" "+getitemname(.rewarditem)+"s^000000";
    			mes " ";
    			mes "Current Winner Prize:";
    			mes "^008000"+.w_rewardamount+" "+getitemname(.w_rewarditem)+"s^000000";
    			next;
    			switch(select("Set Normal Prize:Set Winner Prize:Enable/Disable Prize:Go back to menu"))
    			{
    			case 1:
    				next;
    				mes .n$;
    				mes "Ok, please input the item to be given if the player finds a pair!";
    				next;
    				input .@rewardid;
    				if (getitemname(.@rewardid) == "null" || getitemname(.@rewardid) == "") {next; mes .n$; mes "This item doesn't exists in the database.."; next; goto current_prize; }
    				set .rewarditem, .@rewardid;
    				next;
    				mes .n$;
    				mes "How many "+getitemname(.rewarditem)+"s should players get?";
    				next;
    				input .@rewardamount;
    				if(.@rewardamount <= 0){next; mes .n$; mes "Please input a # greater than 0!"; next; goto current_prize; }
    				set .rewardamount, .@rewardamount;
    				next;
    				mes "So, the current normal prize:";
    				mes "^008000"+.rewardamount+" "+getitemname(.rewarditem)+"s";
    				next;
    				goto current_prize;
    			case 2:
    				next;
    				mes .n$;
    				mes "Ok, please input the item to be given if the player wins the game!";
    				next;
    				input .@w_rewardid;
    				if (getitemname(.@w_rewardid) == "null" || getitemname(.@w_rewardid) == "") {next; mes .n$; mes "This item doesn't exists in the database.."; next; goto current_prize; }
    				set .w_rewarditem, .@w_rewardid;
    				next;
    				mes .n$;
    				mes "How many "+getitemname(.w_rewarditem)+"s should the winner get?";
    				next;
    				input .@w_rewardamount;
    				if(.@w_rewardamount <= 0){next; mes .n$; mes "Please input a # greater than 0!"; next; goto current_prize; }
    				set .w_rewardamount, .@w_rewardamount;
    				next;
    				mes "So, the current winner prize:";
    				mes "^008000"+.w_rewardamount+" "+getitemname(.w_rewarditem)+"s";
    				next;
    				goto current_prize;
    			case 3:
    			enable_disable:
    				next;
    				mes .n$;
    				mes "What would you like to do?";
    				next;
    				switch(select("^FF0000Disable Normal Prize Distribution^000000:^0000FFEnable Normal Prize Distribution^000000:^FF0000Disable Winner Prize Distribution^000000:^0000FFEnable Winner Prize Distribution^000000"))
    				{
    				case 1:
    					next;
    					if(.give_prize == 0){ mes .n$; mes "Normal Prize Distribution is already disabled!"; next; goto enable_disable; }
    					mes .n$;
    					mes "Normal Prize Distribution has been disabled!";
    					set .give_prize,0;
    					goto enable_disable;
    				case 2:
    					next;
    					if(.give_prize == 1){ mes .n$; mes "Normal Prize Distribution is already enabled!"; next; goto enable_disable; }
    					mes .n$;
    					mes "Normal Prize Distribution has been enabled!";
    					set .give_prize,1;
    					goto enable_disable;
    				case 3:
    					next;
    					if(.w_give_prize == 0){ mes .n$; mes "Winner Prize Distribution is already disabled!"; next; goto enable_disable; }
    					mes .n$;
    					mes "Winner Prize Distribution has been disabled!";
    					set .w_give_prize,0;
    					goto enable_disable;
    				case 4:
    					next;
    					if(.w_give_prize == 1){ mes .n$; mes "Winner Prize Distribution is already enabled!"; next; goto enable_disable; }
    					mes .n$;
    					mes "Winner Prize Distribution has been enabled!";
    					set .w_give_prize,1;
    					goto enable_disable;
    				case 5:
    					close;
    				}
    			case 4:
    				next;
    				goto Admin_Menu;
    			}
    		case 4:
    			close;
    		}
    	}
    	
    
    OnInit:
    	//•••••••••••••••••••••••• C O N F I G U R A T I O N ••••••••••••••••••••••••//
    	
    	set .n$, "[ ^FFA500Mavis Vermillion^000000 ]"; // NPC Header
    	
    	set .attempts, 20; // Change this one to how many attempts you like, n+1 , if you input 5, attempts will be 5+1 = 6
    	set .intervalmavis, 3000; // [ Seconds ] Time interval before a player can join the game again!
    	set .kicktimeifafk,120; // [ Seconds ] If afk for 120 seconds, kicked to Savepoint	
    	set $skillmatchgame_based, 0; // Timer Interval [ Account Based - 0 / Character Based - 1 ]
    	
    	set .payamount, 2; // Default item amount payment
    	set .payitem, 675; // Default item payment
    	set .zeny, 1000000; // Default zeny payment
    	set .w_rewardamount, 1; // Default Winner Prize amount
    	set .w_rewarditem, 677; // Default Winner Prize
    	set .rewarditem, 674; // Default Normal Prize
    	set .rewardamount, 1; // Default Normal Prize amount
    	
    	// These things here were due to my laziness. lol when writing the script. XD
    	set .mapname$, "quiz_02"; // Event Map Location
    	set .warpx, 305; // warp to Event Map x coordinate
    	set .warpy, 253; // warp to Event Map y coordinate
    	set .areax1, 295; // Event map areannounce x1
    	set .areay1, 261; // Event map areannounce y1
    	set .areax2, 314; // Event map areannounce x2
    	set .areay2, 242; // Event map areannounce y2	
    	set .maintown$, "prontera"; // Spawn location when game ends
    	set .mainx, 155; // spawn location x coordinate
    	set .mainy, 179; // spawn location y coordinate
    	
    	set .w_give_prize, 1; // Default setting enable/disable winner prize ( Disable = 0, Enable = 1)
    	set .give_prize, 1; // Default setting enable/disable normal prize ( Disable = 0, Enable = 1)
    	
    	set .gmlvl, 70; // Gm level to  access admin menu
    	
    	set .gameon, 0;
    	
    	setwall .mapname$,296,260,18,6,0,"1wallqz";
    	setwall .mapname$,296,243,18,6,0,"2wallqz";
    	setwall .mapname$,296,259,16,4,0,"3wallqz";
    	setwall .mapname$,313,259,16,4,0,"4wallqz";
    
    }
    
    quiz_02,297,259,4	script	Togepi#0::SkillEffect0	463,{
    
    	if( getvariableofnpc(.gameon,"Mavis Vermillion") < 2 || getvariableofnpc(.Char_ID,"Mavis Vermillion") != getcharid(3) )
    		end;
    	
    	set Already_Played, getcharid(3);
    	set #Already_Played, getcharid(3);
    	set @matchnpc, atoi(strnpcinfo(2));
    	set .mapname$,getvariableofnpc(.mapname$,"Mavis Vermillion");
    	set .areax1,getvariableofnpc(.areax1,"Mavis Vermillion");
    	set .areay1,getvariableofnpc(.areay1,"Mavis Vermillion");
    	set .areax2,getvariableofnpc(.areax2,"Mavis Vermillion");
    	set .areay2,getvariableofnpc(.areay2,"Mavis Vermillion");
    	set .intervalmavis,getvariableofnpc(.intervalmavis,"Mavis Vermillion");
    	specialeffect getvariableofnpc(.skill_effects[@matchnpc],"Mavis Vermillion");
    	if( getvariableofnpc(.gameon,"Mavis Vermillion") == 2 )
    	{
    		set getvariableofnpc(.event_showeffect,"Mavis Vermillion"), @matchnpc;
    		set getvariableofnpc(.gameon,"Mavis Vermillion"), 3;
    	}
    	else if( @matchnpc != getvariableofnpc(.event_showeffect,"Mavis Vermillion") )
    	{
    		set @npc_showeffects, getvariableofnpc(.event_showeffect,"Mavis Vermillion");
    		if( getvariableofnpc(.skill_effects[@npc_showeffects],"Mavis Vermillion") == getvariableofnpc(.skill_effects[@matchnpc],"Mavis Vermillion") )
    		{
    			set .rewarditem, getvariableofnpc(.rewarditem,"Mavis Vermillion");
    			set .rewardamount, getvariableofnpc(.rewardamount,"Mavis Vermillion");
    			set .w_rewarditem, getvariableofnpc(.w_rewarditem,"Mavis Vermillion");
    			set .w_rewardamount, getvariableofnpc(.w_rewardamount,"Mavis Vermillion");
    			set .w_give_prize, getvariableofnpc(.w_give_prize,"Mavis Vermillion");
    			set .give_prize, getvariableofnpc(.give_prize,"Mavis Vermillion");
    			set getvariableofnpc(.gamepair,"Mavis Vermillion"), getvariableofnpc(.gamepair,"Mavis Vermillion") + 1;
    
    			if( getvariableofnpc(.gamepair,"Mavis Vermillion") > 0 )
    				{ if(.give_prize == 1){getitem .rewarditem, .rewardamount;}}
    
    			set getvariableofnpc(.gameon,"Mavis Vermillion"), 2;
    
    			donpcevent "SkillEffect" + @npc_showeffects + "::OnHideTogepi";
    			donpcevent "SkillEffect" + @matchnpc + "::OnHideTogepi";
    			
    			set getvariableofnpc(.event_showeffect,"Mavis Vermillion"), -1;
    
    			if( getvariableofnpc(.gamepair,"Mavis Vermillion") > 17 ){ // This 17 here, is the number of Pairs - 1
    				if(.w_give_prize == 1){
    				getitem .w_rewarditem, .w_rewardamount;
    				}
    				if(getareausers(.mapname$,.areax1,.areay1,.areax2,.areay2) > 0 )
    				{
    					if ( $skillmatchgame_based == 0 )
    					{
    						set #Already_Played, gettimetick(2)+.intervalmavis;
    						detachnpctimer;
    					}
    					if ( $skillmatchgame_based == 1 )
    					{
    						set Already_Played, gettimetick(2)+.intervalmavis;
    						detachnpctimer;
    					}
    				}
    				donpcevent "Mavis Vermillion::OnWinner";
    				}
    			else
    				donpcevent "Mavis Vermillion::OnDoingGood";
    				
    		}
    		else
    		{
    			set getvariableofnpc(.gameon,"Mavis Vermillion"), 2;
    			set getvariableofnpc(.event_showeffect,"Mavis Vermillion"), -1;
    			set getvariableofnpc(.attempt,"Mavis Vermillion"), getvariableofnpc(.attempt,"Mavis Vermillion") - 1;
    			if( getvariableofnpc(.attempt,"Mavis Vermillion") < 1 ){
    				if(getareausers(.mapname$,.areax1,.areay1,.areax2,.areay2) > 0 )
    				{
    				if ( $skillmatchgame_based == 0 )
    					{
    						set #Already_Played, gettimetick(2)+.intervalmavis;
    						detachnpctimer;
    					}
    					if ( $skillmatchgame_based == 1 )
    					{
    						set Already_Played, gettimetick(2)+.intervalmavis;
    						detachnpctimer;
    					}
    				}
    				donpcevent "Mavis Vermillion::OnLose";
    				}
    			else
    				donpcevent "Mavis Vermillion::OnDoingBad";
    		}
    	}
    	end;
    
    OnShowSkillEffects:
    	specialeffect getvariableofnpc(.skill_effects[atoi(strnpcinfo(2))],"Mavis Vermillion");
    	end;
    	
    OnHideTogepi:
    	disablenpc "SkillEffect" + atoi(strnpcinfo(2)) + "";
    	end;
    	
    OnShowTogepi:
    	enablenpc "SkillEffect" + atoi(strnpcinfo(2)) + "";
    	end;
    
    }
    
    /* Note : Checks if character is afk or not, set time at the above CONFIGURATIONS.
       This script triggers with OnPCLoadMapEvent.
       OnPCLoadMapEvent triggers when the map has a mapflag *loadevent*.
       If you want to disable this script, because it triggers with other 
       scripts on the same map, just remove the mapflag loadevent,
       and/or remove the entire *IfAfkFor2Minutes* script.*/
       
    -	script	IfAfkFor2Minutes	-1,{
    
    OnPCLoadMapEvent:
    
    	set .@kicktimeifafk,getvariableofnpc(.kicktimeifafk,"Mavis Vermillion");
    	set .intervalmavis,getvariableofnpc(.intervalmavis,"Mavis Vermillion");
    	set Already_Played, getcharid(3);
    	set #Already_Played, getcharid(3);
    	
        while ( !getmapxy ( .@afkmap$, .@afkx, .@afky, 0) && .@afkmap$ == "quiz_02" ) {
            if ( .@afkx == .@afkmapx && .@afky == .@afkmapy ) {
                if( .@afkcountifidle < .@kicktimeifafk ){
                    set .@afkcountifidle,.@afkcountifidle+1;
                    if(.@afkcountifidle==(.@kicktimeifafk-20)){ dispbottom "You have 20 seconds to move or you will be tagged as AFK"; }
                } else {
                    dispbottom "You've been kicked for being afk.";
    				if ( $skillmatchgame_based == 0 )
    				{
    					set #Already_Played, gettimetick(2)+.intervalmavis;
    					detachnpctimer;
    				}
    				if ( $skillmatchgame_based == 1 )
    				{
    					set Already_Played, gettimetick(2)+.intervalmavis;
    					detachnpctimer;
    				}
    				set getvariableofnpc(.gameon,"Mavis Vermillion"), 0;
    				donpcevent "Mavis Vermillion::OnAfk";
                    warp "SavePoint",0,0;
                    break;
                }
            } else {
                set .@afkmapx,.@afkx;
                set .@afkmapy,.@afky;
                set .@afkcountifidle,0;
            }
            sleep2 1000;
        }
    }
    
    quiz_02,300,259,4	duplicate(SkillEffect0)	Togepi#1::SkillEffect1	463
    quiz_02,303,259,4	duplicate(SkillEffect0)	Togepi#2::SkillEffect2	463
    quiz_02,306,259,4	duplicate(SkillEffect0)	Togepi#3::SkillEffect3	463
    quiz_02,309,259,4	duplicate(SkillEffect0)	Togepi#4::SkillEffect4	463
    quiz_02,312,259,4	duplicate(SkillEffect0)	Togepi#5::SkillEffect5	463
    
    quiz_02,297,256,4	duplicate(SkillEffect0)	Togepi#6::SkillEffect6	463
    quiz_02,300,256,4	duplicate(SkillEffect0)	Togepi#7::SkillEffect7	463
    quiz_02,303,256,4	duplicate(SkillEffect0)	Togepi#8::SkillEffect8	463
    quiz_02,306,256,4	duplicate(SkillEffect0)	Togepi#9::SkillEffect9	463
    quiz_02,309,256,4	duplicate(SkillEffect0)	Togepi#10::SkillEffect10	463
    quiz_02,312,256,4	duplicate(SkillEffect0)	Togepi#11::SkillEffect11	463
    
    quiz_02,297,253,4	duplicate(SkillEffect0)	Togepi#12::SkillEffect12	463
    quiz_02,300,253,4	duplicate(SkillEffect0)	Togepi#13::SkillEffect13	463
    quiz_02,303,253,4	duplicate(SkillEffect0)	Togepi#14::SkillEffect14	463
    quiz_02,306,253,4	duplicate(SkillEffect0)	Togepi#15::SkillEffect15	463
    quiz_02,309,253,4	duplicate(SkillEffect0)	Togepi#16::SkillEffect16	463
    quiz_02,312,253,4	duplicate(SkillEffect0)	Togepi#17::SkillEffect17	463
    
    quiz_02,297,250,4	duplicate(SkillEffect0)	Togepi#18::SkillEffect18	463
    quiz_02,300,250,4	duplicate(SkillEffect0)	Togepi#19::SkillEffect19	463
    quiz_02,303,250,4	duplicate(SkillEffect0)	Togepi#20::SkillEffect20	463
    quiz_02,306,250,4	duplicate(SkillEffect0)	Togepi#21::SkillEffect21	463
    quiz_02,309,250,4	duplicate(SkillEffect0)	Togepi#22::SkillEffect22	463
    quiz_02,312,250,4	duplicate(SkillEffect0)	Togepi#23::SkillEffect23	463
    
    quiz_02,297,247,4	duplicate(SkillEffect0)	Togepi#24::SkillEffect24	463
    quiz_02,300,247,4	duplicate(SkillEffect0)	Togepi#25::SkillEffect25	463
    quiz_02,303,247,4	duplicate(SkillEffect0)	Togepi#26::SkillEffect26	463
    quiz_02,306,247,4	duplicate(SkillEffect0)	Togepi#27::SkillEffect27	463
    quiz_02,309,247,4	duplicate(SkillEffect0)	Togepi#28::SkillEffect28	463
    quiz_02,312,247,4	duplicate(SkillEffect0)	Togepi#29::SkillEffect29	463
    
    quiz_02,297,244,4	duplicate(SkillEffect0)	Togepi#30::SkillEffect30	463
    quiz_02,300,244,4	duplicate(SkillEffect0)	Togepi#31::SkillEffect31	463
    quiz_02,303,244,4	duplicate(SkillEffect0)	Togepi#32::SkillEffect32	463
    quiz_02,306,244,4	duplicate(SkillEffect0)	Togepi#33::SkillEffect33	463
    quiz_02,309,244,4	duplicate(SkillEffect0)	Togepi#34::SkillEffect34	463
    quiz_02,312,244,4	duplicate(SkillEffect0)	Togepi#35::SkillEffect35	463
    
    quiz_02	mapflag	nowarp
    quiz_02	mapflag	nowarpto
    quiz_02	mapflag	nosave
    quiz_02	mapflag	nomemo
    quiz_02	mapflag	noteleport
    quiz_02	mapflag	nochat
    quiz_02	mapflag	novending
    quiz_02	mapflag	loadevent
    
  2. Hi there, my problem is that the hall of fame of my web is only reading the "M"(Male Folder) so when is a girl char is showing the male gif and not the female has well.

     

    Can someone help me to fix please? this is the code :) Ty!

    else {
    		$sex = "<img src='".$this->themePath('img/potm/M/0.gif')."' alt=\"Sex\"/>";
    		$sqlpvp  = "SELECT pvpladder.name AS char_name, pvpladder.kills AS kills, pvpladder.deaths AS deaths, pvpladder.streaks, char.char_id, char.class AS bclass, login.sex, guild.name as gname 
    					FROM pvpladder
    					LEFT JOIN  `char` ON pvpladder.char_id = char.char_id
    					LEFT JOIN  `login` ON char.account_id = login.account_id
    					LEFT JOIN  `guild` ON char.guild_id = guild.guild_id
    					ORDER BY kills DESC 
    					LIMIT 1";
    		$sthpvp  = $server->connection->getStatement($sqlpvp);
    		$sthpvp->execute();
    		$hofchars = $sthpvp->fetchAll();
    		
    		if (empty($hofchars[0]->sex)) {
    			$bsex = $hofchars[0]->sex;
    			$bclass = $hofchars[0]->bclass;
    			$sex = "<img src='".$this->themePath('./img/potm/'.$bsex.'/'.$bclass.'.gif')."' alt=\"Sex\"/>";
    		} else {
    			$bsex = array();
    			$bclass = array();
    		}
    
  3. Si usaste esa opcion para diffear tienes que hacer una configuracion en el src en el archivo: src/config/core.h

     

    Buscar:

     

    /// Comment to disable the official packet obfuscation support.
    /// When enabled, make sure there is value for 'packet_keys' of used packet version or
    /// defined 'packet_keys_use' in db/[import/]packet_db.txt.
    /// This requires PACKETVER 2011-08-17 or newer.
    #define PACKET_OBFUSCATION
    

    y comentarlo:
     

    ///#define PACKET_OBFUSCATION
    

    Compilas e intentas de nuevo.

  4. The iteminfo work this way:

    	[501] = { <-- Id of your item in item_db.txt
    		unidentifiedDisplayName = "Red Potion", <--- Name of your Item (This tree are for unidentified)
    		unidentifiedResourceName = "빨간포션",   <--- Icon and drop for your custom item
    		unidentifiedDescriptionName = { },      <--- Description    
    		identifiedDisplayName = "Red Potion",   <--- Name of your Item (Here start for identified)
    		identifiedResourceName = "빨간포션",     <--- Icon and drop for your custom item
    		identifiedDescriptionName = {
    			"A potion made from grinded Red Herbs.", <-- Description, here you can put all the lines you want
    			"^FFFFFF_^000000",                       <-- This give you a space between description from other characteristics
    			"Class:^0000FF Restorative item^000000", 
    			"Heal:^009900 45 - 65^000000 HP",
    			"Weight:^009900 7^000000"
    		},
    		slotCount = 0, <-- Amount of slots you want your item Show drom 1 to 4
    		ClassNum = 0 <-- Here you put the idview of your item in case is a hat
    	},  <-- every item must end with this
    

    Good luck!

    • Upvote 1
  5. o.o no entendi tu pregunta :) a que te refieres con ragexe compatible con data? actualmente el exe mas nuevo compatible con rathena puedes verlo en su packet_db.txt y esta al final es el 55 buscate esa fecha, manten tu kro lo mas actualizado posible y consiguete el translate project que te sirve para poner tus items en ingles. Si no sabes de que te estoy hablando te dejo todo aqui debajo:

    Exe, Te recomiendo que lo busques tu mismo, por cierto en esta seccion tambien puedes encontrar ragnarok oficiales actualizados hasta fechas recientes: Empieza por aqui ---  Basate en esto

     

    Herramienta para diffear: Nemo

     

    Setup compatible con los nuevos exe: Open Setup de Ai4rei

     

    Herramienta para buldear customs Grf o ver GRF oficiales: Grf Editor Post  Descarga Mediafire(Es la mas actualizada)
     

    Proyecto de traduccion: copeas estas carpetas dentro de tu RO y tendras el RO en ingles muy actualizado incluyendo los luas yo te paso link renewal pero hay uno pre-renewal dentro del mismo git.

     

    Nota: No es necesario crear una data nueva si solo quieres trabajar con los items oficiales.

    • Upvote 1
  6. Esta raro el error pero primero probemos usando esto:

    En tu nemo selecciona esta opcion(puedes buscarla desde la parte de arriva donde dice Patch Filter escribes packet y te lo mostrara):

    packet_zpscwaqxd5s.png

     

    despues de diffear correctamente te vas a:
    src/config/core.h

     

     

    Busca la siguiente parte:

    /// Comment to disable the official packet obfuscation support.
    /// When enabled, make sure there is value for 'packet_keys' of used packet version or
    /// defined 'packet_keys_use' in db/[import/]packet_db.txt.
    /// This requires PACKETVER 2011-08-17 or newer.
    #define PACKET_OBFUSCATION 
    

    y cuando la encuentre comenta:

    ///#define PACKET_OBFUSCATION 

    Y compila!

  7. O.o are you using the triple slot machine or the simple? cause in the simple is wher eyou dont have more items:

    // [0] = Zeny, [1] = Item ID, [2] = Item Amount;
     

    setarray .ssm_prize[0],125,501,10; //  <--- Simple in your screen only show one slot machine TRY TO ADD MORE ITEMS HERE

    setarray .tsm_prize[0],450,12429,10,12430,10,12431,10; // <--- this is for the triple slot it show a slot machine with 3 images.

  8. Look the script is configurated to give Zeny and Item:
     

    // 0 = Zeny, 1 = Item, 2 = Zeny&Item
    
    .prize = 2; // <Right here, if you only want to give item change it to one
    
    // [0] = Zeny, [1] = Item ID, [2] = Item Amount;
    setarray .ssm_prize[0],501,10,item,amount,item,amount,item,amount; // this are the rewards for the single slot machine 
    setarray .tsm_prize[0],450,501,30item,amount,item,amount,item,amount; //here are the rewards for the Triple slot machine 
  9. Well i have add some custom pets, all work fine but i want to add a custom illus, i add the custompet.bmp in the illus fold

     

    and edit petinfo.lub

    PetIllustNameTable = {
    
    I try this way:
    
    [jobtbl.JT_PAD_CUSTOMMOB] = "À¯ÀúÀÎÅÍÆäÀ̽º\\illust\\pet_custompet.bmp"
    
    And this way:
    
    [jobtbl.JT_PAD_CUSTOMMOB] = "pet_custompet.bmp"
    
    
    

    i check this topic:

    https://rathena.org/board/topic/60349-resolved-custom-pet-illustration/

     

    and this:
    https://rathena.org/board/topic/75175-qpets-picture/

    Same Author, but nothing :(  Any help please! TY

     

    but still having this:

    post-1399-0-46497300-1471281092_thumb.png

  10. If you have an updated rathena this is the alternative sprite for Genetic and you cand use it with @bodystyle 1 the jobs that have sprites are:

    • Genetic
    • Royal Guard
    • Mechanic
    • Guillotine Cross
    • Arch Bishop
    • Ranger

    Some of them you can find it in the download section HERE (credits to Haziel), if you dont want to have error you must add their palettes too or when your users use the color 4 your client will crash or will got their body full in black.

  11. I found this script is from AnnieRuru, all work fine but when change the pet the old egg is not deleting. Delete the ítem that is needed to evol the pet but not the egg :) can someone help please! TY!

    prontera,212,168,1	script	Will Conner	923,{
    
    if ( getpetinfo(PET_CLASS) ) {
            mes .@npcname$;
            mes "Por favor regresa tu mascota a su Huevo.";
            cutin "",255;
            close;
        }
        getinventorylist;
        for ( .@i = 0; .@i < @inventorylist_count; .@i++ ) {
            if ( @inventorylist_card1[.@i] != 0  ) {
                query_sql "select intimate, class, level, equip, name from pet where pet_id = "+( .@id = @inventorylist_card2[.@i] + ( ( @inventorylist_card2[.@i] >= 0 )? 0 : 1 << 16 ) + @inventorylist_card3[.@i] * ( 1 << 16 ) ), .@intimate, .@class, .@level, .@equipped, .@name$;
                if ( .@intimate > .pet_min_friendly ) {
                    .@menu$ = .@menu$ +"^0000FF"+ .@name$ +" ^00CC00{"+ getmonsterinfo( .@class, 0 ) +"} ^000000["+ .@level +"] ^FF0000"+( ( .@equipped )? "*equipped" : "" )+":";
                    .@pet_id[.@c] = .@id;
                    .@egg_id[.@c] = @inventorylist_id[.@i];
                    .@pet_name$[.@c] = .@name$;
                    .@pet_class[.@c] = .@class;
                    .@pet_level[.@c] = .@level;
                    .@pet_equipped[.@c] = .@equipped;
                    .@c++;
                }
            }
        }
        if ( !.@c ) {
            mes .@npcname$;
            mes "your inventory doesn't have any pet egg that intimate enough";
            cutin "",255;
            close;
        }
        mes "select which pet that you want it to evolve";
        next;
        .@s = select( .@menu$ ) -1;
        mes "selected : "+ .@pet_name$[.@s];
        mes "level : "+ .@pet_level[.@s];
        mes "equipped : "+( ( .@pet_equipped[.@s] )? "Yes" : "No" );
        if ( getd( ".petr"+ .@pet_class[.@s] ) ) {
            mes "require :-";
            .@size = getarraysize( getd( ".petr"+ .@pet_class[.@s] ) );
            for ( .@i = 0; .@i < .@size; .@i += 2 )
                mes getd( ".petr"+ .@pet_class[.@s] +"["+( .@i +1 )+"]" )+"x "+ getitemname( getd( ".petr"+ .@pet_class[.@s] +"["+ .@i +"]" ) );
        }
        next;
        if ( !getd( ".pet"+ .@pet_class[.@s] ) ) {
          mes "this pet cannot evolve any further";        
        close;    
        }
        if ( .@pet_level[.@s] < .min_level ) {
            mes "this pet doesn't meet the level requirement";        
        close;    
        }
        if ( .@pet_equipped[.@s] ) {
            mes "please unequip this pet accesory to continue";        
        close;
        }
        if ( getd( ".petr"+ .@pet_class[.@s] ) ) {
            .@size = getarraysize( getd( ".petr"+ .@pet_class[.@s] ) );
            for ( .@i = 0; .@i < .@size; .@i += 2 ) {
                if ( countitem( getd( ".petr"+ .@pet_class[.@s] +"["+ .@i +"]" ) ) < getd( ".petr"+ .@pet_class[.@s] +"["+( .@i +1 )+"]" ) ) {
                    mes "you need "+ getd( ".petr"+ .@pet_class[.@s] +"["+( .@i +1 )+"]" ) +"x "+ getitemname( getd( ".petr"+ .@pet_class[.@s] +"["+ .@i +"]" ) ) +" to evolve this pet";
                    cutin "",255;
                close;
                }
            }
            for ( .@i = 0; .@i < .@size; .@i += 2 ) {
                delitem getd( ".petr"+ .@pet_class[.@s] +"["+ .@i +"]" ), getd( ".petr"+ .@pet_class[.@s] +"["+( .@i +1 )+"]" );
                
            }    
        }
        makepet .@get_pet_id = getd( ".pet"+ .@pet_class[.@s] +"["+ rand( getarraysize( getd( ".pet"+ .@pet_class[.@s] ) ) ) +"]" );
        mes "your "+ .@pet_name$[.@c] +" has reborn into "+ getmonsterinfo( .@get_pet_id, 0 );
        mes "please rename your pet ~";
        close;
     
     
     
     
    OnInit:
     
     
        .min_level = 2; // minimum level 80 to change pet egg
        .pet_min_friendly = getbattleflag("pet_support_min_friendly");
    //    setarray getd( ".petr"+ <require pet egg> ), <require itemID 1>, <require item require 1>, <require itemID 2>, <require item require 2>, ...
        setarray getd( ".petr"+ 3317 ), 7224,1; // custom pet
        setarray getd( ".petr"+ 3318 ), 7224,1; // custom pet
     
    //    setarray getd( ".pet"+ <require pet egg> ), <random pet egg 1>, <random pet egg 2> ....
         setarray getd( ".pet"+ 3317 ), 3332; // ??? Angel 1
    	 setarray getd( ".pet"+ 3318 ), 3330; // ??? Angel 1
        // add more as needed
     
    waitingroom "Pet Evolution" , 0;
     
    end;
    }
    
  12. Helly "MUCHAS GRACIAS" solucione el tema de los errores tenias razon  haora a buscar alguna id libre 

     

    /no1

     Hola :) que bueno que te sirviera, mira si quieres tener ID libres o tus propias ID para asi estar mas organizado te vas a tu src.: src/map/npc.h

     

    buscas esta línea:

     

     // Old NPC range
    #define MAX_NPC_CLASS 1000
    // New NPC range
    ​#define MAX_NPC_CLAS2_START 10000
    #define MAX_NPC_CLASS2_END 10203 // <-- Sustituye este numero por uno mas alto yo personalmente lo tengo en 11000

     

    ​Guardas y compilas

×
×
  • Create New...