Jump to content

Ninja

Members
  • Posts

    513
  • Joined

  • Last visited

  • Days Won

    4

Posts posted by Ninja

  1. You can actually use Cydh's tutorial for Multi Servers 

    Though in his context, the servers are located inside 1 VM only. To get around that, setup 1 full server inside 1 VM, let's call it VM#1.

    In this VM#1, Make sure that your database, login-server and map-server are accessible externally by using the Public IP of your VM#1 in your conf files. Other than that, make sure that the user you created for your databases isn't bounded to 'localhost' rather should be '%' which means from anywhere. In your VM#2, use the Public IP of VM#2 in your conf files. You don't need to create a new login-server, just configure the char-server and inter-server to point to your VM#1. then point your map-server in VM#2 to your char-server in your VM#2. hence, graphically:

    image.png.cba164c1cb33b7a7cc8a0bff55c7d02b.png

    Example: You have two VMs:

    VM#1: 1.1.1.1

    VM#2: 2.2.2.2

    Quote

    VM#1. login_athena.conf

    bind: 1.1.1.1

    VM#1. char_athena.conf

    bind: 1.1.1.1

    login_ip: 1.1.1.1

    VM#1. map_athena.conf

    bind: 1.1.1.1

    char_ip: 1.1.1.1

    VM#1. inter_athena.conf

    (all ip addresses): 1.1.1.1

    Quote

    VM#2. char_athena.conf

    bind: 2.2.2.2

    login_ip: 1.1.1.1

    VM#2. map_athena.conf

    bind: 2.2.2.2

    char_ip: 2.2.2.2

    VM#2. inter_athena.conf

    (all ip addresses): 1.1.1.1

    • Upvote 1
  2. Hey buddy,

    use the latest rathena, then copy-pasta.

    const.hpp

    Quote

    // Renewal variable cast time reduction
    #ifdef RENEWAL_CAST
        #define VARCAST_REDUCTION(val){ \
            if( (varcast_r += val) != 0 && varcast_r >= 0 ) \
                time = time * (1 - (float)min(val, 100) / 100); \
        }
        #define FIXCAST_REDUCTION(val){ \
            if( (fixcast_r += val) != 0 && fixcast_r >= 0 ) \
                time = time * (1 - (float)min(val, 100) / 100); \
        }

    #endif

    skill.cpp

    Quote

            if (sc->data[SC_SUFFRAGIUM]) {
                //VARCAST_REDUCTION(sc->data[SC_SUFFRAGIUM]->val2);
                FIXCAST_REDUCTION(sc->data[SC_SUFFRAGIUM]->val2);

                status_change_end(bl, SC_SUFFRAGIUM, INVALID_TIMER);
            }

    Quote

            if (sc->data[SC_POEMBRAGI])
                FIXCAST_REDUCTION(sc->data[SC_POEMBRAGI]->val2);
                //reduce_cast_rate += sc->data[SC_POEMBRAGI]->val2;

     

  3. Hi, long time no see. Here I am again having some free time but now, only for leisure purposes and maybe help out on anything I can.

    I've search the forums and didn't find anything related. I am stuck with one problem, I am trying to learn how to catch responses from menus generated via source.

    I know it's easy to do this via script and I've done a lot of them but I'm stuck on figuring out how to handle PC responses from source.

    Below is a snippet of my code that I'm trying to play with.

    skill.inc

    // Copyright (c) rAthena Dev Teams - Licensed under GNU GPL
    // For more information, see LICENCE in the main folder
    
    #include "..\map\clif.hpp"
    #include "..\map\script.hpp"
    #include "..\common\socket.hpp"
    #include "..\common\malloc.hpp"
    #include "..\common\strlib.hpp"
    
    void test_skill_inc(struct map_session_data *sd){
    	struct s_packet_db* info = &packet_db[RFIFOW(sd->fd,0)];
    	if(sd->npc_id == 0){
    		//create and display the menu
    		char* menu;
    		menu = "this:is:a:test";
    		clif_scriptmenu(sd, -1, menu);
    	} else {
    		uint8 select = RFIFOB(sd->fd,info->pos[1]);
    		//parse response
    		switch(select){
    		case 1:
    			clif_scriptmes(sd, sd->npc_id, "chose this");
    			break;
    		case 2:
    			clif_scriptmes(sd, sd->npc_id, "chose is");
    			break;
    		case 3:
    			clif_scriptmes(sd, sd->npc_id, "chose a");
    			break;
    		case 4:
    			clif_scriptmes(sd, sd->npc_id, "chose test");
    			break;
    		}
    		clif_scriptclose(sd, sd->npc_id);
    	}
    }

    skill.cpp

    #include "../custom/skill.inc"
    int skill_castend_nodamage_id(...)
    ...
    	case MC_VENDING:
    		if(sd)
    		{	//Prevent vending of GMs with unnecessary Level to trade/drop. [Skotlex]
    			if ( !pc_can_give_items(sd) )
    				clif_skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0);
    			else {
    				test_skill_inc(sd);
    			}
    		}
    ...

    My aim is to pop up a menu - in this case, "this," "is," "a," "test" - when the vending skill(or generally any skill) is pressed then creates a message window that contains the chosen item from the menu.

    Will be grateful for the help ? thanks.

     

  4. On 05/11/2016 at 9:15 AM, Secrets said:

    If you are going to donate, donate to rA instead. I'd like some money for some coffee, but this project is solely for the community.

    Thank you for your feedback. You might be afraid that 100% of time available by our team will be dedicated to this project, but, no, we still improve our current emulator (rA) with current information we have. As for the void you mentioned, I'd like to fill those where I can, too. However, it was mostly caused by no official server files being leaked since a year or two years ago. New features were datamined from official servers, and it takes longer time than converting stuffs directly from official server files.

    If I may suggest, maybe you can also "open" the task list, if it exists, even just the minor to medium ones to the public and let them contribute? :) I know issues are there to get worked on but how about features and all that? That way you can offload/streamline some of the minor stuff to other people who wants to contribute. This is my 2 cents.

  5. On 8/5/2017 at 8:23 AM, phit666 said:

    I will soon, Ive also set libevent to use IOCP as backend when compiling to windows, we knew how slow is select in windows so using the IOCP as backend will really add an edge for those windows users.

    That's great. But if you can also optimize the Linux part then that would also be nice. Most users prefer Linux as they cost way less than a WindowsVPS. :)

  6. //////////////////////////////////////////////////////////////////////////////////
    // Returns time remaining in a readable format.
    // The argument is subtracted from UNIX epoch time, or 'gettimetick(2)'.
    // -- callfunc "Time2Str",<tick in UNIX epoch time>
    // Example:
    //    // Displays "Time left: 1 day, 1 hour, 8 minutes, 20 seconds"
    //    set .@Timer, gettimetick(2) + 90500;
    //    mes "Time left: " + callfunc("Time2Str",.@Timer);
    //////////////////////////////////////////////////////////////////////////////////

     

    • Upvote 1
  7. On 7/12/2017 at 3:08 AM, Vykimo said:

    Thanks for you support all, but I've still nobody who is interested in that project... I've the feeling that it's gonna die. :/

    like I said, you should post what skillset you need so someone could check and help you :)

    don't give up. You can work on it slowly.

  8. 47 minutes ago, Vykimo said:

    So this topic is because I am currently looking for 1-2 developpers motivated (and experienced for God's sake) to help me on this hard task.

    You prolly want to mention what specific skillset you want from people to help you out :) I've seen potential in this too. Too bad, inspite of working for a web dev company doing tests, I've never coded stuff for web. I hope you do well with this project. Cheers!

  9. I think a better way to handle this is to add a player variable that holds a timestamp when he last finished a quest you've made.

    example:

    OnQuestFinish:
    	set CustomQuestTimeStamp, gettimetick(2);
    	end;
    
    OnQuestCheck:
    	set @TimeDelay, gettimetick(2) - CustomQuestTimeStamp;
    	if (@TimeDelay < (.TimeBeforeAplayerCanDoThisQuestAgain))
        	mes "Sorry you can't do this quest right now. Please come back later.";
    	 	close;
        else {
    		//... quest stuff here
    	}
    	end;
                                                                
    OnInit:
       	set .TimeBeforeAplayerCanDoThisQuestAgain, 1 * 86400; //60 secs/min * 60 mins/hr * 24 hrs/day * how many days you want
    	end;

     

×
×
  • Create New...