Page 1 of 1

How to kill an NPC in LUA

Posted: Wed Jun 13, 2012 8:37 pm
by Parcae2
So I have the infamous clone bug in the Sher'Tul Fortress, and this means I can't access my stash. I teleported out with the change level command, but I'd like to be able to come back. Can anyone tell me how to use LUA or debug mode to kill my clone?

Edit: I'd like to thank Donkatsu for this suggestion.

Re: How to kill an NPC in LUA

Posted: Thu Jun 14, 2012 1:28 am
by edge2054
cnt+shift+alt + left click will kill an actor I believe.

To do it with the console you need to find the actor's x, y coordinates (they're displayed on the tooltip in debug mode) and then you do...

Code: Select all

target = game.level.map(x, y, Map.ACTOR)
substitute the x, y for the actual numbers (15, 4 for example) and then type

Code: Select all

target:die(target)

Code: Select all

target = nil
I think anyway, just working off the top of my head.

Re: How to kill an NPC in LUA

Posted: Thu Jun 14, 2012 6:16 pm
by Parcae2
Thanks! Sadly, before seeing your response I had worked out an in-game way to kill the clone, which broke the game in new and exciting ways (see also: the bugs forum).

I'm primarily just amused at this point.