Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /// callfunc("package_func",<itemid>,<amount>,<chance>{,<itemid>,<amount>,<chance>{,<itemid>,<amount>,<chance>{,...},<accountid>}})
- function script package_func {
- set .@len, getargcount()-((getarg(getargcount()-1)>=2000000)?1:0);
- set .@id, ((getarg(getargcount()-1)>=2000000)?getarg(getargcount()-1):getcharid(3));
- while(set(.@i,.@i+3)-3<.@len)
- if(rand(101)<=getarg(.@i-1))
- getitem(set(@package_item[.@a++-1],getarg(.@i-3)),set(@package_amount[.@a-1],getarg(.@i-2)),.@id);
- return .@a;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement