itsjbrojo Posted February 17, 2021 Posted February 17, 2021 Hello, Can I ask for a script which the Repairman NPC checks the inventory and will not repair any broken +10 equipment.. because the repairall command bypasses it everytime. the idea is when I failed to refine a +10 gear to +11 with HD refiner, instead of downgrading or breaking.. it will have a red tag as broken... inorder to repair it I will need to do a quest before the repairman NPC will repair the gear. only for +10 broken equipment.. other refines will be fine and can be repaired with zeny. Quote
0 Mastagoon Posted February 18, 2021 Posted February 18, 2021 On 2/17/2021 at 11:57 AM, itsjbrojo said: Hello, Can I ask for a script which the Repairman NPC checks the inventory and will not repair any broken +10 equipment.. because the repairall command bypasses it everytime. the idea is when I failed to refine a +10 gear to +11 with HD refiner, instead of downgrading or breaking.. it will have a red tag as broken... inorder to repair it I will need to do a quest before the repairman NPC will repair the gear. only for +10 broken equipment.. other refines will be fine and can be repaired with zeny. Well, if you want to this only using scripts, it's gonna be tricky... you can perhaps replace the "broken" weapon with a different item, for example Damaged Weapon, and save the original weapon's data as a character array or in SQL, and then allow the players to trade the broken weapon with their original item. If your problem is only with @repairall, adding this one line in Atcommand.cpp will make the command ignore +10 equipment or higher ACMD_FUNC(repairall) { int count, i; nullpo_retr(-1, sd); count = 0; for (i = 0; i < MAX_INVENTORY; i++) { if(sd->inventory.u.items_inventory[i].refine >= 10) continue; // <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< Add this line if (sd->inventory.u.items_inventory[i].nameid && sd->inventory.u.items_inventory[i].card[0] != CARD0_PET && sd->inventory.u.items_inventory[i].attribute == 1) { sd->inventory.u.items_inventory[i].attribute = 0; clif_produceeffect(sd, 0, sd->inventory.u.items_inventory[i].nameid); count++; } } if (count > 0) { clif_misceffect(&sd->bl, 3); clif_equiplist(sd); clif_displaymessage(fd, msg_txt(sd,107)); // All items have been repaired. } else { clif_displaymessage(fd, msg_txt(sd,108)); // No item need to be repaired. return -1; } return 0; } 1 Quote
Question
itsjbrojo
Hello, Can I ask for a script which the Repairman NPC checks the
inventory and will not repair any broken +10 equipment..
because the repairall command bypasses it everytime.
the idea is when I failed to refine a +10 gear to +11 with HD refiner,
instead of downgrading or breaking.. it will have a red tag as broken...
inorder to repair it I will need to do a quest before the repairman NPC will repair the gear.
only for +10 broken equipment.. other refines will be fine and can be repaired with zeny.
1 answer to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.