Jump to content

GmOcean

Members
  • Posts

    666
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by GmOcean

  1. The coding still works, you just need to add it manually. I've already added this about 2 weeks ago.
  2. Yea, colored text does make it easier IMO to read, but, that is why I added showdigit as it only pops up for 5seconds. Most butters from what I can tell periodically monitor their bots. And this way, even they might miss it. Not sure if a bot can detect showdigit either.
  3. Those are just viewIDs of official headgears. You should already have those by default.
  4. Okay, so here is what you were asking for I guess. You can increase the strength of this by using methods that Euphy mentioned in addition to the showdigit time method. But for now this is in itself pretty strong D: ( i guess lol). Okay, so the way this script works is the following: 1. It shows a time at the top of the screen for 5 seconds. (Same format as used when your #1 in PvP). 2. It generates 3 random strings of text each different in length depending on what you specify. 3. The FIRST and LAST string of text is highlighted red, and are what the player needs to type in. 4. It is case sensitive. 5. Format inputted is: string1+string2+numbers. ex: asdf234asdfqwer5678qwer012345678 6. The player has a limited amount of time to input the password. (This can be specified in the script). 7. After the player logs in there is a random amount of time until the player is given the test. ( between 1min -> 15min by default ). 8. Lastly the length of the text is random from 10->48 (by default. can be changed). ex: Ae16455934 OR ex: 1234AsDf5678qwERgh34awTGTJhiiL9ku8765Fta14593402 So, yeah it's up to you on what you wanna change it to. First off, change this to a number higher than those your players are. This prevents them from using commands to bypass the bot check. // Only group with level more than or equal this value can use atcommand while talking with NPC. atcommand_enable_npc: 0 Then simply install this script and make the changes as needed. - script bot_test -1,{ OnInit: set .mim,1; //Minimum Wait time before starting bot test. set .mxm,15; //Maximum Wait time before starting bot test. set .often,60; //How often a bot test is given in minutes. set .timetest,30; //Seconds for players to input test before they auto-fail. set .minstr,1; //DO NOT CHANGE //Max Length each section of the string will be. set .maxstr,20; // ( .maxstr * 2 ) + 8 = Password Length. //DO NOT CHANGE THE BELOW// .day = 86400; .hour = 3600; .min = 60; setarray .0$[0],"a","b","c","d","e","f","g","h","i","j","k","L","m","n","o","p","q","r","s","t","u","v","w","x","y","z"; setarray .1$[0],"A","B","C","D","E","F","G","H","ii","J","K","LL","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"; setarray .2$[0],"0","1","2","3","4","5","6","7","8","9"; setarray .day$[1],"01","02","03","04","05","06","07","08","09","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29","30"; setarray .hour$[0],"00","01","02","03","04","05","06","07","08","09","10","11","12","13","14","15","16","17","18","19","20","21","22","23"; setarray .min$[0],"00","01","02","03","04","05","06","07","08","09","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29", "30","31","32","33","34","35","36","37","38","39","40","41","42","43","44","45","46","47","48","49","50","51","52","53","54","55","56","57","58","59"; setarray .second$[0],"00","01","02","03","04","05","06","07","08","09","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29", "30","31","32","33","34","35","36","37","38","39","40","41","42","43","44","45","46","47","48","49","50","51","52","53","54","55","56","57","58","59"; OnPCLoginEvent: addtimer (60000 *rand(.@min,.@mxm) ), strnpcinfo(3)"+::OnBotTest"; //Starts timer to trigger bot timer end; OnBotTest: set @pass,0; addtimer .timetest * 1000, strnpcinfo(3)"+::OnTestCheck"; set .@d,rand(1,30); set .@h,rand(1,23); set .@m,rand(60); set .@s,rand(60); set .@a,rand(20); set .@b,rand(20); set .@c,rand(20); freeloop(1); while( .@i <= .@a ){ .@d = rand(3); if( .@d == 2 ){ set .@str1$,.@str1$ + getd(".@"+ .@d +"$["+ rand(10) +"]"); } if( .@d == 0 || .@d == 1 ){ set .@str1$,.@str1$ + getd(".@"+ .@d +"$["+ rand(26) +"]"); } .@i++; } while( .@j <= .@a ){ .@e = rand(3); if( .@e == 2 ){ set .@str2$,.@str2$ + getd(".@"+ .@e +"$["+ rand(10) +"]"); } if( .@e == 0 || .@e == 1 ){ set .@str2$,.@str2$ + getd(".@"+ .@e +"$["+ rand(26) +"]"); } .@j++; } while( .@l <= .@a ){ .@f = rand(3); if( .@f == 2 ){ set .@str3$,.@str3$ + getd(".@"+ .@f +"$["+ rand(10) +"]"); } if( .@f == 0 || .@f == 1 ){ set .@str3$,.@str3$ + getd(".@"+ .@f +"$["+ rand(26) +"]"); } .@l++; } freeloop(0); showdigit ( (.@day * .@d) + (.@hour * .@h) + (.@min * .@m) + (.@s) ); mes "Input the ^FF0000TEXT^000000 only + the numbers above"; mes "^FF0000"+ .@str1$ +"^0000FF"+ .@str2$ +"^FF0000"+ .@str3$ +"^000000"; //For Debug purposes //mes ""+ .@day$[.@d]+""+ .@hour$[.@h] +""+ .@min$[.@m] +""+ .@second$[.@s]+""; input .@password$; if( .@password$ != ""+ .@str1$ +""+ .@str3$ +""+ .@day$[.@d] +""+ .@hour$[.@h] +""+ .@min$[.@m] +""+ .@second$[.@s] +"" ){ mes "^FF0000 FAILED"; //Punishment close; } addtimer (60000 * .often), strnpcinfo+"::OnBotTest"; set @pass,1; close; OnTestCheck: if( @pass ){end;} //Punishment end; } Right now, this script does not provide any form of punishment. To punish a person (ban/kick or other wise), simply search for //Punishment and replace with your punishment method.
  5. You need to limit your arrays to 128. Right now your telling sql to fetch ALL your account IDs at 1 time, but rAthena only supports a max of 128 per array. query_sql("SELECT account_id FROM `char` LIMIT 128;",.@account_ids); But, this is only HOW you limit it, what you need to do is loop this query until it's completely retrieved all the information, so we'll change it to this: do { set .@results, query_sql("SELECT account_id FROM `char` LIMIT 128,"+ .@page +"",.@account_ids); for (set .@x,0; .@x < .@results; set .@x, .@x + 1) { blah; blah; blah; blah; blah; } set .@page,.@page + 128; } while (.@results); Replace blah blah blah blah, with the update query's, and this SHOULD effectively continuously loop through all account_ids and then do what you want with them until they are all done.
  6. The problem is, your making the script call: getcharid(3) automatically, but the issue with that is there isn't a player attached. If your going to use it in this method, you need to apply the optional parameter of specifying what player to get the id from. ex: query_sql "SELECT `this_week` FROM `char` WHERE `account_id` = " + getcharid(3, "player_name") + "", .@this_week;
  7. @Skorm - Duplicates only share same NPC variables when they were set by the main npc right? Or did that change in a previous update, because eA didn't work like that and I haven't experimented with rA in that way yet D: Edit: It seems they do indeed share the same values when using a duplicate NPC D: Changed my frist post, to direct to Skorm's for #3 =P
  8. *getitem2 <item id>,<amount>,<identify>,<refine>,<attribute>,<card1>,<card2>,<card3>,<card4>{,<account ID>}; *getitem2 "<item name>",<amount>,<identify>,<refine>,<attribute>,<card1>,<card2>,<card3>,<card4>{,<account ID>}; This command will give an amount of specified items to the invoking character. If an optional account ID is specified, and the target character is currently online, items will be created in their inventory instead. If they are not online, nothing will happen. It works essentially the same as 'getitem' but is a lot more flexible. Those parameters that are different from 'getitem' are: identify - Whether you want the item to be identified (1) or not (0). refine - For how many pluses will it be refined. It will not let you refine an item higher than the max refine. attribute - Whether the item is broken (1) or not (0). card1,2,3,4 - If you want a card compound to it, place the card ID number into the specific card slot. Card1-card4 values are also used to store name information for named items, as well as the elemental property of weapons and armor. You can create a named item in this manner, however, if you just need a named piece of standard equipment, it is much easier to the 'getnameditem' function instead. You will need to keep these values if you want to destroy and then perfectly recreate a named item, for this see 'getinventorylist'. If you still want to try creating a named item with this command because 'getnameditem' won't do it for you cause it's too limited, you can do it like this. Careful, minor magic ahead. // First, let's get an ID of a character who's name will be on the item. // Only an existing character's name may be there. // Let's assume our character is 'Adam' and find his ID. @charid = getcharid(0,"Adam"); // Now we split the character ID number into two portions with a binary // shift operation. If you don't understand what this does, just copy it. @card3 = @charid & 65535; @card4 = @charid >> 16; // If you're inscribing non-equipment, @card1 must be 254. // Arrows are also not equipment. @card1 = 254; // For named equipment, card2 means the Star Crumbs and elemental // crystals used to make this equipment. For everything else, it's 0. @card2 = 0; // Now, let's give the character who invoked the script some // Adam's Apples: getitem2 512,1,1,0,0,@card1,@card2,@card3,@card4; This wasn't tested with all possible items, so I can't give any promises, experiment first before relying on it. To create equipment, continue this example it like this: // We've already have card3 and card4 loaded with correct // values so we'll just set up card1 and card2 with data // for an Ice Stiletto. // If you're inscribing equipment, @card1 must be 255. @card1 = 255; // That's the number of star crumbs in a weapon. @sc = 2; // That's the number of elemental property of the weapon. @ele = 1; // And that's the wacky formula that makes them into // a single number. @card2 = @ele+((@sc*5)<<8); // That will make us an Adam's +2 VVS Ice Stiletto: getitem2 1216,1,1,2,0,@card1,@card2,@card3,@card4; Experiment with the number of star crumbs - I'm not certain just how much will work most and what it depends on. The valid element numbers are: 1 - Ice, 2 - Earth 3 - Fire 4 - Wind. You can, apparently, even create duplicates of the same pet egg with this command, creating a pet which is the same, but simultaneously exists in two eggs, and may hatch from either, although, I'm not sure what kind of a mess will this really cause. prontera,150,180,4 script npc_name 123,{ getitem2 2137,1,1,0,0,0,0,0,4800; end; }
  9. This needs to be done via src edit. Currently isn't possible to detect whether someone dropped an item or not via script commands.
  10. "." - A NPC variable. They exist in the NPC and disappear when the server restarts or the NPC is reloaded. Can be accessed from inside the NPC or by calling 'getvariableofnpc'. Function objects can also have .variables which are accessible from inside the function, however 'getvariableofnpc' does NOT work on function objects. *getvariableofnpc(<variable>,"<npc name>") Returns a reference to a NPC variable (. prefix) from the target NPC. This can only be used to get . variables. Examples: //This will return the value of .var, note that this can't be used, since the value isn't caught. getvariableofnpc(.var,"TargetNPC"); //This will set the .v variable to the value of the TargetNPC's .var variable. set .v, getvariableofnpc(.var,"TargetNPC"); //This will set the .var variable of TargetNPC to 1. set getvariableofnpc(.var,"TargetNPC"), 1; Note: even though function objects can have .variables, getvariableofnpc will not work on them. @1: Yes, it should be possible using this method. @2: You need to use getvariableofnpc for each instance of needing to use the variable from another NPC. @3: As Skorm mentions, as long as the NPC is a duplicate of another NPC, the scope variables will be the same as another. @4: When using deletearray command, the documentation is right, but also wrong. It should read: *deletearray <array name>{[<first value>],<how much to delete>}; This is because, when a start & end value is omitted, it defaults to: deletearray <arrayname>[0],<script_max_array_size>; So it should be completely erasing your array from existence. Hope that helps D: and anyone else who feels I am wrong on a certain matter, please don't hesitate to correct me !!
  11. Edit: Read Below. I didn't realize it was renewal table instead of pre-renewal.
  12. Okay, so I was wondering if some one would be able to make a command that does the following: 1. Changes a player & his guild into a certain PK type state. 2. This PK type state will have a value of X (Which is change able). 3. A Player/Guild of PK State X will not be able to attack anyone in the open world unless the person they are attacking is also in PK State X. (ex1. Player A is in PKstateX. Player B is in PKstateY. = Can not attack.) (ex2. Player A is in PKstateX. Player B is in PKstateX. = Can Attack.) (ex3. Player A is in PKstateX. Player B is in PKstateY. Both players are in a PvP/GvG map. = Can Attack). (ex4. Player A is in PKstateX. Player B is in PKstateX. Player C is in PKstateZ. = Player A can attack Player B. Player C can not attack either of them.). 4. Follows the same rules as GvG/PvP. Hope to see if this is possible. I would assume so, since factions are possible, and this is a "form" of that.
  13. //Neut Watr Erth Fire Wind Pois Holy Shdw Gho Und 70, 100, 100, 100, 100, 100, 75, 75, 125, 100, // Ghost <----- Just change the value to what you want. Right now, it's 70% dmg. *Note - This affects all Ghost Lvl 1 type monsters as well.*
  14. xD Yeah, i should add it, but i made it at like 4am last night really tired and lazy lol.
  15. File Name: Utility: Effect List File Submitter: GmOcean File Submitted: 31 Aug 2014 File Category: Utilities Content Author: GmOcean A simple script that will allow users to cycle through the effects listed in 'effect_list.txt'. These effects were tested using client version: 2013-08-07a. Older clients (such as Pre-Renewal Clients) may result in errors due to not having those effects inside them. Click here to download this file
  16. Version 0.2

    587 downloads

    A simple script that will allow users to cycle through the effects listed in 'effect_list.txt'. These effects were tested using client version: 2013-08-07a. Older clients (such as Pre-Renewal Clients) may result in errors due to not having those effects inside them.
    Free
  17. bonus2 bSubEle,e,x; +x% damage reduction against element e bonus bDefEle,e; Gives the player's defense element e
  18. - script bounty_script -1,{ OnInit: set .bounty,10000; //Sets Earned Bounty in zeny. setarray .woe_reward[0],501,1; //[0] = Item given. | [1] = Amount given. set .wanted_increments,100000; //Sets how large a wanted level is in comparison to bountys. set .ip_ban,0; //Whether or not IP farming results in a ban. (Time in days). set .ip_jail,0; //Whether or not IP farming results in jail time. (Time in hours). set .mapname$,""; //Mapname script works on. Leave blank for all maps. set .resu_kill,0; //Whether or not to warp players to savepoint upon death. set .zeny_warp,0; //Whether or not to warp players to savepoint upon having less than 10k zeny. set .zeny_loss,0; //Whether or not players lose zeny upon dying. OnPCLoginEvent: if( !.ip_ban && !.ip_jail ){end;} //Prevents useless sql_query if ip farming punishments are disabled. query_sql("select last_ip from `login` WHERE account_id = "+ getcharid(3) +""),.@ip$; setd ".ip"+getcharid(0)+"$",.@ip$; end; OnPCLogoutEvent: if( !.ip_ban && !.ip_jail ){end;} //Prevents useless commands, if ip farming punishments are disabled. setd ".ip"+getcharid(0)+"$",""; end; OnPCKillEvent: if( strcharinfo(3) != .mapname$ && .mapname$ != "" ){end;} set .ip1$, getd(".ip"+getcharid(0)+"$"); if(killedrid == getcharid(3)){end;} //Prevent Suicide. attachrid(killedrid); if( .ip_ban || .ip_jail ){ //Checks to see if IP farming punishment is enabled. if( .ip1$ == getd(".ip"+getcharid(0)+"$") ) {dispbottom "Cheating will not be tolerated. Repeated offenses will result in a public denounciation, and a 5day ban."; set @repeatcheat,@repeatcheat +1; if(@repeatcheat >=3) {announce ""+strcharinfo(0)+" has been caught cheating and has been banned for 5days.",bc_blue|bc_all; if( .ip_ban ){ atcommand "@ban +5d "+strcharinfo(0)+""; } else if( .ip_jail ){ atcommand "@jail "+strcharinfo(0)+""; } } end;} //Prevents same IP Address Farming } if( .zeny_loss ){ if( zeny >= .bounty ){set zeny,zeny-.bounty;} } set .zeny, getd(".bounty"+ getcharid(0) +""); setd ".bounty"+ getcharid(0) +"",0; //Sets Bounty to 0 if they die. if( .zeny_warp ){ if(zeny < .bounty){warp "SavePoint",0,0;} } //Warps them out of map if they no longer have zeny. if( .resu_kill ){ warp "SavePoint",0,0; } //Warps them out of map to prevent resu kill spam attachrid(killerrid); set zeny,zeny + .zeny; setd ".bounty"+ getcharid(0) +"", getd(".bounty"+ getcharid(0) +"") + .bounty; //Sets Bounty to +.bounty per kill. set .@a$, ""+ getd(".bounty"+ getcharid(0) +"") +""; if(agitcheck() || agitcheck2()){if( .woe_reward[0] ){getitem .woe_reward[0],.woe_reward[1];}end;} set .@b, getstrlen(.@a$); while(.@c < .@ {set .@a$,insertchar(.@a$,",",(.@b - 3));set .@b,.@b-3; set .@c,.@c+3;} if( (getd(".bounty"+ getcharid(0) +"") / .wanted_increments) >= 10 ){announce "["+ strcharinfo(0) +"] has killed ["+ rid2name(killedrid) +"]. "+ (Sex?"He":"She") +" has a bounty of: "+ .@a$ +" zeny! [ WANTED LEVEL ***** ]",bc_blue|bc_all;} if( (getd(".bounty"+ getcharid(0) +"") / .wanted_increments) == 9 ){announce "["+ strcharinfo(0) +"] has killed ["+ rid2name(killedrid) +"]. "+ (Sex?"He":"She") +" has a bounty of: "+ .@a$ +" zeny! [ WANTED LEVEL **** ]",bc_blue|bc_all;} if( (getd(".bounty"+ getcharid(0) +"") / .wanted_increments) == 8 ){announce "["+ strcharinfo(0) +"] has killed ["+ rid2name(killedrid) +"]. "+ (Sex?"He":"She") +" has a bounty of: "+ .@a$ +" zeny! [ WANTED LEVEL *** ]",bc_blue|bc_all;} if( (getd(".bounty"+ getcharid(0) +"") / .wanted_increments) == 7 ){announce "["+ strcharinfo(0) +"] has killed ["+ rid2name(killedrid) +"]. "+ (Sex?"He":"She") +" has a bounty of: "+ .@a$ +" zeny! [ WANTED LEVEL ** ]",bc_blue|bc_all;} if( (getd(".bounty"+ getcharid(0) +"") / .wanted_increments) == 6 ){announce "["+ strcharinfo(0) +"] has killed ["+ rid2name(killedrid) +"]. "+ (Sex?"He":"She") +" has a bounty of: "+ .@a$ +" zeny! [ WANTED LEVEL * ]",bc_blue|bc_all;} if( (getd(".bounty"+ getcharid(0) +"") / .wanted_increments) >= 1 && (getd(".bounty"+ getcharid(0) +"") / .wanted_increments) < 6 ){announce "["+ strcharinfo(0) +"] has killed ["+ rid2name(killedrid) +"]. "+ (Sex?"He":"She") +" has a bounty of: "+ .@a$ +" zeny! [ WANTED LEVEL "+ (getd(".bounty"+ getcharid(0) +"") / .wanted_increments) +" ]",bc_blue|bc_all;} if( (getd(".bounty"+ getcharid(0) +"") / .wanted_increments) == 0 ){announce "["+ strcharinfo(0) +"] has killed ["+ rid2name(killedrid) +"]. "+ (Sex?"He":"She") +" has a bounty of: "+ .@a$ +" zeny!",bc_blue|bc_all;} end; } This version has options to enable and disable certain things. This is the last version, i'm releasing.
  19. setarray .map$[0],"Guild Map 1","Guild Map 2","Guild Map 3"; //Replace with the name of the maps each guild owns setarray .guild[0],1,2,3; //Replace with the guild ids that belong to the corresponding guild maps. You should know all of this information already if your requesting this script.
  20. Okay so let me try to get this straight. 1. This script works just fine. 2. You want to know if it'll work when a player uses @warp to one of the guild maps? If this is so, then the answer to #2 is Yes. When a player uses @warp to the map, it should trigger the OnPCLoadMapEvent: which will make the script run. If what you're trying to do is remove the ability to use @warp to the map, then a mapflag needs to be added.
  21. Yea, I don't like the global vars either, but seeing as how most already used them, I figured might as well stick with the pattern. But thanks, I'll try this out later when I get home. And of course I'll post back with my success chance lol. Edit: This works perfectly. I believe with this, I can finally complete my script with a minimal annoyance of having to create duplicate NPCs, now just to figure out a decent algorithm to cycle through them all without getting lost on which one i'm on D:
  22. Basically I need a command, that acts like the command, *getareausers("<map name>",<x1>,<y1>,<x2>,<y2>); But instead of returning just the AMOUNT of players in the area, I need it to create an array, of those player's account ID's. *getareauserid("<map name>",<x1>,<y1>,<x2>,<y2>) Upon executing this command, $@areauseraid[0] is a global temporary number array which contains the account id of all users found in the specified area. $@areausercount is the number of users found in the specified area. This is basically how it would turn out. (Yes I borrowed the layout used for getpartymember and getguildmember commands).
  23. - script On1956Dead -1,{ OnNPCKillEvent: if( killedrid == 1956 ) && rand(100) < 10 ) { getmapxy(.@m$,.@x,.@y,0); makeitem( .item[ rand( .item_size ) ],1,.@m$,.@x,.@y; } end; OnInit: setarray .item[0],18113,2016,1586,1395,1832,21001; .item_size = getarraysize( .item ); end; }
  24. Haha. I see. I figured as much. In the past with eA I had a command that would allow me to make npc duplicates via a script command. But sadly that code is lost. It allowed me to specify the w4, npc name and sprite I'd, while just duplicating an existing npc. So essentially it let me make a new one on the fly without the need to reloadscript, and the best part is they were temporary, so they vanished after a restart.
×
×
  • Create New...