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

Ideam how to make it give xp


velgin
 Share

Recommended Posts

Hello

@velgin:

> im trying to figure out how to get and ideam to give you xp but i have no idea how can someone help me?

If by your previous post, you mean a script item that when used, gives you exp then use this script that I made:
```
'REPLACE THE X WITH A CASE NUMBER
Case X

'The exp to give
Dim exp
exp = 25

'If we can take the item
If CanTake(Index, ItemNeeded, ItemAmount) = True Then

'Take the item - replace the ItemNeeded and ItemAmount with the item that you an to take and the number to take
                Call TakeItem(Index, ItemNeeded, ItemAmount)

'Set the player exp
                Call SetPlayerExp(Index, GetPlayerExp(Index) + exp)

Call PlayerMsg(index, "You gain " & exp & "!", WHITE)

Else
Call PlayerMsg(index, "You don't have that item", WHITE)

End If

Exit Sub

```
Now install: http://www.touchofdeathforums.com/smf/index.php?topic=28174.0

Let me know if this works or if you have any questions

Yours sincerely
cloudwolf00
Link to comment
Share on other sites

@velgin:

> still dont get it?

This goes under Sub ScriptedItem in your Main.txt:

```
'REPLACE THE X WITH A CASE NUMBER
Case X

'The exp to give
Dim exp
exp = 25

'If we can take the item
If CanTake(Index, ItemNeeded, ItemAmount) = True Then

'Take the item - replace the ItemNeeded and ItemAmount with the item that you an to take and the number to take
                Call TakeItem(Index, ItemNeeded, ItemAmount)

'Set the player exp
                Call SetPlayerExp(Index, GetPlayerExp(Index) + exp)

Call PlayerMsg(index, "You gain " & exp & "!", WHITE)

Else
Call PlayerMsg(index, "You don't have that item", WHITE)

End If

Exit Sub

```
Select te correct case number.

Example:

If you have 2 items made, you last was Case 1, this would be case 2.

The go to: http://www.touchofdeathforums.com/smf/index.php/topic,28174.0.html

and follow the instructions on that script, or once teh item is used, it will be used again, again, etc…

Making the item:

Goto your client after installing the scripts. ress F1 and edt items. Select teh correct item and choose scripted > Case X.

Follow it liek that, it should work.
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...