Advertisement
Skorm

rA-Item Package Function

Aug 23rd, 2013
294
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.49 KB | None | 0 0
  1. /// callfunc("package_func",<itemid>,<amount>,<chance>{,<itemid>,<amount>,<chance>{,<itemid>,<amount>,<chance>{,...},<accountid>}})
  2.  
  3. function    script  package_func    {
  4.     set .@len, getargcount()-((getarg(getargcount()-1)>=2000000)?1:0);
  5.     set .@id, ((getarg(getargcount()-1)>=2000000)?getarg(getargcount()-1):getcharid(3));
  6.     while(set(.@i,.@i+3)-3<.@len)
  7.         if(rand(101)<=getarg(.@i-1))
  8.             getitem(set(@package_item[.@a++-1],getarg(.@i-3)),set(@package_amount[.@a-1],getarg(.@i-2)),.@id);
  9.     return .@a;
  10. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement