Zeke Posted March 2, 2014 Group: Members Topic Count: 9 Topics Per Day: 0.00 Content Count: 21 Reputation: 0 Joined: 12/05/13 Last Seen: March 9, 2016 Share Posted March 2, 2014 (edited) Hi, I need a script as follows 1. A Npc should spawn before every WOE i.e 30 mins before the woe starts till the woe gets over. to provide woe supplies to players by clicking on it. 2. The Npc should give items according to the player class as specified. a. A Sniper will get traps, pots and etc as specified b. A Creator will get acid bottles, pots etc as specified etc as to all chars of trans 99 class only. 3. The Npc should reappear before every woe and should give the items only once before every woe. 4. And the npc should give supplies only to players in guild approved by a GM. 5. Server WOE Timings. Sunday 1700 hours - 1900 hours and WEDNESDAY 1800 hours - 2000 hours. Can Anyone help with this script? Edited March 3, 2014 by Zeke Quote Link to comment Share on other sites More sharing options...
Skorm Posted May 23, 2014 Group: Forum Moderator Topic Count: 33 Topics Per Day: 0.01 Content Count: 1282 Reputation: 393 Joined: 02/03/12 Last Seen: Friday at 02:41 AM Share Posted May 23, 2014 - Guildless classes won't get items now.(working) - It wasn't working with if and else for support/offensive creator and high wizard, it used to give only the first item to both the roles/options (eg:- when selected support it gave support item, when selected offensive again it gave support item and not offensive item) same for high wizard. Switch case for stalker, ninja working fine. I changed the script, now it works with switch for hwiz/creators, pls correct if any errors - NPC was able to give items to all classes (non trans/ trans below job 4022). It dint give any item as they were not set in switch class, but it used to show message "here you go". I made some changes, its working now. pls correct if any errors. - Clear guild data was not having options to select yes/no. Once selected it would directly clear the data. I made some changes, pls correct if any errors - Its working now after these changes, but i don't know if i've made any mistakes, please correct them if i have, also i wanna ask if we can add another option for Guild Leaders, like there's one for GMs. So, they can be able to claim "Guild Leader Package". EDIT :- We are able to add 1 Guild multiple times. - script SupplyTrigger -1,{ OnWed1700: OnSun1600: enablenpc "WoE Supply"; end; OnAgitEnd: OnAgitEnd2: disablenpc "WoE Supply"; end; } prontera,100,200,3 script WoE Supply 78,{ function sf { function s; .@a = getarg(2); .@len = getarg(3); return ( sprintf( getarg(0), s(.@a, .@len, getarg(1)), s(.@a++, .@len, getarg(1)), s(.@a++, .@len, getarg(1)), s(.@a++, .@len, getarg(1)), s(.@a++, .@len, getarg(1)), s(.@a++, .@len, getarg(1)), s(.@a++, .@len, getarg(1)), s(.@a++, .@len, getarg(1)), s(.@a++, .@len, getarg(1)), s(.@a++, .@len, getarg(1)) ) +(( .@a+1 < .@len )?":Next":":") +(( .@a-11 > 0 )?":Back":":") +":Cancel" ); function s { if( getarg(0) >= getarg(1) ) return ""; else { .@name$ = getguildname(getelementofarray(getarg(2),getarg(0))); return .@name$=="null"?"":.@name$; } }; }; function nex { return((getarg(0)+10)<getarg(1)?getarg(0)+10:getarg(1)-(getarg(1)%10)); }; function bac { return((getarg(0)-10)>=0?getarg(0)-10:0); }; if( getgmlevel()>=80 ) { mes .Npc_Name$; mes "Hello Mr. GM what would you like to do?"; next; switch( select("Add/Remove Guilds:Clear Guild Data:Player Menu:Cancel") ) { case 1: mes .Npc_Name$; mes "Would you like to add or remove a guild?"; .@a_len = getarraysize($App_Guilds); .@format$ = "%s:%s:%s:%s:%s:%s:%s:%s:%s:%s"; next; if( select("Remove:Add") == 1 ) { while( .@a != 9999 ) { select( sf( .@format$, $App_Guilds, .@a, .@a_len ) ); switch( @menu ) { case 11: .@a = nex( .@a, .@a_len ); break; case 12: .@a = bac( .@a ); break; case 13: end; default: .@select = .@a+@menu-1; mes .Npc_Name$; mes "You've selected ^0000FF["+getguildname($App_Guilds[.@select])+"]^000000 guild. Would you like to remove them from the accepted guilds?"; next; if( select("Yes:No") == 1 ) { deletearray($App_Guilds[.@select],1); mes .Npc_Name$; mes "The guild has been removed!"; } close; } } } else { mes .Npc_Name$; mes "Please input guild name or masters name."; next; input(.@input$); .@len = query_sql( "Select `guild_id` from `guild` where `name` like '%"+escape_sql(.@input$)+"%' or `master` like '%"+escape_sql(.@input$)+"%';",.@guild_id ); while( .@a != 9999 ) { select( sf( .@format$, .@guild_id, .@a, .@len ) ); switch( @menu ) { case 11: .@a = nex( .@a, .@len ); break; case 12: .@a = bac( .@a ); break; case 13: end; default: .@select = .@a+@menu-1; .@a_len = getarraysize($App_Guilds); for(.@b=0;.@b<.@a_len;.@b++) if( $App_Guilds[.@b]==.@guild_id[.@select] ) { mes .Npc_Name$; mes "You've selected ^0000FF["+getguildname(.@guild_id[.@select])+"]^000000 guild. I'm sorry but that guild has already been added to the accepted list."; close; } mes .Npc_Name$; mes "You've selected ^0000FF["+getguildname(.@guild_id[.@select])+"]^000000 guild. Would you like to add them to the accepted guilds?"; next; if( select("Yes:No") == 1 ) { .@a_len = getarraysize($App_Guilds); if( .@a_len>=128 ) { mes .Npc_Name$; mes "I'm sorry but the accepted list is full please make some room and try again..."; } else { mes .Npc_Name$; mes "The guild was successfully added!"; $App_Guilds[.@a_len] = .@guild_id[.@select]; } } close; } } } case 2: mes .Npc_Name$; mes "Are you sure you want to clear the guild data?!"; next; if( select("Yes!:No!")==1 ) { mes .Npc_Name$; mes "This is you last chance. Are you surly sure as sure can be?"; next; if( select("Surly!:No, wait... Where am I?!!")==1 ) deletearray($App_Guilds); } if( @menu==1 ) { mes .Npc_Name$; mes "The deed is done..."; } else { mes .Npc_Name$; mes "Wow that was a close one... Have a nice day!"; } close; case 3: break; case 4: mes .Npc_Name$; mes "Alright, have a nice day!"; close; } } mes .Npc_Name$; mes "I'm here to give you supplies for WoE!"; next; mes .Npc_Name$; .@len = getarraysize($App_Guilds); for( .@i=0; .@i <= .@len; .@i++ ) { if( getcharid(2) == $App_Guilds[.@i] ) set .@Guild_Check, .@Guild_Check+1; } if( .@Guild_Check < 1 ) { mes "Your guild has not yet been approved, please contact the GMs"; close; } if( !getcharid(2) ) { mes "Sorry only members of a guild may use this npc."; close; } if( BaseLevel < 99 || Class > 4022 ) { mes "Sorry this is for Lvl 99 Trans Class only"; close; } if( gettimetick(2) < #delay ) { mes "Sorry, you can only claim this once every WoE"; close; } switch( Class ) { case 4009: //High Priest getitem 19052,1; //HP Pack break; case 4010: //High Wizard mes "Please choose your role"; mes "Support : Ganbantien"; mes "Offensive : SG/MS/LOV (Includes Crystal Fragments)"; next; if( select("Support High Wizard:Offensive High Wizard")==1 ) getitem 19047,1; //Support HWIZ Pack else getitem 19046,1; //Offensive HWIZ Pack break; case 4011: //Whitesmith getitem 19051,1; //Whitesmith Pack break; case 4012: //Sniper getitem 19054,1; //Sniper Pack break; case 4013: //Sinx getitem 19055,1; //Sinx Pack break; case 4016: //Champion getitem 19053,1; //Champion Pack break; case 4017: //Professor getitem 19048,1; //Prof Pack break; case 4018: //Stalker mes "Please choose your type."; mes "Flame : Flame Stone"; mes "Ice : Ice Stone"; mes "Wind : Wind Stone"; mes "Shadow : Shadow Orb"; next; switch( select("Flame:Ice:Wind:Shadow") ) { case 1: getitem 19056,1; break; case 2: getitem 19057,1; break; case 3: getitem 19058,1; break; case 4: getitem 19059,1; } break; case 4019: //Creator mes "Please choose your role."; mes "Support : Slim Potion Pitcher"; mes "Offensive : Acid Demonstration"; next; if( select("Support Creator:Offensive Creator")==1 ) getitem 19050,1; else getitem 19049,1; break; case 25: //Ninja mes "Please choose your type."; mes "Flame : Flame Stone"; mes "Ice : Ice Stone"; mes "Wind : Wind Stone"; mes "Shadow : Shadow Orb"; next; switch( select("Flame:Ice:Wind:Shadow") ) { case 1: getitem 19056,1; break; case 2: getitem 19057,1; break; case 3: getitem 19058,1; break; case 4: getitem 19059,1; } break; //Add more cases for all classes default: if( !callsub( L_GLSub, .Npc_Name$ ) ) mes "Sorry this is only for the classes which require items for using skills."; close; } set #delay, gettimetick(2)+10800; callsub( L_GLSub, .Npc_Name$ ); mes "There you are, goodluck!"; close; L_GLSub: if( getguildmasterid(getcharid(2)) == getcharid(0) ) { mes getarg(0); mes "Would you like to claim your guild leader package too?"; next; if( select("Yes:No")==1 ) switch( gettime(4) ) { case 0: getitem 19056,1; break; //Sunday case 1: getitem 19056,1; break; //Monday case 2: getitem 19056,1; break; //Tuesday case 3: getitem 19056,1; break; //Wednesday case 4: getitem 19056,1; break; //Thursday case 5: getitem 19056,1; break; //Friday case 6: getitem 19056,1; //Saturday } return 1; } return 0; OnInit: set .Npc_Name$, "[^0000FF WoE Supply ^000000]"; disablenpc "WoE Supply"; end; } 1 Quote Link to comment Share on other sites More sharing options...
-1 DEsMOn Posted December 2, 2021 Group: Members Topic Count: 63 Topics Per Day: 0.04 Content Count: 172 Reputation: 1 Joined: 11/16/20 Last Seen: November 4, 2023 Share Posted December 2, 2021 On 5/23/2014 at 5:07 AM, Skorm said: Yeah some things still haven't been tested like the next and back buttons when there are more than 10 guilds in the list but it should work. - script SupplyTrigger -1,{ OnWed1700: OnSun1600: enablenpc "WoE Supply"; end; OnAgitEnd: OnAgitEnd2: disablenpc "WoE Supply"; end; } prontera,100,200,3 script WoE Supply 78,{ function sf { function s; .@a = getarg(2); .@len = getarg(3); return ( sprintf( getarg(0), s(.@a, .@len, getarg(1)), s(.@a++, .@len, getarg(1)), s(.@a++, .@len, getarg(1)), s(.@a++, .@len, getarg(1)), s(.@a++, .@len, getarg(1)), s(.@a++, .@len, getarg(1)), s(.@a++, .@len, getarg(1)), s(.@a++, .@len, getarg(1)), s(.@a++, .@len, getarg(1)), s(.@a++, .@len, getarg(1)) ) +(( .@a+1 < .@len )?":Next":":") +(( .@a-11 > 0 )?":Back":":") +":Cancel" ); function s { if( getarg(0) >= getarg(1) ) return ""; else { .@name$ = getguildname(getelementofarray(getarg(2),getarg(0))); return .@name$=="null"?"":.@name$; } }; }; function nex { return((getarg(0)+10)<getarg(1)?getarg(0)+10:getarg(1)-(getarg(1)%10)); }; function bac { return((getarg(0)-10)>=0?getarg(0)-10:0); }; if( getgmlevel()>=80 ) { mes .Npc_Name$; mes "Hello Mr. GM what would you like to do?"; next; switch( select("Add/Remove Guilds:Clear Guild Data:Player Menu:Cancel") ) { case 1: mes .Npc_Name$; mes "Would you like to add or remove a guild?"; .@a_len = getarraysize($App_Guilds); .@format$ = "%s:%s:%s:%s:%s:%s:%s:%s:%s:%s"; next; if( select("Remove:Add") == 1 ) { while( .@a != 9999 ) { select( sf( .@format$, $App_Guilds, .@a, .@a_len ) ); switch( @menu ) { case 11: .@a = nex( .@a, .@a_len ); break; case 12: .@a = bac( .@a ); break; case 13: end; default: .@select = .@a+@menu-1; mes .Npc_Name$; mes "You've selected ^0000FF["+getguildname($App_Guilds[.@select])+"]^000000 guild. Would you like to remove them from the accepted guilds?"; next; if( select("Yes:No") == 1 ) { deletearray($App_Guilds[.@select],1); mes .Npc_Name$; mes "The guild has been removed!"; } close; } } } else { mes .Npc_Name$; mes "Please input guild name or masters name."; next; input(.@input$); .@len = query_sql( "Select `guild_id` from `guild` where `name` like '%"+escape_sql(.@input$)+"%' or `master` like '%"+escape_sql(.@input$)+"%';",.@guild_id ); while( .@a != 9999 ) { select( sf( .@format$, .@guild_id, .@a, .@len ) ); switch( @menu ) { case 11: .@a = nex( .@a, .@len ); break; case 12: .@a = bac( .@a ); break; case 13: end; default: .@select = .@a+@menu-1; .@a_len = getarraysize($App_Guilds); for(.@b=0;.@b<.@a_len;.@b++) if( $App_Guilds[.@b]==.@guild_id[.@select] ) { mes .Npc_Name$; mes "You've selected ^0000FF["+getguildname(.@guild_id[.@select])+"]^000000 guild. I'm sorry but that guild has already been added to the accepted list."; close; } mes .Npc_Name$; mes "You've selected ^0000FF["+getguildname(.@guild_id[.@select])+"]^000000 guild. Would you like to add them to the accepted guilds?"; next; if( select("Yes:No") == 1 ) { .@a_len = getarraysize($App_Guilds); if( .@a_len>=128 ) { mes .Npc_Name$; mes "I'm sorry but the accepted list is full please make some room and try again..."; } else { mes .Npc_Name$; mes "The guild was successfully added!"; $App_Guilds[.@a_len] = .@guild_id[.@select]; } } close; } } } case 2: mes .Npc_Name$; mes "Guild data cleared!"; deletearray($App_Guilds); close; case 3: break; case 4: mes .Npc_Name$; mes "Alright, have a nice day!"; close; } } mes .Npc_Name$; mes "I'm here to give you supplies for WoE!"; next; mes .Npc_Name$; for( set .@i,0; .@i <= getarraysize($App_Guilds); set .@i, .@i+1 ) { if( getcharid(2) == $App_Guilds[.@i] ) set .@Guild_Check, .@Guild_Check+1; } if( .@Guild_Check < 1 ) { mes "Your guild has not yet been approved, please contact the GMs"; close; } if( !getcharid(2) ) { mes "Sorry only members of a guild may use this npc."; close; } if( BaseLevel < 99 || Class > 4022 ) { mes "Sorry this is for Lvl 99 Trans Class only"; close; } if( gettimetick(2) < #delay ) { mes "Sorry, you can only claim this once every WoE"; close; } switch( Class ) { case 4012: //Sniper class getitem 1065,10; //10 Traps getitem 504,20; //20 White potions break; case 4019: //Creator class getitem 7136,10; //10 Acid Bottles getitem 504,20; //20 White potions break; //Add more cases for all classes default: break; } set #delay, gettimetick(2)+10800; mes "Here you go, goodluck!"; close; OnInit: set .Npc_Name$, "[^0000FF WoE Supply ^000000]"; disablenpc "WoE Supply"; end; } Great Work...!! was looking for this and found this ..!! 1 Quote Link to comment Share on other sites More sharing options...
Patskie Posted March 3, 2014 Group: Members Topic Count: 50 Topics Per Day: 0.01 Content Count: 1702 Reputation: 241 Joined: 09/05/12 Last Seen: 11 hours ago Share Posted March 3, 2014 You should at least let us know what is your server woe time? 1 Quote Link to comment Share on other sites More sharing options...
sandbox Posted March 3, 2014 Group: Members Topic Count: 38 Topics Per Day: 0.01 Content Count: 949 Reputation: 174 Joined: 06/12/12 Last Seen: Sunday at 03:55 PM Share Posted March 3, 2014 Kindly test and check for errors for I do not have an active emulator. - script SupplyTrigger -1,{ OnInit: disablenpc "Woe Supply"; OnClockXYAB: //Change XYAB variables to HOUR+MINUTE, 1830 = 6:30pm enablenpc "WoE Supply"; end; OnAgitEnd: OnAgitEnd2: disablenpc "WoE Supply"; end; } prontera,100,200,3 script WoE Supply 78,{ mes .@Npc_Name$; mes "I'm here to give you supplies for WoE!"; next; mes .@Npc_Name$; for(set .@i,0; .@i <= getarraysize(.@App_Guild); set .@i, .@i+1) { if(getcharid(2) == .@App_Guild[.@i]) set .@Guild_Check,.@Guild_Check+1; } if(.@Guild_Check < 1) { mes "Your guild has not yet been approved, please contact the GMs"; close; } if(BaseLevel < 99 || Class > 4022) { mes "Sorry this is for Lvl 99 Trans Class only"; close; } switch(Class) { case 4012: //Sniper class getitem 1065,10; //10 Traps getitem 504,20; //20 White potions break; case 4019: //Creator class getitem 7136,10; //10 Acid Bottles getitem 504,20; //20 White potions break; //Add more cases for all classes default: break; } mes "Here you go, goodluck!"; close; OnInit: setarray .@App_Guild[0],1001,1002,1003; //Edit content to Guild IDs of approved guilds. set .@Npc_Name$,"[^0000FF WoE Supply ^000000]"; end; } Quote Link to comment Share on other sites More sharing options...
Zeke Posted March 3, 2014 Group: Members Topic Count: 9 Topics Per Day: 0.00 Content Count: 21 Reputation: 0 Joined: 12/05/13 Last Seen: March 9, 2016 Author Share Posted March 3, 2014 (edited) Hi, In the script the Npc is active the whole time. It should activate only on wednesday 1700 Hours to 2000 hours and on Sunday 1600 Hours to 1900 Hours. Second thing. It should provide supplies only once before every seige. Thank You for ya help though .. Appreciate.. Edited March 3, 2014 by Zeke Quote Link to comment Share on other sites More sharing options...
sandbox Posted March 4, 2014 Group: Members Topic Count: 38 Topics Per Day: 0.01 Content Count: 949 Reputation: 174 Joined: 06/12/12 Last Seen: Sunday at 03:55 PM Share Posted March 4, 2014 Upon loading it via @loadscript, yes it would show up but when the server starts, it wouldn't. So you have to hide it manually if you load it via command. For the new schedule, replace OnHour with OnWed1700: OnSun1600: For the one time limit, add this if(gettimetick(2) < .@Delay) { mes "Sorry, you can only claim this once every WoE"; close; } above switch(Class) { also this .@Delay = gettimetick(2)+10800; above mes "Here you go, goodluck!"; Quote Link to comment Share on other sites More sharing options...
Zeke Posted March 4, 2014 Group: Members Topic Count: 9 Topics Per Day: 0.00 Content Count: 21 Reputation: 0 Joined: 12/05/13 Last Seen: March 9, 2016 Author Share Posted March 4, 2014 Mate i am yet getting the items every time im talking to the npc. And i restarted the server. yet the npc is showing up. It should show only between the timing specified. Quote Link to comment Share on other sites More sharing options...
sandbox Posted March 5, 2014 Group: Members Topic Count: 38 Topics Per Day: 0.01 Content Count: 949 Reputation: 174 Joined: 06/12/12 Last Seen: Sunday at 03:55 PM Share Posted March 5, 2014 I forgot to add an 'end;' on the OnInit part, kindly add it and test. May you show me the script and let me look if it's properly placed Quote Link to comment Share on other sites More sharing options...
Zeke Posted March 5, 2014 Group: Members Topic Count: 9 Topics Per Day: 0.00 Content Count: 21 Reputation: 0 Joined: 12/05/13 Last Seen: March 9, 2016 Author Share Posted March 5, 2014 - script SupplyTrigger -1,{ OnInit: disablenpc "Woe Supply"; OnWed1700: OnSun1600: enablenpc "WoE Supply"; end; OnAgitEnd: OnAgitEnd2: disablenpc "WoE Supply"; end; } prontera,100,200,3 script WoE Supply 78,{ mes .@Npc_Name$; mes "I'm here to give you supplies for WoE!"; next; mes .@Npc_Name$; for(set .@i,0; .@i <= getarraysize(.@App_Guild); set .@i, .@i+1) { if(getcharid(2) == .@App_Guild[.@i]) set .@Guild_Check,.@Guild_Check+1; } if(.@Guild_Check < 1) { mes "Your guild has not yet been approved, please contact the GMs"; close; } if(BaseLevel < 99 || Class > 4022) { mes "Sorry this is for Lvl 99 Trans Class only"; close; } if(gettimetick(2) < .@Delay) { mes "Sorry, you can only claim this once every WoE"; close; } switch(Class) { case 4012: //Sniper class getitem 1065,10; //10 Traps getitem 504,20; //20 White potions break; case 4019: //Creator class getitem 7136,10; //10 Acid Bottles getitem 504,20; //20 White potions break; //Add more cases for all classes default: break; } .@Delay = gettimetick(2)+10800; mes "Here you go, goodluck!"; close; OnInit: setarray .@App_Guild[0],1001,1002,1003; //Edit content to Guild IDs of approved guilds. set .@Npc_Name$,"[^0000FF WoE Supply ^000000]"; end; } Here is the script. Ty Quote Link to comment Share on other sites More sharing options...
sandbox Posted March 5, 2014 Group: Members Topic Count: 38 Topics Per Day: 0.01 Content Count: 949 Reputation: 174 Joined: 06/12/12 Last Seen: Sunday at 03:55 PM Share Posted March 5, 2014 Kindly test - script SupplyTrigger -1,{ OnWed1700: OnSun1600: enablenpc "WoE Supply"; end; OnAgitEnd: OnAgitEnd2: disablenpc "WoE Supply"; end; } prontera,100,200,3 script WoE Supply 78,{ mes .@Npc_Name$; mes "I'm here to give you supplies for WoE!"; next; mes .@Npc_Name$; for(set .@i,0; .@i <= getarraysize(.@App_Guild); set .@i, .@i+1) { if(getcharid(2) == .@App_Guild[.@i]) set .@Guild_Check,.@Guild_Check+1; } if(.@Guild_Check < 1) { mes "Your guild has not yet been approved, please contact the GMs"; close; } if(BaseLevel < 99 || Class > 4022) { mes "Sorry this is for Lvl 99 Trans Class only"; close; } if(gettimetick(2) < Delay) { mes "Sorry, you can only claim this once every WoE"; close; } switch(Class) { case 4012: //Sniper class getitem 1065,10; //10 Traps getitem 504,20; //20 White potions break; case 4019: //Creator class getitem 7136,10; //10 Acid Bottles getitem 504,20; //20 White potions break; //Add more cases for all classes default: break; } set Delay,gettimetick(2)+10800; mes "Here you go, goodluck!"; close; OnInit: setarray .@App_Guild[0],1001,1002,1003; //Edit content to Guild IDs of approved guilds. set .@Npc_Name$,"[^0000FF WoE Supply ^000000]"; disablenpc "WoE Supply"; end; } Quote Link to comment Share on other sites More sharing options...
Zeke Posted March 6, 2014 Group: Members Topic Count: 9 Topics Per Day: 0.00 Content Count: 21 Reputation: 0 Joined: 12/05/13 Last Seen: March 9, 2016 Author Share Posted March 6, 2014 sir, the script is malfunctioning. The Npc now comes on inputted time. But when you click on the NPC it disappears without giving any items immediately. Quote Link to comment Share on other sites More sharing options...
sandbox Posted March 6, 2014 Group: Members Topic Count: 38 Topics Per Day: 0.01 Content Count: 949 Reputation: 174 Joined: 06/12/12 Last Seen: Sunday at 03:55 PM Share Posted March 6, 2014 Oh sorry, kindly move this part to the last, before the closing brace } OnInit: setarray .@App_Guild[0],1001,1002,1003; //Edit content to Guild IDs of approved guilds. set .@Npc_Name$,"[^0000FF WoE Supply ^000000]"; disablenpc "WoE Supply"; end; Quote Link to comment Share on other sites More sharing options...
Zeke Posted March 12, 2014 Group: Members Topic Count: 9 Topics Per Day: 0.00 Content Count: 21 Reputation: 0 Joined: 12/05/13 Last Seen: March 9, 2016 Author Share Posted March 12, 2014 Hey sandbox sorry was out of town. Thanx for the script. Modified few things and works fine now ... Quote Link to comment Share on other sites More sharing options...
Veracious Posted May 12, 2014 Group: Members Topic Count: 17 Topics Per Day: 0.00 Content Count: 179 Reputation: 17 Joined: 04/24/14 Last Seen: February 17, 2024 Share Posted May 12, 2014 (edited) Kindly test - script SupplyTrigger -1,{ OnWed1700: OnSun1600: enablenpc "WoE Supply"; end; OnAgitEnd: OnAgitEnd2: disablenpc "WoE Supply"; end; } prontera,100,200,3 script WoE Supply 78,{ mes .@Npc_Name$; mes "I'm here to give you supplies for WoE!"; next; mes .@Npc_Name$; for(set .@i,0; .@i <= getarraysize(.@App_Guild); set .@i, .@i+1) { if(getcharid(2) == .@App_Guild[.@i]) set .@Guild_Check,.@Guild_Check+1; } if(.@Guild_Check < 1) { mes "Your guild has not yet been approved, please contact the GMs"; close; } if(BaseLevel < 99 || Class > 4022) { mes "Sorry this is for Lvl 99 Trans Class only"; close; } if(gettimetick(2) < Delay) { mes "Sorry, you can only claim this once every WoE"; close; } switch(Class) { case 4012: //Sniper class getitem 1065,10; //10 Traps getitem 504,20; //20 White potions break; case 4019: //Creator class getitem 7136,10; //10 Acid Bottles getitem 504,20; //20 White potions break; //Add more cases for all classes default: break; } set Delay,gettimetick(2)+10800; mes "Here you go, goodluck!"; close; OnInit: setarray .@App_Guild[0],1001,1002,1003; //Edit content to Guild IDs of approved guilds. set .@Npc_Name$,"[^0000FF WoE Supply ^000000]"; disablenpc "WoE Supply"; end; } I tested this script its working great for me but it is spamable --- people can get multiple items/packages by loging in other characters of the same account. I know that there's a guild register option but players can kick guild members and add others again. Its very much possible to abuse this way even if i set guild register option. This can be easily abused in mid rates and high rates. Much more.. its all listed below Can you pls modify it like :- 1) Only 1 Character per account can use it. By Default its like --- A character who has already claimed the package can char select and login another character of the same account & claim the items once again and he can place them into storage and use double items Can it also be modified like :- lets say, if a Sniper claims the items/package. Then, from the same account he cant login in his Creator and have another package. Doing this wont let players abuse the amount of items given to them every woe and have almost unlimited supplies which can ofcourse be used on every other map because these items will be the original items which can't be disabled on non-gvg maps. Making custom items wont work for EDP AD GEMS,etc because skills dont accept custom items and it will require source editing. So, how about making it like only one char of an account can claim it? --------Items created from opening boxes with the use of getitembound cant be traded,vended,mailed,dropped,etc. So, this will work perfectly if thats set as players wont be able to make multiple accounts for claiming the supply and giving it to their main accounts. 2) Having more options to select some classes which require a complete different set of items like (Creator), (HWiz),(NinjaORStalker), (Guild Master Package) etc like i)Support Creator ii)Damage Creator, i)Support HWiz ii)Damage Hwiz & for (NinjaorStalker) --- here Ninja and stalkers have 4 options i)Fire Type ii)Ice Type iii)Wind Type iv)Shadow Type for Guild Master Package i) Guild Master Package WOE FE ii) Guild Master Package WOE SE. Details of point 2 - Players can Select their "roles" of WOE whether they're full support classes(FS) or damage dealer classes(DD) or if they're Guild Masters. Guild Masters - any Guild Leaders who claims Guild Master Package can also claim their class specific packages too. (This can also be abused if there are Guild Leader Changer NPCs on servers) Edited May 12, 2014 by Veracious Quote Link to comment Share on other sites More sharing options...
Veracious Posted May 15, 2014 Group: Members Topic Count: 17 Topics Per Day: 0.00 Content Count: 179 Reputation: 17 Joined: 04/24/14 Last Seen: February 17, 2024 Share Posted May 15, 2014 need this bump Quote Link to comment Share on other sites More sharing options...
Skorm Posted May 22, 2014 Group: Forum Moderator Topic Count: 33 Topics Per Day: 0.01 Content Count: 1282 Reputation: 393 Joined: 02/03/12 Last Seen: Friday at 02:41 AM Share Posted May 22, 2014 - script SupplyTrigger -1,{ OnWed1700: OnSun1600: enablenpc "WoE Supply"; end; OnAgitEnd: OnAgitEnd2: disablenpc "WoE Supply"; end; } prontera,100,200,3 script WoE Supply 78,{ mes .Npc_Name$; mes "I'm here to give you supplies for WoE!"; next; mes .Npc_Name$; for( set .@i,0; .@i <= getarraysize(.App_Guild); set .@i, .@i+1 ) { if( getcharid(2) == .App_Guild[.@i] ) set .@Guild_Check, .@Guild_Check+1; } if( .@Guild_Check < 1 ) { mes "Your guild has not yet been approved, please contact the GMs"; close; } if( BaseLevel < 99 || Class > 4022 ) { mes "Sorry this is for Lvl 99 Trans Class only"; close; } if( gettimetick(2) < #delay && compare(#job$+"|","|"+Class+"|") ) { mes "Sorry, you can only claim this once every WoE"; close; } if( gettimetick(2) >= #delay ) set #job$, ""; switch( Class ) { case 4012: //Sniper class getitem 1065,10; //10 Traps getitem 504,20; //20 White potions break; case 4019: //Creator class getitem 7136,10; //10 Acid Bottles getitem 504,20; //20 White potions break; //Add more cases for all classes default: break; } set #delay, gettimetick(2)+10800; set #job$, #job$+"|"+Class; mes "Here you go, goodluck!"; close; OnInit: setarray .App_Guild[0], 1001, 1002, 1003; //Edit content to Guild IDs of approved guilds. set .Npc_Name$, "[^0000FF WoE Supply ^000000]"; disablenpc "WoE Supply"; end; } I switched it up a little bit so that players can't get items of the same class by logging onto a different character. Quote Link to comment Share on other sites More sharing options...
Veracious Posted May 22, 2014 Group: Members Topic Count: 17 Topics Per Day: 0.00 Content Count: 179 Reputation: 17 Joined: 04/24/14 Last Seen: February 17, 2024 Share Posted May 22, 2014 (edited) I switched it up a little bit so that players can't get items of the same class by logging onto a different character. Hi, thanks for looking into this. I have a question... does it also mean that only 1 char per account can get supply? or its still like any number of chars can take it but only with class restriction which you put? If its so, can you change it to 1 character per account please? Also, can it be designed like GM doesn't have to edit the script, instead he will just be able to register and remove guild ids from the npc itself instead of editing the script everytime a new guild wants to be registered. Edited May 22, 2014 by Veracious Quote Link to comment Share on other sites More sharing options...
Skorm Posted May 22, 2014 Group: Forum Moderator Topic Count: 33 Topics Per Day: 0.01 Content Count: 1282 Reputation: 393 Joined: 02/03/12 Last Seen: Friday at 02:41 AM Share Posted May 22, 2014 Hi, thanks for looking into this. I have a question... does it also mean that only 1 char per account can get supply? or its still like any number of chars can take it but only with class restriction which you put? If its so, can you change it to 1 character per account please? Also, can it be designed like GM doesn't have to edit the script, instead he will just be able to register and remove guild ids from the npc itself instead of editing the script everytime a new guild wants to be registered. Yeah some things still haven't been tested like the next and back buttons when there are more than 10 guilds in the list but it should work. - script SupplyTrigger -1,{ OnWed1700: OnSun1600: enablenpc "WoE Supply"; end; OnAgitEnd: OnAgitEnd2: disablenpc "WoE Supply"; end; } prontera,100,200,3 script WoE Supply 78,{ function sf { function s; .@a = getarg(2); .@len = getarg(3); return ( sprintf( getarg(0), s(.@a, .@len, getarg(1)), s(.@a++, .@len, getarg(1)), s(.@a++, .@len, getarg(1)), s(.@a++, .@len, getarg(1)), s(.@a++, .@len, getarg(1)), s(.@a++, .@len, getarg(1)), s(.@a++, .@len, getarg(1)), s(.@a++, .@len, getarg(1)), s(.@a++, .@len, getarg(1)), s(.@a++, .@len, getarg(1)) ) +(( .@a+1 < .@len )?":Next":":") +(( .@a-11 > 0 )?":Back":":") +":Cancel" ); function s { if( getarg(0) >= getarg(1) ) return ""; else { .@name$ = getguildname(getelementofarray(getarg(2),getarg(0))); return .@name$=="null"?"":.@name$; } }; }; function nex { return((getarg(0)+10)<getarg(1)?getarg(0)+10:getarg(1)-(getarg(1)%10)); }; function bac { return((getarg(0)-10)>=0?getarg(0)-10:0); }; if( getgmlevel()>=80 ) { mes .Npc_Name$; mes "Hello Mr. GM what would you like to do?"; next; switch( select("Add/Remove Guilds:Clear Guild Data:Player Menu:Cancel") ) { case 1: mes .Npc_Name$; mes "Would you like to add or remove a guild?"; .@a_len = getarraysize($App_Guilds); .@format$ = "%s:%s:%s:%s:%s:%s:%s:%s:%s:%s"; next; if( select("Remove:Add") == 1 ) { while( .@a != 9999 ) { select( sf( .@format$, $App_Guilds, .@a, .@a_len ) ); switch( @menu ) { case 11: .@a = nex( .@a, .@a_len ); break; case 12: .@a = bac( .@a ); break; case 13: end; default: .@select = .@a+@menu-1; mes .Npc_Name$; mes "You've selected ^0000FF["+getguildname($App_Guilds[.@select])+"]^000000 guild. Would you like to remove them from the accepted guilds?"; next; if( select("Yes:No") == 1 ) { deletearray($App_Guilds[.@select],1); mes .Npc_Name$; mes "The guild has been removed!"; } close; } } } else { mes .Npc_Name$; mes "Please input guild name or masters name."; next; input(.@input$); .@len = query_sql( "Select `guild_id` from `guild` where `name` like '%"+escape_sql(.@input$)+"%' or `master` like '%"+escape_sql(.@input$)+"%';",.@guild_id ); while( .@a != 9999 ) { select( sf( .@format$, .@guild_id, .@a, .@len ) ); switch( @menu ) { case 11: .@a = nex( .@a, .@len ); break; case 12: .@a = bac( .@a ); break; case 13: end; default: .@select = .@a+@menu-1; .@a_len = getarraysize($App_Guilds); for(.@b=0;.@b<.@a_len;.@b++) if( $App_Guilds[.@b]==.@guild_id[.@select] ) { mes .Npc_Name$; mes "You've selected ^0000FF["+getguildname(.@guild_id[.@select])+"]^000000 guild. I'm sorry but that guild has already been added to the accepted list."; close; } mes .Npc_Name$; mes "You've selected ^0000FF["+getguildname(.@guild_id[.@select])+"]^000000 guild. Would you like to add them to the accepted guilds?"; next; if( select("Yes:No") == 1 ) { .@a_len = getarraysize($App_Guilds); if( .@a_len>=128 ) { mes .Npc_Name$; mes "I'm sorry but the accepted list is full please make some room and try again..."; } else { mes .Npc_Name$; mes "The guild was successfully added!"; $App_Guilds[.@a_len] = .@guild_id[.@select]; } } close; } } } case 2: mes .Npc_Name$; mes "Guild data cleared!"; deletearray($App_Guilds); close; case 3: break; case 4: mes .Npc_Name$; mes "Alright, have a nice day!"; close; } } mes .Npc_Name$; mes "I'm here to give you supplies for WoE!"; next; mes .Npc_Name$; for( set .@i,0; .@i <= getarraysize($App_Guilds); set .@i, .@i+1 ) { if( getcharid(2) == $App_Guilds[.@i] ) set .@Guild_Check, .@Guild_Check+1; } if( .@Guild_Check < 1 ) { mes "Your guild has not yet been approved, please contact the GMs"; close; } if( !getcharid(2) ) { mes "Sorry only members of a guild may use this npc."; close; } if( BaseLevel < 99 || Class > 4022 ) { mes "Sorry this is for Lvl 99 Trans Class only"; close; } if( gettimetick(2) < #delay ) { mes "Sorry, you can only claim this once every WoE"; close; } switch( Class ) { case 4012: //Sniper class getitem 1065,10; //10 Traps getitem 504,20; //20 White potions break; case 4019: //Creator class getitem 7136,10; //10 Acid Bottles getitem 504,20; //20 White potions break; //Add more cases for all classes default: break; } set #delay, gettimetick(2)+10800; mes "Here you go, goodluck!"; close; OnInit: set .Npc_Name$, "[^0000FF WoE Supply ^000000]"; disablenpc "WoE Supply"; end; } Quote Link to comment Share on other sites More sharing options...
Veracious Posted May 23, 2014 Group: Members Topic Count: 17 Topics Per Day: 0.00 Content Count: 179 Reputation: 17 Joined: 04/24/14 Last Seen: February 17, 2024 Share Posted May 23, 2014 Yeah some things still haven't been tested like the next and back buttons when there are more than 10 guilds in the list but it should work. Tested it, one char per account working. But, any guildless character can get the items now. Quote Link to comment Share on other sites More sharing options...
Unknown Posted May 23, 2014 Group: Members Topic Count: 43 Topics Per Day: 0.01 Content Count: 109 Reputation: 2 Joined: 09/07/12 Last Seen: October 21, 2016 Share Posted May 23, 2014 +1 for fixing it q____q! Quote Link to comment Share on other sites More sharing options...
Skorm Posted May 23, 2014 Group: Forum Moderator Topic Count: 33 Topics Per Day: 0.01 Content Count: 1282 Reputation: 393 Joined: 02/03/12 Last Seen: Friday at 02:41 AM Share Posted May 23, 2014 Tested it, one char per account working. But, any guildless character can get the items now. Small oversight on my part it's fixed in the above post. +1 for fixing it q____q! Lol you're welcome. Quote Link to comment Share on other sites More sharing options...
Veracious Posted May 23, 2014 Group: Members Topic Count: 17 Topics Per Day: 0.00 Content Count: 179 Reputation: 17 Joined: 04/24/14 Last Seen: February 17, 2024 Share Posted May 23, 2014 Small oversight on my part it's fixed in the above post. Just checked and tested again but it still gives items to guildless characters. Btw, here is a list i had made for giving items by specifying the role whether its a support or offensive class but it doesn't seem to work with menu, it gives all the items in the menu list if option/menu no.1 is selected. also tried select menu and if else but it doesn't work that way. switch( Class ) { case 4009: //High Priest getitem 19052,1; //HP Pack break; case 4010: //High Wizard mes "Choose your role"; menu "Support High Wizard",sup1,"Offensive High Wizard",off1; sup1: getitem 19047,1; //Support HWIZ Pack off1: getitem 19046,1; //Offensive HWIZ Pack break; case 4011: //Whitesmith getitem 19051,1; //Whitesmith Pack break; case 4012: //Sniper getitem 19054,1; //Sniper Pack break; case 4013: //Sinx getitem 19055,1; //Sinx Pack break; case 4016: //Champion getitem 19053,1; //Champion Pack break; case 4017: //Professor getitem 19048,1; //Prof Pack break; case 4018: //Stalker mes "Choose your role"; menu "Flame",fl1,"Ice",ice1,"Wind",wind1,"Shadow",shd1; fl1: getitem 19056,1; ice1: getitem 19057,1; wind1: getitem 19058,1; shd1: getitem 19059,1; break; case 4019: //Creator mes "Choose your role"; menu "Support Creator",sup2,"Offensive Creator",off2; sup2: getitem 19050,1; off2: getitem 19049,1; break; case 25: //Ninja mes "Choose your role"; menu "Flame",fl2,"Ice",ice2,"Wind",wind2,"Shadow",shd2; fl2: getitem 19056,1; ice2: getitem 19057,1; wind2: getitem 19058,1; shd2: getitem 19059,1; break; //Add more cases for all classes default: break; } Quote Link to comment Share on other sites More sharing options...
Skorm Posted May 23, 2014 Group: Forum Moderator Topic Count: 33 Topics Per Day: 0.01 Content Count: 1282 Reputation: 393 Joined: 02/03/12 Last Seen: Friday at 02:41 AM Share Posted May 23, 2014 Just checked and tested again but it still gives items to guildless characters. Btw, here is a list i had made for giving items by specifying the role whether its a support or offensive class but it doesn't seem to work with menu, it gives all the items in the menu list if option/menu no.1 is selected. also tried select menu and if else but it doesn't work that way. Somehow I managed to paste the script twice one after the other in the same code box. If you grabbed the top version it wasn't changed. I've since corrected the mistake. Also: switch( Class ) { case 4009: //High Priest getitem 19052,1; //HP Pack break; case 4010: //High Wizard mes "Choose your role"; if( select("Support High Wizard:Offensive High Wizard")==1 ) getitem 19047,1; //Support HWIZ Pack else getitem 19046,1; //Offensive HWIZ Pack break; case 4011: //Whitesmith getitem 19051,1; //Whitesmith Pack break; case 4012: //Sniper getitem 19054,1; //Sniper Pack break; case 4013: //Sinx getitem 19055,1; //Sinx Pack break; case 4016: //Champion getitem 19053,1; //Champion Pack break; case 4017: //Professor getitem 19048,1; //Prof Pack break; case 4018: //Stalker mes "Choose your role"; switch( select("Flame:Ice:Wind:Shadow") ) { case 1: getitem 19056,1; break; case 2: getitem 19057,1; break; case 3: getitem 19058,1; break; case 4: getitem 19059,1; } break; case 4019: //Creator mes "Choose your role"; if( select("Support Creator:Offensive Creator")==1 ) getitem 19050,1; else getitem 19049,1; break; case 25: //Ninja mes "Choose your role"; switch( select("Flame:Ice:Wind:Shadow") ) { case 1: getitem 19056,1; break; case 2: getitem 19057,1; break; case 3: getitem 19058,1; break; case 4: getitem 19059,1; } break; //Add more cases for all classes default: break; } Quote Link to comment Share on other sites More sharing options...
Veracious Posted May 23, 2014 Group: Members Topic Count: 17 Topics Per Day: 0.00 Content Count: 179 Reputation: 17 Joined: 04/24/14 Last Seen: February 17, 2024 Share Posted May 23, 2014 (edited) Somehow I managed to paste the script twice one after the other in the same code box. If you grabbed the top version it wasn't changed. I've since corrected the mistake. - Guildless classes won't get items now.(working) - It wasn't working with if and else for support/offensive creator and high wizard, it used to give only the first item to both the roles/options (eg:- when selected support it gave support item, when selected offensive again it gave support item and not offensive item) same for high wizard. Switch case for stalker, ninja working fine. I changed the script, now it works with switch for hwiz/creators, pls correct if any errors switch( Class ) { case 4009: //High Priest getitem 19052,1; //HP Pack break; case 4010: //High Wizard mes "Please choose your role."; mes "Support : Ganbantien"; mes "Offensive : SG/MS/LOV (Includes Crystal Fragments)"; //if( select("Support High Wizard:Offensive High Wizard") ) //getitem 19047,1; //Support HWIZ Pack //else //getitem 19046,1; //Offensive HWIZ Pack switch( select("Support:Offensive") ) { case 1: getitem 19047,1; break; case 2: getitem 19046,1; } break; case 4011: //Whitesmith getitem 19051,1; //Whitesmith Pack break; case 4012: //Sniper getitem 19054,1; //Sniper Pack break; case 4013: //Sinx getitem 19055,1; //Sinx Pack break; case 4016: //Champion getitem 19053,1; //Champion Pack break; case 4017: //Professor getitem 19048,1; //Prof Pack break; case 4018: //Stalker mes "Please choose your type."; mes "Flame : Flame Stone"; mes "Ice : Ice Stone"; mes "Wind : Wind Stone"; mes "Shadow : Shadow Orb"; switch( select("Flame:Ice:Wind:Shadow") ) { case 1: getitem 19056,1; break; case 2: getitem 19057,1; break; case 3: getitem 19058,1; break; case 4: getitem 19059,1; } break; case 4019: //Creator mes "Please choose your role."; mes "Support : Slim Potion Pitcher"; mes "Offensive : Acid Demonstration"; //if( select("Support Creator:Offensive Creator") ) //getitem 19050,1; //else //getitem 19049,1; switch( select("Support:Offensive") ) { case 1: getitem 19050,1; break; case 2: getitem 19049,1; } break; case 25: //Ninja mes "Please choose your type."; mes "Flame : Flame Stone"; mes "Ice : Ice Stone"; mes "Wind : Wind Stone"; mes "Shadow : Shadow Orb"; switch( select("Flame:Ice:Wind:Shadow") ) { case 1: getitem 19056,1; break; case 2: getitem 19057,1; break; case 3: getitem 19058,1; break; case 4: getitem 19059,1; } break; //Add more cases for all classes default: break; } - NPC was able to give items to all classes (non trans/ trans below job 4022). It dint give any item as they were not set in switch class, but it used to show message "here you go". I made some changes, its working now. pls correct if any errors. if( BaseLevel < 90 ) { mes "Sorry this is only for Lvl 90 and above"; close; } if( Class > 4022 || Class == 22 || Class == 26 || Class == 27 || Class == 28 || Class == 23 || Class == 24 || Class == 0 || Class == 1 || Class == 2 || Class == 3 || Class == 4 || Class == 5 || Class == 6 || Class == 7 || Class == 8 || Class == 9 || Class == 10 || Class == 11 || Class == 12 || Class == 13 || Class == 14 || Class == 15 || Class == 16 || Class == 17 || Class == 18 || Class == 19 || Class == 20 || Class == 4001 || Class == 4002 || Class == 4003 || Class == 4004 || Class == 4005 || Class == 4006 || Class == 4007 || Class == 4008 || Class == 4015 || Class == 4020 || Class == 4021 ) { mes "Sorry this is only for the classes which require items for using skills"; close; } - Clear guild data was not having options to select yes/no. Once selected it would directly clear the data. I made some changes, pls correct if any errors case 2: mes .Npc_Name$; mes "Do you want to clear all the Guild data?"; menu "Yes",yes1,"No",no1; no1: next; mes .Npc_Name$; mes "Alright, have a nice day!"; close; yes1: next; mes .Npc_Name$; mes "Are you sure? This will remove all registered guilds"; menu "Yes",yes2,"No",no2; no2: next; mes .Npc_Name$; mes "Alright, have a nice day!"; close; yes2: next; mes .Npc_Name$; mes "Guild data cleared!"; deletearray($App_Guilds); close; - Its working now after these changes, but i don't know if i've made any mistakes, please correct them if i have, also i wanna ask if we can add another option for Guild Leaders, like there's one for GMs. So, they can be able to claim "Guild Leader Package". EDIT :- We are able to add 1 Guild multiple times. Edited May 23, 2014 by Skorm Added spoilers; the topic is getting messy. Quote Link to comment Share on other sites More sharing options...
Veracious Posted May 23, 2014 Group: Members Topic Count: 17 Topics Per Day: 0.00 Content Count: 179 Reputation: 17 Joined: 04/24/14 Last Seen: February 17, 2024 Share Posted May 23, 2014 EDIT :- We are able to add 1 Guild multiple times. Cant add 1 Guild multiple times anymore.(working now) - It wasn't working with if and else for support/offensive creator and high wizard, it used to give only the first item to both the roles/options (eg:- when selected support it gave support item, when selected offensive again it gave support item and not offensive item) same for high wizard. Support/Offensive roles get their respective items.(working now) - Its working now after these changes, but i don't know if i've made any mistakes, please correct them if i have, also i wanna ask if we can add another option for Guild Leaders, like there's one for GMs. So, they can be able to claim "Guild Leader Package". I tried the latest script but its not showing an option for Guild Master. - script SupplyTrigger -1,{ OnSat0152: OnSun1600: enablenpc "WoE Package Supplier"; end; OnAgitEnd: OnAgitEnd2: disablenpc "WoE Package Supplier"; end; } prontera,151,181,3 script WoE Package Supplier 78,{ function sf { function s; .@a = getarg(2); .@len = getarg(3); return ( sprintf( getarg(0), s(.@a, .@len, getarg(1)), s(.@a++, .@len, getarg(1)), s(.@a++, .@len, getarg(1)), s(.@a++, .@len, getarg(1)), s(.@a++, .@len, getarg(1)), s(.@a++, .@len, getarg(1)), s(.@a++, .@len, getarg(1)), s(.@a++, .@len, getarg(1)), s(.@a++, .@len, getarg(1)), s(.@a++, .@len, getarg(1)) ) +(( .@a+1 < .@len )?":Next":":") +(( .@a-11 > 0 )?":Back":":") +":Cancel" ); function s { if( getarg(0) >= getarg(1) ) return ""; else { .@name$ = getguildname(getelementofarray(getarg(2),getarg(0))); return .@name$=="null"?"":.@name$; } }; }; function nex { return((getarg(0)+10)<getarg(1)?getarg(0)+10:getarg(1)-(getarg(1)%10)); }; function bac { return((getarg(0)-10)>=0?getarg(0)-10:0); }; if( getgmlevel()>=80 ) { mes .Npc_Name$; mes "Hello Mr. GM what would you like to do?"; next; switch( select("Add/Remove Guilds:Clear Guild Data:Player Menu:Cancel") ) { case 1: mes .Npc_Name$; mes "Would you like to add or remove a guild?"; .@a_len = getarraysize($App_Guilds); .@format$ = "%s:%s:%s:%s:%s:%s:%s:%s:%s:%s"; next; if( select("Remove:Add") == 1 ) { while( .@a != 9999 ) { select( sf( .@format$, $App_Guilds, .@a, .@a_len ) ); switch( @menu ) { case 11: .@a = nex( .@a, .@a_len ); break; case 12: .@a = bac( .@a ); break; case 13: end; default: .@select = .@a+@menu-1; mes .Npc_Name$; mes "You've selected ^0000FF["+getguildname($App_Guilds[.@select])+"]^000000 guild. Would you like to remove them from the accepted guilds?"; next; if( select("Yes:No") == 1 ) { deletearray($App_Guilds[.@select],1); mes .Npc_Name$; mes "The guild has been removed!"; } close; } } } else { mes .Npc_Name$; mes "Please input guild name or masters name."; next; input(.@input$); .@len = query_sql( "Select `guild_id` from `guild` where `name` like '%"+escape_sql(.@input$)+"%' or `master` like '%"+escape_sql(.@input$)+"%';",.@guild_id ); while( .@a != 9999 ) { select( sf( .@format$, .@guild_id, .@a, .@len ) ); switch( @menu ) { case 11: .@a = nex( .@a, .@len ); break; case 12: .@a = bac( .@a ); break; case 13: end; default: .@select = .@a+@menu-1; .@a_len = getarraysize($App_Guilds); for(.@b=0;.@b<.@a_len;.@b++) if( $App_Guilds[.@b]==.@guild_id[.@select] ) { mes .Npc_Name$; mes "You've selected ^0000FF["+getguildname(.@guild_id[.@select])+"]^000000 guild. I'm sorry but that guild has already been added to the accepted list?"; } mes .Npc_Name$; mes "You've selected ^0000FF["+getguildname(.@guild_id[.@select])+"]^000000 guild. Would you like to add them to the accepted guilds?"; next; if( select("Yes:No") == 1 ) { .@a_len = getarraysize($App_Guilds); if( .@a_len>=128 ) { mes .Npc_Name$; mes "I'm sorry but the accepted list is full please make some room and try again..."; } else { mes .Npc_Name$; mes "The guild was successfully added!"; $App_Guilds[.@a_len] = .@guild_id[.@select]; } } close; } } } case 2: mes .Npc_Name$; mes "Do you want to clear all the Guild data?"; menu "Yes",yes1,"No",no1; no1: next; mes .Npc_Name$; mes "Alright, have a nice day!"; close; yes1: next; mes .Npc_Name$; mes "Are you sure? This will remove all registered guilds"; menu "Yes",yes2,"No",no2; no2: next; mes .Npc_Name$; mes "Alright, have a nice day!"; close; yes2: next; mes .Npc_Name$; mes "Guild data cleared!"; deletearray($App_Guilds); close; case 3: break; case 4: mes .Npc_Name$; mes "Alright, have a nice day!"; close; } } mes .Npc_Name$; mes "I'm here to give you supplies for WoE!"; next; mes .Npc_Name$; for( set .@i,0; .@i <= getarraysize($App_Guilds); set .@i, .@i+1 ) { if( getcharid(2) == $App_Guilds[.@i] ) set .Guild_Check, .Guild_Check+1; } if( .Guild_Check < 1 ) { mes "Your guild has not been registered yet, please contact the GMs"; close; } if( !getcharid(2) ) { mes "Sorry only members of a registered guild can use this npc."; close; } if( BaseLevel < 90 ) { mes "Sorry this is only for Lvl 90 and above"; close; } if( Class > 4022 || Class == 22 || Class == 26 || Class == 27 || Class == 28 || Class == 23 || Class == 24 || Class == 0 || Class == 1 || Class == 2 || Class == 3 || Class == 4 || Class == 5 || Class == 6 || Class == 7 || Class == 8 || Class == 9 || Class == 10 || Class == 11 || Class == 12 || Class == 13 || Class == 14 || Class == 15 || Class == 16 || Class == 17 || Class == 18 || Class == 19 || Class == 20 || Class == 4001 || Class == 4002 || Class == 4003 || Class == 4004 || Class == 4005 || Class == 4006 || Class == 4007 || Class == 4008 || Class == 4015 || Class == 4020 || Class == 4021 ) { mes "Sorry this is only for the classes which require items for using skills"; close; } if( gettimetick(2) < #delay ) { mes "Sorry, you can only claim this only once every WoE"; close; } switch( Class ) { case 4009: //High Priest getitem 19052,1; //HP Pack break; case 4010: //High Wizard mes "Please choose your role."; mes "Support : Ganbantien"; mes "Offensive : SG/MS/LOV (Includes Crystal Fragments)"; //if( select("Support High Wizard:Offensive High Wizard") ) //getitem 19047,1; //Support HWIZ Pack //else //getitem 19046,1; //Offensive HWIZ Pack switch( select("Support:Offensive") ) { case 1: getitem 19047,1; break; case 2: getitem 19046,1; } break; case 4011: //Whitesmith getitem 19051,1; //Whitesmith Pack break; case 4012: //Sniper getitem 19054,1; //Sniper Pack break; case 4013: //Sinx getitem 19055,1; //Sinx Pack break; case 4016: //Champion getitem 19053,1; //Champion Pack break; case 4017: //Professor getitem 19048,1; //Prof Pack break; case 4018: //Stalker mes "Please choose your type."; mes "Flame : Flame Stone"; mes "Ice : Ice Stone"; mes "Wind : Wind Stone"; mes "Shadow : Shadow Orb"; switch( select("Flame:Ice:Wind:Shadow") ) { case 1: getitem 19056,1; break; case 2: getitem 19057,1; break; case 3: getitem 19058,1; break; case 4: getitem 19059,1; } break; case 4019: //Creator mes "Please choose your role."; mes "Support : Slim Potion Pitcher"; mes "Offensive : Acid Demonstration"; //if( select("Support Creator:Offensive Creator") ) //getitem 19050,1; //else //getitem 19049,1; switch( select("Support:Offensive") ) { case 1: getitem 19050,1; break; case 2: getitem 19049,1; } break; case 25: //Ninja mes "Please choose your type."; mes "Flame : Flame Stone"; mes "Ice : Ice Stone"; mes "Wind : Wind Stone"; mes "Shadow : Shadow Orb"; switch( select("Flame:Ice:Wind:Shadow") ) { case 1: getitem 19056,1; break; case 2: getitem 19057,1; break; case 3: getitem 19058,1; break; case 4: getitem 19059,1; } break; //Add more cases for all classes default: break; } set #delay, gettimetick(2)+10800; mes "Here you go, goodluck!"; close; OnInit: set .Npc_Name$, "[^0000FF WoE Package Supplier ^000000]"; disablenpc "WoE Package Supplier"; end; } This is my previous script, which i will be using/putting it in your last script(but i used your latest script while testing), i'm unsure about the new changes, can you change this script instead of changing the latest one? Quote Link to comment Share on other sites More sharing options...
Question
Zeke
Hi, I need a script as follows
1. A Npc should spawn before every WOE i.e 30 mins before the woe starts till the woe gets over. to provide woe supplies to players by clicking on it.
2. The Npc should give items according to the player class as specified.
a. A Sniper will get traps, pots and etc as specified
b. A Creator will get acid bottles, pots etc as specified
etc as to all chars of trans 99 class only.
3. The Npc should reappear before every woe and should give the items only once before every woe.
4. And the npc should give supplies only to players in guild approved by a GM.
5. Server WOE Timings.
Sunday 1700 hours - 1900 hours and
WEDNESDAY 1800 hours - 2000 hours.
Can Anyone help with this script?
Edited by ZekeLink to comment
Share on other sites
29 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.