Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 11/06/20 in all areas

  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 set just like your normal setup 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 DB1 Create database with name (if default is) ragnarok Do normal config, import everything just like normal config DB2 Create database with name ragnarok2 Do normal config, import everything just like normal config inter_athena.conf setup Inter-1 set as normal setup Inter-2 copy conf/inter_athena.conf as conf/inter_athena2.conf set as normal setup change the char_server_id to ragnarok2 change the map_server_id to ragnarok2 change the log_db_id to ragnarok2 Run the servers Run login-server Run char-server A and map-server A1 just like running a server For the 2nd server (char-server B and map-server B.1) follow this 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 char-server.exe--inter-config conf/inter_athena2.conf --char-config conf/char_athena2.conf 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 From conf/map_athena2.conf Change import: conf/maps_athena.conf to import: conf/maps_athenaB1.conf Copy conf/maps_athena.conf to conf/maps_athenaB1.conf Remove/comment payon, prontera, izlude, morocc, and other cities from this map-server in file conf/maps_athenaB1.conf Copy npc/script Map-server B.2 Copy conf/map_athena2.conf to conf/map_athena2a.conf Set map_port: 5123 (5121 used for Map-server B.1, while 5122 for B.2) Change import: conf/maps_athenaB1.conf to import: conf/maps_athenaB2.conf Make a new file conf/maps_athenaB2.conf Add the entries map: payon map: prontera map: izlude map: morocc // ... Now re-run the Map-server B2 then following by B3 map-server.exe --inter-config conf/inter_athena2.conf --map-config conf/map_athena2.conf --battle-config conf/battle2/battle_athena.conf map-server.exe --inter-config conf/inter_athena2.conf --map-config conf/map_athena2a.conf --battle-config conf/battle2/battle_athena.conf 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....)
    1 point
  2. You are only checking the first element of the array. The correct script should be: { setarray .@mapname$[0], "prt_fild08", "06guild_01", "06guild_02", "06guild_03", "06guild_04", "06guild_05", "06guild_06", "06guild_07", "06guild_08"; set .@found,0; for(.@i = 0; .@i < getarraysize(.@mapname$); .@i++ ) { if(strcharinfo(3) == .@mapname$[.@i]) { set .@found,1; } } if (.@found == 1) { delitem 604,1; monster "this",-1,-1,"--ja--",-1,1,""; } else dispbottom "This item can't be used on your current map."; } (Not tested, but it should work)
    1 point
  3. Well in that case it'd probably be best to limit the amount of announces to 1 per account. You'd avoid a whole bunch of issues with that. The following resolves your server restart issues, though I'm... too lazy to make a GM handling of those announces. prontera,187,210,3 script Broadcaster#1::BC 894,{ .@npcname$ = "^FF9300 Broadcaster ^000000"; .@header$ = "[^0000ff" + .@npcname$ + "^000000]"; mes .@header$; mes "Hi, I'm the Broadcaster."; mes "I can Broadcast a message for you."; mes " "; mes " "; mes " "; mes "It costs ^ff0000" + .broadcastfee + "^000000 zeny."; next; mes .@header$; mes "Would you like to Broadcast?"; next; switch (select("Yes:Nevermind:Auto-broadcast:")) { case 1: if (Broadcast > gettimetick(2)) { mes .@header$; mes "Sorry you have to wait for 1 min."; close; } if (Zeny < .broadcastfee) { goto L_NotEnoughZeny; } mes .@header$; mes "Please input your message."; next; input .@broadcast$; Zeny -= .broadcastfee; announce "Shout from " + strcharinfo(0) + ": " + .@broadcast$ + "", 0, 0x5AFF00; // Edit 5AFF00 for color code HTML Color Code Broadcast = gettimetick(2) + 60; //Timer 60 = 1 minute/s dispbottom "Broadcaster: Please wait for 1min until next broadcast to avoid flooding."; end; case 2: mes .@header$; mes "Suit yourself."; close; case 3: mes .@header$; mes "Hi, I can automatically broadcast messages for you!"; mes "It will cost you ^ff0000" + .auto_broadcastfee + "^000000 zeny per broadcast."; next; .@aid = getcharid(3); switch(select("Proceed:Check status:Exit")) { case 1: if ($bc_announces_delay[.@aid]) { mes .@header$; mes "You already have an auto announce for this account."; close; } mes .@header$; mes "Please input your message."; next; input .@broadcast$; mes .@header$; mes "How many times do you want to broadcast?"; mes "Min: 1"; mes "Max: 100"; next; input .@repeat, 1, 100; if (.@repeat < 1 || .@repeat > 100) { mes .@header$; mes "Suit yourself."; close; } .@delay = 3; //mes .@header$; //mes "Delay between announces?"; //mes "Min: 3"; //mes "Max: 20"; //next; //input .@delay, 3, 20; // //if (.@delay < 3 || .@delay > 20) { // mes .@header$; // mes "Suit yourself."; // close; //} .@cost = .auto_broadcastfee * .@repeat; mes .@header$; mes "You want to broadcast:"; mes "^ff0000" + .@broadcast$ + "^000000"; mes "Every 3 minutes for ^00ff00" + .@repeat + "^000000 time(s)?"; mes "It will cost you a total of ^ff0000" + .@cost + "^000000 zeny."; next; switch(select("Proceed:Cancel")) { case 2: mes .@header$; mes "Suit yourself."; close; } if (Zeny < .@cost) { goto L_NotEnoughZeny; } Zeny -= .@cost; $bc_announces_timer[.@aid] = 0; $bc_announces_repeat[.@aid] = .@repeat; $bc_announces_delay[.@aid] = .@delay * 60; $bc_announces_mes$[.@aid] = "Shout from " + strcharinfo(0) + ": " + .@broadcast$; $bc_announces_aid2idx[.@aid] = $bc_announces_count; $bc_announces_idx2aid[$bc_announces_count] = .@aid; $bc_announces_count++; close; case 2: if ($bc_announces_delay[.@aid] == 0) { mes .@header$; mes "You currently have no auto announces."; close; } mes .@header$; mes "Your current announce is as follow:"; mes "^ff0000" + $bc_announces_mes$[.@aid] + "^000000"; mes "It will be announced again in " + $bc_announces_timer[.@aid] + " second(s)."; mes "It will repeat " + $bc_announces_repeat[.@aid] + " more time(s)."; next; switch(select("Okay:Cancel announce:")) { case 1: mes .@header$; mes "..."; close; case 2: mes .@header$; mes "Your zeny will not be refunded, are you sure you want to cancel?"; next; switch(select("No:Yes")) { case 1: mes .@header$; mes "Suit yourself."; close; } if ($bc_announces_delay[.@aid] == 0) { // It already ended? end; } callsub L_RemoveAutoAnnounce, .@aid; mes .@header$; mes "All done."; close; } end; case 3: mes .@header$; mes "Suit yourself."; close; case 4: close; } close; } end; L_NotEnoughZeny: mes .@header$; mes "You don't have enough zeny."; close; OnTimer1000: freeloop(1); for (.@i = 0; .@i < $bc_announces_count; .@i++) { .@aid = $bc_announces_idx2aid[.@i]; $bc_announces_timer[.@aid]--; if ($bc_announces_timer[.@aid] <= 0 && .@didannounce == false) { announce $bc_announces_mes$[.@aid], 0, 0x5AFF00; $bc_announces_repeat[.@aid]--; $bc_announces_timer[.@aid] = $bc_announces_delay[.@aid]; if ($bc_announces_repeat[.@aid] <= 0) { callsub L_RemoveAutoAnnounce, .@aid; .@i--; } .@didannounce = true; // Prevents overlapping of announces } } freeloop(0); initnpctimer; end; L_RemoveAutoAnnounce: .@aid = getarg(0); .@idx = $bc_announces_aid2idx[.@aid]; $bc_announces_timer[.@aid] = 0; $bc_announces_repeat[.@aid] = 0; $bc_announces_delay[.@aid] = 0; $bc_announces_mes$[.@aid] = ""; .@last_aid = $bc_announces_idx2aid[$bc_announces_count - 1]; $bc_announces_idx2aid[.@idx] = .@last_aid; $bc_announces_idx2aid[$bc_announces_count - 1] = 0; $bc_announces_aid2idx[.@last_aid] = .@idx; $bc_announces_count--; return; OnInit: .broadcastfee = 3000000; .auto_broadcastfee = 500000; initnpctimer; end; }
    1 point
×
×
  • Create New...