Hi i just want to know what seems to be the problem on my script? because this one works i havent change anything but when @reloadscript it suddenly not working..
- shop custom_seller2 -1,501:20
turbo_room.gat,109,119,3 script Donation Shop 100,{
mes "I will sell you items for " + getitemname(.CoinID) + ".";
callshop "custom_seller2",1;
npcshopattach "custom_seller2";
end;
OnBuyItem:
for(set .@i,0; .@i<getarraysize(.customs); set .@i,.@i+1) {
for(set .@d,0; .@d<getarraysize(@bought_nameid); set .@d,.@d+1) {
if(@bought_nameid[.@d]==.customs[.@i]) {
if(checkweight(@bought_nameid[.@d],@bought_quantity[.@d])) {
if(countitem(.CoinID) >= .Price[.@i]*@bought_quantity[.@d]) {
delitem .CoinID,.Price[.@i]*@bought_quantity[.@d];
getitem @bought_nameid[.@d],@bought_quantity[.@d];
} else dispbottom "You don't have enough "+getitemname(.CoinID)+" to purchase that item.";
} else dispbottom "Purchasing these items will put you over the weight limit!";
}
}
}
deletearray @bought_quantity, getarraysize(@bought_quantity);
deletearray @bought_nameid, getarraysize(@bought_nameid);
close;
OnInit:
setarray .customs[0],29359,29360,29361,20078,29315,29316,29147,29157,5135,5376,5518,13422,13412,13413,29147,29201,20113,20114,20115,20116,29287,20009,2383,1161,1533,2629,2630,4359,4361,4357,2751,2541,4407,20076,20031,20053,29318,5013,4367,20019,4363,2357,2524,2421,2375,2433,2537;// Enter the ID of customs here
set .CoinID,29327; // Enter the ID of the coin here.
setarray .Price[0],50,30,40,50,30,30,50,50,20,25,35,15,20,20,35,30,25,25,25,25,25,25,30,15,15,15,15,65,65,40,20,45,35,30,10,15,7,15,35,50,30,15,15,15,25,15,15; // Price for each custom is set to 20 coins
npcshopitem "custom_seller2",0,0; // Don't touch any coding beyond here
for(set .i,0; .customs[.i]; set .i,.i+1) npcshopadditem "custom_seller2",.customs[.i],.Price[.i];
end;
}
Question
louigui0224
Hi i just want to know what seems to be the problem on my script? because this one works i havent change anything but when @reloadscript it suddenly not working..
Link to comment
Share on other sites
2 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.