I've been going crazy over this script and decided to reach out for some assistance. The script I want is very basic (I think?)- an identifier and repair NPC combined. He would charge 3000z total for the choice they select in the menu (3000 total, not per unidentified/broken item).
As you can see I've messed around with the script in hope to achieve desired result but alas. Help would be greatly appreciated. Thank you.
[Header]
mes "[Equip Assistant]";
mes "Hello, do you need your help with your equipment?";
menu "Identify - 3,000 Zeny",-,"Repair - 3,000 Zeny",L_Repair;
set .@Price, 3000;
getinventorylist;
for(set .@i,0; .@i<@inventorylist_count; set .@i,.@i+1) {
if (@inventorylist_identify[.@i]) continue;
if (Zeny < .@Price) {
dispbottom "It costs "+.@Price+" Zeny to identify an item."; break; }
set Zeny, Zeny-.@Price;
delitem2 @inventorylist_id[.@i],1,0,0,0,0,0,0,0;
getitem @inventorylist_id[.@i],1;
setarray .@Total[0], .@Total[0]+1, .@Total[1]+.@Price; }
if (!.@Total[0]) {
message strcharinfo(0),"No items identified."; end; }
specialeffect2 154;
message strcharinfo(0),"Identified "+.@Total[0]+" items"+((.@Total[1])?" for "+.@Total[1]+" Zeny":"")+".";
end;
L_Repair:
if (Zeny < .@Price) {
dispbottom "It costs "+.@Price+" Zeny to repair your items.";
close;
}
if (getbrokenid(1) == 0){
message strcharinfo(0),"No broken items detected.";
end;
}
while (getbrokenid(1)) {
repair(1);
}
if (.@i) message strcharinfo(0),"Repaired "+ .@i + " items for "+.@Price+" Zeny."; // How to make this part show?
set Zeny, Zeny-.@Price;
end;
}
Question
Mistique
Hi community.
I've been going crazy over this script and decided to reach out for some assistance. The script I want is very basic (I think?)- an identifier and repair NPC combined. He would charge 3000z total for the choice they select in the menu (3000 total, not per unidentified/broken item).
As you can see I've messed around with the script in hope to achieve desired result but alas. Help would be greatly appreciated. Thank you.
[Header] mes "[Equip Assistant]"; mes "Hello, do you need your help with your equipment?"; menu "Identify - 3,000 Zeny",-,"Repair - 3,000 Zeny",L_Repair; set .@Price, 3000; getinventorylist; for(set .@i,0; .@i<@inventorylist_count; set .@i,.@i+1) { if (@inventorylist_identify[.@i]) continue; if (Zeny < .@Price) { dispbottom "It costs "+.@Price+" Zeny to identify an item."; break; } set Zeny, Zeny-.@Price; delitem2 @inventorylist_id[.@i],1,0,0,0,0,0,0,0; getitem @inventorylist_id[.@i],1; setarray .@Total[0], .@Total[0]+1, .@Total[1]+.@Price; } if (!.@Total[0]) { message strcharinfo(0),"No items identified."; end; } specialeffect2 154; message strcharinfo(0),"Identified "+.@Total[0]+" items"+((.@Total[1])?" for "+.@Total[1]+" Zeny":"")+"."; end; L_Repair: if (Zeny < .@Price) { dispbottom "It costs "+.@Price+" Zeny to repair your items."; close; } if (getbrokenid(1) == 0){ message strcharinfo(0),"No broken items detected."; end; } while (getbrokenid(1)) { repair(1); } if (.@i) message strcharinfo(0),"Repaired "+ .@i + " items for "+.@Price+" Zeny."; // How to make this part show? set Zeny, Zeny-.@Price; end; }
Link to comment
Share on other sites
4 answers 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.