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

2 questions


teh jimpie
 Share

Recommended Posts

hi

1\. is there a command like:

If CanTake(Index, 5, "all")

example:
that takes all your items away so much as you have. so if you have only 1 it takes 1, if you have 20 it takes 20.

2\. is there a script for something like a kill npc-quest.
that a npc gives you a task like: 'kill 20 gohsts'
and after you killed 1 gohst, it puts the 20 -1

example:

Case x

Call PutVar("scripts\charextras\" & GetPlayerName(Index) & ".ini", "NPC", "gohsts", 20)
Call PlayerMsg(Index, "Your task is to kill 20 gohsts", WHITE)
?? If PlayerKillNPC Then  XD
gohsts = gohsts - 1
gohsts = CInt(PutVar("scripts\charextras\" & GetPlayerName(Index) & ".ini", "NPC", "gohsts"))

End If
Exit Sub
Link to comment
Share on other sites

Hello

1\. No, there is no command like this built into Eclipse, you would have to make your own.

2\. Here is a small script, not tested but it should work:

```
Case x

        Call PutVar("Scripts\charextras\" & GetPlayerName(Index) & ".ini", "NPC", "ghosts", 20)
        Call PlayerMsg(Index, "Your task is to kill 20 ghosts", WHITE)
Exit Sub

```
In OnNPCDeath:
```
' Executes whenever an NPC is killed.
' Note: Death occurs as normal externally to this script.
Sub OnNPCDeath(Index, Map, NPCNum, NPCIndex)

'Scripted by cloudwolf00, found on the Eclipse forums (www.touchofdeathforums.com)
'If the player killed a ghost - uses the npc name
If getnpcname(NPCNum) = "ghost" Then
        Dim ghosts

        'Number of ghosts to kill
        ghosts = CInt(GetVar("Scripts\charextras\" & GetPlayerName(Index) & ".ini", "NPC", "ghosts"))

        'If you still need to kill ghosts
        If ghosts > 0 Then
                ghosts = ghosts - 1
        End If

        'Add new value
        Call putvar("Scripts\charextras\" & GetPlayerName(Index) & ".ini", "NPC", "ghosts",ghosts)

        'Tell player they killed a ghost and have x left to kill
        Call PlayerMsg(Index, "You killed a ghost! You only have " & ghosts & " left to kill!", WHITE)

End If

End Sub

```
Hope this helps, please leave the credit in!

Yours sincerely
cloudwolf00
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...