OK. I will update it today
Don't have time now.
bump, it's works now :
prontera,150,150,6 script Daily Item Sale 100,{
mes "Hi";
next;
if(select("Sale!:All items") == 2) {
for(set .@i,0; .@i < getarraysize(.TradeID); set .@i, .@i +1){
if(.TradeID[.@i] != 0) {
set .@menu$, .@menu$ + "^0000FF "+getitemname(.TradeID[.@i])+" ^000000 x "+.TradeCount[.@i]+" x "+.TradeItemsAmm[.@i]+"";
set .@menu$, .@menu$ + ":";
}
}
set .@Select, select(.@menu$) - 1;
if(.TradeCount[.@Select] < 1) {
mes "I don't have this item.";
close;
}
mes "Do you want buy it?";
mes "I need - "+getitemname(.TradeItemsReq[.@Select]);
mes " x"+.TradeItemsAmm[.@Select];
next;
if(countitem(.TradeItemsReq[.@Select]) < .TradeItemsAmm[.@Select]) {
mes "Where is my "+getitemname(.TradeItemsReq[.@Select]);
close;
}
delitem .TradeItemsReq[.@Select], .TradeItemsAmm[.@Select];
getitem .TradeID[.@Select], 1;
.TradeCount[.@Select] -= 1;
close;
}
for(set .@i,0; .@i < getarraysize(.TodaySale); set .@i, .@i +1){
if(.TodaySale[.@i] != 0) {
set .@menu$, .@menu$ + "^0000FF "+getitemname(.TodaySale[.@i])+" ^000000 x "+.TodayCount[.@i]+" x "+.TradeItemsAmm[.@i]+"";
set .@menu$, .@menu$ + ":";
}
}
set .@Select, select(.@menu$) - 1;
if(.TodayCount[.@Select] < 1) {
mes "I don't have this item.";
close;
}
mes "Do you want buy it?";
mes "I need - "+getitemname(.TradeItemsReq[.@Select]);
mes " x"+.TradeItemsAmm[.@Select];
next;
if(countitem(.TradeItemsReq[.@Select]) < .TradeItemsAmm[.@Select]) {
mes "Where is my "+getitemname(.TradeItemsReq[.@Select]);
close;
}
delitem .TradeItemsReq[.@Select], .TradeItemsAmm[.@Select];
getitem .TodaySale[.@Select], 1;
.TodayCount[.@Select] -= 1;
close;
OnInit:
setarray .TradeID[0], 12210, 14533, 14545, 7619, 7620, 7227, 7228, 7229, 7230; //your cards id
setarray .TradeCount[0], 5, 5, 5, 3, 3, 3, 2, 1, 3; //card count
setarray .TradeItemsReq[0], 7179, 7539, 7711, 7179, 7539, 7227, 7228, 7229, 7230; //pod, poring coin, event ticket
setarray .TradeItemsAmm[0], 1, 2, 3, 4, 5, 2, 3, 5, 4; // amount of ^ items
for(.i = 0; .i < 5; .i ++) { // 5 items
if(.TradeID[.i] != 0) {
.TodaySale[.i] += .TradeID[rand(getarraysize(.TradeID))];
.TodayCount[.i] += .TradeCount[rand(getarraysize(.TradeCount))];
}
}
end;
OnClock0000:
for(.i = 0; .i < 5; .i ++) { // 5 items
if(.TradeID[.i] != 0) {
.TodaySale[.i] += .TradeID[rand(getarraysize(.TradeID))];
.TodayCount[.i] += .TradeCount[rand(getarraysize(.TradeCount))];
}
}
}