Jump to content

Cydh

Developer
  • Posts

    2,285
  • Joined

  • Last visited

  • Days Won

    72

Posts posted by Cydh

  1. This tutorial will leads you to

    • Set multiple char-server as shown as multi services after login in RO Client
    • Set multiple map-servers for 1 char-server
    • A Lazy setup
      • So called Lazy setup because this guide only "copy" the necessary super minimum config file.
      • The Lazy config will runs same server cores, so if server is compiled in renewal, you only can change the rates as example
      • to make different server types (mod, renewal vs pre) you have to copy/separate the rathena files, u will understand if you can understand this basic (... that's what I thought)
      • How to make it no lazy? Just copy the folders, restructure by using decent directory names... so lazy to write it now, maybe later

    I've seen the setup before, years ago, can't recall where, maybe in old wiki? Because in current wiki is just like this: Multiple Servers.

     

    1 Login-server with Multiple Char-Server

    1 login-server

    1. set just like your normal setup
    2. add 1 more connection account in login (sex = 'S'), the username & password must be different with the first one. Example by default is s1 and p1, this entry be s2 and p2

    2 char-servers

    • char-server A
      • set just like your normal setup
      • map-server A.1
        • set just like normal setup
    • char-server B
      • copy conf/char_athena.conf as conf/char_athena2.conf
      • change the userid: s2
      • change the passwd: p2
      • change the server_name: rAthena-2
      • change the char_port: 6122
      • map-server B.1
        • copy conf/map_athena.conf as conf/map_athena2.conf
        • change the userid: s2
        • change the passwd: p2
        • change the char_port to match char-server B, 6122
        • change the map_port: 5122
        • in addition maybe you later can copy conf/battle/* to conf/battle2/*, so just do this int this example. So you need to copy conf/battle_athena.conf to conf/battle2/battle_athena.conf

    MySQL Databases

    1. DB1
      1. Create database with name (if default is) ragnarok
      2. Do normal config, import everything just like normal config
    2. DB2
      1. Create database with name  ragnarok2 
      2. Do normal config, import everything just like normal config

    inter_athena.conf setup

    1. Inter-1
      1. set as normal setup
    2. Inter-2
      1. copy conf/inter_athena.conf as conf/inter_athena2.conf
      2. set as normal setup
      3. change the char_server_id to  ragnarok2 
      4. change the map_server_id to  ragnarok2 
      5. change the log_db_id to  ragnarok2 

    Run the servers

    1. Run login-server
    2. Run char-server A and map-server A1 just like running a server
    3. For the 2nd server (char-server B and map-server B.1) follow this
      1. You can run manually by open command line or copy the charserv.bat and mapserv.bat file (that's why I against deleting .bat file in compilation), by following
      2. char-server.exe--inter-config conf/inter_athena2.conf --char-config conf/char_athena2.conf
      3. map-server.exe --inter-config conf/inter_athena2.conf --map-config conf/map_athena2.conf --battle-config conf/battle2/battle_athena.conf

     

    1 Char-Server with Multiple Map-servers

    • By simple examples you want 2nd map-server have towns only
    • And this map-servers are part of Char-Server B
    • be careful between map_athena and maps_athena, there's "s" and there is not.

    Map-Server B.1

    1. From conf/map_athena2.conf
      • Change import: conf/maps_athena.conf to import: conf/maps_athenaB1.conf
    2. Copy conf/maps_athena.conf to conf/maps_athenaB1.conf
    3. Remove/comment payon, prontera, izlude, morocc, and other cities from this map-server in file conf/maps_athenaB1.conf
    4. Copy npc/script

    Map-server B.2

    1. Copy conf/map_athena2.conf to conf/map_athena2a.conf
      1. Set map_port: 5123 (5121 used for Map-server B.1, while 5122 for B.2)
      2. Change import: conf/maps_athenaB1.conf to import: conf/maps_athenaB2.conf
    2. Make a new file conf/maps_athenaB2.conf
    3. Add the entries 
      map: payon
      map: prontera
      map: izlude
      map: morocc
      // ...

       

    4. Now re-run the Map-server B2 then following by B3
      1. map-server.exe --inter-config conf/inter_athena2.conf --map-config conf/map_athena2.conf --battle-config conf/battle2/battle_athena.conf
      2. map-server.exe --inter-config conf/inter_athena2.conf --map-config conf/map_athena2a.conf --battle-config conf/battle2/battle_athena.conf
    5. Your map-servers will be run wil neat error messages because missing NPC LOL. Because map-server will hardcoded-ly reads NPC scripts listing from /npc/[pre-]re/scripts_main.conf, you can redefine the path in config file LOL. That's why I say this setup is lazy, because I lazy to copy 'rathena' dir to another dir > then to give an example to remove unnecesary NPCs

     

    Known Multi Server Issues

    Multi Char-server issues

    • None yet

    Multi Map-server issues

    • Some atcommands, such who commands
    • Calling player from other map-server, such Emergency Call skill
    • Channel System
    • Guild storage dupe, yeah, never enable (at)gstorage command if you run this mode
    • The rest later, I forgot all topic references
    • Map-server reads scripts_main.conf from same root directory, can redefine

    Image, video, or any materials to make this tutorial can be fancier, will be added later (so much later....)

    • Upvote 5
    • Love 1
    • MVP 2
    • Like 1
  2. 9 hours ago, xGod said:

    I'm having this kind of error when I try resetting pass on my fluxcp.

    Password recovery cannot be used for this account.

    tried it with the default theme and the custom theme.

    cannot find the string 🤔

     

    edit: typo,

    so change this config in application.php

    	'NoResetPassGroupLevel'		=> AccountLevel::LOWGM,		// Minimum group level of account to prevent password reset using control panel.

     

    • MVP 1
  3. 12 hours ago, WhiteEagle said:

    Cool idea. Can be coupled with quests. Is a little more pleasant than "bring me the item in text format" for the next questpart
    Will this buyable?

    Can be modified for this schema too. For now, this is just "player's buyingstore" but run by NPC. And the buyingstore item list limited only to 5 (blame kRO client)

    11 hours ago, crazyarashi said:

    Looks nice, can it buy specific items like +9 knife with 4 thanatos card stuffs

    Can be modified for this schema too. But again the kRO Client only show non-refine item

  4. Updates and folding fixed in https://github.com/Sehrentos/rAthena-syntax-highlight/pull/7

     

    7 hours ago, sikiro said:

    hey @Cydh ive used this for a while to help me edit scripts would it be possible to make it work with this dark theme https://github.com/Ludomancer/VS2015-Dark-Npp cause white makes my eyes bleed it works however all code is highlited in white.

    @sikiro you can try this, just made, didn't add to main repo yet for testing purpose https://github.com/cydh/rAthena-syntax-highlight/blob/cydh-devel/rAthena-VS2015-Dark.xml

    NOTE: It's not NPP theme, it's just recolor, if you want to stick this as "rathena user-defined language", you have to remove the 'white'-ver first then import that file.

     

    rathena-udl-vs2015-dark-2.thumb.png.f0d6d3b83d10cf1ac2f39c291a450cea.png

    • Upvote 2
  5. *getobjects(<type>,<data>{,"<map name>"{,<x1>,<y1>,<x2>,<y2>}})
    
    Get object GIDs on specified location based on specified 'type'. The returned
    value is number of all objects found. The GIDs is stored in temporary NPC
    variables.
    
    <type> can be combined value as bitwise of
    	BL_PC   - Character object
    	BL_MOB  - Monster object
    	BL_PET  - Pet object
    	BL_HOM  - Homunculus object
    	BL_NPC  - NPC object
    	BL_MER  - Mercenary object
    	BL_ELEM - Elemental object
    
    'data' values are bitmask of
    	0x1 - GID (default)
    	0x2 - Name
    	0x4 - Char ID (only for BL_PC)
    	0x8 - Class (Job ID for BL_PC, Sprite ID for BL_NPC, and Class
    		  for other types)
    
    Default 'map name' for look up is invoker location or NPC if no invoker found.
    
    Object GID found will be saved in these arrays, while 'type' is value of
    UNITTYPE_*. Use getd for good practice.
    
    	[email protected]obj_type_id[]
    	[email protected]obj_type_name$[]
    	[email protected]obj_type_cid[]
    	[email protected]obj_type_class[]
    
    Example 1:
    
    	getobjects(BL_PC,0x1);
    	[email protected]n = getarraysize(getd("[email protected]_"+BL_PC+"_id"));
    	for ([email protected]i = 0; [email protected]i < [email protected]n; [email protected]i++) {
    		getitem 607,1,getd("[email protected]_"+BL_PC+"_id["[email protected]i+"]");
    	}
    
    Example 2:
    
    	getobjects(BL_PC|BL_NPC,0x1|0x2);
    	// For players
    	[email protected]pc = getarraysize(getd("[email protected]_"+BL_PC+"_id"));
    	for ([email protected]i = 0; [email protected]i < [email protected]pc; [email protected]i++) {
    		getitem 501,1,getd("[email protected]_"+BL_PC+"_id["[email protected]i+"]");
    	}
    	// For NPCs
    	[email protected]npc = getarraysize(getd("[email protected]_"+BL_NPC+"_id"));
    	for ([email protected]i = 0; [email protected]i < [email protected]npc; [email protected]i++) {
    		npctalk "My number is "+([email protected]i+1)+"",getd("[email protected]_"+BL_NPC+"_name$["[email protected]i+"]");
    	}

     

    Keywords

    how to get players (account id) on a map, how to get player/char name on a map, how to get char id on a map, how to get char's job on a map, how to get npc id on a map, how to get npc name on a map (exname with hidden part), how to get monster gid on a map, how to get monster name on a map, how to get monster id (class) on a map, .... so does with homunculus, elementals, pets, mercenaries

     

    Downloads

    • Upvote 6
  6. Char Deletion Code for #3272


    So the example usage for  Sub-query  part of Pull: 3272 can be tested by using this FluxCP Addon: Char Deletion Code for #3272. No source mod needed (iirc lol). The plot is to not using birthdate, email, nor pincode as deletion code for deleting character (the confirmation part after the char deletion date's turned blue). The code will be sent into the registered e-mail. This is not OTP (one true pair couple... errrr One-time Password) but has expiration time, so make sure your FluxCP has same timezone with your server timezone (don't ask me).

    Requirements

    1. Have this Pull Request merged into your working rAthena Pull: 3272
    2. For FluxCP from https://github.com/rathena/FluxCP
    3. Tested only after https://github.com/rathena/FluxCP/commit/e0fa6a8347db17de99b3fe0926dc87c0769262fc
    4. Make sure your server enable to send e-mail
    5. You can edit the addons/delcode/module/create.php to disable Captcha check or merge this PR to your FluxCP https://github.com/rathena/FluxCP/pull/196

    Installations

    1. Import table from char_delcode.sql into database that has your login table
    2. Copy addons/delcode directory to your FluxCP's addons directory
    3. Edit the char_deletion_code value to
      char_deletion_code: (SELECT `delcode` FROM `char_delcode` WHERE `account_id`=`login`.`account_id` AND `expired` > NOW() ORDER BY `id` DESC LIMIT 1)
    4. Copy data/templates/delcode.php to data/templates directory on your FluxCP's

    That's all

     

    Example Usage

    PS: The menu labels were edited

     


    • Submitter
    • Submitted
      07/05/2018
    • Category
    • Video
      https://www.youtube.com/watch?v=wJdkRYmcSyY
    • Content Author
      Cydh

     

    • Upvote 1
  7. Error 500 is internal, commonly because when people disable debug and the error occurs on script (access unset array, invalid functions, etc) or query (invalid table/fields). The close PHP tag in 'full' PHP file in not the issue

    So, you can try enable the DebugMode, see the error, after you got that, you can disable it again

    	'DebugMode'					=> false,					// Set to false to minimize technical details from being output by Flux. WARNING: DO NOT USE THIS OPTION ON A PUBLICALLY-ACCESSIBLE CP.

     

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.