Jump to content
  • 0

Help Please!


Jheiar

Question


  • Group:  Members
  • Topic Count:  13
  • Topics Per Day:  0.00
  • Content Count:  33
  • Reputation:   0
  • Joined:  09/27/12
  • Last Seen:  

Anyone can help me here. I just want to announce the "if ($@ran2 == 20) set @prize,2202;" this.

set $@ran2, rand(1,20);
if ($@ran2 == 20) set @prize,2202;
if ($@ran2 == 19) set @prize,519;
if ($@ran2 == 18) set @prize,518;
if ($@ran2 == 17) set @prize,517;
if ($@ran2 == 16) set @prize,516;
if ($@ran2 == 15) set @prize,515;
if ($@ran2 == 14) set @prize,514;
if ($@ran2 == 13) set @prize,513;
if ($@ran2 == 12) set @prize,512;
if ($@ran2 == 11) set @prize,511;
if ($@ran2 == 10) set @prize,510;
if ($@ran2 == 9) set @prize,509;
if ($@ran2 == 8) set @prize,508;
if ($@ran2 == 7) set @prize,507;
if ($@ran2 == 6) set @prize,506;
if ($@ran2 == 5) set @prize,505;
if ($@ran2 == 4) set @prize,504;
if ($@ran2 == 3) set @prize,503;
if ($@ran2 == 2) set @prize,502;
if ($@ran2 == 1) set @prize,501;
set $@ran3, rand(1,20);
if ($@ran3 == 20) set @amount,1;
if ($@ran3 == 19) set @amount,1;
if ($@ran3 == 18) set @amount,1;
if ($@ran3 == 17) set @amount,1;
if ($@ran3 == 16) set @amount,1;
if ($@ran3 == 15) set @amount,1;
if ($@ran3 == 14) set @amount,1;
if ($@ran3 == 13) set @amount,1;
if ($@ran3 == 12) set @amount,1;
if ($@ran3 == 11) set @amount,1;
if ($@ran3 == 10) set @amount,1;
if ($@ran3 == 9) set @amount,1;
if ($@ran3 == 8) set @amount,1;
if ($@ran3 == 7) set @amount,1;
if ($@ran3 == 6) set @amount,1;
if ($@ran3 == 5) set @amount,1;
if ($@ran3 == 4) set @amount,1;
if ($@ran3 == 3) set @amount,1;
if ($@ran3 == 2) set @amount,1;
if ($@ran3 == 1) set @amount,1;
announce "Congratulations to "+strcharinfo(0)+" for getting "+---------+"x "+getitemname(---------)+"!",0;

Edited by Euphy
Codeboxed.
Link to comment
Share on other sites

8 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  72
  • Topics Per Day:  0.02
  • Content Count:  2997
  • Reputation:   1130
  • Joined:  05/27/12
  • Last Seen:  

if ($@ran2 == 20) announce ...;

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  13
  • Topics Per Day:  0.00
  • Content Count:  33
  • Reputation:   0
  • Joined:  09/27/12
  • Last Seen:  

where to put this sir? sorry.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  48
  • Topics Per Day:  0.01
  • Content Count:  410
  • Reputation:   29
  • Joined:  04/04/12
  • Last Seen:  

set $@ran2, rand(1,20);
set @amount,1;
if ($@ran2 == 20) {
set @prize,2202;
announce "Congratulations to "+strcharinfo(0)+" for getting "+---------+"x "+getitemname(---------)+"!",0;
}
if ($@ran2 == 19) set @prize,519;
if ($@ran2 == 18) set @prize,518;
if ($@ran2 == 17) set @prize,517;
if ($@ran2 == 16) set @prize,516;
if ($@ran2 == 15) set @prize,515;
if ($@ran2 == 14) set @prize,514;
if ($@ran2 == 13) set @prize,513;
if ($@ran2 == 12) set @prize,512;
if ($@ran2 == 11) set @prize,511;
if ($@ran2 == 10) set @prize,510;
if ($@ran2 == 9) set @prize,509;
if ($@ran2 == 8) set @prize,508;
if ($@ran2 == 7) set @prize,507;
if ($@ran2 == 6) set @prize,506;
if ($@ran2 == 5) set @prize,505;
if ($@ran2 == 4) set @prize,504;
if ($@ran2 == 3) set @prize,503;
if ($@ran2 == 2) set @prize,502;
if ($@ran2 == 1) set @prize,501;

There, and I cleaned your code a tad.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  13
  • Topics Per Day:  0.00
  • Content Count:  33
  • Reputation:   0
  • Joined:  09/27/12
  • Last Seen:  

announce "Congratulations to "+strcharinfo(0)+" for getting "+@amount,1;+"x "+getitemname(set @prize,2202;)+"!",0;

is this right?

Edited by Jheiar
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  48
  • Topics Per Day:  0.01
  • Content Count:  410
  • Reputation:   29
  • Joined:  04/04/12
  • Last Seen:  

I'm not sure what you mean, what exactly do you want to do with that line?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  13
  • Topics Per Day:  0.00
  • Content Count:  33
  • Reputation:   0
  • Joined:  09/27/12
  • Last Seen:  

if the character won the ran 20 and his name will be announce. i dont know how to set that up. thats why.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  48
  • Topics Per Day:  0.01
  • Content Count:  410
  • Reputation:   29
  • Joined:  04/04/12
  • Last Seen:  

You can simplify it to this:

announce "Congratulations to "+strcharinfo(0)+" for getting a slotted Sunglasses!",0;

Unless you changed item 2202 to something else :P

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  13
  • Topics Per Day:  0.00
  • Content Count:  33
  • Reputation:   0
  • Joined:  09/27/12
  • Last Seen:  

thanks. it works! :)

Link to comment
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.   Paste as plain text instead

  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.

×
×
  • Create New...