- 0
Sign in to follow this
Followers
0
H>How to make it report actual sold item count?
Asked by
utofaery
-
Recently Browsing 0 members
No registered users viewing this page.
Asked by
utofaery
No registered users viewing this page.
By using this site, you agree to our Terms of Use.
I need help to make this npc work correctly to tell how much item count it has sell.
prontera,164,175,4 script Mass Junk Seller 1_M_MERCHANT,{
.@x = 0;
getinventorylist();
for ( set .@i,0; .@i < @inventorylist_count; set .@i,.@i + 1) {
// Check if the Item Type is in the ignore list
if(getiteminfo(@inventorylist_id[.@i],2) == 3 ) {
setarray .@sellid[getarraysize(.@sellid)],@inventorylist_id[.@i];
}
}
mes (.n$);
if(getarraysize(.@sellid) > 0) {
for ( set .@s,0; .@s < getarraysize(.@sellid); set .@s,.@s + 1) {
set .@total,.@total + (getiteminfo(.@sellid[.@s],1)*countitem(.@sellid[.@s]));
delitem2 .@sellid[.@s],countitem(.@sellid[.@s]),1,0,0,0,0,0,0;
.@x = .@x + 1;//this one is not working correctly
}
mes ("Your items were sold.");
mes ("and you received "+.@total+" Zeny.");
mes ("for "+.@x+" Item Count");//Part I need help to fix.
set Zeny,Zeny + .@total;
} else {
mes ("No Items were sold,");
mes ("therefore you don't");
mes ("receive any Zeny.");
}
close2;
end;
}
Share this post
Link to post
Share on other sites