Jump to content

meko9586

Members
  • Posts

    9
  • Joined

  • Last visited

Posts posted by meko9586

  1. When code is tightly coupled, changing a line in some place is easily break the code in many places. Sometimes, it even doesn't cause compile errors and it will be very difficult to trace.

    The point of making the current code base to object oriented code is to resolve tight coupling into loose coupling. Hence, the code will be easier to be maintained and extended.

    Unit testing and integration testing are must for achieving continuous deployment in the future.

    In order to write code that is loosely coupled and maintain re-usability, it is better to follow the SOLID principle and use dependency injection container to assist.

  2. Fair piece of advice, don't treat members of the court as ignorant fools; it won't help your case in the slightest and will probably just make it worst. The intent, no matter how much you try to hide it, is to allow players to log on a Ragnarok Online server you own. The game client files, which you clearly stole from Gravity, have been modified and have been distributed BY YOU. (Making you responsible for this.)

     

    "If I have a gun store (server)..."

    First of, if you open a gun store, clearly the goal is to attract clients and sell weapons. What I think you're misunderstanding here is that you're not allowed to sell weapons, whoever buys them doesn't even matter. In RO terms, you're not allowed to distribute the client files, who plays on the client afterwards is of no importance.

     

    How do you know if someone is using sprites, palette or texture of Gravity?

    They know by downloading your server's client and looking at your files. Unless you do this whole thing on a closed network, but then what's the point?

     

    The only person informed is the one who uses the client, not the server.

    And who's responsible for distributing the client files required to connect to the server?

     

    In summary : you're allowed to run rAthena and open a server, you're not allowed to steal and distribute Gravity's client files. You might as well make a new game, with your own client and your own images, by opening your own company if you want to stay legal.

    How about if someone is just providing a software for users to crack the client files?

    In this way, nobody is distributing the modified client files.

  3. My map-server starts random crashes after a custom update with source modifications.

    After that, I enable gdb to generate debug report. However, the information generated are different in every time.

    Below shows three diagrams captured from gdb after crashes.

    This problem seems to happen only after I use the atcommands @loadnpc, @unloadnpcfile or @reloaditemdb.
    Hope that someone could help me to solve this problem. Regards.

    nSerbRR.png
    YQ1Gs7j.png



    cRoqiwB.png



    wdg6L15.png
    0XdC99z.png

  4. I am using RA17704 with client 2013-08-07a. I diff the client with disable nagle algorithm. I've checked socket.c and it has tcp_nodelay.

     

    Before, I used a Hong Kong dedicated server with CentOS 64bit but it has lag problems and I guessed it was because the main players are from Taiwan. So, I change the host to Taiwan. Now, I am using a cloud server with Windows Server 2008 located in Taiwan.

     

    However, my server start to have walk-lag whenever there are over than 20 players. I've struggled in lag problem for so long so far. Hope that someone could help me. I don't think it's a script problem because the CPU/Ram/Network Usage are all in normal stage. What I guess is that the main culprit is nagle algorithm hasn't been disabled.

     

    Below is the resources overview, tracert report from Hong Kong to the Taiwan server and the speed test result for the local. As I am using traditional Chinese Windows, I've put English meaning next to the Chinese.

    cHPNFub.png

    aQLkTtW.png

    3572528572.png

  5. -	shop	test	-1,501:-1.
    prontera,50,50,5	script	test	847,{
    callshop "test",0;
    npcshopattach "test";
    end;
    OnBuyItem:
    if(@bought_nameid[@i] == 502){ mes "test";close;}
    mes "error";
    end;
    OnInit:
    	npcshopitem "test", 502,10;
    	end;
    }
    

    With just this simple dynamic shop script, my map server suck after I buy item 502.

     

    The map server has no any error messages but it just seems to be stopped.

    The client seems to disconnect from the server but it doesn't pop-up disconnection box eventually.

    When I close the game and re-login to my account, I can not enter the map server.

    As there are no any error messages in map server, I have no way to trace out the problem.

    Besides, I get some source edit.

    First, I changed the max item nameid to 65536.

    Second, I added custom label onpcuseskill.

    Third, I added three custom skills with custom status.

    Fourth, just some simple configuration edit.

    All of them work fine but OnBuyItem.

     

    I've find the following script in npc.c. it has no different with the one in the latest git.

    //npc_buylist for script-controlled shops.
    static int npc_buylist_sub(struct map_session_data* sd, int n, unsigned short* item_list, struct npc_data* nd)
    {
    	char npc_ev[EVENT_NAME_LENGTH];
    	int i;
    	int key_nameid = 0;
    	int key_amount = 0;
    
    	// discard old contents
    	script_cleararray_pc(sd, "@bought_nameid", (void*)0);
    	script_cleararray_pc(sd, "@bought_quantity", (void*)0);
    
    	// save list of bought items
    	for( i = 0; i < n; i++ )
    	{
    		script_setarray_pc(sd, "@bought_nameid", i, (void*)(intptr_t)item_list[i*2+1], &key_nameid);
    		script_setarray_pc(sd, "@bought_quantity", i, (void*)(intptr_t)item_list[i*2], &key_amount);
    	}
    
    	// invoke event
    	snprintf(npc_ev, ARRAYLENGTH(npc_ev), "%s::OnBuyItem", nd->exname);
    	npc_event(sd, npc_ev, 0);
    
    	return 0;
    } 

    Can anyone help me with this or tell me how could I trace out the problem?

    It's a difficult problem, hope that anyone capable could help.

  6. I would like to say thank you if you are reading this.


    I'm trying to add custom skills with custom status. I've got two questions here.


     


    First,


    I wanna ask is it possible to make a status that let the player gets partial defense ignorant against any classes within a time tick.


    As I see in status.c, there are only basic modifications like str/agi/int/vit/dex/luk/atk/def/etc... So, are there any method to add ignore defense bonus to a status?


    By the way, I don't want to use item to replace it because of some reasons.


     


    Second(more important),


    I also want to make a status that can have intravision(maya purple card) ability with sight ranges depending on the level of that skill. I have no idea how to begin with it.


     


    Thanks again if you read all of my questions. I will appreciate if you could give me some tips.


     

  7.                         case 14:
                                warp "ein_dun01",22,14;
                                end;

     

    The attachment to the player will lose after you end the script.

    Hence,

    getmapxy(lastmap$,lastx,lasty,0); << doesn't work after "end;"

     

    Find a way to put it after warp but before "end;"

  8.  

    themon could you mby post your whole packet.db ?

    + changing into db ver 46 and the packet db let 2014-02-05bRagexe.exe work ?

    thats wow :D

    well I dont change anything in packet.db. I just download fresh rathena Emulator and just define 20140205 in my Mmo.h that's all. and now im trying Ossi new translated New world Map with that

     

    It even doesn't need to change the mmo.h  /oops

×
×
  • Create New...