Jump to content

BuLaLaKaW

Members
  • Posts

    125
  • Joined

  • Last visited

Posts posted by BuLaLaKaW

  1. On 3/18/2014 at 8:55 AM, pveronneau said:

    Sorry to resurrect the thread, however this is the first topic Google finds on the subject.  

     

    I wanted to provide a simple method for people to manage their Linux based rAthena servers.

     

    Modern Linux systems have moved away from the old system-v-init system and have now started to use systemd.  Setting up rAthena correctly using systemd is actually very easy.

     

    For this example, I assume that you are using mysql as a database.  I also assume that you run all services (login, character and map) and the database on the same system.  

     

    The logic we want to use is as follows:

     

    Wait until the system goes multi user -> make sure networking has started -> verify the database has started -> start the login server -> start the character server -> start the map server.

     

    You need to make sure your rAthena setup is working correctly, and starts with the "./athena-start start" command before setting this up.  Be sure to stop the rAthena before setting this up.

     

     

    ** NOTE ** All these commands are done as root.

     

    Step 1 - Set your working path to the systemd services directory.

    
    cd /lib/systemd/system/

    ** Warning ** this directory may change based on your distribution!  Most use this path, however some may use a different location.  Refer to your Linux distribution documentation for the correct path.  This path should be correct for Fedora and Debian, possibly others.

     

    Step 2 - Create the service file for the login server.

    Using the editor of your choice (vi, emacs, nano) create the following file. You need to modify it to set your install path and the rathena user.

     

    rathena-login.service

    
    [Unit]
    Description=rAthena login server
    After=syslog.target network.target mysqld.service
    
    [Service]
    WorkingDirectory=<rAthena install directory>
    User=rathena
    ExecStart=<rAthena install directory>/login-server
    ExecReload=/bin/kill -HUP $MAINPID
    KillMode=process
    Restart=on-failure
    RestartSec=42s
    
    [Install]
    WantedBy=multi-user.target

    Step 3 - Create the service file for the character server

    Using the editor of your choice (vi, emacs, nano) create the following file.  You need to modify it to set your install path and the rathena user.

     

     

    rathena-char.service

    
    [Unit]
    Description=rAthena character server
    After=syslog.target network.target mysqld.service rathena-login.service
    
    [Service]
    WorkingDirectory=<rAthena install directory>
    User=rathena
    ExecStart=<rAthena install directory>/char-server
    ExecReload=/bin/kill -HUP $MAINPID
    KillMode=process
    Restart=on-failure
    RestartSec=42s
    
    [Install]
    WantedBy=multi-user.target

    Step 4 - Create the service file for the map server

    Using the editor of your choice (vi, emacs, nano) create the following file.  You need to modify it to set your install path and the rathena user.

     

     

    rathena-map.service

    
    [Unit]
    Description=rAthena map server
    After=syslog.target network.target mysqld.service rathena-login.service rathena-char.service
    
    [Service]
    WorkingDirectory=<rAthena install directory>
    User=rathena
    ExecStart=<rAthena install directory>/map-server
    ExecReload=/bin/kill -HUP $MAINPID
    KillMode=process
    Restart=on-failure
    RestartSec=42s
    
    [Install]
    WantedBy=multi-user.target

    Step 5 - Restart systemd

    
    systemctl daemon-reload

    *If you modify the service files, you need to run this step again.

     

    Step 6 - Start the services and verify they are running

    
    systemctl start rathena-login.service
    systemctl start rathena-char.service
    systemctl start rathena-map.service
    
    systemctl status rathena-login.service
    systemctl status rathena-char.service
    systemctl status rathena-map.service

    Verify each service correctly started.  If you have a failure, verify your paths in the services file and retry.

     

    Step 7 - Enable the services on boot

    ** WARNING ** Do not do this step until you have verified services are running properly in step 6.  Failure to do so *may* result in your system hanging on boot.

    
    systemctl enable rathena-login.service
    systemctl enable rathena-char.service
    systemctl enable rathena-map.service

    That's it, your now running a fully daemonized rAthena server.  With this configuration systemd will watch the services, and if they crash will automatically restart them after 42 seconds.

     

    Here are the commands to manage your server.

     

    Start the server

    
    systemctl start rathena-login.service
    systemctl start rathena-char.service
    systemctl start rathena-map.service

    Stop the server

    
    systemctl stop rathena-login.service
    systemctl stop rathena-char.service
    systemctl stop rathena-map.service

    Restart the server

    
    systemctl restart rathena-login.service
    systemctl restart rathena-char.service
    systemctl restart rathena-map.service

    Additonal notes:

     

    If you use a different database server such as Maria or PostgreSQL, be sure to change the

    
    After=syslog.target network.target mysqld.service

    Line to read

    
    After=syslog.target network.target mariadb.service ...
    
    or
    
    After=syslog.target network.target postgresql.service ...

    If you have split the servers onto different machines, you also need to modify this line to remove the load dependency.

     

    This currently will not work on CentOS!

    CentOS 6 still uses the old SystemVinit system.  CentOS 7 is rumored to have systemd support, however after the acquisition by Redhat the projects future is uncertain.  I suggest you move over to Fedora for all the new hotness, or wait for RHEL7 if you need an enterprise grade Linux distribution.

     

    If your absolutely stuck on CentOS, you need to look into writing a proper init script.  See https://blog.hazrulnizam.com/create-init-script-centos-6/ for an example on how to do this.  Knowledge of shell scripting is required.

     

    Can't I just have one service?

    Short anwser, no.

     

    rAthena runs under three process threads and need to be monitored by systemd independently.  If you ran all services under one script, process failures could not be detected/logged correctly.

    If your really lazy, I think you can do a "systemctl status rathena*" to do all three processes at once.  It just doesn't work 100% of the time.  Best practice is not to be lazy, and call all services independently.

     

    Does this work with other emulators?

    Yes, it should work just fine with Hercules and eathena.

    This might be late .. better late than never .. thank you very much!!!

  2.  

    Its true, they sell sprites, but the spriter gets the money. He also sets the price.

     

    If you dont want to pay anything to what Ceejay Abne recommended. A Valkyrie Helm scouldn't be hard to get, lots of servers heave them in their GRFs ^^

     

    But since you seem to be a fair person, you should think about this fact: The server from which you STEAL it may have payed for it.

     

     

     

    stealing is something that has been owned, however please advise me what to say for people who grab free stuffs and sell it ?

    (that is how I see sprite repo unless they have a section for free and paid stuff, but instead they have everything paid even if it was for free)

     

    if I remember it right, those item(s) requested were free for download way back from eathena and before some mess up on the download section happened here in rathena.

     

    anyways http://www.green-peach.net/ is back ... its just a little wait

     

    I do hope free stuffs should be taken out from sprite repo and not charge for any, they have been doing a lot of revival of their site since years past

  3. sounds like packet.h and mmo.h at first however I recommend you recheck if you are using the correct luafiles since most of those errors is coming from incorrect tables like data\luafiles or data\luafiles512 if the number is right.

     

    just a thought, a user name themon already release a complete set of new client which enables rebellion sprite, why still use an old one ? <just a thought>

  4.  

     

    Or download them here :)

     

    that site is asking for payment or "donation" before you can do a download ... can anyone kind enough to post it here or tag along ?

     

    Lol no.. u just need to register and post anything at the Introduction.. Then u you will be able to download stuff.. but limited by 2 or 3 download.. i think.. and u need to contribute after that.. by donating them some sprite or anything that useful..

     

     

    some but not all of those sprites are supposedly for free in the previous years, but anyways I still do not find the donation reasonable since they do not own those sprite and it should be for the public ...

  5. sir may i ask what if i want some custom items like red valkyrie armor and stuffs where do i get it ? and what do you mean by server side datebase and client iteminfo.lub ?

     

    Oh my. That is really something you will need to do more. I mean due to changes for the past few years, some of these items are no longer downloadable via rathena. At some point you need to learn "Edo Tensei" to get those items you want. About the database on server side, you will need to create that one by one. And about client side, its like creating them from each :

     

    2.1 idnum2itemdisplaynametable.txt   <<<< this is the file for item name

    2.2 idnum2itemdesctable.txt <<< this is the file for item description

    2.3 idnum2itemresnametable.txt  <<< this is the file for the sprite of the item

    2.4 itemslotcounttable.txt << number of slot of the said item

     

    however if you are using itemlub files, it would be easier.

     

    I recommend first that you understand more on how to add custom items wiki.

  6.  

     

    Where can I find the source/script of the total/maximum resistance?

     

    I want to set the resistance of Demi-human from 100% to 150% or any else, I don't know where.

     

    it should be somewhere here : http://svn.rathena.org/svn/rathena/trunk/doc/item_bonus.txt

    * Race (r)
    	RC_Formless, RC_Undead, RC_Brute, RC_Plant, RC_Insect, RC_Fish,
    	RC_Demon, RC_DemiHuman, RC_Angel, RC_Dragon, RC_Player, RC_All
    
    bonus2 bSubRace,r,x;      		+x% damage reduction against race r
    

    then using the above item bonus,

    bonus2 bSubRace,RC_DemiHuman,100;
     
    or
     
    bonus2 bSubRace,RC_DemiHuman,200;

    you can try it I guess

     

    What I mean is how to change their max resists? 

     

     

    I am not sure if I understand you right, however if you say resistance for race I guess there is no such thing as max resistance or min resistance of demi human since there is no inter relationship from one race to the other. There is no settings that a demi human can inflict more damage to brute or to any race.

     

    I have tried to do a search and this concern might be related to this post at some point:

    Damage Reduction for Demi Human

     

    Other that this, when you say resist the one thing I remember about it will be elemental table, depending on your settings you can find them here.

    For Renewal - http://svn.rathena.org/svn/rathena/trunk/db/re/attr_fix.txt

    For Pre RE - http://svn.rathena.org/svn/rathena/trunk/db/pre-re/attr_fix.txt

     

    On those table you can adjust the effects of elements from one another however be guided that not all Demi Human are neutral. Below is a list of demi human race monsters with different elemental properties.

     

    http://ratemyserver.net/index.php?page=mob_db&race=7&mob_search=Search

     

    If still this does not answer your question, please let me know.

  7. Anyone here has custom items for wings and other custom equipments for Armor slot , garmet slot , shoes slot and accessory ?

     

    For custom items, you will need to download and ones available in the download section.

    Now for armor slot, garmet slot, shoes slot and accessory slot, you can easily do this via server side DB and client iteminfo.lub

     

    Here is a basic on custom items

    http://rathena.org/wiki/Custom_Items

     

    And you will need to read this

  8. Where can I find the source/script of the total/maximum resistance?

     

    I want to set the resistance of Demi-human from 100% to 150% or any else, I don't know where.

     

    it should be somewhere here : http://svn.rathena.org/svn/rathena/trunk/doc/item_bonus.txt

    * Race (r)
    	RC_Formless, RC_Undead, RC_Brute, RC_Plant, RC_Insect, RC_Fish,
    	RC_Demon, RC_DemiHuman, RC_Angel, RC_Dragon, RC_Player, RC_All
    
    bonus2 bSubRace,r,x;      		+x% damage reduction against race r
    

    then using the above item bonus,

    bonus2 bSubRace,RC_DemiHuman,100;
     
    or
     
    bonus2 bSubRace,RC_DemiHuman,200;

    you can try it I guess

  9.  

    wow i will try it later AzuraSkyy , thank you so much. this means a lot to me... 

     

    hi olrox .. got an error

     

    attachicon.giferror-help.jpg

     

    can i beg please place the tower on that coordinate, i really do not know how to use browedt

    This link contains a folder with several gat files for this chess map. Each of them is titled chess 3/7/10/15; the number following the map name indicates the height of the gat tile tower you requested.

    Simply re-name the gat file in the folder that best suits your interest to chess.gat and replace your old gat file with it.

    While you did request a 1x1 tower, I made it 2x2 to maintain the symmetry of the map. If you need it adjusted, please explain in detail what you'd like done differently and I'll fix it.

    ~Azura Skyy

     

     

    it did not work :(

     

    I have recreated a possible ending or image in this case, it should look something like this

     

    attachicon.gifchess.jpg

     

    here is the reasons why I want to do something like this

     

    1> if the players or 2 players playing chess is in the middle, they can see the entire view

    2> both cant go out or walk away from the tower

    3> easy to check since I will just do a check number of users on that specific location of the map.

     

    please help

     

    thanks

    Do you want it to be an actual visible structure or just a few tiles that levitate the player in the air?

    All I did was raised the gat tiles (invisible walk-able cells up a unit (3-15)). So you won't see anything unless you visit it in browedit or add it to a server or test it out on a server. When you walk over the center cells, your character should levitate a few cells higher.

    And as I said, I only edited the gat file; so you'd have to rename it from 'chess3' to 'chess.gat' and save it over your old gat file or make a copy of it and replace that copied one. If you don't rename and replace the gat file, it will be pulling the same gat file you uploaded in your original post.

    I hope this makes sense- if not, I could help you in team viewer? My Skype ID is the same as my rAthena username. Feel free to add me on there and message me at any time with questions. Skype messages are sent to my phone so I can reply whenever. :)

    ~Azura Skyy

     

     

    yes, i really need it to be seen like the one in the image below

     

    post-399-0-21090500-1392266488_thumb.jpg

     

    So that I can warp the two players on the said location or on top of that 1 x 1 tower, then use the script below

    *getareausers("<map name>",<x1>,<y1>,<x2>,<y2>)
    
    This function will return the count of connected characters which are located 
    within the specified area - an x1/y1-x2/y2 square on the specified map.
    
    This is useful for maps that are split into many buildings, such as all the 
    "*_in" maps, due to all the shops and houses.
    

    so that I can easily determine how many users are there on that specific location and I want to restrict their movement and let them stay only in the middle part of the map

     

    hope you can make it that way, a visible 1x1 or 2x2 (thinking that it says x1,y1,x2,y2) tower like with an elevation of maybe 5 or 7 high, please

     

    thanks

  10. wow i will try it later AzuraSkyy , thank you so much. this means a lot to me... 


     

    hi olrox .. got an error

     

    attachicon.giferror-help.jpg

     

    can i beg please place the tower on that coordinate, i really do not know how to use browedt

    This link contains a folder with several gat files for this chess map. Each of them is titled chess 3/7/10/15; the number following the map name indicates the height of the gat tile tower you requested.

    Simply re-name the gat file in the folder that best suits your interest to chess.gat and replace your old gat file with it.

    While you did request a 1x1 tower, I made it 2x2 to maintain the symmetry of the map. If you need it adjusted, please explain in detail what you'd like done differently and I'll fix it.

    ~Azura Skyy

     

     

    it did not work :(

     

    I have recreated a possible ending or image in this case, it should look something like this

     

    post-399-0-37538100-1392255577_thumb.jpg

     

    here is the reasons why I want to do something like this

     

    1> if the players or 2 players playing chess is in the middle, they can see the entire view

    2> both cant go out or walk away from the tower

    3> easy to check since I will just do a check number of users on that specific location of the map.

     

    please help

     

    thanks

×
×
  • Create New...