Jump to content

awesomazingxed

Members
  • Posts

    95
  • Joined

  • Last visited

Posts posted by awesomazingxed

  1. Halo rathena. I just to ask how can i change the duration of changing gender in this In-game Control Panel. 

    I want to make the duration for 1 hour.  

    //===== eAthena Script =======================================
    //= User Account Editor
    //===== By ===================================================
    //= llchrisll
    //===== Version ==============================================
    //= 1.0 - Script Made
    //		- Added Reset Equip
    //		- Added Change Slot
    //		- Fixed Change Slot Bug
    //        Changed from Menu > input
    //= 1.1 - Fixxed minor Bugs
    //= 1.2 - Fixxed small bug, Showing Online Player was bugged
    //		- Also reversed order of menu outputs (was pissing me off q.q)
    //===== Compatible With ======================================
    //= Every eAthena Version
    //===== Description ==========================================
    //= This Script allows Player's editing their Account in-Game
    //  like an Control Panel.
    //= For GM's over Level 40:
    //- View Server Statistic
    //- View your own Account - Same as Player
    //- View other Char's Account Details by typing
    //  the name of an character bounded to it; such us E-Mail, IP,
    //  for GM's with Level 80 and higher Username and Account ID as well
    //===== Comments =============================================
    //= .@max_ch: Max Characters per Account, please
    //  put the number you have or the Slot Change Part
    //  won't work like it should.
    //  For Renewal Servers : src/common/mmo.h > #define MAX_CHARS
    //  Don't know for older servers anymore though.
    //============================================================
    turbo_room,67,82,5	script	IG Control Panel	715,{
    set .@max_ch,22; // Max Characters per Account
    set .@n$,"^55AA88[Control Panel]^000000";
    
    
    mes .@n$;
    mes "Hello, " + strcharinfo(0);
    mes "I can tell you your Account";
    mes "Settings, as well I can";
    mes "change them for you.";
    mes "What do you like to do?";
    next;
    if(getgmlevel() >= 99) goto GM_Menu;
    menu "- Show my Info",CP_My,"- Nothing",CP_Quit;
    close;
    
    //================== GM_Menu ==================
    GM_Menu:
    if(select("- View Players Account's:- View my Account:- View Server Statistic") == 1) {
    
    //===================== View other Player's Account =====================		
    	mes .@n$;
    	mes "Please type the character";
    	mes "name you want and I'll find the";
    	mes "Account bounded to it.";
    	input @s_char$;
    	next;
    	mes .@n$;
    	if(@s_char$ == "") { mes "Character Name is invalid."; close;}
    	query_sql "SELECT `account_id` FROM `char` WHERE `name` = '"+@s_char$+"'",@s_accid;
    	if(!@s_accid) { mes "Character Name is invalid."; close;}
    	query_sql "SELECT `userid` , `sex` , `email` , `logincount` , `last_ip` FROM `login` WHERE `account_id` = '"+@s_accid+"'",@user$,@sex$,@email$,@login,@last_ip$;
    	if(getgmlevel() >= 80) {
    		mes "Username: " + @user$;
    		mes "Account ID: " + @s_accid;
    	}
    	mes "Gender: " + @sex$;
    	mes "E-Mail: " + @email$;
    	mes "Login Count: " + @login;
    	mes "Last IP: " + @last_ip$;
    	mes " ";
    	mes "Due user protection";
    	mes ((getgmlevel() >= 80) ? "the Password" : "the Username, Account ID and Password");
    	mes "won't be shown.";
    	close;
    //===================================================
    	
    //================= View my Account =============
    } else if(@menu == 2) {
    	CP_My:
    	query_sql "SELECT `userid` , `sex` , `email` , `logincount` , `last_ip` FROM `login` WHERE `account_id` = '"+getcharid(3)+"'",@user$,@sex$,@email$,@login,@last_ip$;
    	mes .@n$;
    	mes "Username: " + @user$;
    	mes "Account ID: " + getcharid(3);
    	mes "Gender: " + @sex$;
    	mes "E-Mail: " + @email$;
    	mes "Login Count: " + @login;
    	mes "Your IP: " + @last_ip$;
    	mes " ";
    	mes "Duo user protection";
    	mes "the password won't be shown.";
    	mes "What now?";
    	next;
    	switch(select("- View Char's:- Edit E-Mail:- Edit Gender:- Nothing")) {
    		
    //============== View Char's ============
    		case 1:
    		mes .@n$;
    		mes "Choose a character, if you";
    		mes "want to change something.";
    		query_sql "SELECT `char_num` , `name` , `class` , `base_level` , `job_level` , `zeny` , `str` , `agi` , `vit` , `int` , `dex` , `luk` , `last_map` , `last_x` , `last_y` , `save_map` , `save_x` , `save_y` FROM `char` WHERE `account_id` = '"+getcharid(3)+"' ORDER BY `base_level` DESC",@char_num,@name$,@class,@base_level,@job_level,@zeny,@str,@agi,@int,@vit,@dex,@luk,@last_map$,@last_x,@last_y,@save_map$,@save_x,@save_y;
    		set @menu$,"";
    		mes " ";
    		set @menu$,"- " + @name$[0] + "";
    		mes "^FF0000~ "+@name$[0]+" ~^000000";
    		mes "---------------------";
    		mes "[Base/Job: " + @base_level[0] + "/" + @job_level[0] + "]";
    		mes "(Class: " + jobname(@class[0]) + ")";
    		mes "=====================";
    		for( set @a,1; @a < getarraysize(@name$); set @a,@a + 1) {
    			mes "^FF0000~ "+@name$[@a]+" ~^000000";
    			mes "---------------------";
    			mes "[Base/Job: " + @base_level[@a] + "/" + @job_level[@a] + "]";
    			mes "(Class: " + jobname(@class[@a]) + ")";
    			mes "=====================";
    			set @menu$,@menu$ + ":- " + @name$[@a] + "";
    		}
    		next;
    			
    		if((prompt(@menu$) - getarraysize(@name$)) > 0) {
    			close;
    			
    		} else {
    			set @m,@menu - 1;
    			
    			mes .@n$;
    			mes "You have chosen:";
    			mes "^FF0000~ "+@name$[@m]+" ~^000000";
    			mes "Base/Job: " + @base_level[@m] + "/" + @job_level[@m];
    			mes "Class: " + jobname(@class[@m]);
    			mes "Zeny: " + @zeny[@m];
    			mes " ";
    			mes "Strenght: " + @str[@m];
    			mes "Agility: " + @agi[@m];
    			mes "Vitality: " + @vit[@m];
    			mes "Intelligence: " + @int[@m];
    			mes "Dexterity: " + @dex[@m];
    			mes "Luck: " + @luk[@m];
    			mes " ";
    			mes "Position:";
    			mes "Current Map: " + @last_map$[@m];
    			mes "Cooardinates x: " + @last_x[@m] + ", y: " + @last_y[@m];
    			mes " ";
    			mes "Savepoint:";
    			mes "Map: "+ @save_map$[@m] + " x: " + @save_x[@m] + ", y: " + @save_y[@m];
    			mes "What do you want to do?";
    			next;
    			switch(select("- Reset Position:- Reset Style:- Change Slot:- Reset Equip:- Nothing")) {
    			
    //=============================== Reset Position ============================
    				case 1:
    				mes .@n$;
    				query_sql "SELECT `online` FROM `char` WHERE `name` = '"+escape_sql(@name$[@m])+"'",@online;
    				if(@online) {
    					mes "I'm sorry, but I can't reset the";
    					mes "position of the chosen character";
    					mes "while you are logged-in on it.";
    					close;
    					}
    				mes "I will reset the position now.";
    				query_sql "UPDATE `char` SET `last_map` =  '"+@save_map$[@m]+"' , `last_x` = '"+@save_x[@m]+"' , `last_y` = '"+@save_y[@m]+"' WHERE `name` = '"+escape_sql(@name$[@m])+"'";
    				close;
    				
    //=============================== Reset Style ============================					
    				case 2:
    				mes .@n$;
    				mes "This will reset your";
    				mes "whole style.";
    				next;
    				if(select("- Proceed:- Stop!!") - 1) {
    					mes .@n$;
    					mes "As you wish.";
    					mes "Your request has been canceled.";
    					close;
    				} else {
    					mes .@n$;
    					query_sql "SELECT `online` FROM `char` WHERE `name` = '"+escape_sql(@name$[@m])+"'",@online;
    					if(@online) {
    						mes "I'm sorry, but I can't reset the";
    						mes "style of the chosen character";
    						mes "while you are logged-in on it.";
    						close;
    					}
    					query_sql "UPDATE `char` SET `hair` = '0' , `hair_color` = '0' , `clothes_color` = '0' WHERE `name` = '"+escape_sql(@name$[@m])+"'";
    					mes "Your request has been completed.";
    					close;
    				}
    				
    //=============================== Change Character Slot ============================					
    				case 3:
    				set @menu_c$,"";
    				mes .@n$;
    				mes "The slots, which are used:";
    				mes " ";
    				for( set @num,0; @num < getarraysize(@char_num); set @num,@num + 1) {
    					mes @char_num[@num] + ". " + @name$[@num];
    				}
    				mes " ";
    				mes "Into which Slot do you want to change?";
    				next;
    				input @num_ch;
    				
    				mes .@n$;
    				if(@num_ch > .@max_ch) {
    					mes "I'm sorry, but you";
    					mes "have put an invalid";
    					mes "number. Try again please.";
    					close;
    				}
    				mes "You have chosen:";
    				mes @num_ch + ".";
    				mes " ";
    				mes "I will change the slot now.";
    				mes "Is that correct?";
    				if(select("- Yes, continue:- No, wrong") - 1) {
    					close;
    				} else {
    					next;
    					mes .@n$;
    					query_sql "SELECT `online` FROM `char` WHERE `name` = '"+escape_sql(@name$[@m])+"'",@online;
    					if(@online) {
    						mes "I'm sorry, but I can't change the";
    						mes "Slot of the chosen character";
    						mes "while you are logged-in on it.";
    						close;
    					}
    					for(set @n_ct,0; @n_ct < getarraysize(@char_num); set @n_ct,@n_ct + 1) {
    						if(@char_num[@n_ct] == @num_ch) {
    							mes "I'm sorry, but this";
    							mes "Slot is in use already.";
    							mes "Try again please.";
    							close;
    						}
    					}
    					query_sql "UPDATE `char` SET `char_num` = '"+@num_ch+"' WHERE `name` = '"+escape_sql(@name$[@m])+"'";
    					mes "Your request has been completed.";
    					close;
    				}
    //================================ Reset Equip ===============================
    				case 4:
    				mes .@n$;
    				mes "Wanna reset your Equip?";
    				if(select("- Yes, please:- No, thanks") - 1) {
    					close;
    				} else {
    					next;
    					mes .@n$;
    					query_sql "SELECT `online` FROM `char` WHERE `name` = '"+@name$[@m]+"'",@online;
    					if(@online) {
    						mes "I'm sorry, but I can't reset";
    						mes "your equipment of this character";
    						mes "while you are logged-in on it.";
    						close;
    					}
    					mes "I will start now.";
    					query_sql "UPDATE `inventory` SET `equip` = '0' WHERE `char_id` = '"+getcharid(0,escape_sql(@name$[@m]))+"'";
    					query_sql "UPDATE `char` SET `weapon` = '0' , `shield` = '0' , `head_top` = '0' , `head_mid` = '0' , `head_bottom`  = '0' WHERE `name` = '"+escape_sql(@name$[@m])+"'";
    					next;
    					mes .@n$;
    					mes "Your request has been completed.";
    					close;
    				}
    //===================== Nothing =====================					
    				case 5:
    				goto CP_Quit;
    				break;
    			} // Edit Char - End
    
    		} // Choose Char - End 
    //============== Edit Mail ============			
    		case 2:
    		mes .@n$;
    		mes "Now input the new E-Mail";
    		mes "Address:";
    		mes "Note: Type 'Cancel' for";
    		mes "aborting your attempt.";
    		next;
    		input @mail_n$;
    		if(@mail_n$ == "Cancel") goto CP_Quit;
    		mes .@n$;
    		mes "Old E-Mail:" +@email$;
    		mes "New E-Mail:" +@mail_n$;
    		mes " ";
    		mes "Is that correct?";
    		next;
    		if(select("- Yes, proceed please:- No, cancel it") - 1) {
    			mes .@n$;
    			mes "As you wish.";
    			mes "Your request has been canceled.";
    			close;
    		} else {
    			mes .@n$;
    			mes "You're E-Mail will be changed now.";
    			next;
    			query_sql "UPDATE `login` SET `email` = '"+escape_sql(@mail_n$)+"' WHERE `account_id` = '"+getcharid(3)+"'";
    			mes .@n$;
    			mes "Your request has been completed.";
    			close;
    		}
    //============== Edit Gender - 1 Month delay ============			
    		case 3:
    		mes .@n$;
    		if(gettimetick(2) < #sexch) {
    			mes "You can't change your";
    			mes "gender again. The time left:";
    			mes #sexch - gettimetick(2) + " Seconds.";
    			close;
    		}
    		mes "Note: Delay between changing your";
    		mes "gender again is one month.";
    		mes "Wanna still change it?";
    		next;
    		if(select("- Yes, proceed please:- No, cancel it") - 1) {
    			mes .@n$;
    			mes "As you wish.";
    			mes "Your request has been canceled.";
    			close;
    		} else {
    			mes .@n$;
    			mes "You're gender will be changed now,";
    			mes "you'll be kicked afterwards.";
    			next;
    			mes .@n$;
    			mes "Your request has been completed.";
    			close2;
    			set #sexch,gettimetick(2) + 1000;
    			changesex;
    			end;
    		}
    //===================== Nothing =====================			
    		case 4:
    		goto CP_Quit;
    		break;
    	}
    	
    } else if(@menu == 3) {
    //=============== Server Statistic ===================
    
    	query_sql "SELECT count(*) FROM `login` WHERE `account_id` > 1",.@count_acc;
    	query_sql "SELECT count(*) FROM `char`",.@count_char;
    	query_sql "SELECT `zeny` FROM `char` WHERE `zeny` > 0",.@count_zeny;
    	for( set .@z,0; .@z < getarraysize(.@count_zeny); set .@z,.@z + 1) 
    		set .@total_zeny,.@total_zeny + .@count_zeny[.@z];
    		
    	next;
    	mes .@n$;
    	mes "Total Accounts: " + .@count_acc;
    	mes "Total Characters: " + .@count_char;
    	mes "Total Zeny: " + .@total_zeny;
    	next;
    	menu "Show Online Players",-,"Nothing",CP_Quit;
    		mes .@n$;
    		mes "I will now show the list of the";
    		mes "Online Players	in your Chat Box.";
    		close2;
    		dispbottom "======~-[)* Online <†> Players *(]~-========";
    		query_sql "SELECT `name` , `class` , `base_level` , `job_level` FROM `char` WHERE `online` = '1'",.@name$,.@class,.@b_level,.@j_level;
    		for( set .@a,0; .@a < getarraysize(.@name$); set .@a,.@a + 1) 
    			dispbottom .@name$[.@a] + " [Base/Job: " + .@b_level[.@a] + "/" + .@j_level[.@a] + "] (Class: " + jobname(.@class[.@a]) + ")";
    			
    		end;
    }
    //=================== Quit Message ==================
    CP_Quit:
    mes .@n$;
    mes "Farewell, " + strcharinfo(0);
    close;
    
    //============== End of Script ===================
    }
    
  2.  

     

    Thank you Skorm. It works, but can you make it works only in a specific map? Is it possible? Coz players can get skulls whenever they're dueling. (@duel)

    Thanks in advance. 

     

    -	script	item_get	-1,{ OnPCKillEvent: if(getmapflag(strcharinfo(3),mf_pvp)) getitem 501, 10; }
    

     

    It works! Thanks a lot Skorm!  /no1

  3. Hello everyone, can someone help me with this script. 

    Everytime I use @reward command, it keeps saying "player is not online" eventhough they're online and the name is correct. Thanks in advance. Ciao. 

    
    
    -	script	reward	-1,{
    
    	OnInit:
    		// Configuration
    		bindatcmd "reward", strnpcinfo(3) +"::OnAtcommand", 40, 40;
    	
    		// Enable preset items? 1 = yes, 0 = no
    		.preset = 1;
    		
    		// Announce reward? 1 = yes, 0 = no
    		.announce = 1;
    		
    		// Log reward? 1 = yes, 0 = no
    		.log = 1;
    		
    		// Define preset item IDs and amounts
    		setarray .preset_id[0],
    			7720, 1,	// 1: Gold Coin
    			7307, 50;	// 2: Spiritual Whispers
    			
    		end;
    		
    	
    	OnAtcommand:
    		// Reward with preset items (syntax: @reward <preset> <player name>)
    		if (.preset) {
    			// Check if preset is defined
    			if (!atoi(.@atcmd_parameters$[0]) || (atoi(.@atcmd_parameters$[0]) - 1) * 2 > .@atcmd_numparameters) {
    				message strcharinfo(0), "Invalid preset defined.";
    				
    				// List presets
    				for (.@i = 0; .@i < getarraysize(.preset_id); .@i += 2) {
    					message strcharinfo(0), (.@i / 2 + 1) +": "+ .preset_id[.@i + 1] +" "+ getitemname(.preset_id[.@i]);
    				}
    				
    				message strcharinfo(0), .@atcmd_command$ +" failed.";
    				end;
    			}
    			
    			// Select preset item ID and amount
    			.@item_id = .preset_id[(atoi(.@atcmd_parameters$[0]) - 1) * 2];
    			.@amount = .preset_id[(atoi(.@atcmd_parameters$[0]) - 1) * 2 + 1];
    			
    		// Reward with user-defined items (syntax: @reward <item id> <amount> <player name>
    		} else {
    			// Define item ID and amount
    			.@item_id = atoi(.@atcmd_parameters$[0]);
    			.@amount = atoi(.@atcmd_parameters$[1]);
    		}
    		
    		// Check for proper input
    		if (.@atcmd_numparameters < (.preset ? 2 : 3)) {
    			message strcharinfo(0), "Invalid syntax (usage: "+ .@atcmd_command$ +" "+ (.preset ? "<preset>" : "<item id> <amount>") +" <player name>).";
    			message strcharinfo(0), .@atcmd_command$ +" failed.";
    			end;
    		}
    	
    		// Determine target player name
    		for (.@i = (.preset ? 1 : 2); .@i < .@atcmd_numparameters; .@i++) {
    			.@player_name_tmp$[.@j++] = .@atcmd_parameters$[.@i];
    		}
    	
    		// Define target player name
    		.@player_name$ = implode(.@player_name_tmp$, " ");
    		
    		// Check if target player is online
    		if (!getcharid(3, .@player_name$)) {
    			message strcharinfo(0), "The player '"+ .@player_name$ +"' is not online or does not exist.";
    			message strcharinfo(0), .@atcmd_command$ +" failed.";
    			
    		// Reward target player
    		} else {
    			getitem .@item_id, .@amount, getcharid(3, .@player_name$);
    			
    			// Announce reward
    			if (.announce) {
    				announce strcharinfo(0) +" has rewarded '"+ .@player_name$ +"' with "+ .@amount +" "+ getitemname(.@item_id) +".", bc_all;
    			}
    			
    			// Log reward
    			if (.log) {
    				query_logsql
    				"INSERT INTO `rewardlog` VALUES (NULL, '"+ getcharid(3) +"', '"+ escape_sql(strcharinfo(0)) +"', '"+ .@amount +"', '"+ .@item_id +"', "+
    				"'"+ escape_sql(getitemname(.@item_id)) +"', '"+ getcharid(0, .@player_name$) +"', '"+ escape_sql(.@player_name$) +"', NOW())";
    				
    				message strcharinfo(0), "Reward has been logged.";
    			}
    		}
    		
    		end;
    
    }
    
    
  4. Hello everyone, i just found a bug in this script.

    Everytime I create or add a vote poll it keeps saying "vote exceeded"

    Thank you so much.

    //===== eAthena Script =======================================
    //= Vote NPC
    //===== By ===================================================
    //= llchrisll
    //===== Version ==============================================
    //= 1.0 - Script Made
    //= 1.1 - Added missing check for Vote Limit
    //===== Compatible With ======================================
    //= Every eAthena Version
    //===== Description ==========================================
    //= This script can create/delete/reset votes.
    //  Config has been made as dynamically as possible.
    //	Delay, Max Answers, Max Votes at once, Max letters per Vote,
    //	Max letters per Answers can be set too.
    //	See 'OnInit'.
    //===== Comments =============================================
    //= Request (http://rathena.org/board/topic/57438-request-vote-npc/'>http://rathena.org/board/topic/57438-request-vote-npc/)
    //	by PapaZola (http://rathena.org/board/user/682-papazola/'>http://rathena.org/board/user/682-papazola/)
    //	in the rAthena Board (http://rathena.org/board)
    //============================================================
    turbo_room,104,121,4	script	Vote Poll NPC	858,{
    
    mes .n$;
    mes "Hello, "+strcharinfo(0)+".";
    if(getgmlevel() < .gm) {
    	DoVote:
    	if(getarraysize($vote_q$) < 1) {
    		mes "I'm sorry, there is no vote yet.";
    		close;
    	}
    	if(gettimetick(2) < #vote_del) {
    		mes "You can't vote again, please wait the delay is over.";
    		close;
    		
    	} else if(.vote_limit == 1 && #vote_l == 1) {
    		mes "I'm sorry, but you voted already.";
    		close;
    	}
    	mes "Please select which vote you want to participate in:";
    	mes "^FF0000Note: Vote Delay " + ( (.vote_delay/60 >= 60)?.vote_delay/3600+" hours.":.vote_delay/60+" minutes");
    	mes ( (.vote_limit == 1)?"You can only vote once per vote.^000000":"You can vote more than once after the delay has passed.^000000");
    	set @v_menu$,"";
    	for ( set .@l,0; .@l < getarraysize($vote_q$); set .@l,.@l + 1)
    		set @v_menu$,@v_menu$ + "- "+$vote_q$[.@l] + ( ($vote_q$[.@l+1] != "")?":":"");
    		
    	next;
    	set .@v,select(@v_menu$) - 1;
    	
    	mes .n$;
    	set @a_menu$,"";
    	for ( set .@a,1; .@a < getd("$vote_q"+.@v+"_at"); set .@a,.@a + 1) 
    		set @a_menu$,@a_menu$ + "- "+getd("$vote_q"+.@v+"_a"+.@a+"$") + ( (getd("$vote_q"+.@v+"_a"+(.@a+1)+"$") != "")?":":"");
    	
    	mes $vote_q$[.@v];
    	next;
    	set .@a,select(@a_menu$);
    	mes .n$;
    	mes "Thank you for participating in this vote.";
    	mes "I appreciate it.";
    	setd("$vote_q"+.@d+"_v"+.@a),getd("$vote_q"+.@d+"_v"+.@a) + 1;
    	if(.vote_limit == 0) 
    		set #vote_del,gettimetick(2) + .vote_delay;
    	else
    		set #vote_l,1;
    	close;
    	
    } else {
    	mes "How may I help you today?";
    	mes " ";
    	if(getarraysize($vote_q$) < 1) mes "Currently there are no Votes running.";
    	else {
    		mes "Currently there are the following Votes running:";
    		mes "====================";
    		for ( set .@q,0; .@q < getarraysize($vote_q$); set .@q,.@q + 1) {
    			mes (.@q + 1) + ". "+$vote_q$[.@q];
    			mes ( ($vote_q$[.@q+1] != "")?"---------------------":"====================");
    		}
    	}
    	next;
    	switch(select("- View Vote Results:- Add Vote:- Delete Vote:- Reset Vote:- Delete All Votes:- Vote:- Nevermind")) {
    	
    		case 1:
    		mes .n$;
    		mes "Here are the current Vote Results!";
    		next;
    		mes "====================";
    		for(set .@d,0; .@d < getarraysize($vote_q$); set .@d,.@d + 1) {
    			mes $vote_q$[.@d]+":";
    			set .@a,1;
    			while( .@a < getd("$vote_q"+.@d+"_at")) {
    				mes getd("$vote_q"+.@d+"_a"+.@a+"$")+": "+getd("$vote_q"+.@d+"_v"+.@a);
    				set .@a,.@a + 1;
    			}
    			mes ( ($vote_q$[.@d+1] != "")?"---------------------":"====================");
    		}
    		close;
    	
    		case 2:
    		mes .n$;
    		if(getarraysize($vote_q$) == .votes) {
    			mes "I'm sorry, but the maxium of votes you can create has been reached.";
    			mes "Please delete one first before creating a new one.";
    			close;
    		}
    		mes "Please state the question for the Vote please.";
    		mes "Maximum is "+.vote_q_max+" letters.";
    		next;
    		if(input(.@v_name$,1,.vote_q_max) != 0) {
    			mes .n$;
    			mes "The question you have put is too long.";
    			mes "Please choose a shorter one.";
    			close;
    		}
    
    		set @a,1;
    		while( @a <= .vote_a) {
    			mes .n$;
    			mes "Possible Answer #"+@a+"/"+.vote_a+":";
    			mes "Maximum "+.vote_a_max+" letters.";
    			next;
    			if(input(getd(".@v_a"+@a+"$"),1,.vote_a_max) != 0) {
    				mes .n$;
    				mes "Error: Maximum "+.vote_a_max+" letters.";
    				next;
    				continue;
    			}
    			if(getd(".@v_a"+@a+"$") != "") {
    				setd("$vote_q"+getarraysize($vote_q$)+"_a"+@a+"$"),getd(".@v_a"+@a+"$");
    				set @a,@a + 1;
    			}
    		}
    		setd("$vote_q"+getarraysize($vote_q$)+"_at"),@a; // Total Answers of the vote
    		setarray $vote_q$[getarraysize($vote_q$)],.@v_name$;
    		mes .n$;
    		mes "New Vote, "+.@v_name$+", has been created.";
    		close;
    		
    		case 3:
    		mes .n$;
    		mes "Please select which vote you want to delete:";
    		set @v_menu$,"";
    		for ( set .@l,0; .@l < getarraysize($vote_q$); set .@l,.@l + 1)
    			set @v_menu$,@v_menu$ + "- "+$vote_q$[.@l] + ( ($vote_q$[.@l+1] != "")?":":"");
    			
    		next;
    		set .@v,select(@v_menu$) - 1;
    		
    		mes .n$;
    		mes "Chosen Vote: \""+$vote_q$[.@v]+"\"";
    		mes "Correct?";
    		if(select("- Yes:- No") - 1) close;
    		next;
    		mes .n$;
    		mes "I will now delete this vote.";
    		close2;
    		set .@a,1;
    		while( .@a != getd("$vote_q"+.@v+"_at")) {
    			setd("$vote_q"+.@v+"_a"+.@a+"$"),"";
    			setd("$vote_q"+.@v+"_v"+.@a),0;
    			set .@a,.@a + 1;
    		}
    		setd("$vote_q"+.@v+"_at"),0;
    		deletearray $vote_q$[.@v],1;
    		end;
    		
    		case 4:
    		mes .n$;
    		mes "Please select which vote you want to reset:";
    		set @v_menu$,"";
    		for ( set .@l,0; .@l < getarraysize($vote_q$); set .@l,.@l + 1)
    			set @v_menu$,@v_menu$ + "- "+$vote_q$[.@l] + ( ($vote_q$[.@l+1] != "")?":":"");
    			
    		next;
    		set .@v,select(@v_menu$) - 1;
    		
    		mes .n$;
    		mes "Chosen Vote: \""+$vote_q$[.@v]+"\"";
    		mes "Correct?";
    		if(select("- Yes:- No") - 1) close;
    		next;
    		mes .n$;
    		mes "I will now reset this vote.";
    		close2;
    		set .@a,1;
    		while( .@a != getd("$vote_q"+.@v+"_at")) {
    			setd("$vote_q"+.@v+"_v"+.@a),0;
    			set .@a,.@a + 1;
    		}
    		end;
    		
    		case 5:
    		mes .n$;
    		mes "Do you really delete every vote?";
    		if(select("- Yes:- No") - 1) close;
    		for(set .@d,0; .@d < getarraysize($vote_q$); set .@d,.@d + 1) {
    			set .@a,1;
    			while( .@a != getd("$vote_q"+.@d+"_at")) {
    				setd("$vote_q"+.@d+"_a"+.@a+"$"),"";
    				setd("$vote_q"+.@d+"_v"+.@a),0;
    				set .@a,.@a + 1;
    			}
    			setd("$vote_q"+.@d+"_at"),0;
    		}
    		deletearray $vote_q$[0],128;
    		close;
    		
    		case 6:
    		mes .n$;
    		goto DoVote;
    		
    		case 7:
    		close;
    	}
    }
    
    OnInit:
    waitingroom "Voting Poll",0;
    end;
    }
    set .n$,"["+strnpcinfo(1)+"]";
    set .votes,10; // Max Votes at the same time, Maximum 128!!!
    set .vote_q_max,100; // Maxium letters for the question
    set .vote_a,2; // Max Answers possible
    set .vote_a_max,100; // Maxium letters for the answers
    set .vote_delay,86400; // Delay in seconds, default 1 day (86400 Seconds)
    set .vote_limit,1; // Each player can only once per Vote: 1 = On / 0 = Off
    set .gm,60; // GM Access Level
    end;
    }
    
    
  5. Hello everyone, can someone check this script. 

    Eventhough the woe is active, GM below level 99 can log in. 

    Anyone knows?

    
    
    -	script	KickGM#woe	-1,{
    OnPCLoginEvent:
    if( !getgmlevel() || getgmlevel() >= 99 ) end;
    if( agitcheck() || agitcheck2() ) goto OnAgitStart;
    set .GMList$[ getarraysize( .GMList$ ) ],strcharinfo(0);
    end;
    
    OnPCLogoutEvent:
    for( set .@i,0; .@i < getarraysize( .GMList$ ); set .@i,.@i + 1 )
    	if( strcharinfo(0) == .GMList$[.@i] )
    		deletearray .GMList$[.@i],1;
    end;
    
    OnAgitStart:
    for( set .@i,0; .@i < getarraysize( .GMList$ ); set .@i,.@i + 1 )
    	atcommand "@kick "+.GMList$[.@i]
    end;
    }
    
  6. Hello everyone, can someone help me with this. 

    Everytime i use this command toward players, it keeps saying "Player is not online or does not exist"

    Eventhough they're online and the name is correct. Anyone knows?

    Thanks in advance. Ciao!  /lv

    /*=========================================================
    @adjgm command
    by Missingno
    ===========================================================
    Idea: http://goo.gl/8mcFke
    ===========================================================
    Description:
    Permanently adjusts a target player's GM group via 
    atcommand.
    ===========================================================
    Compatibility:
    Optimised for rAthena emulators.
    ===========================================================
    Changelog:
    v1.0 - First version.
    =========================================================*/
    
    -	script	adjgm	-1,{
    
    	OnInit:
    		bindatcmd "adjgm", strnpcinfo(0) +"::OnAtcommand", 99, 99;
    		end;
    		
    		
    	OnAtcommand:
    		// Check for proper input
    		if (.@atcmd_numparameters < 2) {
    			message strcharinfo(0), "Invalid syntax (usage: "+ .@atcmd_command$ +" <group id> <player name>).";
    			message strcharinfo(0), .@atcmd_command$ +" failed.";
    			end;
    		}
    		
    		// Define target group ID
    		.@group_id = atoi(.@atcmd_parameters$[0]);
    		
    		// Determine target player name
    		for (.@i = 1; .@i < .@atcmd_numparameters; .@i++) {
    			.@player_name_tmp$[.@j++] = .@atcmd_parameters$[.@i];
    		}
    		
    		// Define target player name
    		.@player_name$ = implode(.@player_name_tmp$, " ");
    		
    		// Check if target player is online
    		if (!getcharid(3, .@player_name$)) {
    			message strcharinfo(0), "'"+ .@player_name$ +"' is not online or does not exist.";
    			message strcharinfo(0), .@atcmd_command$ +" failed.";
    			
    		// Adjust target player group
    		} else {
    			charcommand "#adjgroup "+ .@player_name$ +" "+ .@group_id;
    			query_sql "UPDATE `login` SET `group_id` = '"+ .@group_id +"' WHERE `account_id` = '"+ getcharid(3, .@player_name$) +"'";
    			message strcharinfo(0), "'"+ .@player_name$ +"' was moved to group "+ .@group_id +".";
    		}
    		
    		end;
    
    }
    
  7.  

    Nothing happens whenever i'm using @hold commands.  /pat

     

    Maybe like this?

     

    -	script	hold	-1,{
    
    	OnInit:
    		bindatcmd("hold", strnpcinfo(3)+"::OnHold");
    		end;
    
    	OnHold:
    		if ( !@Hold ) {
    			set @Hold, 1;
    			message strcharinfo(0), "Hold mode is ON.";
    			pcblockmove getcharid(3), 1;
    		} else {
    			set @Hold, 0;
    			message strcharinfo(0), "Hold mode is OFF.";
    			pcblockmove getcharid(3), 0;
    		}
    
    }
    

     

    Works like a gem. Thank you Skorm!  /no1

  8.  

     use @refresh  /ok  make @refresh all 5 sec

    -	script	Hold	-1,{
    	
    	
    OnInit:
    while(1) {
    bindatcmd("hold", strnpcinfo(3) +"::OnAFK");
    end;
    
    OnAFK:
    if (@Hold) {
    set @Hold, 0;
    dispbottom "Hold mode is OFF.";
    end;
    } else {
    set @Hold, 1;
    new:
    if(@Hold==1)
    atcommand "@refresh";
    sleep2 5000;
    goto new;
    }
    }
    }
    

     

    Nothing happens whenever i'm using @hold commands.  /pat

  9. Hello everyone, can i request an @hold command. it has a function that the players CAN'T walk, but can cast skills and attack. This one is useful during GVG to avoid slide due to lag spikes. Thank you in advance. Ciao

  10. Hello everyone, this is Euphy's @autopots. This one is working! Is it possible for me to request an autopots using SP pots? For example, a player's SP is 50%, it will autopots his/her SP to 75%. Something like that. 

    //===== rAthena Script =======================================
    //= Auto-Potion
    //===== By: ==================================================
    //= Euphy
    //===== Current Version: =====================================
    //= 1.0
    //===== Compatible With: =====================================
    //= rAthena Project
    //===== Description: =========================================
    //= Provides an @autopot command to automatically use potions
    //= when hit (i.e. 'autobonus2').
    //===== Additional Comments: =================================
    //= 1.0 First version. [Euphy]
    //============================================================
    
    -	script	#autopot	-1,{
    OnInit:
    	bindatcmd("autopot",strnpcinfo(0)+"::OnCommand");
    	end;
    
    L_Help:
    	dispbottom "Available commands:";
    	dispbottom "    @autopot <item id> {<min hp % [1..100]> {<delay [50..1000]>}}";
    	dispbottom "    @autopot <on|off>";
    	dispbottom "    @autopot list";
    	dispbottom "    @autopot info";
    	dispbottom "    @autopot help";
    	return;
    
    L_Info:
    	dispbottom "------ Auto-Potion Information ------";
    	dispbottom "POTION:  " + getitemname(@autopot_id) + " (" + @autopot_id + ")";
    	dispbottom "MIN HP:   " + @autopot_min + " %";
    	dispbottom "DELAY:    " + @autopot_delay + " ms";
    	dispbottom "---------------------------------------------";
    	return;
    
    L_Start:
    	.@potion = getarg(0);
    	.@min    = getarg(1);
    	.@delay  = getarg(2);
    	if (.@min   < 1  || .@min   > 100)  .@min   = 90;
    	if (.@delay < 50 || .@delay > 1000) .@delay = 50;  // lower values will increase server strain
    	switch (.@potion) {
    		case 501:
    		case 507:
    		case 545:
    		case 569: .@effect = EF_POTION1; break;
    		case 502: .@effect = EF_POTION2; break;
    		case 503:
    		case 508:
    		case 546:
    		case 579:
    		case 11500: .@effect = EF_POTION3; break;
    		case 504:
    		case 509:
    		case 547:
    		case 11501:
    		case 11503:
    		case 11548: .@effect = EF_POTION4; break;
    		case 512:
    		case 513:
    		case 515:
    		case 516:
    		case 548:
    		case 549:
    		case 550:
    		case 582:
    		case 607: .@effect = EF_POTION7; break;
    		default: .@effect = EF_EXIT; break;
    	}
    
    	if (BaseLevel < getiteminfo(.@potion,12)) {
    		message strcharinfo(0), "Your base level is too low to use '" + getitemname(.@potion) + "'.";
    		end;
    	}
    
    	@autopot_id    = .@potion;
    	@autopot_min   = .@min;
    	@autopot_delay = .@delay;
    	@autopot_eff   = .@effect;
    	@autopot_none  = 0;
    	bonus_script "{ callfunc \"start_autopot\"; }",86400,8,0,SI_INCHEALRATE;
    
    	message strcharinfo(0), "Auto-Potion started.";
    	callsub L_Info;
    	return;
    
    OnCommand:
    	if (!getarraysize(.@atcmd_parameters$)) {
    		message strcharinfo(0), "Invalid syntax.";
    		callsub L_Help;
    		end;
    	}
    
    	.@command$ = strtolower(.@atcmd_parameters$[0]);
    
    	if (.@command$ == "on") {
    		if (@autopot_min)
    			message strcharinfo(0), "Auto-Potion is already on.";
    		else if (@autopot_min_) {
    			@autopot_min  = @autopot_min_;
    			@autopot_min_ = 0;
    			message strcharinfo(0), "Auto-Potion enabled.";
    			callsub L_Info;
    		} else {
    			message strcharinfo(0), "Auto-Potion has not been set.";
    			callsub L_Help;
    		}
    		end;
    	} else if (.@command$ == "off") {
    		if (!@autopot_min)
    			message strcharinfo(0), "Auto-Potion is already off.";
    		else {
    			@autopot_min_ = @autopot_min;
    			@autopot_min  = 0;
    			message strcharinfo(0), "Auto-Potion disabled.";
    		}
    		end;
    	} else if (.@command$ == "list") {  // credits to AnnieRuru
    		getinventorylist;
    		for (; .@i < @inventorylist_count; .@i++) {
    			if (getiteminfo(@inventorylist_id[.@i],2) == IT_HEALING) {
    				.@items[.@count] = @inventorylist_id[.@i];
    				.@menu$ = .@menu$ + sprintf("~ ^0055FF%s^000000 (%dx):", getitemname(@inventorylist_id[.@i]), countitem(@inventorylist_id[.@i]));
    				.@count++;
    			}
    		}
    		if (.@count) {	// 'mes' window needed if player is hit during selection
    			mes "[ Auto-Potion ]";
    			mes "Select a healing item.";
    			.@select = select(.@menu$ + "   ^777777Cancel^000000") - 1;
    			if (.@select != .@count)
    				callsub L_Start, .@items[.@select], 0, 0;
    			close2;
    		} else
    			message strcharinfo(0), "There are no healing items in your inventory.";
    		end;
    	} else if (.@command$ == "info") {
    		if (@autopot_min) {
    			message strcharinfo(0), "Auto-Potion information is displayed below.";
    			callsub L_Info;
    		} else
    			message strcharinfo(0), "Auto-Potion is not enabled.";
    		end;
    	} else if (.@command$ == "help") {
    		message strcharinfo(0), "List of commands is displayed below.";
    		callsub L_Help;
    		end;
    	} else {
    		.@potion = atoi(.@atcmd_parameters$[0]);
    		if (getiteminfo(.@potion,2) != IT_HEALING) {
    			message strcharinfo(0), getitemname(.@potion) + " is not a healing item.";
    			end;
    		}
    		callsub L_Start, .@potion, atoi(.@atcmd_parameters$[1]), atoi(.@atcmd_parameters$[2]);
    		end;
    	}
    }
    
    function	script	start_autopot	{
    	if (@autopot_active) end;
    	@autopot_active = 1;
    	while (Hp && Hp * 100 / MaxHp < @autopot_min) {
    		if (!countitem(@autopot_id)) {
    			if (@autopot_none <= gettimetick(2)) {
    				@autopot_none = gettimetick(2) + 10;
    				dispbottom "There are no '" + getitemname(@autopot_id) + "' in your inventory.";
    			}
    			break;
    		}
    		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))
    			break;
    		if (getstatus(SC_STONE) || getstatus(SC_FREEZE) || getstatus(SC_STUN) || getstatus(SC_SLEEP))
    			;
    		else {
    			delitem @autopot_id,1;
    			consumeitem @autopot_id;
    			specialeffect2 @autopot_eff;
    		}
    		sleep2 @autopot_delay;
    	}
    	@autopot_active = 0;
    	autobonus2 "{}",10000,1,BF_WEAPON|BF_MAGIC;
    	end;
    }
    
  11.  

    I didn't test this and I'm not sure but you can give it a try

    //===== rAthena Script ======================================= 
    //= Armor Enchanter
    //===== By: ================================================== 
    //= L0ne_W0lf
    //===== Current Version: ===================================== 
    //= 1.3a
    //===== Compatible With: ===================================== 
    //= rAthena Project
    //===== Description: ========================================= 
    //= [Official Conversion]
    //= Add a +1, +2, or +3 random stat to a specified armor.
    //===== Additional Comments: ================================= 
    //= 1.0 First version.
    //= 1.1 Corrected typo (Sit -> Suit) (bugreport:4586)
    //= 1.2 Optimized. [Euphy]
    //= 1.3 Fixed some typos and optimized a little more. [Daegaladh]
    //= 1.3a Added 'disable_items' command. [Euphy]
    //============================================================ 
    
    turbo_room,73,79,5	script	Armor Enchanter	73,{
    	disable_items;
    	mes "[Apprentice Craftsman]";
    	if (Zeny >= 1) {
    		mes "I've been studying ways to enhance an armor to maximize its capability.";
    		next;
    		mes "[Apprentice Craftsman]";
    		mes "Enchanting is an awesome skill that infuses a mysterious status powers into the armor's hidden socket.";
    		next;
    		mes "[Apprentice Craftsman]";
    		mes "However, you have to keep in mind that if there are two armors of the same kind in your possession, the Enchantment will be applied in the order they are placed in your inventory.";
    		next;
    		mes "[Apprentice Craftsman]";
    		mes "In that case, the Enchantment may be applied to an item which you didn't mean to Enchant. So just bring ^5555ffONE Armor^000000 you want enchanted to be safe...";
    		next;
    		mes "[Apprentice Craftsman]";
    		mes "I'm not responsible for what would happen if you have more than one of the same kind in your inventory.";
    		next;
    		switch(select("Non Slotted Armor.:Slotted Armor.:High Grade Armor.:Maybe next time.")) {
    		case 1:
    			setarray .@Items[0],2307,2309,2314,2316,2321,2325,2327,2328,2330,2332,2334,2335,2341,2344,2346,2348,2350,2337,2386,2394,2395,2396;
    			set .@j,50;
    			break;
    		case 2:
    			setarray .@Items[0],2311,2318,2319,2320,2308,2310,2315,2317,2322,2324,2326,2331,2333,2336,2342,2345,2347,2349,2351;
    			set .@j,55;
    			set .@k,1;
    			break;
    		case 3:
    			setarray .@Items[0],2364,2365,2391,2374,2375,2376,2377,2378,2379,2380,2381,2382,2387,2388,2389,2390;
    			set .@j,60;
    			break;
    		case 4:
    			mes "[Apprentice Craftsman]";
    			mes "Please come back when you have any interest in enchanting your armor.";
    			close;
    		}
    		set .@menu$,"";
    		for(set .@i,0; .@i<getarraysize(.@Items); set .@i,.@i+1)
    			set .@menu$, .@menu$+getitemname(.@Items[.@i])+((.@k)?" [1]":"")+":";
    		callsub S_EnchantArmor, .@Items[select(.@menu$)-1], .@j;
    		end;
    	}
    	mes "I am in charge of Enchanting Armors. Simply put, I've been studying ways to power-up armor.";
    	next;
    	mes "[Apprentice Craftsman]";
    	mes "If by any chance, you would want to enchant your armor, bring me 1 zeny and the armor you want to enchant and you are all set to go.";
    	close;
    
    S_EnchantArmor:
    	set .@itemid,getarg(0);
    	set .@failrate,getarg(1);
    	mes "[Apprentice Craftsman]";
    	if (countitem(.@itemid) == 1) {
    		mes "Socket enchant will cost you 1 zeny. And there will be a random option enchanted. Of course, there is a chance of breaking your armor.";
    		next;
    		mes "[Apprentice Craftsman]";
    		mes "First and most importantly.";
    		mes "^ff5555Existing Refine Level of the Armor";
    		mes "and Cards will be GONE.^000000";
    		mes "Do you still want to try an Enchant?";
    		next;
    		if(select("Hmm... Let me think it over.:Go ahead.") == 1) {
    			mes "[Apprentice Craftsman]";
    			mes "Well, I can't blame you. Safety first, eh?";
    			mes "Now you have a nice day.";
    			close;
    		}
    		mes "[Apprentice Craftsman]";
    		mes "Quite of an adventurer huh? Well, shall we?";
    		close2;
    		specialeffect2 EF_MAPPILLAR;
    		if (countitem(7420) < 5) {
    			mes "[Apprentice Craftsman]";
    			mes "Sorry, but you don't have enough zeny.";
    			close;
    		}
    		progressbar "ffff00",7;
    		set .@skullid, 7420;
    		delitem .@skullid,5;
    		delitem .@itemid,1;
    		switch (rand(1,.@failrate)) {
    			case 1: set .@addpart,4702;break;
    			case 2: set .@addpart,4712;break;
    			case 3: set .@addpart,4722;break;
    			case 4: set .@addpart,4732;break;
    			case 5: set .@addpart,4742;break;
    			case 6: set .@addpart,4752;break;
    			case 7:
    			case 8: set .@addpart,4701;break;
    			case 9:
    			case 10: set .@addpart,4711;break;
    			case 11:
    			case 12: set .@addpart,4721;break;
    			case 13:
    			case 14: set .@addpart,4731;break;
    			case 15:
    			case 16: set .@addpart,4741;break;
    			case 17:
    			case 18: set .@addpart,4751;break;
    			case 19:
    			case 20:
    			case 21: set .@addpart,4700;break;
    			case 22:
    			case 23:
    			case 24: set .@addpart,4710;break;
    			case 25:
    			case 26:
    			case 27: set .@addpart,4720;break;
    			case 28:
    			case 29:
    			case 30: set .@addpart,4730;break;
    			case 31:
    			case 32:
    			case 33: set .@addpart,4740;break;
    			case 34:
    			case 35:
    			case 36: set .@addpart,4750;break;
    			default:
    				specialeffect2 EF_PHARMACY_FAIL;
    				mes "[Apprentice Craftsman]";
    				mes "Well that's too bad.";
    				mes "The requested equipment has failed to enchant.";
    				close;
    		}
    		getitem2 .@itemid, 1, 1, 0, 0, 0, 0, 0, .@addpart;
    	}
    	else {
    		mes "Hmm? There's nothing to be enchanted!";
    		mes "Please come back with just ONE equipment to be enchanted.";
    		close;
    	}
    }
    

     

    Thanks Ford. It works! 

  12. Hello everyone. Can i request a map edit of phtownall by Keough, I have the files but i want to edit the map coz it's too big plus whenever i warped in that map, i felt a little bit lag for 5 seconds. I think because there's a lot of cells loading. 

     

    So I'm requesting an edit of this map. 

     

     

    349aykk.jpg

     

    This is the 9 in 1 Malaya Style Map from Keough. 

    I only just want the middle part. 

     

     

    11uf4th.jpg

     

    I want to remove this thing because it blocks half of the maintown. 

    20rpcaw.jpg

     

    Lastly, is it possible to put my server logo in the middle? 

     

     

    Thank you so much in advance for those who can help me. 

    I have all the files of that map, all i want is an edit. 

    Just message me if you guys can help me. Thanks.  /no1

     

  13. Hello everyone. I got a problem with my Stalker NPC. 

    Whenever a player clicks it, it will gone. So it's like it's good for only 1 use. Dunno what's wrong. 

    So i have to @reloadscript again to make it back again. 

    Here's my stalker npc script. 

    phtownall,189,195,4	script	Stalker NPC	481,{
    mes "Which skill you need me to cast on you ?";
    set .@SkillID,select( implode( .SkillName$,":" ) ) - 1;
    mes "Selected "+.Skillname$[.@SkillID];
    close2;
    unitskilluseid getnpcid(0),.SkillID[.@SkillID],.SkillLv[.@SkillID],getcharid(3);
    sleep 3000;
    movenpc strnpcinfo(0),108,89;
    end;
    
    OnInit:
    setarray .SkillID[0],84,89,83,537,542,62,421,534;
    setarray .SkillLv[0],10,10,10,10,5,10,7,10;
    setarray .SkillName$[0],"Jupitel Thunder","Storm Gust","Meteor Storm","Lightning Spear of Ice","North Wind","Bowling Bash","Flying Side Kick","Crimson Fire Blossom";
    end;
    }
    
  14. Hello Everyone. Can someone make me a custom commands that has a function to warp in a specific location. 

    @maintown = ( @warp phtownall 199,184 )

    @mall = ( @warp turbo_room 100, 100 )

    @event = ( @warp quiz_02 100,100 )

    @donate = ( @warp turbo_room 200,200 )

     

     

    I know there's @go commands. But is it possible to make a commands like that? 

     

    Thank you in advance. Ciao.  /no1

  15. Hello everyone. I just to request an NPC that automatically cast Poem of Bragi (non-stop) 150 Int 

    It's just like a normal NPC that has bragi like a clown. I'm gonna use it to my training ground. Thanks in advance. Ciao. 

  16. Hello there. Can someone remake this script. This is an ordinary armor enchanter. 

    What i want is instead of zenny, players are required to give 5 Skulls [7420] per enchant coz zenny is useless in my server. Thank you in advance. Appreciated for those who help. 

    //===== rAthena Script ======================================= 
    //= Armor Enchanter
    //===== By: ================================================== 
    //= L0ne_W0lf
    //===== Current Version: ===================================== 
    //= 1.3a
    //===== Compatible With: ===================================== 
    //= rAthena Project
    //===== Description: ========================================= 
    //= [Official Conversion]
    //= Add a +1, +2, or +3 random stat to a specified armor.
    //===== Additional Comments: ================================= 
    //= 1.0 First version.
    //= 1.1 Corrected typo (Sit -> Suit) (bugreport:4586)
    //= 1.2 Optimized. [Euphy]
    //= 1.3 Fixed some typos and optimized a little more. [Daegaladh]
    //= 1.3a Added 'disable_items' command. [Euphy]
    //============================================================ 
    
    turbo_room,73,79,5	script	Armor Enchanter	73,{
    	disable_items;
    	mes "[Apprentice Craftsman]";
    	if (Zeny >= 1) {
    		mes "I've been studying ways to enhance an armor to maximize its capability.";
    		next;
    		mes "[Apprentice Craftsman]";
    		mes "Enchanting is an awesome skill that infuses a mysterious status powers into the armor's hidden socket.";
    		next;
    		mes "[Apprentice Craftsman]";
    		mes "However, you have to keep in mind that if there are two armors of the same kind in your possession, the Enchantment will be applied in the order they are placed in your inventory.";
    		next;
    		mes "[Apprentice Craftsman]";
    		mes "In that case, the Enchantment may be applied to an item which you didn't mean to Enchant. So just bring ^5555ffONE Armor^000000 you want enchanted to be safe...";
    		next;
    		mes "[Apprentice Craftsman]";
    		mes "I'm not responsible for what would happen if you have more than one of the same kind in your inventory.";
    		next;
    		switch(select("Non Slotted Armor.:Slotted Armor.:High Grade Armor.:Maybe next time.")) {
    		case 1:
    			setarray .@Items[0],2307,2309,2314,2316,2321,2325,2327,2328,2330,2332,2334,2335,2341,2344,2346,2348,2350,2337,2386,2394,2395,2396;
    			set .@j,50;
    			break;
    		case 2:
    			setarray .@Items[0],2311,2318,2319,2320,2308,2310,2315,2317,2322,2324,2326,2331,2333,2336,2342,2345,2347,2349,2351;
    			set .@j,55;
    			set .@k,1;
    			break;
    		case 3:
    			setarray .@Items[0],2364,2365,2391,2374,2375,2376,2377,2378,2379,2380,2381,2382,2387,2388,2389,2390;
    			set .@j,60;
    			break;
    		case 4:
    			mes "[Apprentice Craftsman]";
    			mes "Please come back when you have any interest in enchanting your armor.";
    			close;
    		}
    		set .@menu$,"";
    		for(set .@i,0; .@i<getarraysize(.@Items); set .@i,.@i+1)
    			set .@menu$, .@menu$+getitemname(.@Items[.@i])+((.@k)?" [1]":"")+":";
    		callsub S_EnchantArmor, .@Items[select(.@menu$)-1], .@j;
    		end;
    	}
    	mes "I am in charge of Enchanting Armors. Simply put, I've been studying ways to power-up armor.";
    	next;
    	mes "[Apprentice Craftsman]";
    	mes "If by any chance, you would want to enchant your armor, bring me 1 zeny and the armor you want to enchant and you are all set to go.";
    	close;
    
    S_EnchantArmor:
    	set .@itemid,getarg(0);
    	set .@failrate,getarg(1);
    	mes "[Apprentice Craftsman]";
    	if (countitem(.@itemid) == 1) {
    		mes "Socket enchant will cost you 1 zeny. And there will be a random option enchanted. Of course, there is a chance of breaking your armor.";
    		next;
    		mes "[Apprentice Craftsman]";
    		mes "First and most importantly.";
    		mes "^ff5555Existing Refine Level of the Armor";
    		mes "and Cards will be GONE.^000000";
    		mes "Do you still want to try an Enchant?";
    		next;
    		if(select("Hmm... Let me think it over.:Go ahead.") == 1) {
    			mes "[Apprentice Craftsman]";
    			mes "Well, I can't blame you. Safety first, eh?";
    			mes "Now you have a nice day.";
    			close;
    		}
    		mes "[Apprentice Craftsman]";
    		mes "Quite of an adventurer huh? Well, shall we?";
    		close2;
    		specialeffect2 EF_MAPPILLAR;
    		if (Zeny < 1) {
    			mes "[Apprentice Craftsman]";
    			mes "Sorry, but you don't have enough zeny.";
    			close;
    		}
    		progressbar "ffff00",7;
    		set Zeny, Zeny-1;
    		delitem .@itemid,1;
    		switch (rand(1,.@failrate)) {
    			case 1: set .@addpart,4702;break;
    			case 2: set .@addpart,4712;break;
    			case 3: set .@addpart,4722;break;
    			case 4: set .@addpart,4732;break;
    			case 5: set .@addpart,4742;break;
    			case 6: set .@addpart,4752;break;
    			case 7:
    			case 8: set .@addpart,4701;break;
    			case 9:
    			case 10: set .@addpart,4711;break;
    			case 11:
    			case 12: set .@addpart,4721;break;
    			case 13:
    			case 14: set .@addpart,4731;break;
    			case 15:
    			case 16: set .@addpart,4741;break;
    			case 17:
    			case 18: set .@addpart,4751;break;
    			case 19:
    			case 20:
    			case 21: set .@addpart,4700;break;
    			case 22:
    			case 23:
    			case 24: set .@addpart,4710;break;
    			case 25:
    			case 26:
    			case 27: set .@addpart,4720;break;
    			case 28:
    			case 29:
    			case 30: set .@addpart,4730;break;
    			case 31:
    			case 32:
    			case 33: set .@addpart,4740;break;
    			case 34:
    			case 35:
    			case 36: set .@addpart,4750;break;
    			default:
    				specialeffect2 EF_PHARMACY_FAIL;
    				mes "[Apprentice Craftsman]";
    				mes "Well that's too bad.";
    				mes "The requested equipment has failed to enchant.";
    				close;
    		}
    		getitem2 .@itemid, 1, 1, 0, 0, 0, 0, 0, .@addpart;
    	}
    	else {
    		mes "Hmm? There's nothing to be enchanted!";
    		mes "Please come back with just ONE equipment to be enchanted.";
    		close;
    	}
    }
    
    
  17. Hello there. Can someone remake this script. This is an Advance Refiner script. 

    Basically I want is to broadcast ( server-wide ) whenever a player successfully refined his/her weapon/armor to +9 and +10 so other players will notify. Thank you in advance. Ciao /no1  

    //===== rAthena Script =======================================
    //= Advanced Refiner
    //===== By: ==================================================
    //= L0ne_W0lf
    //===== Current Version: =====================================
    //= 1.6
    //===== Compatible With: =====================================
    //= rAthena Project
    //===== Description: =========================================
    //= [Official Conversion]
    //= Refiner that uses Enriched ores to increase upgrade success.
    //= After a conversation with Doddler, it's been established that
    //= the advanced refiner works similar the the "Bubble Gum" item.
    //= The success percentage is not "increased" however, if it fails
    //= You get a second try. This tries twice at the same time,
    //= effectively giving you a re-roll on your attempt.
    //= - Dialog is only partly official to iRO.
    //= - Uses the iRO position for this NPC.
    //===== Additional Comments: =================================
    //= 1.0 First Version. [L0ne_W0lf]
    //= 1.1 Fixed a weird carriage return. o_o [L0ne_W0lf]
    //= 1.2 Optimizing refine method [Zephyrus]
    //= 1.3 Typo fixes [Yommy]
    //= 1.4 Removed unnecessary dialogs [Zephyrus]
    //= 1.4a Added 'disable_items' command. [Euphy]
    //= 1.4b Fixed coordinates. [Euphy]
    //= 1.5 Some official script updates. [Euphy]
    //= 1.6 Added VIP features. [Euphy]
    //============================================================
    
    turbo_room,64,91,5	script	Advanced Refiner	681,{
    	disable_items;
    	mes "[Suhnbi]";
    	mes "I am the Armsmith";
    	mes "I can refine all kinds of weapons,";
    	mes "armor and equipment, so let me";
    	mes "know what you want to refine.";
    	next;
    
    	setarray .@position$[1], "Head","Body","Left hand","Right hand","Robe","Shoes","Accessory 1","Accessory 2","Head 2","Head 3";
    	set .@menu$,"";
    	for(set .@i,1; .@i<=10; set .@i,.@i+1) {
    		if (getequipisequiped(.@i)) {
    			set .@menu$, .@menu$ + .@position$[.@i] + "-" + "[" + getequipname(.@i) + "]";
    			set .@equipped,1;
    		}
    		set .@menu$, .@menu$ + ":";
    	}
    	if (.@equipped == 0) {
    		mes "[Suhnbi]";
    		mes "I don't think I can refine any items you have...";
    		close;
    	}
    	set .@part, select(.@menu$);
    
    	if (!getequipisequiped(.@part)) //custom check
    		close;
    	if (!getequipisenableref(.@part)) {
    		mes "[Suhnbi]";
    		mes "Go find another Blacksmith. You can't refine this thing.";
    		close;
    	}
    	if (getequiprefinerycnt(.@part) >= 10) {
    		mes "[Suhnbi]";
    		mes "Hmm... someone perfected this already. I don't think I can work on it further.";
    		close;
    	}
    
    	// Make sure you have the neccessary items and Zeny to refine your items
    	// Determines chance of failure and verifies that you want to continue.
    	switch(getequipweaponlv(.@part)) {
    		case 1: callsub S_RefineValidate,1,7620,1,.@part; break;
    		case 2: callsub S_RefineValidate,2,7620,1,.@part; break;
    		case 3: callsub S_RefineValidate,3,7620,1,.@part; break;
    		case 4: callsub S_RefineValidate,4,7620,1,.@part; break;
    		default: callsub S_RefineValidate,0,7619,1,.@part; break;
    	}
    
    	mes "[Suhnbi]";
    	mes "Clang! Clang! Clang!";
    	if (getequippercentrefinery(.@part) > rand(100) || getequippercentrefinery(.@part) > rand(100)) {
    		successrefitem .@part;
    		next;
    		emotion e_no1;
    		mes "[Suhnbi]";
    		mes "There you go! It's done.";
    		mes "It's been a while since I've made such a fine "+((getequipweaponlv(.@part))?"weapon":"armor")+". You must be happy because it has become stronger!";
    		close;
    	}
    	failedrefitem .@part;
    	next;
    	emotion (!rand(5))?e_cash:e_omg;
    	mes "[Suhnbi]";
    	mes "Uuuuuuuuuummmmmph!!!";
    	next;
    	mes "[Suhnbi]";
    	mes "...";
    	mes ".....";
    	mes ".......Huhuhuhuhu~";
    	mes "........It was your choice and my ability, no regret.";
    	close;
    
    S_RefineValidate:
    	set .@price, getarg(2);
    
    	// If the VIP system is enabled, the prices for non-VIP players are considerably higher.
    	if (VIP_SCRIPT && !vip_status(1)) {
    		switch(getarg(0)){
    			case 0: set .@price, .@price * 10; break;
    			case 1: set .@price, .@price * 40; break;
    			case 2: set .@price, .@price * 50; break;
    			case 3: set .@price, .@price * 2; break;
    			case 4: set .@price, .@price * 2; break;
    		}
    	}
    
    	mes "[Suhnbi]";
    	if (getarg(0))
    		mes "You want to refine a level " + getarg(0) + " weapon?";
    	mes "To refine that, you'll need to have one ^ff9999" + getitemname(getarg(1)) + "^000000 and " + .@price + " zeny.";
    	mes "Would you like to continue?";
    	next;
    	if(select("Yes:No") == 1) {
    		if (getequippercentrefinery(getarg(3)) < 100) {
    			if (getarg(0)) {
    				mes "[Suhnbi]";
    				mes "Wow!!";
    				mes "This weapon probably";
    				mes "looks like it's been refined...";
    				mes "many times...";
    				mes "It may break if";
    				mes "you refine it again.";
    				next;
    				mes "And if it breaks,";
    				mes "you can't use it anymore!";
    				mes "All the cards in it and the properties ^ff0000will be lost^000000!";
    				mes "^ff0000Besides, the equipment will break!^000000";
    				mes "Are you sure you still want to continue?";
    				next;
    				if(select("Yes:No") == 2) {
    					mes "[Suhnbi]";
    					mes "Good.";
    					mes "Because if the weapon breaks from unreasonable refining, then I get a bad mood, too.";
    					close;
    				}
    			} else {
    				mes "[Suhnbi]";
    				mes "Giggle. Giggle. Oh, you have guts, daring to refine this.";
    				mes "You know it's pretty risky, don't you?";
    				next;
    				mes "If your defensive equipment is broken, you'll never be able to use it again.";
    				mes "Even your cards and your modifications will ^ff0000completely disappear^000000.";
    				//mes "Everything will disappear. As in... GONE!";
    				mes "Do you really wish to continue?";
    				next;
    				if(select("Yes:No") == 2) {
    					mes "[Suhnbi]";
    					mes "What nonsense. You waste my precious time.";
    					mes "Get lost, punk.";
    					close;
    				}
    			}
    		}
    		if (countitem(getarg(1)) > 0 && Zeny > .@price) {
    			delitem getarg(1),1;
    			set Zeny, Zeny - .@price;
    			return;
    		}
    		mes "[Suhnbi]";
    		mes "Are these all you have?";
    		mes "I'm very sorry, but I can't do anything without all the materials. Besides, I deserve some payments for my work, don't I?";
    		close;
    	}
    	mes "[Suhnbi]";
    	mes "I can't help it even if you're not happy about it...";
    	close;
    }
    
    
  18.  

    Other way..

    CREATE TABLE IF NOT EXISTS `cp_highest_peak` (
      `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
      `num_users` int(10) unsigned NOT NULL DEFAULT '0',
      `peak_date` date NOT NULL,
      PRIMARY KEY (`id`)
    ) ENGINE = MYISAM;
    

    and now the script is here

    //====================================================================================
    //Script Name: Server Online Users Highest Peak
    //SVN: Tested in rAthena r156513
    //Developed By: JayPee Mateo
    //Version: 1.0
    //Requirement(s): FluxCP Server Highest Addon
    //Description: This npc script will record the highest number of players that your server reach
    //====================================================================================
    - script Highest Peak -,{
    
    OnPCLoginEvent:
    
    
    set .currentUsersOL,getusers(1); //Current Online Users
    
    //Query for the highest peak in the database
    query_sql("SELECT `num_users` FROM `cp_highest_peak` ORDER BY `num_users` LIMIT 1",.@numUsers);
    //Get the date
    set .date$,gettime(7)+"-"+gettime(6)+"-"+gettime(5); 
    
    set .highestPeak,.@numUsers[0]; //Highest Peak
    if(getarraysize(.@numUsers) == 0)
    {
    //If not data found Insert statement
    set .highestPeak,.currentUsersOL;
    query_sql("INSERT INTO `cp_highest_peak`(num_users,peak_date) VALUES("+.highestPeak+",'"+.date$+"')"); //Insert new highest Peak
    }
    else
    {
    if(.currentUsersOL>.highestPeak)
    {
    announce ""+.currentUsersOL,bc_all;
    set .highestPeak,.currentUsersOL; 
    query_sql("UPDATE `cp_highest_peak`SET num_users='"+.highestPeak+"',peak_date='"+.date$+"'"); //Insert new highest Peak
    }
    }
    end;
    
    }
    

     

    Thanks men. Appreciated.  /no1

    Just replace the getmapusers("prontera") by getusers(1)

     

    Cool. It works.  /no1

×
×
  • Create New...