Jump to content

nitrous

Developer
  • Posts

    141
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by nitrous

  1. Just put #CASHPOINTS += (.@amount*10);
  2. Check your imports, maybe it's in there? Make sure in battle.c, the minimum of max_hair_style is 0. Also, min_hair_style should be 0 if you want 0-29 hairstyles.
  3. But that's not even the problem. sd is null because it's a monster, not a player. sce is set to null in here sc_timer_next(tick+sce->val4, status_change_timer, bl->id, data); sc_timer_next is a macro, with it's definition here #define sc_timer_next(t,f,i,d) \ if( (sce=sc->data[type]) ) \ sce->timer = add_timer(t,f,i,d); \ else \ ShowError("status_change_timer: Unexpected NULL status change id: %d data: %d\n", id, data) So there must have been an error pop up in the console. On the next line, there's a segfault because sce is null. He needs to change sce->val4 = 0; to if (sce) { sce->val4 = 0; }
  4. Don't do that, it will break monster statuses as well.
  5. Did you change the msgstringtable.txt in the grf?
  6. nitrous

    bug

    #define PACKETVER 20150513
  7. Yup Make sure you only add together the basic modes, not the combinations, as that will screw up the mode.
  8. I doubt the people in charge of rAthena would try to merge this, since if you're using stock rAthena there's no issue with the mmo_charstatus size.
  9. Use addrid(0) and soundeffect()
  10. If you've added to the max limits of storage, inventory, cartinventory, skill, or basically any #define that's used in mmo_charstatus, updating your rAthena to the newest hash might have caused some errors. This is because with the addition to Random Options, the size of the item data structure increased. Therefore, you either need to trim the size of mmo_charstatus (which can be up to 65510 bytes big), or change the packet structure of the packets that transfer mmo_charstatus between the map and char server. I did the latter. Here's the diff. Note - I logged in and stored about 1500 items in the storage, logged off, restarted the server, logged back in, and all my items were there. Didn't test the max, but I assume it's around 32000 (the max of a short). If you use this diff and your server crashes or items are lost, please don't blame me. This is supposed to be used for people who want to use random options AND have already increased their storage size. I don't know the reason for some of the values the rAthena devs chose for these #defines, so I could be changing something I shouldn't be. EDIT: This is now a WIP, as I tried to increase the max storage to 5000 and the mapserver disconnected, even though (in theory) it should have worked. Once I fix I'll post again. EDIT 2: I've seem to found the reason for the error. FIFOSIZE_SERVERLINK must be set high enough for the biggest packet size you're using (which is this packet). The diff has been updated to reflect this. If you need even more space, increase that value. This should now work, and thus no longer a WIP.
  11. You can either revert the Random Option commits, rewrite the packets between char and map, or lower your limits. I've started working on a fix, but until then, just revert the Random Option commits. https://rathena.org/board/topic/107116-packet-size-increase-for-mmo-charstatus/
  12. If you don't want to change the packets, you'll have to make the size of mmo_charstatus to less then 65510 bytes. Currently it's 75472, so you need to shave off about 10000 bytes. The size of struct s_skill is 8 bytes. 10000/8 is 1250 So lower the MAX_SKILL by at least 1250.
  13. You'd have to write a new command for this.
  14. What is GE? I mean, theoretically it should work, I don't know why it doesn't. Can you post the code that errors?
  15. OnPcDead: if map == "guild_v3" Warp SavePoint; Something like that, on phone so it's just pseudocode
  16. nitrous

    Pk room

    Why remove? Sorry, that was in response to this.
  17. query_sql("DELETE FROM inventory WHERE (nameid = 1100 OR nameid = 1400 OR nameid = 1600 OR nameid = 1700) AND refine = 10;"); query_sql("DELETE FROM cart_inventory WHERE (nameid = 1100 OR nameid = 1400 OR nameid = 1600 OR nameid = 1700) AND refine = 10;"); query_sql("DELETE FROM storage WHERE (nameid = 1100 OR nameid = 1400 OR nameid = 1600 OR nameid = 1700) AND refine = 10;"); query_sql("DELETE FROM guild_storage WHERE (nameid = 1100 OR nameid = 1400 OR nameid = 1600 OR nameid = 1700) AND refine = 10;");
  18. No, you're supposed to remove IT_CHARM from the list.
  19. Youre using the wrong timetick; you need to use gettimetick(2), and you need use the logic I used in my above post
  20. Gettimetick(2) is the number of seconds since the unix epoch (Jan 1st 1970). When you log out, "set LogOutTick, gettimetick(2)". For example, let's say 1000000. When you log in, "set LogInTick, gettimetick(2)". For example, let's say 1100000. So "LogInTick - LogOutTick" is 1100000 - 1000000 = 100000. The player has been offline for 100000 seconds.
  21. https://github.com/rathena/rathena/blob/master/doc/script_commands.txt#L2959-L2968 gettimetick(2) returns the epoch time So on logout, you store the timetick [logouttime]. On login, you get the timetick [logintime], then the offline time is [logintime - logouttime]
  22. Just use gettimetick(2) and calculate the difference.
×
×
  • Create New...