Jump to content
  • 0
minx123

random box with announce get item

Question

hello.. i need some help, how to make random box with announce get special item?

 

i want make box if player get the special item. it will announce to all map.

 

Share this post


Link to post
Share on other sites

3 answers to this question

Recommended Posts

  • 0

Create a function script and make the item usage call it with callfunc.
 
 

function    script    Random_Box_Script    {    .@[member=Rand] = rand(1,3);    switch(.@[member=Rand])    {        case 1:            getitem 1001,1;            end;        case 2:            getitem 1002,1;            end;        case 3:            getitem 1003,1; // The special item            announce strcharinfo(0)+ " was lucky and obtained the special prize!",bc_map,0x00FF00; // Map announcement            end;    }}

 
 

{    Id: 1000    AegisName: "Random_Box"    Name: "Random Box"    Type: 18    Buy: 0    Weight: 0    Script: <" callfunc "Random_Box_Script"; ">},
Edited by Anisotropic Defixation

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.