-
Content Count
81 -
Joined
-
Last visited
-
Days Won
4
Content Type
Profiles
Forums
Downloads
Staff Applications
Calendar
Everything posted by Cabrera
-
Hello everyone , I kindof have a problem with putting a custom bgm for my town(prontera). Its previous bgm was 08.bgm I had got another custom bgm for it but when i replaced it theres no sound ingame T_T And i even changed all the mp3nametable (i use 2012/10/04) client . i think its one of the 2 problems i list below: 1. the audio sample rate of original 08.mp3 is 22khz. My new one is 44 khz 2. the size of the original mp3 is 2283 kb. the new one is 6653 kb. Can any one help me solve this? i need to fix this asap Thanks in advance >.<
-
Hey guyz could any 1 give me the combined script bonus for the folowing? which i can replace to the {},{},{} present at the end of item script :3? Set 1: Adds +20 all stat, 2% maxhp and 2%maxsp per refine Set 2: Adds +15 all stat, 1% Increase dmg to demihuman per refine Set 3: Adds +30 all stat, 10% increase in Movement speed,1% decrease dmg from demiH per refine Thanks in advance <3
-
Hi all, Just looked at this script by ll Chris ll and was wondering if the quest area part could be added back without exploits? cuz it would be a great way for guild leaders to host events internally if they have the right items to do it(as rewards and wat not.) so heres the script by Chris so credits to him just need that addition D: //===== eAthena Script =======================================//= Guild Manager//===== By ===================================================//= lllchrislll//===== Version ==============================================//= 1.0 - Script Made// - Added many features (Didn't write that down...)// - Added the possiblity to use the donation via an Shop// Items can only be set by the GM's, see 'OnInit'// - Fixxed some bugs with the Reward Function// Reward can only be set by the GM's, see 'OnInit'//= 1.1 - Changed Reward Giving via Quest, also fixxed some bugs reported by darkis// - Rewritten the Ranking Check, well it is using more memory now.... (Sorry for that)// - Added an Random EXP Boost depending how much "rank" points// you possess, also added an menu option for it, see 'G_EXP'.// - Also rewritten the explanation how to add this system to WoE:SE //= 1.2 - Removed the Quest Area from preventing exploits.//====== ToDo List ===========================================//= Guild Shop: Looking for way to prevent the usage of your own Zeny instead// of the donation for checking if you want to buy something// Well, I found a way, but would cause a huge exploit.....//= Ranking Decrease: - How about when you lost a castle?// Previous WoE: 3, This WoE: 2 > -1 Rank for Guild only or Member too? ;I////===== Compatible/Created/Tested With ======================================//= eAthena SQL 14434 Trunk//===== Description ==========================================//= This Script handles a Ranking System in the Guild itself,//= the ranking itself can increase and decrease.//= Increasing the Ranking:// - Donating money to the guild, which can be used by the// Guild Master only// - Emperium Break during WoE////= Decreasing of the Ranking:// - Killing the Guild Members in PvP Rooms// - Being offline for 1 week without telling the // guild master, to update the "Holiday List".////= Also you can recieve other rewards from breaking the Emp,// which is done by collecting points.//===== MySQL Entries =======================================/* //= Member Table:DROP TABLE IF EXISTS `guild_rank_mem`;CREATE TABLE `guild_rank_mem` ( `char_id` int(10) unsigned NOT NULL, `guild_id` smallint(5) unsigned NOT NULL, `rank` smallint(5) unsigned DEFAULT '0', `woe` smallint(5) unsigned DEFAULT '0', `donate` int(11) unsigned DEFAULT '0', `donate_am` int(11) unsigned DEFAULT '0', `holiday` smallint(5) unsigned DEFAULT '0', PRIMARY KEY (`char_id`)) ENGINE=MyISAM;//= Guild Table:DROP TABLE IF EXISTS `guild_rank_guild`;CREATE TABLE `guild_rank_guild` ( `guild_id` smallint(5) unsigned NOT NULL, `type` smallint(5) unsigned DEFAULT '1', `rank` smallint(5) unsigned DEFAULT '0', `woe` smallint(5) unsigned DEFAULT '0', `donate` int(11) unsigned DEFAULT '0', `donate_min` int(11) unsigned DEFAULT '0', `donate_max` int(11) unsigned DEFAULT '0', PRIMARY KEY (`guild_id`)) ENGINE=MyISAM;*///===== Comments =============================================//= You need to edit the following line in the// npc/guild/agit_template.txt//========== Find this ==========///*// Adjust Economy Invest Level for Castleset .@Economy,GetCastleData(strnpcinfo(2),2) - 5;if (.@Economy < 0) set .@Economy, 0;//========== Add above ==========//// Callfunc for Guild Rank System callfunc "GLD_RANK_WOE"; //= WoE:SE : Open these file under npc/guild2/ arug_cas02.txt arug_cas04.txt schg_cas01.txt schg_cas03.txt schg_cas05.txt arug_cas01.txt arug_cas03.txt arug_cas05.txt schg_cas02.txt schg_cas04.txt//========== Find this, which only shows up once every file. =========//mapannounce "arug_cas01","The emperium has been shattered!",bc_map,"0x00FF00",FW_NORMAL,20,0,40; // ------- or -------- //announce "The emperium has been shattered!",bc_map,"0x00FF00",FW_NORMAL,20,0,40;//========== Add after ==========//// Callfunc for Guild Rank System callfunc "GLD_RANK_WOE";*///============================================================- script GuildRanks#Events -1,{end;OnInit:query_sql "SHOW TABLES LIKE 'guild_rank_guild'",.@ch_gld_tbl$;query_sql "SHOW TABLES LIKE 'guild_rank_mem'",.@ch_mem_tbl$;if($gld_ranker_tbl == 1) { // If the tables exists if(.@ch_gld_tbl$[0] != "" && .@ch_mem_tbl$[0] != "") { end; // If one of the tables doesn't exists } else if(.@ch_gld_tbl[0] == "" || .@ch_mem_tbl[0] == "") { query_sql "DROP TABLE IF EXISTS `guild_rank_guild`"; query_sql "DROP TABLE IF EXISTS `guild_rank_mem`"; set $gld_ranker_tbl,0; }}// Checking if the System is on or notif(!$gld_ranker_tbl) disablenpc "GuildRanks#Events"; end;setarray .expboost[0],5,10,15,20,25; // Exp Boost in %setarray .rankreq[0],15,30,60,120,240; // Rank Points required// Example: To gain 15% EXP Bonus, you need 60 Rank Points.set .boostuse,1; // Which day it will be activated on: 0-6 = Sunday - Saturday, 7 = Randomswitch(.boostuse) { case 0: set .expdayn$,"Sunday"; break; case 1: set .expdayn$,"Monday"; break; case 2: set .expdayn$,"Tuesday"; break; case 3: set .expdayn$,"Wednesday"; break; case 4: set .expdayn$,"Thursday"; break; case 5: set .expdayn$,"Friday"; break; case 6: set .expdayn$,"Saturday"; break; default: set .expdayn$,"a random day."; break;} set .GldEXPBoost,0;if(gettime(4) == ( (.boostuse != 7) ? .boostuse : rand(7) ) ) { set .GldEXPBoost,1; announce "Guild Rank System: EXP Bonus has been activated.",0,0x00FF00;}end;OnNPCKillEvent:if(!getcharid(2)) end; // If the player is not in a guild.// =========== EXP Boost ============== //if(.GldEXPBoost == 1) { if(EXPLastRank < query_sql("SELECT `rank` FROM `guild_rank_mem` WHERE `guild_id` = '"+getcharid(2)+"' AND `char_id` = '"+getcharid(0)+"'",@rank) ) { set EXPLastRank,@rank; for( set @b,0; @b < getarraysize(.rankreq); set @b,@b + 1) { if(EXPLastRank >= .rankreq[@b]) { if(.rankreq[@b+1] != 0) { set EXPBoost,.expboost[@b]; if(EXPLastRank < .rankreq[@b+1] ) break; } else { set EXPBoost,.expboost[@b]; break; } } } } set @bexp,(getmonsterinfo(killedrid,3)*EXPBoost); if(getgmlevel()) dispbottom "Debug: Monster: "+getmonsterinfo(killedrid,0)+" with "+@bexp+" Base EXP, "+@jexp+" Job EXP"; set @jexp,(getmonsterinfo(killedrid,4)*EXPBoost); set BaseEXP,BaseEXP + @bexp; set JobEXP,JobEXP + @jexp; dispbottom "EXP Bonus: "+EXPBoost+"%. You have recieved additionally "+@bexp+" Base EXP and "+@jexp+" Job EXP.";}end;OnPCKillEvent:if(!getcharid(2)) end;if(getmapflag(strcharinfo(3),mf_pvp) == 0) end;query_sql "SELECT `name` FROM `guild_member` WHERE `guild_id` = '"+getcharid(2)+"'",@gld_mem$;set @Killer$,rid2name(killerrid);for( set @gpvp,0; @gm < getarraysize(@gld_mem$); set @gpvp,@gpvp + 1) { if(@Killer$ == @gld_mem$[@gpvp]) { query_sql "UPDATE `guild_rank_mem` SET `rank` = `rank` - 1 WHERE `guild_id` = '"+getcharid(2)+"' AND `char_id` = '"+getcharid(0,@Killer$)+"'"; break; }}donpcevent "::OnReset";end;OnPCLogoutEvent:if(!getcharid(2)) end;if(query_sql("SELECT `holiday` FROM `guild_rank_mem` WHERE `guild_id` = '"+getcharid(2)+"' AND `char_id` = '"+getcharid(0)+"'",@holiday) == 0) { set gld_off_log,gettimetick(2) + 691200; // 8 Days set gld_last,getcharid(2);}end;OnPCLoginEvent:if($gld_ranker_tbl) announce "The Guild Ranking System is online.",4,0x00FF00;if(.GldEXPBoost == 1) announce "Guild Rank System: EXP Bonus has been activated.",4,0x00FF00;;// Don't enable these lines, NEVER!! Need a solution for this problem // if(BkpZeny != 0) { set Zeny,BkpZeny; set BkpZeny,0; } // Guild Shop Exploit Preventingif(!getcharid(2)) end;set EXPBoost,0;if(gld_last != getcharid(2)) set gld_off_log,0; end;query_sql "SELECT `holiday` FROM `guild_rank_mem` WHERE `guild_id` = '"+getcharid(2)+"' AND `char_id` = '"+getcharid(0)+"'",@holiday;if(@holiday == 0 && (gettimetick(2) > gld_off_log)) { query_sql "UPDATE `guild_rank_mem` SET `rank` = `rank` - 1 WHERE `guild_id` = '"+getcharid(2)+"' AND `char_id` = '"+getcharid(0)+"'";} else { set gld_off_log,0;}end;// ========================= Auto Guild Checking =========================//// This part checks the Registered Guilds and their members.// If the guild doesn't exists anymore or an Member has left a guild,// they will be deleted from the ranking and if the new Guild is registered// it will insert them into the new guild.// ==========================================================================OnClock0000:set .GldEXPBoost,0;if(gettime(4) == ( (.boostuse != 7) ? .boostuse : rand(7) ) ) { set .GldEXPBoost,1; announce "Guild Rank System: EXP Bonus has been activated.",0,0x00FF00;;}OnRankCheck:// Which Guild is registered and still existsquery_sql "SELECT `guild_id` FROM `guild_rank_guild`",.@gld_ids;for( set .@w,0; .@w < getarraysize(.@gld_ids); set .@w,.@w + 1) { if(query_sql("SELECT `guild_id` FROM `guild` WHERE `guild_id` = '"+.@gld_ids[.@w]+"'",.@c_gld) != 0) { // Getting the Guild Member ID's from the Guild_Member Table query_sql "SELECT `char_id` FROM `guild_member` WHERE `guild_id` = '"+.@gld_ids[.@w]+"'",.@gld_mem; for ( set .@m,0; .@m < getarraysize(.@gld_mem); set .@m,.@m+1) { // Checking if the Member is in the ranking if(query_sql("SELECT `char_id` FROM `guild_rank_mem` WHERE `guild_id` = '"+.@gld_ids[.@w]+"' AND `char_id` = '"+.@gld_mem[.@m]+"'",.@c_chid) == 0) { // Checking in which Guild the Member is if(query_sql("SELECT `guild_id` FROM `guild_member` WHERE `char_id` = '"+.@gld_mem[.@m]+"'",.@c_gid) != .@gld_ids[.@w]) { // If the Member doesn't exists anymore in this guild query_sql "DELETE FROM `guild_rank_mem` WHERE `char_id` = '"+.@gld_mem[.@m]+"'"; } // Member is not in the ranking query_sql "INSERT INTO `guild_rank_mem` ( `guild_id` , `char_id` ) VALUES ( '"+.@gld_ids[.@w]+"' , '"+.@gld_mem[.@m]+"' )"; } }// If the Guild doesn't exist anymore delete it from the ranking. } else { query_sql "DELETE FROM `guild_rank_guild` WHERE `guild_id` = '"+.@gld_ids[.@w]+"'"; query_sql "DELETE FROM `guild_rank_mem` WHERE `guild_id` = '"+.@gld_ids[.@w]+"'"; callsub OnGuildBreak; }}donpcevent "::OnReset";end;OnGuildBreak:announce "The guild "+getguildname(.@gld_ids[.@w])+" has been disbanded.",0,0xFF0000;OnReset:deletearray .@gld_ids[0],getarraysize(.@gld_ids);deletearray .@gld_mem[0],getarraysize(.@gld_mem);deletearray .@c_chid[0],getarraysize(.@c_chid);deletearray .@c_gid[0],getarraysize(.@c_gid);end;}//OnAgitBreak:function script GLD_RANK_WOE {query_sql "SELECT `type` FROM `guild_rank_guild` WHERE `guild_id` = '"+getcharid(2)+"'",@type;if(@type == 1) { query_sql "UPDATE `guild_rank_mem` SET `rank` = `rank` + 1 , `woe` = `woe` + 1 WHERE `guild_id` = '"+getcharid(2)+"' AND `char_id` = '"+getcharid(0)+"'"; query_sql "UPDATE `guild_rank_guild` SET `rank` = `rank` + 1 , `woe` = `woe` + 1 WHERE `guild_id` = '"+getcharid(2)+"'"; announce "You have gained 1 Point for breaking an Emperium while WoE.",4,0xFF0000;}//end;return;}// ===================== Guild Shop Pre-Setting ==================== //- shop GUILD_SHOP -1,512:-1// ===================== Guild Rank Manager ====================== //prontera,152,193,4 script Guild Ranker#gldrank 110,{callsub G_Array;set .@n$,"[Guild Ranker]";set .@last_id,25077; // Highest Item IDset @guild_id,getcharid(2);OnStart:mes .@n$;// **********************************************************************//// // GM Menu Selection //// **********************************************************************// if(getgmlevel() >= 80) { mes "Player or GM Menu?"; menu "Player Menu",-,"GM Menu",G_GM; next; mes .@n$;}// **********************************************************************//// // No MySQL Entries made //// **********************************************************************// if(!$gld_ranker_tbl) { mes "I'm sorry, but"; mes "the System hasn't been"; mes "enabled yet."; close;}// **********************************************************************//// // Not in a Guild //// **********************************************************************// if(!@guild_id) { mes "I'm sorry, but you"; mes "are not in a guild."; close;}// **********************************************************************//// // Main Greeting //// **********************************************************************// mes "Hello, "+strcharinfo(0)+"!";if(query_sql("SELECT `guild_id` FROM `guild_rank_guild` WHERE `guild_id` = '"+@guild_id+"'",@gld_check) == 0) { mes "As I can see your Guild has not been registered yet,"; if(strcharinfo(0) == getguildmaster(@guild_id)) { mes "wanna register it now?"; next; if(select("- Yes register:- No, thanks") == 2) { goto G_Quit; } else { goto G_Register; } } else { mes "if you want to join,"; mes "please inform your Guild Master about it."; close; }}mes "How can I help ya?";next;if(strcharinfo(0) == getguildmaster(@guild_id)) { if(select("- Guild Master Menu:- Member Menu") == 1) { menu "- Guild Summary",G_Summary,"- EXP Boost Info",G_EXP,"- Guild Shop",G_Shop,"- Donation Limit",G_Donate_L,"- Holiday List",G_Holiday,"- Nothing",G_Quit; }}menu "- Guild Summary",G_Summary,"- EXP Boost Info",G_EXP,"- See Ranking",G_Rank,"- Get Reward",G_Reward,"- Donation",G_Donate,"- Nothing",G_Quit;// **********************************************************************//// // Guild Summary //// **********************************************************************// G_Summary: query_sql "SELECT `type` , `donate` , `donate_min` , `donate_max` FROM `guild_rank_guild` WHERE `guild_id` = '"+@guild_id+"'",@type,@donate,@donate_min,@donate_max; mes .@n$; mes "Guild Type: "+ ( (@type == 2) ? "Non-WoE" : "WoE"); mes " "; mes "Donation Status:"; mes "Currently we have "+@donate+" Zeny on our Account."; mes "Donation Limit:"; mes "Minium: " + @donate_min + " Zeny."; // Donate Minimum Amount mes "Maximum: " + @donate_max + " Zeny."; // Donate Maximum Amount close;// **********************************************************************//// // EXP Boost Info //// **********************************************************************// G_EXP: mes .@n$; mes "The EXP Boost is global to every guild."; mes "The boost depends on your rank and the percent set by the GM Team."; mes "And will be activated on "+getvariableofnpc(.expdayn$,"GuildRanks#Events"); mes "Status: " + ( (getvariableofnpc(.GldEXPBoost,"GuildRanks#Events") == 1) ? "Active" : "Not Active."); mes " "; mes "Current Rank Requirements and EXP Boost."; for( set @e,0; @e < getarraysize(getvariableofnpc(.expboost,"GuildRanks#Events")); set @e,@e + 1) { mes getvariableofnpc(.rankreq[@e],"GuildRanks#Events")+" Points = "+getvariableofnpc(.expboost[@e],"GuildRanks#Events")+"% EXP Boost."; } close; // **********************************************************************//// // Ranking //// **********************************************************************// G_Rank: mes .@n$; mes "What kind of ranking"; mes "do you want to see?"; next; switch(select("- Donation:- WoE:- All")) { // **********************************************************************//// // Total Donation //// **********************************************************************// case 1: mes .@n$; query_sql "SELECT `char_id` , `donate` , `donate_am` FROM `guild_rank_mem` WHERE `guild_id` = '"+@guild_id+"' ORDER BY `donate_am` DESC",@char_id,@donate,@donate_am; query_sql "SELECT `donate` FROM `guild_rank_guild` WHERE `guild_id` = '"+@guild_id+"'",@donate_total; mes "Total Donation:"; mes @donate_total; mes " "; mes "Name - Quantity - Donated Amount Total"; for( set @gm,0; @gm < getarraysize(@char_id); set @gm,@gm + 1) { query_sql "SELECT `name` FROM `guild_member` WHERE `guild_id` = '"+@guild_id+"' AND `char_id` = '"+@char_id[@gm]+"'",@c_name$; mes @c_name$+" - "+@donate[@gm]+" - "+@donate_am[@gm]; } close; // **********************************************************************//// // Emperium Breaks //// **********************************************************************// case 2: mes .@n$; query_sql "SELECT `char_id` , `woe` FROM `guild_rank_mem` WHERE `guild_id` = '"+@guild_id+"' ORDER BY `woe` DESC",@char_id,@woe; query_sql "SELECT `woe` FROM `guild_rank_guild` WHERE `guild_id` = '"+@guild_id+"'",@woe2; mes "Total Emp Breaks:"; mes @woe2; mes " "; mes "Name - Break Quantity"; for( set @gm,0; @gm < getarraysize(@char_id); set @gm,@gm + 1) { query_sql "SELECT `name` FROM `guild_member` WHERE `guild_id` = '"+@guild_id+"' AND `char_id` = '"+@char_id[@gm]+"'",@c_name$; mes @c_name$+" - "+@woe[@gm]; } close;// **********************************************************************//// // Member Ranking //// **********************************************************************// case 3: mes .@n$; query_sql "SELECT `char_id` , `rank` FROM `guild_rank_mem` WHERE `guild_id` = '"+@guild_id+"' ORDER BY `rank` DESC",@char_id,@rank; mes "Name - Ranking"; for( set @gm,0; @gm < getarraysize(@char_id); set @gm,@gm + 1) { query_sql "SELECT `name` FROM `guild_member` WHERE `guild_id` = '"+@guild_id+"' AND `char_id` = '"+@char_id[@gm]+"'",@c_name$; mes @c_name$+" - "+@rank[@gm]; } close; } // **********************************************************************//// // Recieving Reward //// **********************************************************************// G_Reward: query_sql "SELECT `woe` FROM `guild_rank_mem` WHERE `guild_id` = '"+@guild_id+"' AND `char_id` = '"+getcharid(0)+"'",@woe; mes .@n$; mes "Your current balance is:"; mes "WoE Points: "+@woe; next; mes .@n$; mes "Reward - Points needed"; mes .rew_woe_need[0] + ". " + .rew_woe_am[0] + "x " + ( (.rew_woe[0] == 1) ? " Zeny": getitemname(.rew_woe[0]) + " (ID:" + .rew_woe[0] + ")" ) + " - "+.rew_woe_need[0]; set @r_menu$,"- "+.rew_woe_need[0] + " "+( (.rew_woe_need[0] > 1) ? "Points": "Point"); for( set @r,1; @r < getarraysize(.rew_woe); set @r,@r+1) { mes .rew_woe_am[@r] + "x " + ( (.rew_woe[@r] == 1) ? " Zeny": getitemname(.rew_woe[@r]) + " (ID: " + .rew_woe[@r] + ")" ) + " - "+.rew_woe_need[@r]; set @r_menu$,@r_menu$ + ":- "+.rew_woe_need[@r] + " "+( (.rew_woe_need[@r] > 1) ? "Points": "Point"); } mes " "; mes "Please choose the reward you want."; next; switch(prompt(@r_menu$)) { default: set @m,@menu - 1; break; case 255: goto G_Quit; break; } mes .@n$; mes "You have chosen:"; mes .rew_woe_am[@m] + "x " + ( (.rew_woe[@m] == 1) ? " Zeny": getitemname(.rew_woe[@m]) + " (ID: " + .rew_woe[@m] + ")" ) + " - "+.rew_woe_need[@m]; mes "Is that correct?"; next; if(select("- Yes:- No") == 2) { goto G_Quit; } else { mes .@n$; if(.rew_woe_need[@m] > @woe) { mes "I'm sorry, but it seems you don't have enough points for this reward."; close; } if(.rew_woe[@m] == 1) { mes "You have recieved "+.@rew_woe_am[@m]+" Zeny."; set Zeny,Zeny + .rew_woe_am[@m]; } else { mes "You have recieved "+.rew_woe_am[@m] + "x "+getitemname(.rew_woe[@m]); getitem .rew_woe[@m],.rew_woe_am[@m]; } query_sql "UPDATE `guild_rank_mem` SET `woe` = `woe` - "+.rew_woe_need[@m]+" WHERE `guild_id` = '"+@guild_id+"' AND `char_id` = '"+getcharid(0)+"'"; close; } // **********************************************************************//// // Making Donation //// **********************************************************************// G_Donate: query_sql "SELECT `donate` , `donate_min` , `donate_max` FROM `guild_rank_guild` WHERE `guild_id` = '"+@guild_id+"'",@donate,@donate_min,@donate_max; mes .@n$; if(@donate_min < 1) { mes "Your Guild Master hasn't set the"; mes "Donation Limit yet."; close; } mes "Total Donation: "+@donate; mes "The account can hold up to "+.don_limit+" Zeny."; if(@donate < .don_limit) { mes (.don_limit - @donate) +" can be donated until the limit will be reached."; } else if(@donate >= .don_limit) { mes "Limit reached, the account is full."; mes "Please wait until your Guild Master used some donations up."; close; } mes "You can donate once per week."; mes "The minimum amount is " + @donate_min + " Zeny"; // Donate Minimum Amount mes "and the maximum "+ @donate_max + " Zeny."; // Donate Maximum Amount next; if(@guild_id == last_gld && gld_don_delay > gettimetick(2)) { mes .@n$; mes "I'm sorry, but the week hasn't passed yet."; close; } else if(@guild_id != last_gld) { set gld_don_delay,0; } if(input(@do_don,@donate_min,@donate_max) != 0) { mes .@n$; mes "You have put an invalid amount."; close; } if(Zeny < @do_don) { mes .@n$; mes "You don't have the needed money."; close; } if( (@donate + @do_don) >= .don_limit) { mes "The donation you are trying to make is too much for the account to handle."; mes "Please wait until your Guild Master uses some donations."; close; } query_sql "UPDATE `guild_rank_mem` SET `donate` = donate + 1 , `donate_am` = donate_am + "+@do_don+" , `rank` = rank + 1 WHERE `guild_id` = '"+@guild_id+"' AND `char_id` = '"+getcharid(0)+"'"; query_sql "UPDATE `guild_rank_guild` SET `donate` = donate + "+@do_don+" WHERE `guild_id` = '"+@guild_id+"'"; set Zeny,Zeny - @do_don; set gld_don_delay,gettimetick(2) + 604800; // 1 Week Delay set last_gld,@guild_id; mes .@n$; mes "Thank you for your"; mes "donation."; close; // **********************************************************************//// // Adding Donation Limit //// **********************************************************************// G_Donate_L: mes .@n$; mes "Type the minimum amount"; mes "Note: Highest is 10,000,000"; next; input @don_min; if(@don_min < 1 || @don_min > 10000000) close; mes .@n$; mes "Now the maximum amount:"; mes "Note: Highest is 10,000,000 too"; input @don_max; if(@don_max < @don_min || @don_max > 10000000) close; next; mes .@n$; mes "Result:"; mes "Minium: "+@don_min; mes "Maximum: "+@don_max; mes " "; mes "Correct?"; if(select("- Yes:- No") == 1) { query_sql "UPDATE `guild_rank_guild` SET `donate_min` = '"+@don_min+"' , `donate_max` = '"+@don_max+"' WHERE `guild_id` = '"+@guild_id+"'"; } close; // **********************************************************************//// // Guild Shop - using Donations //// **********************************************************************// G_Shop: query_sql "SELECT `donate` FROM `guild_rank_guild` WHERE `guild_id` = '"+@guild_id+"'",@don_total; mes .@n$; mes "Hello Master,"; mes "how can I help you?"; mes "You guild members have donated "+@don_total+" Zeny so far."; next; menu "Open Shop",-,"Nothing",G_Quit; mes .@n$; mes "I will now open the shop for you."; mes "Note: The Skill Discount won't work here."; mes "The difference will be shown, but I will use the actual costs."; mes "Also it checks the Zeny in your inventory, so if you get enough"; mes "donations, but not enough Zeny with you, it could result in an error."; close2; // Don't enable these lines, NEVER!! Need a solution for this problem // set BkpZeny,Zeny; // A way to surprass the bug by having not enough Zeny with you even if he uses the donations? // if(@don_total > .don_limit) set Zeny,.don_limit; else set Zeny,@don_total; callshop "GUILD_SHOP",1; npcshopattach "GUILD_SHOP"; end; OnBuyItem: for( set @bid,0; @bid < getarraysize(@bought_nameid); set @bid,@bid + 1) { for( set @sid,0; @sid < getarraysize(.gshop_id); set @sid,@sid + 1) { if(.gshop_id[@sid] == @bought_nameid[@bid]) { set @cost_item,(.gshop_cost[@sid]*@bought_quantity[@bid]); set @cost_total,(@cost_total+@cost_item); break; } } } query_sql "SELECT `donate` FROM `guild_rank_guild` WHERE `guild_id` = '"+@guild_id+"'",@don_total; if(@cost_total > .don_limit) { dispbottom "I'm sorry, but you can't buy this much at once."; dispbottom "Maximum is " + .don_limit + " Zeny."; } else { if(@cost_total > @don_total) { dispbottom "You don't have enough Zeny."; } else { for( set @buy,0; @buy < getarraysize(@bought_nameid); set @buy,@buy + 1) { getitem @bought_nameid[@buy],@bought_quantity[@buy]; } dispbottom "Thank you for shopping."; dispbottom "You have used "+@cost_total+" Zeny of the Donations."; query_sql "UPDATE `guild_rank_guild` SET `donate` = `donate` - '"+@cost_total+"' WHERE `guild_id` = '"+@guild_id+"'"; } } set @cost_total,0; deletearray @bought_nameid[0],128; deletearray @bought_quantity[0],128; // Don't enable this line, NEVER!! Need a solution for this problem // if(BkpZeny != 0) { set Zeny,BkpZeny; set BkpZeny,0; } end;// **********************************************************************//// // Holiday List //// **********************************************************************// G_Holiday: mes .@n$; mes "What do you like to do?"; next; switch(select("- Add:- Remove:- Show List:- Nothing")) {// **********************************************************************//// // Adding Member on the Holiday List //// **********************************************************************// case 1: mes .@n$; mes "Type the member name you want to add:"; next; input @hl_name$; query_sql "SELECT `char_id` FROM `guild_member` WHERE `guild_id` = '"+@guild_id+"' AND `name` = '"+escape_sql(@hl_name$)+"'",@char_id; if(!@char_id) { mes .@n$; mes "The name you have put is wrong."; close; } query_sql "UPDATE `guild_rank_mem` SET `holiday` = '1' WHERE `guild_id` = '"+@guild_id+"' AND `char_id` = '"+@char_id+"'"; mes .@n$; mes "The member "+@hl_name$+" has been added to the "Holiday List"."; close;// **********************************************************************//// // Removing Member from the Holiday List //// **********************************************************************// case 2: mes .@n$; mes "Select the member from the list"; mes "which you want to remove."; next; query_sql "SELECT `char_id` FROM `guild_rank_mem` WHERE `guild_id` = '"+@guild_id+"' AND `holiday` = '1'",@char_id; if(!@char_id) { mes .@n$; mes "There is no member in the list."; close; } query_sql "SELECT `name` FROM `guild_member` WHERE `guild_id` = '"+@guild_id+"' AND `char_id` = '"+@char_id[0]+"'",@char_n$; set @menu$,"- "+@char_n$[0]; for( set @gm_s,1; @gm_s < getarraysize(@char_id); set @gm_s,@gm_s + 1) { query_sql "SELECT `name` FROM `guild_member` WHERE `guild_id` = '"+@guild_id+"' AND `char_id` = '"+@char_id[@gm_s]+"'",@char_n$; set @menu$,@menu$ + ":- "+@char_n$[@gm_s]; } switch(prompt(@menu$)) { default: set @h,@menu - 1; mes .@n$; mes "You have chosen "+ @char_n$[@h]; mes " "; mes "Wanna remove him/her?"; if(select("- Yes:- No") == 2) close; next; query_sql "SELECT `char_id` FROM `guild_member` WHERE `guild_id` = '"+@guild_id+"' AND `name` = '"+escape_sql(@char_n$[@h])+"'",@char_id_n; query_sql "UPDATE `guild_rank_mem` SET `holiday` = '0' WHERE `guild_id` = '"+@guild_id+"' AND `char_id` = '"+@char_id_n+"'"; mes .@n$; mes "The member "+@char_n$[@h]+" has been removed from the List."; close; case 255: goto G_Quit; break; }// **********************************************************************//// // Showing Holiday List //// **********************************************************************// case 3: mes .@n$; mes "These members has been"; mes "put on the list:"; next; query_sql "SELECT `char_id` FROM `guild_rank_mem` WHERE `guild_id` = '"+@guild_id+"' AND `holiday` = '1'",@char_id; if(!@char_id) { mes .@n$; mes "There is no member"; mes "in the list."; close; } query_sql "SELECT `name` FROM `guild_member` WHERE `guild_id` = '"+@guild_id+"' AND `char_id` = '"+@char_id[0]+"'",@char_n$; mes @char_n$[0]; for( set @gm_s,1; @gm_s < getarraysize(@char_id); set @gm_s,@gm_s + 1) { query_sql "SELECT `name` FROM `guild_member` WHERE `guild_id` = '"+@guild_id+"' AND `char_id` = '"+@char_id[@gm_s]+"'",@char_n$; mes @char_n$[@gm_s]; } close; case 4: goto G_Quit; break; } // **********************************************************************//// // Guild Registering //// **********************************************************************// G_Register:mes .@n$;mes "You want to register your Guild for the our Ranking System?";mes "^FF0000Note: This ranking will be permanent until you are disbanding the guild.^000000";if(select("- Yes, please:- No, thanks") - 1) { close;} else { next; mes .@n$; mes "What type is your Guild?"; set @type,select("- WoE:- Non-WoE"); query_sql "INSERT INTO `guild_rank_guild` ( `guild_id` , `type` , `rank` , `woe` , `donate` , `donate_min` , `donate_max` ) VALUES ( '"+@guild_id+"' , '"+@type+"' , '0' , '0' , '0' , '0' , '0' )"; query_sql "SELECT `char_id` FROM `guild_member` WHERE `guild_id` = '"+@guild_id+"' ORDER BY `char_id` ASC",@char_id; for( set @g,0; @g < getarraysize(@char_id); set @g,@g+1) { query_sql "INSERT INTO `guild_rank_mem` ( `guild_id` , `char_id` , `holiday` ) VALUES ( '"+@guild_id+"' , '"+@char_id[@g]+"' , '0' )"; } close;}// **********************************************************************//// // GM Menu //// **********************************************************************// G_GM:next;mes .@n$;mes "Hello "+strcharinfo(0)+",";if($gld_ranker_tbl) { mes "how can I help you?"; next; switch(select("- Guild Ranks:- Re-Check Rank List:- Delete Tables")) { case 1: query_sql "SELECT `guild_id` , `rank` , `woe` FROM `guild_rank_guild` WHERE `rank` > '0' ORDER BY `rank` DESC",.@r_gld,.@r_rank,.@r_woe; mes .@n$; mes "Only Guilds with Ranking Points will be displayed!"; if(.@r_gld[0] == 0) { mes "There is no guild to display."; close; } mes "The format of the list"; mes "will be like this:"; mes " "; mes " Guild Name: Points"; mes "===== Emp Breaks: ==="; mes "x"; mes "*******************"; for( set @r,0; @r < getarraysize(.@r_gld); set @r,@r + 1) { next; mes getguildname(.@r_gld[@r])+": "+.@r_rank; mes "===== Emp Breaks: ==="; mes .@r_woe[@r]; mes "*******************"; } close; case 2: mes .@n$; mes "I will now re-check the Ranking Status for all guilds."; close2; doevent "GuildRanks#Events::OnRankCheck"; end; case 3: mes .@n$; mes "Are you sure to delete everything?"; next; if(select("- Delete:- Nevermind") - 1) { close; } else { close2; query_sql "DROP TABLE IF EXISTS `guild_rank_guild`"; query_sql "DROP TABLE IF EXISTS `guild_rank_mem`"; disablenpc "GuildRanks#Events"; announce "The Guild Ranking System is offline.",0,0xFF0000; set $gld_ranker_tbl,0; end; } }} else { mes "I'm sorry, but the ranking has not been activated yet,"; mes "but it's also necessary to install the required entries in"; mes "your database."; next; mes .@n$; mes "First I will check if you installed it through the entries at the top of the script file."; mes "Then I will activate it."; mes "If that is not the case, I will install and activate the system for you if you want."; next; query_sql "SHOW TABLES LIKE 'guild_rank_guild'",.@c_tbl$; if(.@c_tbl$[0] == "") { mes .@n$; mes "Result:"; mes "The entries are not yet installed wanna install them?"; next; if(select("- Install it~:- Na, it would fail!") - 1) { mes .@n$; mes "How do you wanna know without installing it!!"; emotion e_bzz; percentheal -99,-99; close2; sleep2 2000; percentheal 100,100; end; } else { mes .@n$; mes "Here we go~"; //= Member Table: query_sql "CREATE TABLE `guild_rank_mem` ( `char_id` int(10) , `guild_id` smallint(5) , `rank` smallint(5) , `woe` smallint(5) , `donate` int(11) , `donate_am` int(11) , `holiday` smallint(5) )"; //= Guild Table: query_sql "CREATE TABLE `guild_rank_guild` ( `guild_id` smallint(5) , `type` smallint(5) , `rank` smallint(5) , `woe` smallint(5) , `donate` int(11) , `donate_min` int(11) , `donate_max` int(11) )"; enablenpc "GuildRanks#Events"; announce "The Guild Ranking System is online.",0,0x00FF00; set $gld_ranker_tbl,1; close; } } else { mes .@n$; mes "It seems like the entries has been installed,"; mes "then I will activate the system if you want."; if(select("- Please proceed~:- Stop please") - 1) { close; } else { enablenpc "GuildRanks#Events"; announce "The Guild Ranking System is online.",0,0x00FF00; set $gld_ranker_tbl,1; close; } }}// **********************************************************************//// // Closing Message //// **********************************************************************// G_Quit:mes .@n$;mes "See ya again.";close;G_Array:set @r_menu$,"";set .@rew_it_list$,"";deletearray .@c_tbl$[0],getarraysize(.@c_tbl$);deletearray @gld_mem$[0],getarraysize(@gld_mem$);deletearray @char_id[0],getarraysize(@char_id);deletearray @donate[0],getarraysize(@donate);deletearray @donate_am[0],getarraysize(@donate_am);deletearray @woe[0],getarraysize(@woe);deletearray @rank[0],getarraysize(@rank);deletearray .@r_gld[0],getarraysize(.@r_gld);deletearray .@r_rank[0],getarraysize(.@r_rank);deletearray .@r_woe[0],getarraysize(.@r_woe);return;OnInit:// Guild Rewards:// .rew_woe: Item ID, when you put 1 it will give Zeny as Reward.// .rew_woe_am: Amount of the Items or Zeny.// .rew_woe_need: The points needed// For Emp Breakingsetarray .rew_woe[0],1,969;setarray .rew_woe_am[0],50000,10;setarray .rew_woe_need[0],1,5;// Maximum Zeny for Donation Accountset .don_limit,2000000000; // 2b Zeny// Attaching Items To the Shopnpcshopdelitem "GUILD_SHOP",512;setarray .gshop_id[0],7619,7620;setarray .gshop_cost[0],200000,200000;for ( set .@s,0; .@s < getarraysize(.gshop_id); set .@s,.@s + 1 ) { npcshopadditem "GUILD_SHOP",.gshop_id[.@s],.gshop_cost[.@s];}end;}
-
Thanks annie yes i am on hercules atm so thx for the script made my quest npc making a whoooole lot easier. Just 1 more question will it remove the shuffled data once server closes or smthing? Like i mean will it loose data once i log out or close map server? Thx again!
-
Hey all so this is wat i am thinking about. A quest npc script in which u just need to input any number of items u want(example apple, torn magic book, etc) and input the number of each and then the npc randomly arranges the items for various equips with the given custom quantity of item. Ok still didnt get wat i mean? Heres an example; I input 4 items item 333,123,122,111 I input their quantity, 50,100,20,30 I input an equipment name say id 923 and the max items i want for the questing say 2. Then, npc randomly shuffles the 4 items and gives 2 of the 4 with their quantity to that equipment. Do the same for the next amount of items. This looks more like a utility script :/ but hope u guyz understood. Thanx in advance!
-
Y dont u check it out urself? O.o
-
Did u see the icon on the right side? maybe u disabled /effect. The healer works fine for me D:
-
@broker you have to enable those buffs. Go to the script and remove "//" before wat ever buff u want to enable. if u click the poring without removing that it just heals u.
-
@Judas i had this prob before. Its not that i think. Here are problems i encounterd: Case 1 :If i change max stats and go ingame and type @statall it shows 255. after i reset stats its back to 6010. Is this your problem? plz do tell me. If so then its cuz u didnt enable point table calculations in battle.conf ( i think im not sure.) Case 2: You level up to hmm some 20 levels? and u have some 50 stats. If u type @statall at that time and then reset, u still have 50 stat points only. If thats the case then its not a problem. its just that u got to manually level up till 250 or watever ur max level is so that those stats remain the same.
-
Bump
-
Hey guys been long since I made a script request :3 @annie sorry I don't have time to test the bg queue u made because of my exams X.x will try that once I'm free frm it. Ok about the topic now. Just like woe controller gives the reward directly to the guild leader instead of clicking some reward npcs, I would like a script in which the rewarding is the same but the rewards given are separated. Example : guild leader gets item 212 while guild members get item 224 ( I mean to say they get separate items) and this is the same reward for all castles. Thx in advance p.s: if you don't mind , would like the script for both ramod and hercules thx
-
Then the player will be able to use commands though he's dead
-
I believe this is done through npc scripting ... not in the source code ...show your battleground script then I point it out for you Well its the same hercules bg_common txt or is it possible to edit the script you have made as sample? for example: (not too good wid scripts since joining rA/Herc LOL) u have like 3 select buttons so if those are made to cases then, if case 1: Create BG Team and player who created : xxx then: Announcement will be : mes "xxx Has created a Bg Team! Go to the battlerecuiter to join it!" and if Join BG team which is case 2: mes" yyy has joined the BG team! Wanna Join too? Talk to the battlerecruiter!" and if leave bg then no need announcements cuz that would just spam the crap out of the server lol.
-
Thnx alot Pan its there u saved my day LOL :) +99999 xD
-
I think it should be some thing like @novend or something since its the cells that are counted. i think u need to bindatcmd something like @pvpmode or smthing which activates pvp at that cell. Example @pvp <x> <y>
-
Hey Annie just a suggestion: Could you add an announcement once the random queue starts? Example : If i click join bg queue, an announcement is made for that bgid which has been selected randomly (lets say kvm) then announcement is: "The queue for KVM has begun - Go to the Recruiter to join the queue! Thnx again ^_~
-
Thnx for the quick rep pan! Which part of the src should i check and what should i look for? Thnx again?
-
Its a big achievement that it has come this far so plz be patient Wend. Keep it up guyz U rock ^_~
-
Since the loadmapevent was recently introduced(i think) Will it still work on rAmod? (eamod of rA) cuz i would love to use this in the server yet im too worried that after all the configs i do with the controller, the mapflag wont work. rAmod is at packet DB ver. 30 and so i donno plz do clarify this for me thnx
-
U mean the mount?
-
How to make client read the grf instead of data folder?
Cabrera posted a question in Client-Side Support
Hey guyz i use 10 4 2012 client and just wondered what diff i should use to make client read the grf instead of the data folder. Thx in advance guyz -
Hey annie, solved it i duplicated the script and changed the announcements and castles so that both dont clash uhuhu hope it works thx again!
-
oh lol i was blind sry xD thnx sam, Annie a BIG thanks to u xD
-
//===== rAthena Script =======================================//= Euphy's WOE Controller//===== By: ==================================================//= Euphy//===== Current Version: =====================================//= 1.3b//===== Compatible With: =====================================//= rAthena SVN r16571+//===== Description: =========================================//= A controller for War of Emperium designed for//= simplicity and ease of use.//= Many concepts taken from ToastOfDoom's script,//= and "rewards" function originally by Goddameit.//===== Additional Comments: =================================//= Be sure to disable the default agit controllers!//== npcguildagit_controller.txt//== npcguild2agit_start_se.txt//============================================================prontera,149,193,4 script WOE Information 835,{ doevent "WOE_CONTROL::OnMenu"; end; OnAgitStart: while(agitcheck()) { misceffect 58; sleep 425; } end; }- script WOE_CONTROL -1,{function Disp_Owner; function Add_Zero;OnInit:// -------------------------------------------------------------------------------------------------------------------------- set .CastleWarp,0; // 1: Always enable all castle warps. | 0: Warp only to active castles. set .AutoKick,1; // Automatically kick players from inactive castles during WOE? (1:yes / 0:no) set .ExitWarp,0; // Warp all players from castles when WOE ends? (1:yes / 0:no) set .GMAccess,99; // GM level required to access Session Manager (cannot be 0) setarray .Reward[0],14001,1; // Reward for all members of conquering guilds, per castle: <ID>,<Count>{,...} (0 to disable)// -------------------------------------------------------------------------------------------------------------------------- set .Size, getarraysize($WOE_CONTROL); setarray .Castles$[0], "prtg_cas01","prtg_cas02","prtg_cas03","prtg_cas04","prtg_cas05", "payg_cas01","payg_cas02","payg_cas03","payg_cas04","payg_cas05", "gefg_cas01","gefg_cas02","gefg_cas03","gefg_cas04","gefg_cas05", "aldeg_cas01","aldeg_cas02","aldeg_cas03","aldeg_cas04","aldeg_cas05", "arug_cas01","arug_cas02","arug_cas03","arug_cas04","arug_cas05", "schg_cas01","schg_cas02","schg_cas03","schg_cas04","schg_cas05"; setarray .EndLabel$[0],"ar01","ar02","ar03","ar04","ar05","sc01","sc02","sc03","sc04","sc05"; setarray .Days$[0],"Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"; setarray .Regions$[0],"Prontera","Payon","Geffen","Aldebaran","Arunafeltz","Schwaltzvalt"; setarray .Map$[0],"prt_gld","pay_gld","gef_fild13","alde_gld","aru_gld","sch_gld"; setarray .MapX[0],134,240,153,111,208,121,295,317,140,204,214,308,143,193,305,48, 95,142,239,264,158,83, 68,299,292,293,288, 97,137, 71; setarray .MapY[0], 65,128,137,240,240,233,116,293,160,266, 75,240,240,278, 87,83,249, 85,242, 90,272,47,155,345,107,100,252,196, 90,315; if (!agitcheck() && !agitcheck2()) sleep 4000; set .Init,1;OnMinute00: freeloop(1); if (agitcheck() || agitcheck2()) { for(set .@i,0; .@i<.Size; set .@i,.@i+4) if (gettime(4)==$WOE_CONTROL[.@i] && gettime(3)==$WOE_CONTROL[.@i+2]) { OnWOEEnd: announce "The War Of Emperium is over!",bc_all|bc_woe; AgitEnd; AgitEnd2; sleep 1000; for(set .@j,0; .@j<30; set .@j,.@j+1) { if (.Active[0]&(1<<.@j)) Disp_Owner(.Castles$[.@j],1); else if (.AutoKick) removemapflag .Castles$[.@j], mf_loadevent; if (.ExitWarp) maprespawnguildid .Castles$[.@j],0,3; } if (.Reward[0] && .Active[0] && .ForceEnd != 2) callsub OnReward, .Active[0]; deletearray .Active[0],2; if (.ForceEnd) { set .ForceEnd,0; end; } break; } } if ((!agitcheck() && !agitcheck2()) || .Init) { if (!agitcheck() && !agitcheck2()) set .Init,0; for(set .@i,0; .@i<.Size; set .@i,.@i+4) if (gettime(4)==$WOE_CONTROL[.@i] && gettime(3)>=$WOE_CONTROL[.@i+1] && gettime(3)<$WOE_CONTROL[.@i+2]) { deletearray .Active[0],2; set .Active[0], $WOE_CONTROL[.@i+3]; if (.Init) { AgitEnd; AgitEnd2; } else announce "The War Of Emperium has begun!",bc_all|bc_woe; sleep 1000; AgitStart; AgitStart2; for(set .@j,0; .@j<30; set .@j,.@j+1) { if (.Active[0]&(1<<.@j)) { if (!.Init) Disp_Owner(.Castles$[.@j],0); set .Active[1], .Active[1] | (1<<((.@j/5)+1)); } else { if (.AutoKick) setmapflag .Castles$[.@j], mf_loadevent; if (.@j<20) { donpcevent "Agit#"+.Castles$[.@j]+"::OnAgitEnd"; killmonster .Castles$[.@j], "Agit#"+.Castles$[.@j]+"::OnAgitBreak"; } else { donpcevent "Manager#"+.Castles$[.@j]+"::OnAgitEnd2"; killmonster .Castles$[.@j], "Steward#"+.EndLabel$[.@j-20]+"::OnStartArena"; } } } break; } } set .Init,0; freeloop(0); end;function Disp_Owner { set .@o, getcastledata(getarg(0),1); if (.@o) announce "The ["+getcastlename(getarg(0))+"] castle "+((getarg(1))?"has been conquered":"is currently held")+" by the ["+getguildname(.@o)+"] guild.",bc_all|bc_woe; else announce "The ["+getcastlename(getarg(0))+"] castle is currently unoccupied.",bc_all|bc_woe; return; }function Add_Zero { return ((getarg(0)<10)?"0":"")+getarg(0)+(getarg(1,0)?".":":")+"00"; }OnReward: for(set .@i,0; .@i<30; set .@i,.@i+1) if (getarg(0)&(1<<.@i)) { set .@guild, getcastledata(.Castles$[.@i],1); if (.@guild) { deletearray .@acc[0], getarraysize(.@acc); deletearray .@char[0], getarraysize(.@char); query_sql("SELECT account_id,char_id FROM `guild_member` WHERE guild_id = '"+.@guild+"'", .@acc, .@char); for(set .@j,0; .@j<getarraysize(.@acc); set .@j,.@j+1) if (isloggedin(.@acc[.@j],.@char[.@j])) { for(set .@k,0; .@k<getarraysize(.Reward); set .@k,.@k+2) getitem .Reward[.@k], .Reward[.@k+1], .@acc[.@j]; message rid2name(.@acc[.@j]),"You have been rewarded for conquering "+getcastlename(.Castles$[.@i])+"."; } } } return;OnPCLoadMapEvent: if (!compare(strcharinfo(3),"g_cas")) end; sleep2 1000; message strcharinfo(0), getcastlename(strcharinfo(3))+" is inactive during this WOE session."; sleep2 5000; if (compare(strcharinfo(3),"g_cas")) warp "SavePoint",0,0; end;OnMenu:while(1) { mes "[WOE Information]"; if (agitcheck() || agitcheck2()) { if (!.Size) mes "The War of Emperium is ^0055FFactive^000000."; else { for(set .@i,0; .@i<.Size; set .@i,.@i+4) if (gettime(4)==$WOE_CONTROL[.@i] && gettime(3)>=$WOE_CONTROL[.@i+1] && gettime(3)<$WOE_CONTROL[.@i+2]) { set .@i, $WOE_CONTROL[.@i+2]; break; } mes "The War of Emperium is ^0055FFactive^000000 until ^FF0000"+Add_Zero(.@i)+"^000000 in the following regions:"; mes " "; for(set .@i,0; .@i<6; set .@i,.@i+1) if (.Active[1]&(1<<(.@i+1))) mes " > ^777777"+.Regions$[.@i]+"^000000"; } } else { set .@j,0; set .@k,0; for(set .@i,0; .@i<.Size; set .@i,.@i+4) if ((gettime(4)==$WOE_CONTROL[.@i] && gettime(3)<=$WOE_CONTROL[.@i+1]) || gettime(4)<$WOE_CONTROL[.@i]) { set .@j, $WOE_CONTROL[.@i]; set .@k, $WOE_CONTROL[.@i+1]; break; } if (!.@j && !.@k) { set .@j, $WOE_CONTROL[0]; set .@k, $WOE_CONTROL[1]; } mes "The War of Emperium is ^777777inactive^000000."; if (.Size) { mes " "; mes "The next session will begin"; mes "on ^0055FF"+.Days$[.@j]+"^000000 at "+Add_Zero(.@k)+"^000000."; } } next; switch(select(""+((.CastleWarp || .Active[1])?" ~ Warp to castles...":"")+": ~ Check schedule...: ~ View castle owners...:"+((getgmlevel()<.GMAccess || !getgmlevel())?"":" ~ Manage sessions...")+": ~ ^777777Cancel^000000")) { case 1: set .@menu$,""; for(set .@i,0; .@i<6; set .@i,.@i+1) { if (.CastleWarp || .Active[1]&(1<<(.@i+1))) set .@menu$, .@menu$+" ~ "+((.Active[1]&(1<<(.@i+1)))?"^0055FF":"^777777")+.Regions$[.@i]+" Castles^000000"; set .@menu$, .@menu$+":"; } set .@i, select(.@menu$)-1; set .@menu$,""; for(set .@j,.@i*5; .@j<(.@i*5)+5; set .@j,.@j+1) { if (.CastleWarp || .Active[0]&(1<<.@j)) set .@menu$, .@menu$+" ~ "+((.Active[0]&(1<<.@j))?"^0055FF":"^777777")+getcastlename(.Castles$[.@j])+"^000000"; set .@menu$, .@menu$+":"; } set .@j, select(.@menu$)-1; warp .Map$[.@i],.MapX[(.@i*5)+.@j],.MapY[(.@i*5)+.@j]; close; case 2: mes "[Schedule]"; if (.Size) { freeloop(1); for(set .@i,0; .@i<.Size; set .@i,.@i+4) { mes "> ^FF0000"+.Days$[$WOE_CONTROL[.@i]]+" ("+Add_Zero($WOE_CONTROL[.@i+1])+"-"+Add_Zero($WOE_CONTROL[.@i+2])+")^000000"; for(set .@j,0; .@j<30; set .@j,.@j+1) if ($WOE_CONTROL[.@i+3]&(1<<.@j)) mes " ~ "+getcastlename(.Castles$[.@j])+" ^777777("+.Castles$[.@j]+")^000000"; if (.@i+4<.Size) mes " "; } freeloop(0); } else mes "No times are configured."; next; break; case 3: mes "[Castle Ownership]"; for(set .@i,0; .@i<6; set .@i,.@i+1) { set .@k, .@i*5; mes "> ^FF0000"+.Regions$[.@i]+"^000000"; for(set .@j,.@k; .@j<(.@k+5); set .@j,.@j+1) { set .@t, getcastledata(.Castles$[.@j],1); mes " ~ "+getcastlename(.Castles$[.@j])+": "+((.@t)?"^0055FF"+getguildname(.@t):"^777777unoccupied")+"^000000"; } if (.@i<5) mes " "; } next; break; case 4: while(1) { mes "[Session Manager]"; mes "There are ^0055FF"+(.Size/4)+" session(s)^000000 configured."; mes "What would you like to do?"; next; switch(select(" ~ Add a session...: ~ Delete a session...: ~ Reload settings...:"+((agitcheck() || agitcheck2())?" ~ End WOE session...":"")+": ~ ^777777Go back^000000")) { case 1: mes "[New Session]"; if (.Size > 127) { mes "You have already reached the maximum of 32 sessions."; next; break; } mes "Select a day."; next; set .@Day, select(" ~ "+implode(.Days$,": ~ "))-1; mes "[New Session]"; mes "Select a start time for ^0055FF"+.Days$[.@Day]+"^000000."; next; set .@menu$,""; for(set .@i,0; .@i<23; set .@i,.@i+1) set .@menu$, .@menu$+" ~ "+Add_Zero(.@i,1)+":"; set .@Start, select(.@menu$)-1; mes "[New Session]"; mes "Select an end time for ^0055FF"+.Days$[.@Day]+"^000000."; next; set .@menu$,""; for(set .@i,.@Start+1; .@i<24; set.@i,.@i+1) set .@menu$, .@menu$+" ~ "+Add_Zero(.@i,1)+":"; set .@End, select(.@menu$)+.@Start; for(set .@i,0; .@i<.Size; set .@i,.@i+4) if (.@Day==$WOE_CONTROL[.@i] && ((.@Start >= $WOE_CONTROL[.@i+1] && .@Start < $WOE_CONTROL[.@i+2]) || (.@End > $WOE_CONTROL[.@i+1] && .@End <= $WOE_CONTROL[.@i+2]) || (.@Start <= $WOE_CONTROL[.@i+1] && .@End >= $WOE_CONTROL[.@i+2]))) { mes "[New Session]"; mes "The chosen times overlap with an existing session."; next; set .@d,1; break; } if (.@d) { set .@d,0; break; } set .@Castle,0; while(1) { mes "[New Session]"; mes "^0055FF"+.Days$[.@Day]+" ("+Add_Zero(.@Start)+"-"+Add_Zero(.@End)+")^000000"; mes " > Castles:"; if (!.@Castle) mes " ~ ^777777(none selected)^000000"; else for(set .@i,0; .@i<30; set .@i,.@i+1) if (.@Castle&(1<<.@i)) mes " ~ "+getcastlename(.Castles$[.@i])+" ("+.Castles$[.@i]+")"; next; set .@menu$,((.@Castle)?" ~ ^FF0000Finished...^000000":"")+":"; for(set .@i,0; .@i<30; set .@i,.@i+1) set .@menu$, .@menu$+" ~ "+((.@Castle&(1<<.@i))?"^0055FF":"")+getcastlename(.Castles$[.@i])+" ("+.Castles$[.@i]+")^000000:"; set .@i, select(.@menu$)-1; if (.@i) set .@Castle, .@Castle^(1<<(.@i-1)); else { mes "[New Session]"; mes "Are you sure?"; next; switch(select(" ~ ^0055FFAdd session...^000000: ~ Continue selecting castles...: ~ ^777777Cancel^000000")) { case 1: for(set .@i,0; .@i<.Size; set .@i,.@i+4) if ((.@Day==$WOE_CONTROL[.@i] && .@End<=$WOE_CONTROL[.@i+1]) || .@Day<$WOE_CONTROL[.@i]) { set .@d,1; break; } if (!.@d) { set .@d,1; set .@i,.Size; } copyarray $WOE_CONTROL[.@i+4], $WOE_CONTROL[.@i], .Size-.@i; setarray $WOE_CONTROL[.@i], .@Day, .@Start, .@End, .@Castle; set .Size, getarraysize($WOE_CONTROL); case 3: mes "[New Session]"; mes ((.@d)?"Session added.":"Cancelled."); next; set .@d,1; case 2: break; } if (.@d) { set .@d,0; break; } } } break; case 2: mes "[Remove Session]"; if (!.Size) { mes "There are no sessions configured."; next; break; } mes "Select a session to remove."; next; set .@menu$,""; for(set .@i,0; .@i<.Size; set .@i,.@i+4) set .@menu$, .@menu$+" ~ "+.Days$[$WOE_CONTROL[.@i]]+" ("+Add_Zero($WOE_CONTROL[.@i+1],1)+"-"+Add_Zero($WOE_CONTROL[.@i+2],1)+"):"; set .@menu$, .@menu$+" ~ ^777777Cancel^000000"; set .@i, select(.@menu$)-1; if (.@i==(.Size/4)) break; mes "[Remove Session]"; mes "Delete ^0055FF"+.Days$[$WOE_CONTROL[.@i*4]]+"'s^000000 session?"; mes "This action cannot be undone."; next; set .@j, select(" ~ ^FF0000Delete session...^000000: ~ ^777777Cancel^000000"); mes "[Remove Session]"; if (.@j==2) mes "Cancelled."; else { deletearray $WOE_CONTROL[.@i*4],4; set .Size, getarraysize($WOE_CONTROL); mes "Session deleted."; } next; break; case 3: mes "[Reload Settings]"; mes "This will trigger all events related to new session configurations, if any."; if (agitcheck() || agitcheck2()) { mes " "; mes "Be aware that this will disrupt the current WOE session."; } next; set .@i, select(" ~ ^0055FFReload settings...^000000: ~ ^777777Cancel^000000"); mes "[Reload Settings]"; if (.@i==2) mes "Cancelled."; else { set .Init,1; donpcevent "WOE_CONTROL::OnMinute00"; mes "Variables have been re-initialized."; } next; break; case 4: mes "[Force Agit End]"; if (!agitcheck() && !agitcheck2()) { mes "WOE has already ended."; next; break; } mes "This command will safely execute all AgitEnd events."; mes " "; mes "Kill the current WOE session?"; next; set .@i, select(" ~ ^FF0000End session...^000000:"+((.Reward[0])?" ~ ^FF0000End session without rewards...^000000":"")+": ~ ^777777Cancel^000000"); mes "[Force Agit End]"; if (.@i==3) mes "Cancelled."; else { set .ForceEnd, .@i; donpcevent "WOE_CONTROL::OnWOEEnd"; mes "WOE session terminated."; } next; break; case 5: set .@d,1; break; } if (.@d) { set .@d,0; break; } } break; case 5: close; } }} Thats the controller and sry for the bumps :X thnx again! Bump?
-
Hey annie, the thing is that im trying to give individual gifts for each job. Example: A sniper gets a BG bow. A champion gets a BG knuckle like that so thats y i wanted to know if i can individually giv the gifts from each job quest npc