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

Debbuging please!


adamsharp
 Share

Recommended Posts

Hello What Is Wrong With This Thanks.

```
        Case 1
Dim R       
R = Rand(1,3)
If R = 1
Call GiveItem(Index, 27, 0)
Exit Sub 

If R = 2
Call GiveItem(Index, 28, 0)
Exit Sub

If R = 3
Call GiveItem(Index, 29, 0)
Exit Sub

```Thanks Adamsharp
Link to comment
Share on other sites

here

```
' Executes whenever a scripted item is used or double clicked.
Sub ScriptedItem(Index, Script)
Select Case Script
Case 0
Dim R
R = Rand(1,100)
Call MapMsg(GetPlayerMap(Index), "Player" & GetPlayerName(Index) & " Just Rolled " & R & " Out Of 100!", BLUE)
Exit Sub

        Case 1
Dim G     
G = Rand(1,3)
If G = 1
Call GiveItem(Index, 1, 27)
End If

If G = 2
Call GiveItem(Index, 1, 28)
End If

If G = 3
Call GiveItem(Index, 1, 29)
End If
Exit Sub

Case Else
Call PlayerMsg(Index, "No item script found. Please contact an admin to solve this problem.", WHITE)
Exit Sub
End Select
End Sub

```
Link to comment
Share on other sites

**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

@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

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...