-
Content Count
78 -
Joined
-
Last visited
Content Type
Profiles
Forums
Downloads
Staff Applications
Calendar
Everything posted by Thyr
-
got this error too
-
Hello is this can work on Hercules? common/socket.c Index: socket.c =================================================================== --- socket.c (revision 13725) +++ socket.c (working copy) @@ -16,6 +16,7 @@ #ifdef WIN32 #include <winsock2.h> + #include <time.h> #include <io.h> #else #include <errno.h> @@ -112,7 +113,54 @@ sock_arr_len = fd+1; return fd; } + +#if defined(_MSC_VER) || defined(_MSC_EXTENSIONS) + #define DELTA_EPOCH_IN_MICROSECS 11644473600000000Ui64 +#else + #define DELTA_EPOCH_IN_MICROSECS 11644473600000000ULL +#endif +struct timezone +{ + int tz_minuteswest; /* minutes W of Greenwich */ + int tz_dsttime; /* type of dst correction */ +}; + +int gettimeofday(struct timeval *tv, struct timezone *tz) +{ + FILETIME ft; + unsigned __int64 tmpres = 0; + static int tzflag; + + if (NULL != tv) + { + GetSystemTimeAsFileTime(&ft); + + tmpres |= ft.dwHighDateTime; + tmpres <<= 32; + tmpres |= ft.dwLowDateTime; + + /*converting file time to unix epoch*/ + tmpres /= 10; /*convert into microseconds*/ + tmpres -= DELTA_EPOCH_IN_MICROSECS; + tv->tv_sec = (long)(tmpres / 1000000UL); + tv->tv_usec = (long)(tmpres % 1000000UL); + } + + if (NULL != tz) + { + if (!tzflag) + { + _tzset(); + tzflag++; + } + tz->tz_minuteswest = _timezone / 60; + tz->tz_dsttime = _daylight; + } + + return 0; +} + int sAccept(int fd, struct sockaddr* addr, int* addrlen) { SOCKET s; @@ -196,6 +244,9 @@ time_t last_tick; time_t stall_time = 60; +uint32 max_frequency_warning = 12; //Max number of packets user can have that are within a certain interval of each other before the program kicks +int diff_tolerance = 7000; //In microseconds + uint32 addr_[16]; // ip addresses of local host (host byte order) int naddr_ = 0; // # of ip addresses @@ -317,9 +368,37 @@ set_eof(fd); return 0; } - session[fd]->rdata_size += len; session[fd]->rdata_tick = last_tick; + + // Anti-WPE script by Zohan + if(!session[fd]->flag.server && (RFIFOW(fd,0) == 0x0438 || RFIFOW(fd,0) == 0x0116)) + { + session[fd]->lastDiff = session[fd]->thisDiff; + session[fd]->lastPacket.tv_sec = session[fd]->thisPacket.tv_sec; + session[fd]->lastPacket.tv_usec = session[fd]->thisPacket.tv_usec; + gettimeofday(&session[fd]->thisPacket, NULL); + session[fd]->thisDiff = (((session[fd]->thisPacket.tv_sec - session[fd]->lastPacket.tv_sec) * 1000000) + session[fd]->thisPacket.tv_usec) - session[fd]->lastPacket.tv_usec; + if(abs(session[fd]->thisDiff - session[fd]->lastDiff) < diff_tolerance) + { + session[fd]->warning_number++; + if(session[fd]->warning_number > max_frequency_warning) + { + set_eof(fd); + } + } + else if(session[fd]->thisPacket.tv_sec - session[fd]->lastPacket.tv_sec > 10) + { + session[fd]->warning_number = 0; + } + else + { + if(session[fd]->warning_number > 0) + { + session[fd]->warning_number--; + } + } + } return 0; } common/socket.h Index: socket.h =================================================================== --- socket.h (revision 13725) +++ socket.h (working copy) @@ -83,6 +83,13 @@ size_t rdata_pos; time_t rdata_tick; // time of last recv (for detecting timeouts); zero when timeout is disabled + //Anti-WPE + struct timeval thisPacket; + struct timeval lastPacket; + int thisDiff; + int lastDiff; + uint32 warning_number; + RecvFunc func_recv; SendFunc func_send; ParseFunc func_parse;
-
How can i make the monster gets aggressive, if their same monster is being attack by a player. Example: 10 Peco Peco in your screen and you attacked 1 Peco Peco the other 9 will gets aggressive and attack you. heres my monster script. { Id: 3180 SpriteName: "GRAND_PECO_1" Name: "Golden Peco" Lv: 98 Hp: 55000 Sp: 0 Exp: 889 JExp: 455 AttackRange: 1 Attack: [2097, 5049] Def: 10 Mdef: 10 Stats: { Str: 1 Agi: 50 Vit: 40 Int: 35 Dex: 69 Luk: 40 } ViewRange: 10 ChaseRange: 12 Size: "Size_Small" Race: "RC_Demon" Element: ("Ele_Undead", 1) Mode: { CanMove: true CastSensorIdle: true CanAttack: true Detector: true } MoveSpeed: 250 AttackDelay: 1156 AttackMotion: 456 DamageMotion: 384 MvpExp: 0 }, Thank You!
-
Hi, I got a problem that SecureGRF is not working when opened, im using windows 10. Is there any other GRF Encrypt/Secure for client 2010-07-30?
-
There encounter a crash again but didn't get put gdb yet. I started to re run the server 7am and disconnects in time 6:30pm.. you think its a map server or hosting problem?
-
Hello, I got a semi modified emulator runs, on a VPS. Yesterday i got this problem sometimes the map server gets disconnected in 4 hours or 7 hours of running in VPS. The edits I did before this sudden disconnection happens when i removed the tomb spawn of mvp which gets me error if its set true on my vps also made some edits on my own npc scripts.
-
Hi, Anyone could help me change the Gold points give instead of 1 point every mob killed, it will give a random 1 ~ 5 points. Here's the script. https://pastebin.com/hHq2D6Qx
-
Since, my emulator have no Bot Shield or Guard. I looked for anti bot script that pops out everytime a player kills 100+ monsters. just to avoid openkore bots auto-farm. Hehehe
-
Found this topic on rathena, possible to use it here? or is there a converted antibot killer of Myzter here in hercules? or is this script from rathena is compatible to hercules emulator?
-
Hello, I download the Hercules emulator from https://github.com/HerculesWS/Hercules and downloaded as ZIP. and then I order a Linux VPS to host it, then i used that as my emulator. When i found there's an update in hercules recently. I want to update it to the latest. My Hercules Emulator is currently running on VPS. using Winscp to view it. So in Putty I followed the guide Updating a working copy from here Typed "git pull" and this error comes [root@ragnarok Trunk]# git pull fatal: Not a git repository (or any of the parent directories): .git
-
bump Still looking for Star Gladiator Class - Increase damage on boss monster and holy monster by 100% - Can use Lord of Vermillion - Can use Parrying (Using Book) and Hunter (Changed) - It gives 100% damage using Sharp Shooting Skill.
-
Im having problem that when i equip and items to my character and relog the item is gone in inventor and equipment but the item equipped still views on the character. This problem start when I changed the Emulator files with new sql-files,etc., How can i change the ragnarok schema, to use the new emulators sql-files. Is it possible to overwrite it? tried using putty typing this mysql -u root -p ragnarok < root/Trunk/sql-files/main.sql after using that no message, if it change just came back from the root and waiting for the next command on putty. (checked data on phpadmin ragnarok schema, nothing changed)
-
Hello, just question. I've look to topics on how to use/add plugins to my running server (not yet up there's compiling errors). I saw people saying do "make plugins", so i tried to use it in my puTTy to compile my edited makefile.in in src/plugins right? after typing the make plugins this message pops up. # make plugins make: *** No rule to make target `plugins'. Stop.
-
After leaving the plugin directory. There's no more compile, but no warning that it stops. then tried to start the emulator and it gets me error. [Status]: HPM: Loaded plugin 'HPMHooking' (0.2) built with HPMHooking support. [Fatal Error]: HPM:plugin_load: failed to load 'plugins/command.so' (error: plugins/command.so: cannot open shared object file: No such file or directory)! [Status]: HPM: Loaded plugin 'HPMHooking' (0.2) built with HPMHooking support. [Fatal Error]: HPM:plugin_load: failed to load 'plugins/command.so' (error: plugins/command.so: cannot open shared object file: No such file or directory)! [Status]: HPM: Loaded plugin 'HPMHooking' (0.2) built with HPMHooking support. [Fatal Error]: HPM:plugin_load: failed to load 'plugins/command.so' (error: plugins/command.so: cannot open shared object file: No such file or directory)! Then I also tried adding my plugins in Makefile.in this is the line right? # This is only needed if you want to build your plugin through # # 'make plugins' or 'make all'. If you don't add it to this list, # # you will still be able to build your plugin through # # 'make plugin.my_plugin' # # # # Note: DO NOT include the .c extension!!! # MYPLUGINS = # # ######### DO NOT EDIT ANYTHING BELOW THIS LINE!!! ################## i Change it to this # This is only needed if you want to build your plugin through # # 'make plugins' or 'make all'. If you don't add it to this list, # # you will still be able to build your plugin through # # 'make plugin.my_plugin' # # # # Note: DO NOT include the .c extension!!! # MYPLUGINS = command koe security fcp_bypass # # ######### DO NOT EDIT ANYTHING BELOW THIS LINE!!! ################## Then compiled the emulator it get me repeating compile this is the repeating when compiled. after editing the makefile.in in src/plugin/ Reconfiguring with options: config.status: creating Makefile config.status: creating src/common/Makefile config.status: creating 3rdparty/mt19937ar/Makefile config.status: creating 3rdparty/libconfig/Makefile config.status: creating src/char/Makefile config.status: creating src/login/Makefile config.status: creating src/map/Makefile config.status: creating src/plugins/Makefile config.status: creating src/tool/Makefile config.status: creating src/test/Makefile config.status: creating tools/HPMHookGen/Makefile config.status: creating tools/doxygen/Makefile make[2]: warning: Clock skew detected. Your build may be incomplete. make[2]: Leaving directory `/root/Trunk' make[1]: Leaving directory `/root/Trunk/src/plugins' make[1]: Entering directory `/root/Trunk/src/plugins' make[1]: Warning: File `Makefile.in' has modification time 2.3e+03 s in the future make[2]: Entering directory `/root/Trunk' make[2]: Warning: File `src/plugins/Makefile.in' has modification time 2.3e+03 s in the future conf/plugins.conf plugins_list: [ /* Enable HPMHooking when plugins in use rely on Hooking */ "HPMHooking", //"db2sql", //"sample", //"other", //"hBG", "command", // "whosell", "koe", "security", "fcp_bypass", How can i compile the plugins? Typed make plugins this thing pops out make plugins make: *** No rule to make target `plugins'. Stop.
-
Hello, I compile my server and i got this line PLUGIN HPMHooking_map make[1]: Leaving directory `/root/Trunk/src/plugins' after that the compiling didn't continue. Help me pls.
-
up please
-
Anyone can recommend that can host ragnarok server?
Thyr replied to KTBRDGTT's question in General Server Support
Difference of SSD and without? also the OpenVZ and KVM in terms of setting up RO emulator -
bump anyone?
-
Sorry, used close; and end; didn't tried break; sorry again. Thank you.
-
Hello made function, How can i make this continue to the next package after the accessory given the npc didn't continues. //== GPACK ====================================== function script M_Gpack { switch(getarg(0)) { case 1: mes "[ Guild Package Manager ]"; mes "So you are a guild member,"; mes "please choose your accessory."; switch(select("Strength", "Agility", "Vitality", "Intelligence", "Dexterity", "Luk")) { case 1: getitembound 2771,2,2; close; case 2: getitembound 2770,2,2; close; case 3: getitembound 2766,2,2; close; case 4: getitembound 2768,2,2; close; case 5: getitembound 2769,2,2; close; case 6: getitembound 2767,2,2; close; } next; mes "[ Guild Package Manager ]"; mes "Please choose your set.."; switch(select("STR", "AGI", "VIT", "INT", "DEX", "LUK")) { case 1: //STR getitembound 20002,1,2; getitembound 20002,1,2; close; case 2: //AGI getitembound 20011,1,2; getitembound 20020,1,2; close; case 3: //VIT getitembound 20001,1,2; getitembound 20016 ,1,2; close; case 4: //INT getitembound 20004,1,2; getitembound 20019,1,2; close; case 5: //DEX getitembound 20003,1,2; getitembound 20018,1,2; close; case 6: //LUK getitembound 20013,1,2; getitembound 20017,1,2; close; } case 2: mes "Nothing"; close; } return; }
-
How can I make a Item Box that triggers NPC. Example: Freebies Box, this box give 100 ygg,100 box of thunder, valkyrie set, and Stat Accessory [this thing will trigger npc to choice which type of accessory STR,AGI,VIT,INT,DEX,LUK. (The box still distribute items and then triggers NPC talk, to choose what kind of accessory.)
-
Hello, How can I add Guild Level Requirement. Guild Level must be level 50. //4_F_ZONDAGIRL warcraft,215,170,3 script Guild Package 4_M_EIN_SOLDIER,{ .@req_online = 10; // how many players need to online to claim. .@req_lv = 255; // minimum level of .@online players that has to be. mes "[ ^007fffGuild Package^000000 ]"; mes "Hello, I'm incharge for the Guild Package!"; mes "Here are the Requirements:"; mes "10 Members must be online to be able get our server Guild Package"; mes "All members must be level 255"; mes "^ff0000(Minimum of 15 Members)^000000"; mes "^ff0000WARNING! WARNING! WARNING!^000000"; mes "^ff0000Same IP Detection/Abuser^000000"; mes "^ff0000@autoban Goodluck!!~^000000"; next; mes "[ ^007fffGuild Package^000000 ]"; mes "^007fff--- Guild Leader ---^000000"; mes "- ^ff0000100x^000000 ^009a4dBerry Box^000000"; mes "- ^ff000050x^000000 ^009a4dBox of Thunder Box^000000"; mes "- ^ff000050x^000000 ^009a4dPoison Bottle Box^000000"; mes "- ^ff00002x^000000 ^009a4dTurtle General Card^000000 ^ff8000(Bound)^000000"; mes "- ^ff00001x^000000 ^009a4dGhostring Card^000000 ^ff8000(Bound)^000000"; mes "- ^ff00001x^000000 ^009a4dThara Frog Card^000000 ^ff8000(Bound)^000000"; mes "- ^ff00001x^000000 ^009a4dOrc Hero Card^000000 ^ff8000(Bound)^000000"; mes "- ^ff00001x^000000 ^009a4dEvil Snake Lord Card^000000 ^ff8000(Bound)^000000"; mes "- ^ff00002x^000000 ^009a4dPhreeoni Card^000000 ^ff8000(Bound)^000000"; mes "- ^ff00001x^000000 ^009a4dRaydric Card^000000 ^ff8000(Bound)^000000"; mes "- ^ff00001x^000000 ^009a4dGeneral Egnigem Cenia Card^000000 ^ff8000(Bound)^000000"; mes "- ^ff00001x^000000 ^009a4dSilver Valkyrie Helm^000000 ^ff8000(Bound)^000000"; mes "- ^ff00001x^000000 ^009a4dHollow Mask^000000 ^ff8000(Bound)^000000"; mes "- ^ff00001x^000000 ^009a4dSilver Valkyrie Armor^000000 ^ff8000(Bound)^000000"; mes "- ^ff00001x^000000 ^009a4dSilver Valkyrie Manteau^000000 ^ff8000(Bound)^000000"; mes "- ^ff00001x^000000 ^009a4dSilver Valkyrie Shield^000000 ^ff8000(Bound)^000000"; mes "- ^ff00001x^000000 ^009a4dSilver Valkyrie Shoes^000000 ^ff8000(Bound)^000000"; mes "- ^ff0000500x^000000 ^009a4dSuperb Fish Slice^000000 ^ff8000(Bound)^000000"; mes "- ^ff000050^000000 ^009a4dCredits^000000"; mes "- ^ff0000500^000000 ^009a4dVoting Proof Ticket^000000"; next; mes "[ ^007fffGuild Package^000000 ]"; mes "^007fff-- Each Member --^000000"; mes "- ^ff000050x^000000 ^009a4dBerry Box^000000"; mes "- ^ff000050x^000000 ^009a4dBox of Thunder Box^000000"; mes "- ^ff000050x^000000 ^009a4dPoison Bottle Box^000000"; mes "- ^ff00002x^000000 ^009a4dTurtle General Card^000000 ^ff8000(Bound)^000000"; mes "- ^ff00001x^000000 ^009a4dGhostring Card^000000 ^ff8000(Bound)^000000"; mes "- ^ff00001x^000000 ^009a4dThara Frog Card^000000 ^ff8000(Bound)^000000"; mes "- ^ff00001x^000000 ^009a4dOrc Hero Card^000000 ^ff8000(Bound)^000000"; mes "- ^ff00001x^000000 ^009a4dEvil Snake Lord Card^000000 ^ff8000(Bound)^000000"; mes "- ^ff00001x^000000 ^009a4dRaydric Card^000000 ^ff8000(Bound)^000000"; mes "- ^ff00002x^000000 ^009a4dPhreeoni Card^000000 ^ff8000(Bound)^000000"; mes "- ^ff00001x^000000 ^009a4dGeneral Egnigem Cenia Card^000000 ^ff8000(Bound)^000000"; mes "- ^ff00001x^000000 ^009a4dSilver Valkyrie Helm^000000 ^ff8000(Bound)^000000"; mes "- ^ff00001x^000000 ^009a4dHollow Mask^000000 ^ff8000(Bound)^000000"; mes "- ^ff00001x^000000 ^009a4dSilver Valkyrie Armor^000000 ^ff8000(Bound)^000000"; mes "- ^ff00001x^000000 ^009a4dSilver Valkyrie Manteau^000000 ^ff8000(Bound)^000000"; mes "- ^ff00001x^000000 ^009a4dSilver Valkyrie Shield^000000 ^ff8000(Bound)^000000"; mes "- ^ff00001x^000000 ^009a4dSilver Valkyrie Shoes^000000 ^ff8000(Bound)^000000"; mes "- ^ff0000500x^000000 ^009a4dSuperb Fish Slice^000000 ^ff8000(Bound)^000000"; mes "- ^ff000050^000000 ^009a4dCredits^000000"; mes "- ^ff0000500^000000 ^009a4dVoting Proof Ticket^000000"; next; if ( !getcharid(2) ) { mes "[ Guild Package ]"; mes "You must have a guild"; close; } if ( getguildmasterid( getcharid(2) ) != getcharid(0) ) { mes "[ Guild Package ]"; mes "You are not a Guild Leader"; close; } getguildmember getcharid(2), 1; getguildmember getcharid(2), 2; for ( .@i = 0; .@i < $@guildmembercount; .@i++ ) if ( isloggedin( $@guildmemberaid[.@i], $@guildmembercid[.@i] ) ) .@online++; if ( .@online < .@req_online ) { mes "[ Guild Package ]"; mes "Your Guild must have "+ .@req_online +" guild members online"; close; } .@origin = getcharid(3); for ( .@i = 0; .@i < $@guildmembercount; .@i++ ) { if ( isloggedin( $@guildmemberaid[.@i], $@guildmembercid[.@i] ) ) { attachrid $@guildmemberaid[.@i]; if ( BaseLevel < .@req_lv ) { .@deny_name$[.@c] = strcharinfo(0); .@c++; } } } attachrid .@origin; if ( .@c ) { mes "[ Guild Package ]"; mes "^ff0000"+ .@c +"^000000 of your Guild member does not meet the ^ff0000255^000000 level requirement"; mes implode( .@deny_name$, "," ); close; } for ( .@i = 0; .@i < $@guildmembercount; .@i++ ) { if ( isloggedin( $@guildmemberaid[.@i], $@guildmembercid[.@i] ) ) { attachrid $@guildmemberaid[.@i]; if ( #guild_package_claimed ) { .@deny_name$[.@c] = strcharinfo(0); .@c++; } } } attachrid .@origin; if ( .@c ) { mes "[ Guild Package ]"; mes "there are "+ .@c +" members already claimed this package within their account"; mes implode( .@deny_name$, "," ); close; } if ( query_sql( "select account_id as aaa, ( select last_ip from login where account_id = aaa ) as last_ip from guild_member where guild_id = "+ getcharid(2) +" group by last_ip", .@aid, .@ip$ ) < .@req_online ) { mes "[ Guild Package ]"; mes "same ip detected"; .@nb = query_sql( "select name, account_id as aaa, ( select last_ip from login where account_id = aaa ) as last_ip from guild_member where guild_id = "+ getcharid(2), .@name$, .@aid, .@ip$ ); for ( .@i = 0; .@i < .@nb; .@i++ ) mes "[ Guild Package ]"; mes (.@i +1)+". "+ .@name$[.@i] +" ("+ .@ip$ +")"; next; } mes "[ Guild Package ]"; mes "Congratulations! Your Gpack has been claimed!"; for ( .@i = 0; .@i < $@guildmembercount; .@i++ ) { if ( isloggedin( $@guildmemberaid[.@i], $@guildmembercid[.@i] ) ) { attachrid $@guildmemberaid[.@i]; if ( getguildmasterid( getcharid(2) ) != $@guildmembercid[.@i] ) getitembound 13517,100,1; // Yggberry Box else getitembound 13517,50,1; // Yggberry Box getitembound 14524,500,1; //SUPER B getitem 7227,500; // Voting Proof Ticket getitem 20030,50; // Credits getitembound 30110,50,1; // Box Of Thunder Box getitembound 13973,50,1; // EDP Box getitembound 4305,2,1; // Turtle getitembound 4121,2,1; // Phreeoni getitembound 4047,1,1; // Ghostring getitembound 4352,1,1; // Gen Egnihem getitembound 4058,1,1; //Thara Frog getitembound 4143,1,1; //ORC HERO getitembound 4330,1,1;//ESL getitembound 4133,1,1; //Raydric getitembound 20023,1,1; //Hollow getitembound 20009,1,1; //SilverV getitembound 20008,1,1; //SilverV getitembound 20007,1,1; //SilverV getitembound 20006,1,1; //SilverV #guild_package_claimed = 1; } } attachrid .@origin; close; OnInit: waitingroom "Guild Package? Claim it now!",0; end; }
-
I see, so the gepard is the only thing. I thought there is other ways like encrypting the data.ini to disable modification onti by adding grfs. .