Jump to content

Cyrix

Members
  • Posts

    150
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by Cyrix

  1. 1º - Import files to DB - \schemas\logindb

     

    cp_v4p_sites

    cp_v4p_votelogs

    cp_v4p_voters

     

    2º - Copy Folders

     

    vote4points\themes\default\voteforpoints --->>>> to your gamecp theme folder (e.g. flux\themes\default\voteforpoints)

    vote4points\modules\voteforpoints  --->>>> to your gamecp module folder  (e.g. flux\modules\voteforpoints)

     

    3º - Login as ADM and add your sites.

     

    I have TeamViewer installed.... if u need PM...

  2. AGI

    LUK

    Weight

    affects the success chance

     

    ---------------------------------------------------------------------------------------

     

    //((rand(myDEX / 12, myDEX / 4) + myJobLevel + 10 * skLevel) + myLevel / 10) - (targetLevel / 10 + targetLUK / 10 + (targetMaxWeight - targetWeight) / 1000 + rand(targetAGI / 6, targetAGI / 3)

  3. i need help to find the correct funcion to save shop name in db.

     

     

    sd->vending.amount = amount;  // item amount
    sd->status.cart[index].nameid  // item name 
    sd->vending.value  / item value
     
    and to shop name?
     
    sd->vending.title = title; ?????????
    sd->vending.shop_title = shop_title; ?????????
     
    thanks


    I'm using

     

    sd->message

     

    Shop Name =  asdasdasasd

     

    db save this ->  284825544

  4. How to get coordinates and map name?

     

    Ex. payon (172, 219)

     

    And this line dont work... can u help again.  /lv 

     

    if( SQL_ERROR == Sql_Query(mmysql_handle, "INSERT INTO `xxxxx`(`xxxx`,`xxxx`,`xxxx`,`xxxx`, `card0`, `card1`, `card2`, `card3`, `refine`, ) VALUES ('%d','%d','%d','%d','%d','%d','%d','%d','%d')",sd->status.char_id, sd->status.cart[index].nameid, sd->vending.amount, sd->vending.value, sd->vending.card[0], sd->vending.card[1], sd->vending.card[2],, sd->vending.card[3], sd->vending.refine))

  5. Ah, ok sorry I didn't have any stuff on my laptop and was going from memory.

     

    So players who are in autotrade are disassociated from a connection in clif_parse() which is why the vending stuff is still being shown (because vending_closevending() is never called here). You'll need to add a query there to delete the player's stuff from your table. You can just call vending_closevending(sd) and you should be safe to run that in the autotrade check.

     

    Again, I highly suggest you make it a if-statement rather than just a straight query. For example:

     

    if (SQL_ERROR == Sql_Query(mmysql_handle, "DELETE FROM `xxxx` WHERE `char_id`='%d'", sd->status.char_id))
       Sql_ShowDebug(mmysql_handle);

     

    works fine (clif.c) but when I type @at, the rows are deleted.  how to delete only when I relog.

    ---------------------------------------------------------------------------------------------------------------

     

            if (sd->state.autotrade) {
                    //Disassociate character from the socket connection.
                    session[fd]->session_data = NULL;
                    sd->fd = 0;
                    ShowInfo("Character '"CL_WHITE"%s"CL_RESET"' logged off (using @autotrade).\n", sd->status.name);
                    
     
     if (SQL_ERROR == Sql_Query(mmysql_handle, "DELETE FROM `xxxx` WHERE `char_id`='%d'", sd->status.char_id))

       Sql_ShowDebug(mmysql_handle);

     
     
                } else
                if (sd->state.active) {
                    // Player logout display [Valaris]
                    ShowInfo("Character '"CL_WHITE"%s"CL_RESET"' logged off.\n", sd->status.name);
                    clif_quitsave(fd, sd);
                } else {
                    //Unusual logout (during log on/off/map-changer procedure)
                    ShowInfo("Player AID:%d/CID:%d logged off.\n", sd->status.account_id, sd->status.char_id);
                    map_quit(sd);
                }
            } else {
                ShowInfo("Closed connection from '"CL_WHITE"%s"CL_RESET"'.\n", ip2str(session[fd]->client_addr, NULL));
            }
            do_close(fd);
            return 0;
        }
  6. As long as you have your delete query in the if (sd->vending) check it will remove the items just fine. It's possible you have a typo or something. Use like what you have in your first post and include the SQL debug line to see if there is an issue.

     

    Only in auto trade dont delete lines....

    ---------------------------------------------------------------------

     

    void vending_closevending(struct map_session_data* sd)
    {
        nullpo_retv(sd);
     
        if( sd->state.vending )
        {
            sd->state.vending = false;
            clif_closevendingboard(&sd->bl, 0);
            Sql_Query(mmysql_handle, "DELETE FROM `xxxx` WHERE `char_id`='%d'", sd->status.char_id);
        }
    }

    ----------------------------------------------------------------

    How to get coordinates and map name?

     

    Ex. payon (172, 219)

  7. sd->vender_id is wrong to use. You're looking for the char_id which vender_id is just an index value. You'll need to use sd->status.char_id and that should work just fine in vending_closevending().

     

    Thx, works fine...

     

    but in @at?

  8. rentitem <ItemID>,<Time>;

     

    14039,F_Hockey_Mask_Box,Hockey Mask Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 5314,604800; },{},{}

     

    1 day = 86400

    1 month = 86400 x 30 = 2592000

     

    14039,F_Hockey_Mask_Box,Hockey Mask Box,18,20,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ rentitem 5314,2592000; },{},{}

×
×
  • Create New...