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

Can i do this??


JayT
 Share

Recommended Posts

hey im still learning sadscript and i wonderd if i can do this with godlords TakeItem…

```
Call TakeItem(Index, 1, Rand(50, 500))
```
ok if you dont no what i want i to do then…. all i want it to do is take a rand amount(Between 50 - 500) of gold (Item 1) from the player and i dunno if this will work or not?? many thanks in advance for the help :)
Link to comment
Share on other sites

@Owen:

> yeah you can.
> If your still not sure just use it as a variable
> e.g
> dim x
> x = Rand(x,x)
> Call TakeItem(index,1,x)

Why dim it? :huh:

Just use:
```
Call TakeItem(Index, 1, Rand(50, 500))
```
Or perhaps, and in this case you should actually use Dim:
```
Dim Amount

Amount = Rand(50, 500)

If CanTake(Index, 1, Amount) = True Then
Call TakeItem(Index, 1, Amount)
End If
```
Regards,
  Godlord.
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...