Jump to content

sizenine

Members
  • Posts

    149
  • Joined

  • Last visited

Posts posted by sizenine

  1. You could use gettimestr to generate a date serial YYYYMMDD,

    then each time they login (OnPCLoginEvent), check that date and see if it is less than today.

    If it is, give them the item and set their variable to YYYYMMDD.

    Wait.. but how we would be comparing two string values rather than int values.. would it know if "20120312" is less than "20120313" if they are both strings? or do i have to use some command to typecast the strings to integers?

  2. I want to give my players an item for logging online, but the item is only given once every 24+ hours... is this possible without having to assign a permanent variable and wiping it every 24 hours? And no, OnClockMinute does not work because that requires the players to login at a certain time of the day.. I want to make it so that as long as you got your items 24 hours or more ago, then when you login again, you will automatically get another one.

  3. Yes, i found the solution Judas said :

    Add

    case SC_ON_PUSH_CART:

    After

    case SC_FOOD_LUK_CASH:

    at line ~8029 in status.c

    and Add

    case SC_ON_PUSH_CART:

    After

    case SC_CURSEDCIRCLE_TARGET:

    at line ~9644 in status.c

    Carts don't disappear anymore on dying with this, so the problem is fixed

    nice that worked. but now there's another bug >.<

    so if you have a character that has a cart on, you will notice that all other characters on that account will also show the cart button in the equipment window (alt+q) and also the OFF button. alt+w will work for those characters although no items can be put in. so far it doesn't seem like a bug that can be abused, but it would be nice to have it fixed.

  4. Experienced my first server crash with rAthena today, currently running on r15627.

    [Error]: Memory manager: args of aFree 0x0xf28f072c is invalid pointer pc.c line 7090

    [Error]: Server received crash signal! Attempting to save all online characters!

    Here is line 7090 in my pc.c in bold:

    {// nothing free, increase size

    sd->reg_num++;

    RECREATE(sd->reg, struct script_reg, sd->reg_num);

    }

    UPDATE:

    Happened again... but seems like its caused by a different reason..

    imeMQbsYYvJX8.png

  5. Another here is if you rent a cart the other player doesn't see your cart until you use the Change Cart skill :)

    Maybe something like that can fix this problem

    case SC_ON_PUSH_CART:

    sc->opt3 |= OPT3_ON_PUSH_CART;

    opt_flag = 0;

    break;

    for show effect, like for riding. Well, i dunno how to do it ^^

    i thought the difference in this diff is that we don't use options anymore for carts.. we use statuses.

  6. if (isloggedin(<account id>,<char id>)) {
     attachrid <account_id>;
     // use 'set' to modify variable
    } else {
     // char is offline or on a different char of the account
     // use 'query_sql'
    }

    so you mean that i can use "set COUNTER,1;" with "attachrid <account_id>;" even though no char id is given to set with? im just curious of how the set command will know which char within that account_id to set the COUNTER to.. because COUNTER var is attached to a char and not the account(#).

    UPDATE: it works! thanks so much brian. :)

    i guess what i didnt understand is that attachrid actually attaches to the online player of the account rather than the whole account.

  7. when you do it in sql you will have to make the players logout.. so its better to execute it when your server is on maintenance/offline.

    Yeah, i think that is my last resort though because I don't want to kick players off if it is possible to use an alternative method like the one brian posted below (except there's one conflict).

    no... lol the only reason why i have to use query_sql is because it's in a for loop that goes through ALL existing characters in the database... which is why i said this is to be used massively on all players with one click, not just one person.

    Add an if/else in your loop:

    • if they are online (use 'attachrid' to check), then use set to update their variable
    • else if they are offline, use query_sql to modify the variable in SQL.

    As you said, modifying their variables in SQL while they are online has no effect.

    yes, but the problem is that i'm trying to set a char variable, not an account variable. i think attachrid only works for account id, not char id.

    is there a custom script command anyone made so we can attach to char id?

  8. no... lol the only reason why i have to use query_sql is because it's in a for loop that goes through ALL existing characters in the database... which is why i said this is to be used massively on all players with one click, not just one person.

  9. query_sql "UPDATE `global_reg_value` SET `value` = '6' WHERE `char_id` = "+.@dest_id+" AND `str` = 'TEST_COUNT'";

    it seems that when I use this command, my TEST_COUNT value does not update until my character relogs...

    is there anyway to update it without needing to kick the player off game? and i'm using this instead of set var because its used massively.

  10. well guess what im trying to say if its the way the coder intended to code it in as a status, then i wouldn't really call it a bug.

    But yeah probably isn't offical behaviour, but from rytech's post it seems we can't add any more options masks anymore?

    he intended to code it as a status, but that doesn't mean he intended to have it not behave correctly.

    i think one mod you can do, is have it be unlimited time perhaps even if you die? Don't field manuals last if you die?

    good idea.

  11. i need an if statement that will check if all the users inside my party are standing within a specified area (x1,y1,x2,y2) on the map.

    for example if i was on a map that is 500x500, i want this script to check if all the users in my party are standing within the box area of coordinates (200,200) and (300,300).

  12. New bugs found.

    1) If your character dies, your cart disappears.

    2) If you rent out a cart that you previously had items stored in, it will not display those items inside the cart until you relog respawn with the cart on. Therefore, even if you go rent another cart after dying, you won't be able to see the items you had inside the cart until you relog respawn.

×
×
  • Create New...