adamsharp Posted August 21, 2009 Author Share Posted August 21, 2009 Hello What Is Wrong With This Thanks.``` Case 1Dim R R = Rand(1,3)If R = 1 Call GiveItem(Index, 27, 0)Exit Sub If R = 2 Call GiveItem(Index, 28, 0)Exit SubIf R = 3 Call GiveItem(Index, 29, 0)Exit Sub```Thanks Adamsharp Link to comment Share on other sites More sharing options...
Kimimaru Posted August 21, 2009 Share Posted August 21, 2009 What error does it give you? Link to comment Share on other sites More sharing options...
xelander Posted August 21, 2009 Share Posted August 21, 2009 ``` Case 1Dim R R = Rand(1,3)If R = 1Call GiveItem(Index, 27, 0)End IfIf R = 2Call GiveItem(Index, 28, 0)End IfIf R = 3Call GiveItem(Index, 29, 0)End IfExit Sub```You only use Exit sub in the end of the case. Link to comment Share on other sites More sharing options...
adamsharp Posted August 21, 2009 Author Share Posted August 21, 2009 doesnt give me an error it just dont do oat. Link to comment Share on other sites More sharing options...
xelander Posted August 21, 2009 Share Posted August 21, 2009 Show us the whole Sub please. Link to comment Share on other sites More sharing options...
adamsharp Posted August 21, 2009 Author Share Posted August 21, 2009 here```' Executes whenever a scripted item is used or double clicked.Sub ScriptedItem(Index, Script) Select Case Script Case 0Dim RR = Rand(1,100)Call MapMsg(GetPlayerMap(Index), "Player" & GetPlayerName(Index) & " Just Rolled " & R & " Out Of 100!", BLUE)Exit Sub Case 1Dim G G = Rand(1,3)If G = 1Call GiveItem(Index, 1, 27)End IfIf G = 2Call GiveItem(Index, 1, 28)End IfIf G = 3Call GiveItem(Index, 1, 29)End IfExit Sub Case Else Call PlayerMsg(Index, "No item script found. Please contact an admin to solve this problem.", WHITE) Exit Sub End SelectEnd Sub``` Link to comment Share on other sites More sharing options...
xelander Posted August 21, 2009 Share Posted August 21, 2009 You could do like this:```Case 1Dim ItemNumItemNum = Rand(27,29)GiveItem(Index,Itemnum,-1)```This maaaaybe jsut works. Link to comment Share on other sites More sharing options...
Godlord Posted August 21, 2009 Share Posted August 21, 2009 **Note**: I'm assuming you use my inventory script.If you want to give items to players use:> Call Giveitem(Index, ItemNum, 0)Replace ItemNum with the number of the item to give.If you want to give stackable items or currency to players use:> Call GiveCurrency(Index, ItemNum, Amount)Replace ItemNum with the number of the item to give and replace Amount with the amount to give.Regards, Godlord. Link to comment Share on other sites More sharing options...
The New World Posted August 21, 2009 Share Posted August 21, 2009 @Godlord:> **Note**: I'm assuming you use my inventory script.> > If you want to give items to players use:Replace ItemNum with the number of the item to give.> > If you want to give stackable items or currency to players use:Replace ItemNum with the number of the item to give and replace Amount with the amount to give.> > Regards,> Godlord.Quick curiosity, did you ever re-edit your inventory script? Link to comment Share on other sites More sharing options...
Godlord Posted August 21, 2009 Share Posted August 21, 2009 @Rose:> Quick curiosity, did you ever re-edit your inventory script?A few times in the past. I have a newer version laying around though, although not posted yet.Regards. Godlord. 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