Jump to content

nitrous

Developer
  • Posts

    138
  • Joined

  • Last visited

  • Days Won

    3

Posts posted by nitrous

  1. 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.

    • Upvote 2
  2.  

    remove

    guild_vs2	mapflag	noteleport
    

    from the end of the script

    Why remove?

     

     

    Sorry, that was in response to this.

     

    Hi i want to enable use of fly wing in my gold room? would you help with the script?

  3. 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;");

  4. 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.

  5. function    script    Check_IP    {
        // Get list of accounts with attached character's IP address.
        set [email protected], query_sql("SELECT `account_id` FROM `login` WHERE `last_ip` = '"+getcharip()+"'",[email protected]);
    if([email protected] <2) return;
    for([email protected]=0;[email protected]<[email protected];[email protected]++){
     attachrid([email protected][i]);
    set ##LAST_LOGIN = atoi(gettimestr("%Y%m%d,21));
    }
    return;
    }

    This wont work either because you can't use 'set' if the player is online.

    Instead, try something like this.

    -	script	S_ComebackNPC	-1,{
    OnInit:
    	[email protected] = query_sql("SELECT account_id FROM login WHERE lastlogin < '2016-06-02'", [email protected]);
    	for ([email protected] = 0; [email protected] < [email protected]; [email protected]++) {
    		if (query_sql("SELECT value FROM acc_reg_num WHERE account_id = "[email protected][[email protected]]+" AND key = '#comebackreward'", [email protected]) == 0)
    			query_sql("INSERT INTO acc_reg_num(account_id, key, index, value) VALUE ("[email protected][[email protected]]+", '#comebackreward', 0, 1)");
    	}
    	end;
    OnPCLoginEvent:
    	if (#comebackreward) {
    		#comebackreward = 0;
    		getitem 501, 1;
    	}
    }
    
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.