Anyone can help me this one work on the latest svn.
/*========================================== * сrmor Enchanting *------------------------------------------*/BUILDIN_FUNC(successenchant){ int i = -1, j, num, enchant, ep; char chat_announce[256]; TBL_PC *sd; num = script_getnum(st,2); // Equip Slot enchant = script_getnum(st,3); // Equip Enchant sd = script_rid2sd(st); if( sd == NULL || !itemdb_isenchant(enchant) ) return 0; if( num > 0 && num <= ARRAYLENGTH(equip) ) i = pc_checkequip(sd, equip[num - 1]); if( i < 0 ) return 0; if( !sd->inventory_data[i] || sd->inventory_data[i]->slot >= MAX_SLOTS ) return 0; // Cannot enchant an item with 4 slots. Enchant uses last slot. ep = sd->status.inventory[i].equip; log_pick_pc(sd, LOG_TYPE_SCRIPT, -1, &sd->status.inventory[i]); // By Official Info: Item will lose cards, refine and previus enchants. for( j = 0; j < MAX_SLOTS; j++ ) sd->status.inventory[i].card[j] = 0; sd->status.inventory[i].refine = 0; // -------------------------------------------------------------------- pc_unequipitem(sd,i,2); clif_delitem(sd,i,1,3); sd->status.inventory[i].card[MAX_SLOTS - 1] = enchant; log_pick_pc(sd, LOG_TYPE_SCRIPT, 1, &sd->status.inventory[i]); clif_additem(sd,i,1,0); pc_equipitem(sd,i,ep); clif_misceffect(&sd->bl,3); if( battle_config.channel_announces&8 && server_channel[CHN_VENDING] ) { sprintf(chat_announce, msg_txt(NULL,892), server_channel[CHN_VENDING]->name, sd->status.name, sd->inventory_data[i]->jname, sd->inventory_data[i]->slot, itemdb_search(enchant)->jname); clif_channel_message(server_channel[CHN_VENDING], chat_announce, 26); } return 0;}BUILDIN_FUNC(failedenchant){ int i = -1, num; TBL_PC *sd; num = script_getnum(st,2); sd = script_rid2sd(st); if( sd == NULL ) return 0; if( num > 0 && num <= ARRAYLENGTH(equip) ) i = pc_checkequip(sd, equip[num - 1]); if( i >= 0 ) { pc_unequipitem(sd,i,3); pc_delitem(sd,i,1,0,2,LOG_TYPE_SCRIPT); clif_misceffect(&sd->bl,2); } return 0;} // Enchanting BUILDIN_DEF(successenchant,"ii"), BUILDIN_DEF(failedenchant,"i"),
This is the error I got while compiling.
2>d:ragnarok backupbatanggapo ro projectsrcmapscript.c(7945): warning C4013: 'itemdb_isenchant' undefined; assuming extern returning int2>d:ragnarok backupbatanggapo ro projectsrcmapscript.c(7955): error C2198: 'function through pointer' : too few arguments for call2>d:ragnarok backupbatanggapo ro projectsrcmapscript.c(7966): error C2198: 'function through pointer' : too few arguments for call
Anyone can help me this one work on the latest svn.
This is the error I got while compiling.
7945 if( sd == NULL || !itemdb_isenchant(enchant) )
7955 logs->pick_pc(sd, LOG_TYPE_SCRIPT, -1, &sd->status.inventory);
7966 logs->pick_pc(sd, LOG_TYPE_SCRIPT, 1, &sd->status.inventory);
Edited by gmblankShare this post
Link to post
Share on other sites