Jump to content

meko9586

Members
  • Posts

    9
  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling

Recent Profile Visitors

2264 profile views

meko9586's Achievements

Poring

Poring (1/15)

0

Reputation

  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. 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.
  4. If someone use auto clicking, then the event ruins.
  5. 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.
  6. - 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.
  7. 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.
  8. 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;"
  9. 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
×
×
  • Create New...