hello guys , currently im using this itemshower script , but i want to make itemshower more than 2 item
here my example script :
- script Sample -1,{
OnInit:
set .amount, 10; // amount of item to shower
set .item_id, 12903; // next item id to shower
set .item_id2, 12904; // next item id to shower
set .item_id3, 12905; // next item id to shower
set .item_id4, 12906; // next item id to shower
set .item_id5, 12907; // next item id to shower
set .item_id6, 12908; // next item id to shower
set .item_id7, 13576; // next item id to shower
set .item_id8, 13584; // next item id to shower
Question
DK77
hello guys , currently im using this itemshower script , but i want to make itemshower more than 2 item
here my example script :
- script Sample -1,{
OnInit:
set .amount, 10; // amount of item to shower
set .item_id, 12903; // next item id to shower
set .item_id2, 12904; // next item id to shower
set .item_id3, 12905; // next item id to shower
set .item_id4, 12906; // next item id to shower
set .item_id5, 12907; // next item id to shower
set .item_id6, 12908; // next item id to shower
set .item_id7, 13576; // next item id to shower
set .item_id8, 13584; // next item id to shower
bindatcmd "itemshower",strnpcinfo(3)+"::OnShower";
end;
OnShower:
getmapxy .@map$, .@x, .@y, BL_PC;
while ( .count < .amount ) {
do {
.@x_diff = .@x + rand(1,5);
.@y_diff = .@y + rand(1,5);
} while (!checkcell(.@map$,.@x_diff,.@y_diff,cell_chkpass));
.@var = rand(2);
makeitem .@var?.item_id:.item_id2,1,.@map$,.@x_diff,.@y_diff; // <<< im stuck on this
set .count, .count + 1;
}
set .count, 0;
end;
}
Link to comment
Share on other sites
3 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.