-
Posts
1282 -
Joined
-
Last visited
-
Days Won
41
Content Type
Profiles
Forums
Downloads
Jobs Available
Server Database
Third-Party Services
Top Guides
Store
Crowdfunding
Everything posted by Skorm
-
Hmm not really sure what you mean if you want to add more maps that you can't save on just add more mapflags above the last curly. OnInit: setmapflag "prontera",mf_nosave; setmapflag "map1",mf_nosave; setmapflag "map2",mf_nosave; setmapflag "map3",mf_nosave; }
-
activate pvp when X players are in a map.
Skorm replied to HristDead's question in Scripting Support
There might be a better way of doing this but bleh. - script pvpon -1,{ OnPCLoadMapEvent: set .@usr_map$, strcharinfo(3); getpartymember $@TeamID1; set .@a, $@partymembercount; copyarray .@party_name_desu$[0], $@partymembername$[0],128; while(set(.@f,.@f+1)<=.@a) { getmapxy(.@map$,.@x,.@y,0,.@party_name_desu$[.@f-1]); if(.@map$==.@usr_map$) set(.@i,.@i+1); } getpartymember $@TeamID2; set .@b, $@partymembercount; copyarray .@party_name_desu2$[0], $@partymembername$[0],128; while(set(.@h,.@h+1)<=.@ { getmapxy(.@map$,.@x,.@y,0,.@party_name_desu2$[.@h-1]); if(.@map$==.@usr_map$) set(.@i,.@i+1); } if(.@i >= 4 && .@a >= 2 && .@b >= 2) pvpon "guild_vs2"; } guild_vs2 mapflag loadevent -
prontera,146,174,5 script WoE Prize Giver 1002,{ if ( agitcheck() ) { mes "a war is currently in progress"; mes "if your guild owned a castle ask your guild master to see me to claim the reward"; close; } while(.castlename$[set(.@a,.@a+1)]!="") if ( getcastledata( .castlename$[.@a],1 ) == getcharid(2) ) { if ( $castle_claimed[.@a] ) { mes "your guild already received the reward"; close; } else if ( getguildmasterid( getcharid(2) ) == getcharid(0) ) { mes "receiving the reward for "+ .castlename$[.@a]; getitem 12035,1; // some mathematics ... set $castle_claimed[.@a],1; close; } else { mes "ask your guild master to see me"; close; } } mes "your guild failed to take reward"; mes "if your guild owned a castle ask your guild master to claim reward from me"; close; OnAgitEnd: deletearray $castle_claimed[0], 128; // everytime woe ends the variable resets end; OnInit: setarray .castlename$[1], "prtg_cas01", "prtg_cas04", "payg_cas01", "payg_cas04", "aldeg_cas05", "gefg_cas01", "gef_cas04"; waitingroom "Woe Prize",0; end; }
-
activate pvp when X players are in a map.
Skorm replied to HristDead's question in Scripting Support
That was actually really close imo. - script pvpon -1,{ OnPCLoadMapEvent: getpartymember $@TeamID1; set .@a, $@partymembercount; getpartymember $@TeamID2; set .@b, $@partymembercount; if(.@a >= 2 && .@b >= 2); pvpon "guild_vs2"; } guild_vs2 mapflag loadevent -
- script killmark -1,{ OnPcKillEvent: set .@a$, strcharinfo(3); set .@b , getmapflag(.@a$,mf_pvp)+ getmapflag(.@a$,mf_gvg); if(.@ getitem 7420,1; } If you wanted the script to be a little more dynamic and work on all pvp/gvg maps you could do that... You might also have to add same other map flags like mf_gvg_castle but I'm not sure how often they get used. You can find a whole list in your server db/const.txt.
-
setmapflag "<map name>",mf_nosave; Replace map name with your map. And this would go on the inside of the curlys on a script. also works like but independently: prontera mapflag NoSave
-
That was a debug message I forgot to remove. I've since removed it from my first post. Also I wasn't sure if you wanted that item deleted so I hadn't added that part. I'm glad you were able to understand it enough to add that xD. Means my work isn't quite as messy as I thought LOL. Last Edit: I added a message if you don't have any enchantment orbs... forgot that in the original.
-
Woops made some last second chances ... Switch these around. set .e_len , getarraysize(.eqp$); setarray .eqp$ , "Upper Headgear", "Armor", "Left Hand", "Right Hand", "Garment", "Shoes", "Accessory1", "Accessory2", "Mid Headgear", "Low Headgear"; Or just re-copy my paste because I updated it.
-
prontera,194,188,4 script Enchant Expert 712,{ mes .npc$; mes "Hello there!"; mes "I can enchant your items,"; mes "for a small fee of "+.pric+"z."; emotion e_no1,0; next; if(select("Yes:No")&2) { mes .npc$; mes "Alright, thanks anyways!"; close; } if(Zeny<.pric) { mes .npc$; mes "I'm sorry you don't have enough Zeny, please come back later."; close; } mes .npc$; mes "Which item would you like to enchant?"; next; while(set(.@a,.@a+1)<=.e_len) { if(getequipid(.@a)>-1) set .@menu$, .@menu$+.eqp$[.@a-1]+"- [^0000FF"+getitemname(getequipid(.@a))+"^000000]:"; else set .@menu$, .@menu$+"^adb4be"+.eqp$[.@a-1]+"- [Empty]^000000:"; } select(.@menu$); set .@eq_loc, @menu; set .@eq_itm, getequipid(.@eq_loc); if(.@eq_itm<0) { mes .npc$; mes "Hmm, I don't think you have anything equipped there."; close; } set .@menu$, ""; set .@a, .en_orb[0]; while((set(.@a,.@a+1)-1)<=.en_orb[1]) if(getiteminfo(.@a-1,2)>-1) if(set(.@c,countitem(.@a-1))) { set .@menu$, .@menu$+getitemname(.@a-1)+" x"+.@c+":"; set .@b,.@b+1; set .@item[.@b], .@a-1; } if(.@menu$=="") { mes .npc$; mes "Hmm, you don't seem to have any enchantment orbs."; close; } mes .npc$; mes "Please, select an enchantment from the menu."; next; select(.@menu$); set .@itm, .@item[@menu]; set .@menu$, ""; set .@a, 0; while((set(.@a,.@a+1)-1)<4) { setd(".@crd"+.@a, getequipcardid(.@eq_loc,.@a-1)); if(getequipcardid(.@eq_loc,.@a-1)) set .@menu$, .@menu$+.@a+.crd_c$[.@a-1]+" Slot- [^a92435"+getitemname(getequipcardid(.@eq_loc,.@a-1))+"^000000]:"; else set .@menu$, .@menu$+.@a+.crd_c$[.@a-1]+" Slot- [^30ad25Empty^000000]:"; } mes .npc$; mes "Select a slot."; next; select(.@menu$); set .@eqrf, getequiprefinerycnt(.@eq_loc); if(getequipcardid(.@eq_loc,@menu-1)) { mes .npc$; mes "Would you like me to remove this card?"; next; if(select("Yes:No")&2) { mes .npc$; mes "Alright, thanks anyways!"; close; } getitem getequipcardid(.@eq_loc,@menu-1),1; delitem2 .@eq_itm, 1, 1, .@eqrf, 0, .@crd1, .@crd2, .@crd3, .@crd4; setd(".@crd"+@menu, 0); getitem2 .@eq_itm, 1, 1, .@eqrf, 0, .@crd1, .@crd2, .@crd3, .@crd4; } if(rand(100)>.perc) { mes .npc$; mes "I'm sorry but I've failed you!"; misceffect 155; emotion e_sob,0; set Zeny,Zeny-.pric; close; } set Zeny,Zeny-.pric; delitem .@itm,1; delitem2 .@eq_itm, 1, 1, .@eqrf, 0, .@crd1, .@crd2, .@crd3, .@crd4; setd(".@crd"+@menu, .@itm); getitem2 .@eq_itm, 1, 1, .@eqrf, 0, .@crd1, .@crd2, .@crd3, .@crd4; misceffect .efet; emotion e_no1,0; mes .npc$; mes "All done!"; equip .@eq_itm; close; //NPC Constants OnInit: //=-=-=-=-=-=-=Configuration=-=-=-=-=-=-= set .npc$ , "[^0000FFEnchant Expert^000000]"; // NPC Name set .pric , 1000000; // Price set .efet , 154; // Effect Number set .perc , rand(50,80); // Percent setarray .crd_c$, "st", "nd", "rd", "th"; // Count setarray .en_orb, 4700, 4862; // Range of IDs selected for enchanting. setarray .eqp$ , "Upper Headgear", "Armor", "Left Hand", "Right Hand", "Garment", "Shoes", "Accessory1", "Accessory2", "Mid Headgear", "Low Headgear"; set .e_len , getarraysize(.eqp$); //=-=-=-=-=-=-=-=-Skorm-=-=-=-=-=-=-=-=-= }
-
Alright I'm going to need a little more info like what orb enchantments are you talking about? There are many of them... do you want all?
-
//v1.4 new_1-2,95,71,4 script Enchant Expert 100,{ //Character Variables set .@geid, getequipid(9); set .@cout, countitem(.item); set .@gin$, getitemname(.item); set .@gerf, getequiprefinerycnt(9); set .@crd1, getequipcardid(9,0); set .@crd2, getequipcardid(9,1); set .@crd3, getequipcardid(9,2); set .@crd4, getequipcardid(9,3); set .@itm, 4700+((rand(5)*10)+rand(3)); mes .npc$; mes "I can endow your glasses with mystical powers, but It'll cost yah "+.pric+" "+((.pric-1)?.@gin$+"s":.@gin$)+"."; next; if(!.@cout) { mes .npc$; mes "Sorry come back when you have "+.@gin$+"(s)."; close; } if(select("Yes:No")&2) { mes .npc$; mes "Alright, thanks anyways!"; close; } if(.@cout<.pric) { mes .npc$; mes "I'm sorry you don't have enough "+.@gin$+"(s) to for me to endow your specticals, please come back later."; close; } if(rand(0,((100/.perc)-1))) { mes .npc$; mes "I'm sorry but I've failed you!"; misceffect 155; emotion e_sob,0; delitem .item,.pric; close; } mes .npc$; if(compare(.uit$,""+.@geid)) { delitem .item,.pric; delitem2 .@geid, 1, 1, .@gerf, 0, .@crd1, .@crd2, .@crd3, .@crd4; getitem2 .@geid, 1, 1, .@gerf, 0, .@crd1, .@crd2, .@crd3, .@itm; misceffect .efet; mes "All done!"; equip .@geid; close; } mes "I'm sorry but you need to equipped a slotted mid-range headgear before we can continue."; close; //NPC Constants OnInit: //=-=-=-=-=-=-=Configuration=-=-=-=-=-=-= set .npc$, "[^0000FFBlinger^000000]"; // NPC Name set .pric, 1; // Price set .efet, 154; // Effect Number set .item, 6242; // Item Number set .uit$, "5074,5401,5104,18507,5068,2204,2260,5085,2202";// Item List set .perc, rand(50,80); // Percent /*18603(Black Devil Mask), Not included because it wasn't in my DB*/ /*2286 Unslotted version of 18507*/ /*2203 Unslotted version of 2204*/ /*2201 Unslotted version of 2202*/ //=-=-=-=-=-=-=-=-Skorm-=-=-=-=-=-=-=-=-= } Do you mean like my script if in that case why didn't you just message me?
-
I know if you set your coordinates in the SQL db and relogin you can appear in unreachable places on the map. There might be an npc command that doesn't have the same restrictions as @warp. Maybe unitwarp... or something... where you could then use items in the hot keys to move +- your position. :/
-
Hammer Time for Middle Headgear 2: The Enchantment
Skorm replied to johnbond's question in Script Requests
I don't think they have it already but I can make it Hmm shouldn't be a problem. Tell me how this works for you I tried to keep it pretty close to the original but I also made some small improvements with language and some style. prontera,201,188,4 script Neo Enchanter 851,{ mes .npc$; mes "Hello there!"; mes "I can make Neo items even better!"; mes "If you have a ^0000FF"+getitemname(atoi(.e_itl$[1]))+"^000000,"; mes "a ^0000FF"+getitemname(atoi(.e_itl$[0]))+"^000000,"; mes "or a ^0000FF"+getitemname(atoi(.e_itl$[2]))+"^000000."; mes "I'll enchant it for 1,000,000z"; next; if(select("Yes:No")&2) { mes .npc$; mes "Alright, thanks anyways!"; close; } if(Zeny<.pric) { mes .npc$; mes "I'm sorry you don't have enough Zeny, please come back later."; close; } if(.note){ mes "^a92435----------NOTICE----------"; mes "The enchanted Neo armor will only"; mes "be available during the event"; mes "period. (October 17 - November 21)"; next; } mes .npc$; mes "Which Neo item would you like to enchant?"; next; while(set(.@a,.@a+1)<=.e_len) { if(compare(.e_itl$[.@a-1],""+getequipid(.e_loc[.@a-1]))) set .@menu$, .@menu$+.eqp$[.@a-1]+"- [^0000FF"+getitemname(getequipid(.e_loc[.@a-1]))+"^000000]:"; else set .@menu$, .@menu$+"^adb4be"+.eqp$[.@a-1]+"- [Empty]^000000:"; } select(.@menu$); set .@eq_loc, .e_loc[(@menu-1)]; set .@eq_id, getequipid(.@eq_loc); set .@eq_rf, getequiprefinerycnt(.@eq_loc); if(compare(.e_itm$,""+.@eq_id )) { set .@crd0, getequipcardid(.@eq_loc,0); while(getd(".menu"+.@b+"$")!="") { mes .npc$; mes "Choose ^0000FF"+(.@b+1)+.itm_c$[.@b]+"^000000 enchantment for your item."; next; select(getd(".menu"+.@b+"$")); setd(".@crd"+(.@b+1),getequipcardid(.@eq_loc,(.@b+1))); setd(".@n_crd"+(.@b+1),((.@b>1)?.itm2[@menu-1]:.itm1[0]+((@menu-1)*10))); set(.@b,.@b+1); } } else { mes .npc$; mes "Sorry I don't recoginze that equipment."; close; } set Zeny, Zeny-.pric; delitem2 .@eq_id, 1, 1, .@eq_rf, 0, .@crd0, .@crd1, .@crd2, .@crd3; getitem2 .@eq_id, 1, 1, .@eq_rf, 0, .@crd0, .@n_crd1, .@n_crd2, .@n_crd3; misceffect .efet; mes .npc$; mes "All done!"; equip .@eq_id; close; //NPC Constants OnInit: //=-=-=-=-=-=-=Configuration=-=-=-=-=-=-= set .npc$ , "[Neo Enchanter]"; // NPC Name set .note , 1; // Shows notice 1=on/0=off set .pric , 1000000; // Price set .efet , 154; // Effect Number setarray .itm1 , 4704, 4764; // Item Menu1 Range setarray .itm2 , 4802, 4788, 4765, 4763, 4799; // Item Menu2 setarray .itm_c$, "st", "nd", "rd"; // Numbers setarray .eqp$ , "Shield", "Garment", "Accessory1", "Accessory2";// Menu3 setarray .e_itl$, "2137", "2548", "2763", "2763"; // Equip Items setarray .e_loc , 3, 5, 7, 8; // Equip Locations set .e_itm$, implode(.e_itl$,","); set .e_len , getarraysize(.eqp$); set .i_len , getarraysize(.itm2); //=-=-=-=-=-=-=-=-Skorm-=-=-=-=-=-=-=-=-= for(set(.@a,.itm1[0]);.@a<=.itm1[1];set(.@a,.@a+10)) set .menu0$, .menu0$+ getitemname(.@a)+":"; set .menu1$, .menu0$; for(set(.@a,0);.@a<.i_len;set(.@a,.@a+1)) set .menu2$, .menu2$+ getitemname(.itm2[.@a])+":"; } -
Sorry about that small error on my part. Replace: if(compare(""+.@get,.itm_a$)) With: if(compare(.itm_a$,""+.@get))
-
prontera,195,175,0 script Athena Shin 100,{ mes .npc_n$; mes "Only "+.itm_a+" "+.itm_n$+" to play this random chance mini-game!"; mes "Would you like to play?"; next; if(select("Yes:No:What can I win?")&2) { if(@menu-2) { set .@mes$, "You can win: "; for(set(.@a,1);.@a<=.len_i;set(.@a,.@a+1)) { set .@itm$, getitemname(.itm_l[(.@a-1)]); if(.@a%10&&.@a<=.len_i&&.@a!=.len_i) { set .@mes$, .@mes$+((!((.@a%10)-9)&&.@a<=.len_i)? "and "+.@itm$+".":.@itm$+", "); } else { mes .npc_n$; if(.@a<.len_i) { mes .@mes$; set .@mes$, "You can also win: "+.@itm$+", "; next; if(select("Next:Close")&2) close; } else { mes .@mes$+"and "+.@itm$+"."; close; } } } } else close; } if (countitem(.itm_p) < .itm_a) { mes .npc_n$; mes "You don't have "+.itm_a+" "+.itm_n$; close; } mes .npc_n$; mes "Here you go!"; delitem .itm_p,.itm_a; set .@get, .itm_l[rand(.len_i-1)]; if(compare(""+.@get,.itm_a$)) announce strnpcinfo(0)+": "+strcharinfo(0)+" got ["+getitemname(.@get)+"]!",bc_all|bc_yellow; getitem .@get,1; close; OnInit: set .npc_n$, "[^00FF00Athena Shin^000000]" ; //NPC Name. setarray .itm_l , 7539, 5171, 2863, 501, 502, 503, 504, 505, 506, 507, 508, 509; //Item List. set .itm_a$, "7539, 5171, 2863" ; //Item IDs in this string are announced. set .len_i , getarraysize(.itm_l) ; //Length of array. set .itm_a , 100 ; //Cost of npc. set .itm_p , 7179 ; //Item used as currency. set .itm_n$, getitemname(.itm_p) ; //Item Name. }
-
It's easy to assume, perhaps the client was looking for something similar to the original, or maybe, he's running a lower version of rAthena in which case the command wouldn't exist.
-
Attached from phone. randgetitm.txt
-
prontera,195,175,0 script Athena Shin 100,{ if (countitem(7179) < 100) { mes .npc$; mes "You don't have 100 proof of donation"; close; } mes .npc$; mes "Here you go!"; delitem 7179,100; getitem callfunc("F_RandMes",3,7539,5171,2863),1; close; }
-
- script AFKER -1,{ OnPCLoginEvent: getmapxy(@map$,@x,@y,0); setnpctimer 0; attachnpctimer(strcharinfo(0)); startnpctimer; end; OnTimer5000: getmapxy(@map2$,@x2,@y2,0); if (@map$ == @map2$ && @x == @x2 && @y == @y2) { atcommand "@kick "+strcharinfo(0); stopnpctimer; end; } } stopnpctimer; end; } I wouldn't use the SQL query because it updates really slow. Attaching an npc timer works the same as addtimer. If you want it to loop like that for the duration of the online player change the last stopnpctimer; to setnpctimer 0; Edit: I don't even have a checkidle command... need to update my trunk.
-
I've tried both of these and it still doesn't work. This might seem like a stupid question but are you putting it in the right database?
-
////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////// ////////////////////////////BOT POLICE 2.1//////////////////////////// /////////////////////////////By: Lucas M.///////////////////////////// ////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////// // 1. Edit names and location as needed. // 2. Edit second marks as needed. // 3. Edit @adjgmlvl command as needed(for servers with GM LvL 1 players). // 4. @jailfor works differently for different servers. Adjust appropriately. // 5. When testing on your lvl 99 GM, note that @adjgmlvl has been set to 0. Relog to refresh your commands. zhakastia,79,37,6 script ReviseRO Police 884,{ if (getgmlevel() >= 60) goto L_AdminPolice; mes "[EllieRO Police]"; mes "Good day."; close; L_AdminPolice: mes "[EllieRO Police]"; mes "Please input the name of a"; mes "player you would like to"; mes "superimpose a check on."; next; input @NAME$; if(isloggedin(getcharid(3,@NAME$))==0) goto L_Notlogged; mes "[EllieRO Police]"; mes "The player is online. An"; mes "interrogation is underway."; close2; attachrid(getcharid(3,@NAME$)); L_Start: // Targetted Player Pop-Up Message attachnpctimer strcharinfo(0); startnpctimer; atcommand "@adjgmlvl -1 "+strcharinfo(0)+""; // Leave this alone. mes "[Ellie Staff]"; mes "Manditory bot check in progress."; set @botcode,rand (1111,9999); mes "You have ^B4040460 seconds^000000 seconds to"; mes "input the following code:"; mes "[ ^5FB404"+@botcode+"^000000 ]"; input @exitnum; if (@exitnum == @botcode) goto L_Correct; if (@exitnum != @botcode) goto L_Wrong; close; OnTimer10000: //10 second mark. dispbottom "50 seconds to comply or risk being banned."; end; OnTimer20000: //20 second mark. dispbottom "40 seconds to comply or risk being banned."; end; OnTimer30000: //30 second mark. dispbottom "30 seconds to comply or risk being banned."; end; OnTimer40000: //40 second mark. dispbottom "20 seconds to comply or risk being banned."; end; OnTimer50000: //50 second mark. dispbottom "10 seconds to comply or risk being banned."; end; OnTimer55000: //55 second mark. dispbottom "5 seconds to comply."; end; OnTimer56000: //56 second mark. dispbottom "4 seconds to comply."; end; OnTimer57000: //57 second mark. dispbottom "3 seconds to comply."; end; OnTimer58000: //58 second mark. dispbottom "2 seconds to comply."; end; OnTimer59000: //59 second mark. dispbottom "1 second to comply."; end; OnTimer60000: //60 second mark. stopnpctimer; atcommand "@adjgmlvl 0 "+strcharinfo(0)+""; // Sets to GM LvL 0. //-------------------------------------------------------------------// // 3 hours jail time for not responding in 60 seconds. // (mh = month, dy = day, hr = hour, mn = minute) atcommand "@ban 1y "+strcharinfo(0)+""; end; //-------------------------------------------------------------------// L_Notlogged: mes "[ReviseRO Police]"; mes "That person is not logged in."; close; L_Wrong: next; mes "[ReviseRO Staff]"; mes "This is your second attempt."; set @botcode,rand (1111,9999); mes "You have ^B40404less than a minute^000000"; mes "to input the following code:"; mes "[ ^DF7401"+@botcode+"^000000 ]"; input @exitnum; if (@exitnum == @botcode) goto L_Correct; if (@exitnum != @botcode) goto L_WrongLastTry; close; L_WrongLastTry: next; mes "[ReviseRO Staff]"; mes "This is your last chance."; set @botcode,rand (1111,9999); mes "You have ^B40404less than a minute^000000"; mes "to input the following code:"; mes "[ ^DF0101"+@botcode+"^000000 ]"; input @exitnum; if (@exitnum == @botcode) goto L_Correct; close2; mes "[Ellie Staff]"; mes "You have failed the test."; stopnpctimer; sleep2 1000; atcommand "@adjgmlvl 0 "+strcharinfo(0)+""; // Sets to GM LvL 0. sleep2 1000; //-------------------------------------------------------------------// // 3 hours jail time for inputting the incorrect code three times. // (mh = month, dy = day, hr = hour, mn = minute) atcommand "@ban 1y "+strcharinfo(0)+""; end; //-------------------------------------------------------------------// L_Correct: next; stopnpctimer; atcommand "@adjgmlvl 0 "+strcharinfo(0)+""; // Sets to GM LvL 0. percentheal 100,100; sc_start SC_BLESSING,300000,10; sc_start SC_INCREASEAGI,300000,10; specialeffect2 EF_BLESSING; specialeffect2 EF_INCAGILITY; mes "[EllieRO Police]"; mes "You passed. Thank you for your time."; close; OnWhisperGlobal: if(!getgmlevel()) end; if(@whispervar0$=="all") { query_sql("SELECT SUM(`online`) FROM `char`",.@sum); set .@lim, 128; if(.@sum>128) { while(.@sum>0) { if(.@sum<.@lim&&.@sum>0) { set .@lim,.@sum; set .@sum,1; } else if(.@sum>=.@lim) { set .@sum,.@sum-.@lim; } else { end; } query_sql("SELECT `account_id` FROM `char` WHERE `online` = 1 LIMIT "+.@sum+","+.@lim,.@IDs); set .@len, getarraysize(.@IDs); while( .@V < .@len ){ if( isloggedin(.@IDs[.@V]) ) { attachrid(.@IDs[.@V]); goto L_Start; } set .@V,.@V+1; } deletearray .@IDs, .@len; if(!(.@sum-1)) end; } } else { query_sql "SELECT `account_id` FROM `char` WHERE `online` = 1", .@IDs; while( .@V < .@len ) { if( isloggedin(.@IDs[.@V]) ) { attachrid(.@IDs[.@V]); goto L_Start; } set .@V,.@V+1; } } end; } if(@whispervar0$=="map") { query_sql "SELECT `account_id` FROM `char` WHERE `online` = 1", .@IDs; set .@len, getarraysize(.@IDs); while( .@V < .@len ){ getmapxy(.@N123$,.@B,.@C,0,rid2name(.@IDs[.@V])); if( @whispervar1$ != "" && @whispervar1$ == .@N123$ && isloggedin(.@IDs[.@V]) ){ attachrid(.@IDs[.@V]); goto L_Start; } set .@V,.@V+1; } } end; } // Jail Cell 1. sec_pri,57,83,4 script Jail Time#1::Jail Time 738,{ mes "[Jail Time]"; mes "You have been caught botting."; mes "Please wait for your sentence"; mes "to play out or contact a GM."; atcommand "@jailtime "+strcharinfo(0)+""; close; } //Jail Cell 2. sec_pri,32,83,4 duplicate(Jail Time) Jail Time#2 738
-
http://rathena.org/wiki/Custom_Items
-
Yeah that would be a better solution. I am unable to test scripts because I had to reformat my HDD. Most of the time I just flip through my collection mentally until I think of a similar script and merge them together which isn't always the best solution. ////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////// ////////////////////////////BOT POLICE 2.1//////////////////////////// /////////////////////////////By: Lucas M.///////////////////////////// ////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////// // 1. Edit names and location as needed. // 2. Edit second marks as needed. // 3. Edit @adjgmlvl command as needed(for servers with GM LvL 1 players). // 4. @jailfor works differently for different servers. Adjust appropriately. // 5. When testing on your lvl 99 GM, note that @adjgmlvl has been set to 0. Relog to refresh your commands. zhakastia,79,37,6 script ReviseRO Police 884,{ if (getgmlevel() >= 60) goto L_AdminPolice; mes "[EllieRO Police]"; mes "Good day."; close; L_AdminPolice: mes "[EllieRO Police]"; mes "Please input the name of a"; mes "player you would like to"; mes "superimpose a check on."; next; input @NAME$; if(isloggedin(getcharid(3,@NAME$))==0) goto L_Notlogged; mes "[EllieRO Police]"; mes "The player is online. An"; mes "interrogation is underway."; close2; attachrid(getcharid(3,@NAME$)); L_Start: // Targetted Player Pop-Up Message attachnpctimer strcharinfo(0); initnpctimer; atcommand "@adjgmlvl -1 "+strcharinfo(0)+""; // Leave this alone. mes "[Ellie Staff]"; mes "Manditory bot check in progress."; set @botcode,rand (1111,9999); mes "You have ^B4040460 seconds^000000 seconds to"; mes "input the following code:"; mes "[ ^5FB404"+@botcode+"^000000 ]"; input @exitnum; if (@exitnum == @botcode) goto L_Correct; if (@exitnum != @botcode) goto L_Wrong; close; OnTimer10000: //10 second mark. dispbottom "50 seconds to comply or risk being banned."; end; OnTimer20000: //20 second mark. dispbottom "40 seconds to comply or risk being banned."; end; OnTimer30000: //30 second mark. dispbottom "30 seconds to comply or risk being banned."; end; OnTimer40000: //40 second mark. dispbottom "20 seconds to comply or risk being banned."; end; OnTimer50000: //50 second mark. dispbottom "10 seconds to comply or risk being banned."; end; OnTimer55000: //55 second mark. dispbottom "5 seconds to comply."; end; OnTimer56000: //56 second mark. dispbottom "4 seconds to comply."; end; OnTimer57000: //57 second mark. dispbottom "3 seconds to comply."; end; OnTimer58000: //58 second mark. dispbottom "2 seconds to comply."; end; OnTimer59000: //59 second mark. dispbottom "1 second to comply."; end; OnTimer60000: //60 second mark. stopnpctimer; atcommand "@adjgmlvl 0 "+strcharinfo(0)+""; // Sets to GM LvL 0. //-------------------------------------------------------------------// // 3 hours jail time for not responding in 60 seconds. // (mh = month, dy = day, hr = hour, mn = minute) atcommand "@ban 1y "+strcharinfo(0)+""; end; //-------------------------------------------------------------------// L_Notlogged: mes "[ReviseRO Police]"; mes "That person is not logged in."; close; L_Wrong: next; mes "[ReviseRO Staff]"; mes "This is your second attempt."; set @botcode,rand (1111,9999); mes "You have ^B40404less than a minute^000000"; mes "to input the following code:"; mes "[ ^DF7401"+@botcode+"^000000 ]"; input @exitnum; if (@exitnum == @botcode) goto L_Correct; if (@exitnum != @botcode) goto L_WrongLastTry; close; L_WrongLastTry: next; mes "[ReviseRO Staff]"; mes "This is your last chance."; set @botcode,rand (1111,9999); mes "You have ^B40404less than a minute^000000"; mes "to input the following code:"; mes "[ ^DF0101"+@botcode+"^000000 ]"; input @exitnum; if (@exitnum == @botcode) goto L_Correct; close2; mes "[Ellie Staff]"; mes "You have failed the test."; stopnpctimer; sleep2 1000; atcommand "@adjgmlvl 0 "+strcharinfo(0)+""; // Sets to GM LvL 0. sleep2 1000; //-------------------------------------------------------------------// // 3 hours jail time for inputting the incorrect code three times. // (mh = month, dy = day, hr = hour, mn = minute) atcommand "@ban 1y "+strcharinfo(0)+""; end; //-------------------------------------------------------------------// L_Correct: next; stopnpctimer; atcommand "@adjgmlvl 0 "+strcharinfo(0)+""; // Sets to GM LvL 0. percentheal 100,100; sc_start SC_BLESSING,300000,10; sc_start SC_INCREASEAGI,300000,10; specialeffect2 EF_BLESSING; specialeffect2 EF_INCAGILITY; mes "[EllieRO Police]"; mes "You passed. Thank you for your time."; close; OnWhisperGlobal: if(!getgmlevel()) end; query_sql "SELECT `account_id` FROM `char` WHERE `online` = 1", .@IDs; set .@len, getarraysize(.@IDs); if(@whispervar0$=="all"){ while( .@V < .@len ){ if( isloggedin(.@IDs[.@V]) ){ attachrid(.@IDs[.@V]); goto L_Start; } set .@V,.@V+1; } end; } if(@whispervar0$=="map") while( .@V < .@len ){ getmapxy(.@N123$,.@B,.@C,0,rid2name(.@IDs[.@V])); if( @whispervar1$ != "" && @whispervar1$ == .@N123$ && isloggedin(.@IDs[.@V]) ){ attachrid(.@IDs[.@V]); goto L_Start; } set .@V,.@V+1; } end; } // Jail Cell 1. sec_pri,57,83,4 script Jail Time#1::Jail Time 738,{ mes "[Jail Time]"; mes "You have been caught botting."; mes "Please wait for your sentence"; mes "to play out or contact a GM."; atcommand "@jailtime "+strcharinfo(0)+""; close; } //Jail Cell 2. sec_pri,32,83,4 duplicate(Jail Time) Jail Time#2 738 Try this still repairing server so I can't test just yet, but this uses the sql method posted by Xynvaroth. If he has more then 128 players on at once I would use copy and delete array. query_sql("SELECT SUM(`online`) FROM `char`",.@sum); while(.@sum>=0) { set .@sum,.@sum-128; query_sql("SELECT `account_id` FROM `char` WHERE `online` = 1 limit "+.@sum+",128",.@IDs); set .@i,.@i+1; copyarray getd(".@IDs"+.@i+"[0]"),.@IDs; deletearray .@IDs[0], getarraysize( .@IDs ); } Something like that...