teh jimpie Posted December 29, 2009 Author Share Posted December 29, 2009 hi1\. 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 -1example:Case xCall PutVar("scripts\charextras\" & GetPlayerName(Index) & ".ini", "NPC", "gohsts", 20)Call PlayerMsg(Index, "Your task is to kill 20 gohsts", WHITE)?? If PlayerKillNPC Then XDgohsts = gohsts - 1gohsts = CInt(PutVar("scripts\charextras\" & GetPlayerName(Index) & ".ini", "NPC", "gohsts"))End IfExit Sub Link to comment Share on other sites More sharing options...
cloudwolf00 Posted December 29, 2009 Share Posted December 29, 2009 Hello1\. 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 nameIf 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 IfEnd Sub```Hope this helps, please leave the credit in!Yours sincerelycloudwolf00 Link to comment Share on other sites More sharing options...
teh jimpie Posted December 29, 2009 Author Share Posted December 29, 2009 thx no errors so far 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