-
Content Count
225 -
Joined
-
Last visited
-
Days Won
20
Content Type
Profiles
Forums
Downloads
Staff Applications
Calendar
Everything posted by Habilis
-
I wrote a little script that would start server on the background and would write console logs to /home/hercuser/logs/ServerStartup<DAY-TIME>.dat #!/bin/bash # ARGUMENT CONSTANTS START="start" STOP="stop" RESTART="restart" #path to CD PATHCD="/home/hercuser/Hercules" # Path to the executable. EXE="./athena-start" # Date and representation logic DATE="$(which date)" TIMESTAMP=`$DATE '+%Y-%m-%d_%H_%M'` # Path to the logfile that will hold log of the server up. LOG="/home/hercuser/logs/ServerStartup$TIMESTAMP.dat" cd $PATHCD # Server logging case "$1" in "$START" | "$RESTART") echo "$($EXE $1)" &> "$LOG" 2>&1 & ;; "$STOP") $($EXE $1) ;; *) ;; esac here is the exemple of file ServerStartup2016-06-25_10_48.dat [...] [Status]: Cleaning up maps [866/875]: moro_cav... [Status]: Cleaning up maps [867/875]: 1@dth1... [Status]: Cleaning up maps [868/875]: 1@dth2... [Status]: Cleaning up maps [869/875]: 1@dth3... [Status]: Cleaning up maps [870/875]: 1@rev... [Status]: Cleaning up maps [871/875]: 1@xm_d... [Status]: Cleaning up maps [872/875]: 1@eom... [Status]: Cleaning up maps [873/875]: 1@jtb... [Status]: Cleaning up maps [874/875]: c_tower2_... [Status]: Cleaning up maps [875/875]: c_tower3_... [Status]: Cleaned up 875 maps. [Status]: Close Map DB Connection.... [Status]: Close Log DB Connection.... [Status]: Finished. [Info]: Memory manager: No memory leaks found.
-
Hello Boys and Gals I decided to do a experiment project, on with how minimal $ input, I could make a decent (by decent, I mean, players wouldn't want to delete the game client after 15 minutes playing) Ragnarok Online server and Comunity I will write it all in the Dev's Diary Format (Every entyr will follow standart : Day X : doing stuff [What I've done]) Day 1: First steps First of all, I needed a server software. After reading few reviews, I considered Hercules as my server software, mainly for it's hardware resources management. Then, I needed hardware. Since this is minimal $ input, I have compiled it and configured it to run on my RaspberryPi 3, which runs already a webserver, OwnCloud. It has an UPS made out of a PowerBank (for those who are curious http://raspi-ups.appspot.com/en/index.jsp) Not and option for you ? - You can spend 150-200$ for a year of VPS - Or, you could dustoff that Intel Core 2 duo that sits in your closet (im sure, for many of you, it does), it will run a server just fine... Need to configure a home network (its actually really easy) all I needed to do is give my server machine - a static ip (good business practice) - To that static IP, I needed to forward ports 3 ragnarok ports, 80/443 (80 if Im planning to host a webserver aswell, 443 if Im planning to use SSL, you know that https:// link... will be explained later in the DevsDiary...) I decided not to host a webserver for my Ragnarok Server Comunity. If the game server is down, I want the web site still be available... no problem go to Google and search for free web hosting, there are many of them just suit myself.... then I went to domain registrar (I used Godaddy) and look for a .com domain for my server .com domain grants some credibility When I have added my .com domain to the cart I went to google and search "cupons domain [site where I buy my domain] (in my case its godaddy)" I got a cupon code for first year registration of .com domain for 99cents Now I needed a website... there is plenty of website designs on these forums I liked : https://rathena.org/board/files/file/3012-erods-unfinished-web-template/ Mainly because it was already HTML, I didn't have to slice PSDs... since, I just want a website with basic info a little design and there you go I've configured the DNS of my .com domain to the free webhosting Now everyone can access my server Website from .com domain So far I've spent 99cents on .com domain... Day 2: Free Hosting Limitations The Idea behind using a freehosting, is to keep site and comunity online during Game server downtime. Sure free hostings limit possibilities. But Im designing a strategy to bypass those limitations in one way or another... 1) Free hostings do not allow open socket (used to check server status Online/Offline) Its actually pretty easy to bypass Free hostings offer Cron (Planified tasks) So I will start writing API-like software to run on the webserver on same machine as RagnarokServer Ragnariok server Machine Free Web Hosting Web-API (like) <--------------------- Cron job every 5 minutes with CURL call to Server machine does open socket on 127.0.0.1 returns Plain Text Or JSON (undecided yet) 111 (1 - map is on 1- login is on 1 - char is on) -------------------------> Builds static HTML file with styling and all that good stuff (if no reply from GameServer, Server considered offline) WebSite just includes that static HTML file using AJAX True, the status is not very accurate, it has 5 minutes update lag. but its fully functionnal, no matter what crazy Limitation my free web hosting impose.... Im also thinking to add a API key concept Much like KeyChain VPN token some company give you to work from home... My strategy is never reveal what my database connection string is.... In case a Hacker gets a webshell on that free site the only thing he will see is the WEB-API adress and API token generation algorithm and SALT. Im also thinking to add logging to API so if API spam or bruting attemps detected, I would just change API token Algorithm...
-
[GePard] Error in opening game !
Habilis replied to Sidra Harris's question in General Server Support
Probably Functor will be able to help you -
looks good, did you do it from scratch?
-
Well, first of all, ./configure should go first in this... body of commands then are you using the latest rev?
-
http://herc.ws/board/topic/12855-emotion-heart-show-hold-detach/
-
Hello, here is the adapted version of @emotion @heart @show @hold @detach commands so popular in the Russian eA, rA, Herc community. I don't claim to be the Author, credit for the work goes to each mod respective Author. I just made all of them into Hercules plugins and changed source code a little... emotion.c @emotion 0 - 81 without delay. Now, you can do nasty spam with emotions. #include <stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> #include "../common/HPMi.h" #include "../map/clif.h" #include "../map/atcommand.h" #include "../map/script.h" #include "../map/pc.h" #include "../common/nullpo.h" #include "../common/HPMDataCheck.h" HPExport struct hplugin_info pinfo = { "@emotion", // Plugin name SERVER_TYPE_MAP,// Which server types this plugin works with? "0.1", // Plugin version HPM_VERSION, // HPM Version (don't change, macro is automatically updated) }; /*========================================== * @emotion X by Anarchist * => Displays the emotions without delay *------------------------------------------*/ int emotion_max = 81; // Set las emotion number available forr this command ACMD(emotion) { nullpo_retr(-1, sd); char err_msg[1024]; if(!message || !*message || atoi(message)<0 || atoi(message)>emotion_max) { sprintf(err_msg, "usage: @emotion 0-%d", emotion_max); clif->message(fd, err_msg); return -1; } clif->emotion(&sd->bl,atoi(message)); return 1; } /* Server Startup */ HPExport void plugin_init (void) { addAtcommand("emotion",emotion); } heart.c @heart 1 or 2 (heart emotion without delay) #include <stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> #include "../common/HPMi.h" #include "../map/clif.h" #include "../map/atcommand.h" #include "../map/script.h" #include "../map/pc.h" #include "../common/nullpo.h" #include "../common/HPMDataCheck.h" HPExport struct hplugin_info pinfo = { "@heart", // Plugin name SERVER_TYPE_MAP,// Which server types this plugin works with? "0.1", // Plugin version HPM_VERSION, // HPM Version (don't change, macro is automatically updated) }; /*========================================== @heart X by Anarchist => Displays the heart special effect ------------------------------------------ */ ACMD(heart) { nullpo_retr(-1, sd); if(!message || !*message || atoi(message)<0 || atoi(message)>2) { clif->message(fd, "usage: @heart 1 or 2"); return -1; } if(atoi(message)==1) { clif->specialeffect(&sd->bl,364,0); } else if(atoi(message)==2) { clif->specialeffect(&sd->bl,509,0); } return 1; } /* Server Startup */ HPExport void plugin_init (void) { addAtcommand("heart",heart); } dance.c @dance 1 - 8 (character perform different tricks...) #include <stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> #include "../common/HPMi.h" #include "../map/clif.h" #include "../map/atcommand.h" #include "../map/script.h" #include "../map/pc.h" #include "../common/nullpo.h" #include "../common/HPMDataCheck.h" HPExport struct hplugin_info pinfo = { "@dance", // Plugin name SERVER_TYPE_MAP,// Which server types this plugin works with? "0.1", // Plugin version HPM_VERSION, // HPM Version (don't change, macro is automatically updated) }; /*========================================== @dance X by Anarchist => Special effects with dance style ------------------------------------------ */ ACMD(dance) { nullpo_retr(-1, sd); if(!message || !*message || atoi(message)<0 || atoi(message)>9) { clif->message(fd, "usage: @dance 1-9"); return -1; } switch(atoi(message)) { case 1 : clif->specialeffect(&sd->bl,413,0); break; case 2 : clif->specialeffect(&sd->bl,414,0); break; case 3 : clif->specialeffect(&sd->bl,415,0); break; case 4 : clif->specialeffect(&sd->bl, 426,0); break; case 5 : clif->specialeffect(&sd->bl,458,0); break; case 6 : clif->specialeffect(&sd->bl,466,0); break; case 7 : clif->specialeffect(&sd->bl,501,0); break; case 8 : clif->specialeffect(&sd->bl,540,0); break; case 9 : clif->specialeffect(&sd->bl,550,0); break; } return 1; } /* Server Startup */ HPExport void plugin_init (void) { addAtcommand("dance",dance); } show.c @show X Y (Displays a red dot on the minimap for the given coordinates, useful when searching for quest npc or a merchant selling needed items....) #include <stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> #include "../common/HPMi.h" #include "../map/clif.h" #include "../map/atcommand.h" #include "../map/script.h" #include "../map/pc.h" #include "../common/nullpo.h" #include "../common/HPMDataCheck.h" HPExport struct hplugin_info pinfo = { "@show", // Plugin name SERVER_TYPE_MAP,// Which server types this plugin works with? "0.1", // Plugin version HPM_VERSION, // HPM Version (don't change, macro is automatically updated) }; /*========================================== * @show by KarLaeda * => Displays the point on minimap *------------------------------------------*/ ACMD(show) { int x = 0, y = 0; nullpo_retr(-1, sd); if(!message || !*message || (sscanf(message, "%d %d", &x, &y) != 2)) { clif->message(fd, "usage: @show <x> <y>"); return -1; } clif->viewpoint(sd, 1, 1, x, y, 2, 0xFF0000); return 1; } /* Server Startup */ HPExport void plugin_init (void) { addAtcommand("show",show); } hold.c @hold (Disables / Enables character movement, useful on low rates to Archer/Mages when leveling on immobile monsters) #include <stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> #include "../common/HPMi.h" #include "../map/clif.h" #include "../map/atcommand.h" #include "../map/script.h" #include "../map/pc.h" #include "../common/nullpo.h" #include "../common/HPMDataCheck.h" HPExport struct hplugin_info pinfo = { "@hold", // Plugin name SERVER_TYPE_MAP,// Which server types this plugin works with? "0.1", // Plugin version HPM_VERSION, // HPM Version (don't change, macro is automatically updated) }; /*========================================== * @hold by Voidless *==========================================*/ ACMD(hold) { nullpo_retr(-1, sd); if (!sd->state.blockedmove) { sd->state.blockedmove=1; clif->message(fd, "Character movement turned off"); } else { sd->state.blockedmove=0; clif->message(fd, "Character movement turned on"); } return 1; } /* Server Startup */ HPExport void plugin_init (void) { addAtcommand("hold",hold); } For this plugin, I used the work : http://herc.ws/board/topic/2615-atcommand-afk/ of Mhalicot : http://herc.ws/board/user/1582-mhalicot/ To inspire myself... detach.c @detach (leaves character in game while client can be disconnected) #include <stdio.h> #include <stdlib.h> #include <string.h> #include "../common/HPMi.h" #include "../common/timer.h" #include "../common/nullpo.h" #include "../map/channel.h" #include "../map/script.h" #include "../map/pc.h" #include "../map/clif.h" #include "../map/chat.h" #include "../map/battle.h" #include "../map/status.h" #include "../common/HPMDataCheck.h" HPExport struct hplugin_info pinfo = { "@detach", // Plugin name SERVER_TYPE_MAP,// Which server types this plugin works with? "0.1", // Plugin version HPM_VERSION, // HPM Version (don't change, macro is automatically updated) }; /*========================================== * @detach *==========================================*/ ACMD(detach) { nullpo_retr(-1, sd); if( pc_isdead(sd) ) { clif->message(fd, "Cannot use @detach if you are dead."); return true; } if( map->list[sd->bl.m].flag.autotrade == battle->bc->autotrade_mapflag ) { if(map->list[sd->bl.m].flag.pvp || map->list[sd->bl.m].flag.gvg){ clif->message(fd, "You may not use @detach when you are on maps PVP or GVG."); return true; } sd->state.monster_ignore = 0; sd->state.autotrade = 1; chat->create_pc_chat(sd, "DETACH", "", 1, true); sd->sc.opt1 = OPT1_STONE; pc->setoption(sd, sd->sc.option); pc_setsit(sd); skill->sit(sd,1); clif->sitting(&sd->bl); channel->quit(sd); clif->authfail_fd(sd->fd, 15); return true; } else { clif->message(fd, "@detach is not allowed on this map."); return true; } } /* Server Startup */ HPExport void plugin_init (void) { addAtcommand("detach",detach); } Put all .c files inside src/plugins in the file src/plugins/makefile.in include the plugins MYPLUGINS = show heart emotion dance hold detach run commmand : make plugins in file conf/plugins.conf add plugins plugins_list: [ /* Enable HPMHooking when plugins in use rely on Hooking */ //"HPMHooking", //"db2sql", //"sample", //"other", "show", "heart", "emotion", "dance", "hold", "detach" ] Start server, enhoy
-
Well, that's a curious result and good future reference.
-
On the second thought, I doubt if it is wise having 'sleeping' threads on the server side. I will explore more how to separate @ commands from spam limit and add their own limit of 5-8. Perhaps, this would be more reasonable.
-
Hello I was about to release popular commands in Russian comunity such as @emotion @heart (Emotions without delay) as plugins for herc But i encountered a problem with chat flood (3 times one word phrase, even if command) So, I decided to make it configurable how many times command will be executed The comand is executed ex: 20 times but so fast, emotions merge one into another. I made a function to delay a bit, but it seems delay is not respected, no matter how much time i set as delay.... waitDelay is my delay function... /* ============================================= @emo Converted by: samsudin Original Made by: OnPlay inspired by: Anarchist ================================================ v1.0 Initial Release Displays the emotions without delay */ #include <stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> #include <time.h> #include "../common/HPMi.h" #include "../common/nullpo.h" #include "../map/clif.h" #include "../map/atcommand.h" #include "../map/script.h" #include "../map/pc.h" #include "../common/timer.h" #include "../common/HPMDataCheck.h" HPExport struct hplugin_info pinfo = { "@emo", // Plugin name SERVER_TYPE_MAP,// Which server types this plugin works with? "0.1", // Plugin version HPM_VERSION, // HPM Version (don't change, macro is automatically updated) }; /*========================================== * @emo by OnNplay * inspired by Anarchist * => Displays the emotions without delay *------------------------------------------ */ int emotion_max_repeat = 20; //max repeat without delay int emotion_max = 81; int delay_repeats = 5000; void waitDelay (void) { unsigned int tick; tick = timer->gettick()+delay_repeats; while (timer->gettick() < tick); } ACMD(emo) { int emotion = 0, repeat = 0, nbargs=0; char err_msg[1024]; nbargs=sscanf(message, "%d %d", &emotion, &repeat); if (!message || !*message || nbargs != 2 || emotion < 1 || emotion > emotion_max || repeat < 1 || repeat > emotion_max_repeat) { sprintf(err_msg, "usage: @emo <emotion (1-%d)> <repeat (max %d)>", emotion_max, emotion_max_repeat); clif->message(fd, err_msg); return -1; } for (int i = 0; i < repeat; i++) { clif->emotion(&sd->bl, emotion); waitDelay(); } return 1; } /* Server Startup */ HPExport void plugin_init (void) { addAtcommand("emo",emo); }
-
Well thankyou, but there is no ONRRO in that file. I have searched it, after googling this issue and finding post about it on rAthena... And BTW, the hotkey is CTRL+F Sounds more like it. Is there a diff that I accidentally activated? before, I didn't have that... That might be the case, im working on the client this time. Well you know the jazz, getting together GRFs, patching/diffing .exe
-
Im having this writing appearing next to the date I have no idea what possibly could cause that...
-
The install is, really, the same as any other computer running the same Linux distro. I was trully surprised, why some guy strugled so much installing the Emulator on a RaspberryPi, on rAthena forum. Anyways, here is a link to herc wiki on installing Hercules on debian (Raspbian in my case). http://herc.ws/wiki/Installation_(Debian) I refered to this link for installing and compiling. I dont know about performance of this little guy. So far, Im running on it : nginX+php-fpm - my blog written on Laravel 5 using SSL - OwnCloud installation serving of a raid1 array of 2 Samsung fit USB drives of 128gb (Probably not as wise as it may seem but whynot...) - My Ragnarok Online website - Hercules Will need to see, how will it run under stress of, say, 50 players online.... more online, however.... I dont think a hobby server will possibly score one day....
-
Hello community! I'm new (well not so new anymore... Had server hosting experience back in 2007 with eAthena). Well, enough of lifestories. After all, you would read a book, if you wanted a story. So, I'm writing here just to share this proof of concept. Running Hercules server on RaspberryPi 3 is, indeed, possible. I've just started. So far, I've been able to setup and connect to server. As soon as I will finish sorting out Client PreRe 2013-12-30 mess (It is a mess, since most links are dead) I will Invite some friends to gather feedback about their overall experience playing on the server hosted on RaspberryPi, I thought, that could be a nice experience to share with you guys. UPD : Ow, and I suppose, the choice of Hercules is pretty obvious ? ( back in 2007, I hosted that eAthena server on a similar spec PC as the RaspberryPi 3.)
-
2013-08-07aRagexe Failed to connect to server
Habilis replied to Habilis's question in General Server Support
Thank you for thee reply, but It didn't work... since my local network configuration is 192.168.2.60 -> Hercules 192.168.2.12 -> Client machine So I changed ALL ips (char_ip,map_ip,login_ip) to 192.168.2.60 I also noticed that I only opened all three Ragnarok ports on tcp protocol in my iptables. So I added udp too.... I also tried once without any iptables..... Doesn't work!!! Seems like packet problem to me.... Although, I have double checked all that packet mambo-jumbo.... I really don't know what was the problem, probably the client 2013-08-07 had buggy packet encryption I downloaded 2013-12-30, patched with NEMO, edited mmo.h and recompiled and now im able to connect ! -
Hello Im having this issue It seems to be alright for the Login server As Im connecting to the server in the console output, im able to see the messages [Status]: Connection of the account 'test' accepted. [Info]: Closed connection from '192.168.2.12'. No error messages at all... But in the client after a little while, im getting I have used 2013-08-07aRagexe.exe and NEMO to patch the client here is my clientinfo.xml <?xml version="1.0" encoding="euc-kr" ?> <clientinfo> <desc>Ragnarok Client Information</desc> <servicetype>korea</servicetype> <servertype>primary</servertype> <connection> <display>TestRO</display> <desc></desc> <balloon></balloon> <address>192.168.2.60</address> <port>6900</port> <version>45</version> <langtype>1</langtype> <registrationweb>...</registrationweb> <yellow> <admin>2000001</admin> </yellow> <loading> <image>loading00.jpg</image> <image>loading01.jpg</image> <image>loading02.jpg</image> <image>loading03.jpg</image> <image>loading04.jpg</image> <image>loading05.jpg</image> <image>loading06.jpg</image> <image>loading07.jpg</image> <image>loading08.jpg</image> <image>loading09.jpg</image> <image>loading10.jpg</image> </loading> </connection> </clientinfo> In the sources I have disabled Renewal /src/config/renewal.h by Uncomenting #define DISABLE_RENEWAL in the /src/common/mmo.h I set the #ifndef PACKETVER #define PACKETVER 20130807 #endif And I recompiled the server here are my configs login-server.conf // The login server listens on the interface with this IP address. // NOTE: This allows you to run multiple servers on multiple interfaces // while using the same ports for each server. //bind_ip: 127.0.0.1 // Login Server Port login_port: 6900 // Can you use _M/_F to make new accounts on the server? new_account: yes //If new_account is enabled, minimum length to userid and passwords should be 4? //Must be 'Yes' unless your client uses both 'Disable 4 LetterUserID/Password' Diffs new_acc_length_limit: yes // Account registration flood protection system // allowed_regs is the number of registrations allowed in time_allowed (in seconds) allowed_regs: 1 time_allowed: 10 // To log the login server? // NOTE: The login-sql server needs the login logs to enable dynamic pass failure bans. log_login: yes // Check The clientversion set in the clientinfo ? check_client_version: yes // What version we would allow to connect? (if the options above is enabled..) client_version_to_connect: 45 char-server.conf // Login Server IP // The character server connects to the login server using this IP address. // NOTE: This is useful when you are running behind a firewall or are on // a machine with multiple interfaces. login_ip: 127.0.0.1 // The character server listens on the interface with this IP address. // NOTE: This allows you to run multiple servers on multiple interfaces // while using the same ports for each server. //bind_ip: 127.0.0.1 // Login Server Port login_port: 6900 // Character Server IP // The IP address which clients will use to connect. // Set this to what your server's public IP address is. char_ip: 192.168.2.60 // Character Server Port char_port: 6121 network.conf // Network configuration file /* * List here any LAN subnets this server is in. * Example: * - char- (or map-) server's IP in LAN is 192.168.0.10 * - Public IP is 198.51.100.37 * If the list contains "192.168.0.10:255.255.255.0", any clients connecting * from the same 192.168.0.0/24 network will be presented with the LAN IP * (192.168.0.10) in the server list, rather than the public IP (198.51.100.37). */ lan_subnets: ( "127.0.0.1:255.0.0.0", "192.168.2.10:255.255.255.0", ) /* * List here any IP ranges a char- or map-server can connect from. * A wildcard of "0.0.0.0:0.0.0.0" means that server connections are allowed * from ANY IP. (not recommended). */ allowed: ( //"0.0.0.0:0.0.0.0", "127.0.0.1:255.0.0.0", "192.168.2.10:255.255.255.0", ) /* * List here any IP ranges a char- or map-server can connect from. These ranges * will also be excluded from the automatic ipban in casee of password failure. * Any entry present in this list is also automatically included in the * allowed IP list. * Note: This may be a security threat. Only edit this list if you know what * you are doing. */ trusted: ( "127.0.0.1:255.0.0.0", "192.168.2.10:255.255.255.0", ) map-server.conf // Character Server IP // The map server connects to the character server using this IP address. // NOTE: This is useful when you are running behind a firewall or are on // a machine with multiple interfaces. char_ip: 127.0.0.1 // The map server listens on the interface with this IP address. // NOTE: This allows you to run multiple servers on multiple interfaces // while using the same ports for each server. //bind_ip: 127.0.0.1 // Character Server Port char_port: 6121 // Map Server IP // The IP address which clients will use to connect. // Set this to what your server's public IP address is. map_ip: 192.168.2.60 // Map Server Port map_port: 5121 I have absolutely no idea, what could be wrong..... a slightest hint would be greatly apriciated!