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

Script Question


wawahoe123
 Share

Recommended Posts

Could anybody please make a script for me with does the following:

First, it checks if you have a specific item. If you have the required item, there is a one on 4 chance you will get another item. If u don't get the item, a text will be shown saying you didn't get the item. If you dont have the required item a text will be shown saying you don't have it
Link to comment
Share on other sites

@Soul:

> This is the "Questions & Answers" board. As such, we don't provide direct help but we do try to help you. So no, we will not make the script for you, although you could try and then request help.

I actually also tried it. Now I need a line of script wich checks if the player has a specific item. Could you please give it? That's the only thing I need now to finish my script.
Link to comment
Share on other sites

@frankpetrov:

> not sure exactly…. but I think you have to use this  Item(GetPlayerInvItemNum(MyIndex, InvNum))

I don't get it. If I want to make it like the player needs a item with the ID 2, what does the code have to be? Would really appreciate it if someone could just place the code for only that here.
Link to comment
Share on other sites

For EO it would be:
```
If HasItem(Index,2) =  1 Then
End If
```
And for lolz..

```
If HasItem(Index,2) =  1 Then
    If Rand(1,4) = 4 then
          Call GiveInvItem(Index,???,!!!)
          Call PlayerMsg(Index, "You received an item!", Yellow)
    Else
          Call PlayerMsg(Index, "You did not receive an item. :(", BrightRed)
    End If
End If
```??? = Item ID
!!! = Item Amount
Link to comment
Share on other sites

Actually it does, just not from a slow as crap text file.. It's built into the server, and requires some more thinking when adding stuff. :) Anyways, this is not a discussion on which one is better. I hope someone can answer your question. ^^'
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...