Jump to content

Cyrix

Members
  • Posts

    150
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by Cyrix

  1. Hi,

    I need help to get itemid card2 from script.c function "successremovecards":

    	    BUILDIN_FUNC(successremovecards) {
        int i=-1,c,cardflag=0;
            TBL_PC* sd = script_rid2sd(st);
        int num = script_getnum(st,2);
            if (equip_index_check(num))
            i=pc_checkequip(sd,equip_bitmask[num]);
            if (i < 0 || !sd->inventory_data[i]) {
            return SCRIPT_CMD_SUCCESS;
        }
            if(itemdb_isspecial(sd->inventory.u.items_inventory[i].card[0]))
            return SCRIPT_CMD_SUCCESS;
         
        // code to verify item.tmp card2 start here, and can be with sql query or other code;
        // example: 
        // if (item.tmp.card[2].nameid >4900){
        // message  item.tmp.card[2].nameid
        // }else{
           
          for( c = sd->inventory_data[i]->slot - 1; c >= 0; --c ) {
            if( sd->inventory.u.items_inventory[i].card[c] && itemdb_type(sd->inventory.u.items_inventory[i].card[c]) == IT_CARD ) {// extract this card from the item
                unsigned char flag = 0;
                struct item item_tmp;
                memset(&item_tmp,0,sizeof(item_tmp));
                cardflag = 1;
                item_tmp.nameid   = sd->inventory.u.items_inventory[i].card[c];
                item_tmp.identify = 1;
                    if((flag=pc_additem(sd,&item_tmp,1,LOG_TYPE_SCRIPT))){    // get back the cart in inventory
                    clif_additem(sd,0,0,flag);
                    map_addflooritem(&item_tmp,1,sd->bl.m,sd->bl.x,sd->bl.y,0,0,0,0,0);
                }
            }
        }
            if(cardflag == 1) {//if card was remove remplace item with no card
            unsigned char flag = 0, j;
            struct item item_tmp;
            memset(&item_tmp,0,sizeof(item_tmp));
                item_tmp.nameid      = sd->inventory.u.items_inventory[i].nameid;
            item_tmp.identify    = 1;
            item_tmp.refine      = sd->inventory.u.items_inventory[i].refine;
            item_tmp.attribute   = sd->inventory.u.items_inventory[i].attribute;
            item_tmp.expire_time = sd->inventory.u.items_inventory[i].expire_time;
            item_tmp.bound       = sd->inventory.u.items_inventory[i].bound;
                for (j = sd->inventory_data[i]->slot; j < MAX_SLOTS; j++)
                item_tmp.card[j]=sd->inventory.u.items_inventory[i].card[j];
            
            for (j = 0; j < MAX_ITEM_RDM_OPT; j++){
                item_tmp.option[j].id=sd->inventory.u.items_inventory[i].option[j].id;
                item_tmp.option[j].value=sd->inventory.u.items_inventory[i].option[j].value;
                item_tmp.option[j].param=sd->inventory.u.items_inventory[i].option[j].param;
            }
                pc_delitem(sd,i,1,0,3,LOG_TYPE_SCRIPT);
            if((flag=pc_additem(sd,&item_tmp,1,LOG_TYPE_SCRIPT))){    //chk if can be spawn in inventory otherwise put on floor
                clif_additem(sd,0,0,flag);
                map_addflooritem(&item_tmp,1,sd->bl.m,sd->bl.x,sd->bl.y,0,0,0,0,0);
            }
                clif_misceffect(&sd->bl,3);
        }
        return SCRIPT_CMD_SUCCESS;
    }
         
        // end itemid verify
        // }
        
    	
  2. Hello,

    Hello, I would check before deleting the character, if you have items with it, not delete. If not delete character.

    like this

     if( SQL_ERROR == Sql_Query(sql_handle, "SELECT `%d`.char_id,`%d`.char_id FROM `%d`, `%d` WHERE `char_id`='%d' AND `inventory`.`char_id`='%d'", char_db, inventory_db, char_db, inventory_db, char_id, char_id) )

    error:

    char.c:2204:145: note: each undeclared identifier is reported only once for each function it appears in char.c:2204:154: error: âinventory_dbâ undeclared (first use in this function)

     

    thx

     

  3. Exemplo:

     

    Id: 671
        AegisName: "Gold_Coin"
        Name: "Gold Roulette Coin"
        Type: 2
        Buy: 0
        Weight: 0
        Upper: 63
        Trade: {
            nodrop: true
            notrade: true
            noselltonpc: true
            nocart: true
            nostorage: true
            nogstorage: true
            nomail: true
            noauction: true
        }

    • Upvote 1
  4. Rev. 12641

    Hi, 

     

    https://github.com/rathena/rathena/commit/62a2813

    Fixed Hells Plant hitting Ghost element enemies. (bugreport:8799)

     

    Dont work for me. The hell plant skill, is causing damage to the ghost property. how do I fix this ?

     

    2490,9,6,2,0,0x3,1,5,1,yes,0,0x80,2:3:4:5:6,misc,0,0x0, GN_HELLS_PLANT,Hell's Plant
    2491,0,6,1,0,0x90,0,5,1,no,0,0,0,misc,0,0x0, GN_HELLS_PLANT_ATK,Hell's Plant Attack

     

    Ghost Armor = 24k dmg

     

    Thanks.

  5. Racial Cards like

    4140,Knight_Of_Abyss_Card,Abysmal Knight Card,6,20,,10,,,,,,,,2,,,,,{ bonus2 bAddRace,RC_Boss,25; },{},{}

     

    and item like

     

    5325,Robo_Eye,Robo Eye,5,20,,200,,2,,0,0xFFFFFFFF,63,2,512,,10,0,345,{ bonus2 bAddRace,RC_NonBoss,2; bonus2 bAddRace,RC_Boss,2; bonus bMatkRate,2; bonus bDex,1; },{},{}

     

    doesn't work

     

    17527

  6. Racial Cards like

    4140,Knight_Of_Abyss_Card,Abysmal Knight Card,6,20,,10,,,,,,,,2,,,,,{ bonus2 bAddRace,RC_Boss,25; },{},{}

     

    and item like

     

    5325,Robo_Eye,Robo Eye,5,20,,200,,2,,0,0xFFFFFFFF,63,2,512,,10,0,345,{ bonus2 bAddRace,RC_NonBoss,2; bonus2 bAddRace,RC_Boss,2; bonus bMatkRate,2; bonus bDex,1; },{},{}

     

    doesn't work

     

    17527

  7. how to fix this...
    Thanks.
     
    Server Level 260
    Rathena 17506
     
     
    File: job_maxhpsp_db 
    
    //MaxHP - Novice/Super Novice/Novice High/Baby Novice/Baby Super Novice
    1,260,0:23:4001:4023:4045,0,40,45,50,55,60,65,70,75,80,85,90,95,100,105,110,115,120,125,130,135,140,145,150,155,160,165,170,175,180,185,190,195,200,205,210,215,220,225,230,235,240,245,250,255,260,265,270,275,280,285,290,295,300,305,310,315,320,325,330,335,340,345,350,355,360,365,370,375,380,385,390,395,400,405,410,415,420,425,430,435,440,445,450,455,460,465,470,475,480,485,490,495,500,505,510,515,520,525,530
     
    
    
     
    Error:
    HP And SP  = 1
     
    [Error]: pc_readdb_job_maxhpsp: Invalid max level 260 specified.
    [Error]: sv_readdb: Could not process contents of line 10 of "db/pre-re/job_maxh
    psp_db.txt".
    [Error]: pc_readdb_job_maxhpsp: Invalid max level 260 specified.
    [Error]: sv_readdb: Could not process contents of line 13 of "db/pre-re/job_maxh
    psp_db.txt".
    [Error]: pc_readdb_job_maxhpsp: Invalid max level 260 specified.
    [Error]: sv_readdb: Could not process contents of line 16 of "db/pre-re/job_maxh
    psp_db.txt".
    [Error]: pc_readdb_job_maxhpsp: Invalid max level 260 specified.
    [Error]: sv_readdb: Could not process contents of line 19 of "db/pre-re/job_maxh
    psp_db.txt".
    [Error]: pc_readdb_job_maxhpsp: Invalid max level 260 specified.
    [Error]: sv_readdb: Could not process contents of line 22 of "db/pre-re/job_maxh
    psp_db.txt".
    


    Solved...



    Solved...

  8. how to fix this

     

    (09/10/2013 05:12:33) [ Debug ] : mapindex_name2id: Map "prt_fild8" not found in index list!

    (09/10/2013 05:16:40) [ Error ] : map_addblock: invalid map id (17433), only 875 are loaded.
    (09/10/2013 05:18:07) [ Error ] : delete_timer error : function mismatch 0x819f8f0(unit_walktoxy_timer) != 0x81a1d90(unit_teleport_timer)
    (09/10/2013 05:26:47) [ Error ] : map_addblock: invalid map id (15909), only 875 are loaded.
    (09/10/2013 05:26:47) [ Error ] : Server received crash signal! Attempting to save all online characters! 

     

    thx.

×
×
  • Create New...