JayT Posted August 29, 2009 Author Share Posted August 29, 2009 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 More sharing options...
Admiral Refuge Posted August 29, 2009 Share Posted August 29, 2009 Not sure if TakeItem works with currency, but yes, you can use Rand() inside another function. Link to comment Share on other sites More sharing options...
Owen F Posted August 29, 2009 Share Posted August 29, 2009 yeah you can.If your still not sure just use it as a variablee.gdim xx = Rand(x,x)Call TakeItem(index,1,x) Link to comment Share on other sites More sharing options...
JayT Posted August 29, 2009 Author Share Posted August 29, 2009 @admiral yer i though that so i was leaning to TakeCurrency but thats not in goddiez subs its just TakeItem@Owen baby ;) thanks mate :P Link to comment Share on other sites More sharing options...
Godlord Posted August 29, 2009 Share Posted August 29, 2009 @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 AmountAmount = 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 More sharing options...
JayT Posted August 29, 2009 Author Share Posted August 29, 2009 i knew it wunt take long before goddie was here lolz… thanks man appreciate it Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now