Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Some commands and that.


xelander
 Share

Recommended Posts

Yah, i would like to know the command for random.

and will this script work if so?

```
Case "/Randomtip"
dim T
T = (the random command from 1 to 3)
if T = 1 then
call playermsg(index,"rawr tip 1",1)
else if T = 2 then
call palyermsg(index,"rawr tip 2",1)
else if T = 3 then
call palyermsg(index,"rawr tip 3",1)
end if
exit sub
```
i would like some help here.
Link to comment
Share on other sites

Also, if you're going to be comparing something to multiple values, it's best to use the select case statement, e.g.

> **Case** "/Randomtip"
> **Dim** T
> T = Rand(1, 3)
> **Select Case** T
> **Case** 1
>   **Call** PlayerMsg(Index,"rawr tip 1",1)
> **Case** 2
>   **Call** PlayerMsg(Index,"rawr tip 2",1)
> **Case** 3
>   **Call** PlayerMsg(Index,"rawr tip 3",1)
> **End Select**
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...