Jump to content

lekkereten

Members
  • Posts

    148
  • Joined

  • Days Won

    1

Everything posted by lekkereten

  1. Added on r16919 Please tell me if it is what you suggested
  2. Here: TranslatedROSTRviewer.zip mirror: http://www.mediafire.com/?dx7hr0077d6vjhe
  3. [status]: Read information about 1 subnetworks. This could be useful only when subnetwork > 1 [info]: Initializing random number generator. Only display on one console. +1 to Brian suggestion.
  4. I guess no one is going to implement support for PostgreSQL so yes +1 for removal.
  5. Mr Euphy had this awesome idea on this topic regarding to a request for modification in monster script command. The request was to deprecate the event label parameter function as size/ai replacement and add two parameters (size and ai). What do you think about implementing it?
  6. When the crash happens is when the conditional is true or false?
  7. In date.c only 4 out of 9 functions are being used. In the following functions: date_get_year, date_get_month, date_get_hour, date_get_min, date_get_sec, the only one which it is used is date_get_day to later be called by is_day_of_sun, is_day_of_moon, is_day_of_star which will be called on other files. My suggestion is that the functions that are not in use to be removed. Otherwise a macro could be made. Something like that: #define date_get_sub(tm_element) { \ time_t t; \ struct tm* lt; \ t = time(NULL); \ lt = localtime(&t); \ return lt->tm_element; \ } int date_get_year(void) { date_get_sub(tm_year + 1900); } {...} Also, it reminded me about Show* functions in showmsg.c. And with Euphy's script-shortener spirit as inspiration, this could be rewritten with a macro: #define ShowSub(msg_const) { \ int ret; \ va_list ap; \ va_start(ap, string); \ ret = _vShowMessage(msg_const, string, ap); \ va_end(ap); \ return ret; \ } int ShowMessage(const char *string, ...) { ShowSub(MSG_NONE); } int ShowStatus(const char *string, ...) { ShowSub(MSG_STATUS); } int ShowSQL(const char *string, ...) { ShowSub(MSG_SQL); } {...} Now, I don't know if the usage of macros is a good programming practice, it's up to you to decide if this is a good thing that I suggested. Bonus: And do you guys think that it would be worth using the restrict keyword, since pointers are everywhere in the code, and I just thought that it could help optimize it. Example: Thanks.
  8. This or this should do the work.
  9. Do you have a screenshot of what that is?
  10. Go to src/map/map.c Find: if (battle_config.debuff_on_logout&1) { Add after: status_change_end(&sd->bl, SC_FUSION, INVALID_TIMER); This will remove the status when someone logs out
  11. What do you mean? To disable the skill for being used or remove the status or something?
  12. I was looking at the monster command and some lines¹ gave me the idea to merge killmonster and killmonster2 into one function, and use killmonster2 as duplicate of killmonster, just like monstersmall/monsterbig and monster. Patch: killmonster(2)_merge.patch [¹]
  13. OH f*ck me I totally forgot that. And sorry for the mistakes, I did the parameter modification in a hurry. Hmm, I thought the sizes were right, I was using this as my reference: enum size { SZ_SMALL = 0, SZ_MEDIUM, //1 SZ_BIG, //2 }; @edit Should work. monster_patch.patch And you should suggest this as the official behavior, it's a great idea
  14. Yeah, you should use: packet_ver: 28 in packet_db.txt and change the packetver like dastgir wrote.
  15. Sure. Can someone try to say if its working? I can only do that tomorrow. New patch with unsigned type vars and syntax proprosed by OP and Euphy. monster_size_ai_syntax_nwe.patch
  16. Please test. It's just a copy of Ind's INF2_NOLP. Go to src/map/skill.c: Find: if( !(skill_get_inf2(group->skill_id)&(INF2_SONG_DANCE|INF2_TRAP)) && map_getcell(bl->m, bl->x, bl->y, CELL_CHKLANDPROTECTOR) ) Change to: if( !(skill_get_inf2(group->skill_id)&(INF2_SONG_DANCE|INF2_TRAP|INF2_NOLP)) && map_getcell(bl->m, bl->x, bl->y, CELL_CHKLANDPROTECTOR) ) Go to src/map/skill.h: Find: INF2_NO_ENEMY = 0x1000, Add after: INF2_NOLP = 0x2000, Go to db/skill_db.txt: Find: 516,0,8,4,-1,0x2,3,10,1,no,0,0,0,weapon,0, GS_DESPERADO,Desperado Change to: 516,0,8,4,-1,0x2,3,10,1,no,0,0x2000,0,weapon,0, GS_DESPERADO,Desperado Remember to recompile your emulator. I can't test, ...your emulator is kinda old.
  17. This ain't a well-made code, but it is working so far. Here's the explanation of the behavior. Go to src/map/skill.c Find: req.amount[i] = skill_db[j].amount[i]; Add after: if (skill == ASC_EDP) { j = pc_search_inventory(sd, 678); if (j < 0) { j = pc_search_inventory(sd, 608); if (j > 0 && sd->status.inventory[j].amount >= 1) { req.itemid[i] = 608; req.amount[i] = 1; } } } Change 608 for the item you desire to be used as an alternative to EDP in j = pc_search_inventory(sd, 608); and req.itemid = 608; Change 1 in sd->status.inventory[j].amount >= 1 to how many 608 it will be required. Do it in req.amount = 1; as well. Recompile and enjoy.
  18. I've updated the patch to the latest revision. Try with it. Here: extend_vending.patch
  19. You can try this. @all I've updated the diff to r16857. I did not test. Here: extending_vending_16857.patch
  20. I'm not much of a client guy, but it seems to be an incompatible version between client/server. Post what version of hexed you're using, and the packet_db.txt configuration as well packet ver from common/mmo.h
  21. Could you please test this patch that I've done? The syntax should work like: *monster "<map name>",<x>,<y>,"<name to show>",<mob id>,<amount>{,<size>, <ai>, "<event label>"}; <size>: 0=small, 1=medium, 2=big <ai>: 0=off, 1=on There should be no trouble compiling, since I did it myself and got no errors nor warnings. However I can't test at the moment, which is why I asked you to do so. Patch: monster_size_ai.patch
  22. You could make a *little* optimization on your code. unsigned int base_penalty = 0; if (battle_config.zeny_penalty > 0 && ||>> sd->status.zeny > 0 && <<|| !map[sd->bl.m].flag.nozenypenalty) <-------------------- { base_penalty = (unsigned int)((double)sd->status.zeny * (double)battle_config.zeny_penalty / 10000.); pc_payzeny(sd, base_penalty); }
  23. Tried both common leveling and @baselevelup?
×
×
  • Create New...