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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...

Important Information

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