Hi guys, I'm making a script which involves when a creature it teleports everyone in the room to a position, now I need some way to register the kill, but for some reason the creature script isn't working and i'm starting to wonder if "kill" is even an event for TFS 0.2.1.5
here is my
creaturescript.xml
and
script that occurs:
so any ideas?
here is my
creaturescript.xml
Code:
<event type="kill" name="TamedTroll" event="script" value="test.lua"/>
and
script that occurs:
Code:
function onKill()
local NESTSPAWN = { {x = 524 , y = 838, z = 7},
{x = 524 , y = 838, z = 7, stackpos = STACKPOS_TOP_CREATURE} }
if(getGlobalStorageValue(1005) == 1) then
if (isCreature(getThingfromPos(NESTSPAWN[2]).uid) == FALSE) then
local nestteleport = {
{x = 514, y = 828, z = 7},
{x = 534, y = 848, z = 7}
}
local prizeteleport = { {x = 502, y = 832, z = 7} }
for xcord = nestteleport[1].x , nestteleport[2].x do
for ycord = nestteleport[1].y, nestteleport[2].y do
local teleporthere = { {x = xcord, y = ycord, z = 7, stackpos = STACKPOS_TOP_CREATURE}}
if isPlayer(getThingfromPos(teleporthere[1]).uid) == TRUE then
doSendMagicEffect(teleporthere[1], CONST_ME_POFF)
doTeleportThing(getThingfromPos(teleporthere[1]).uid, prizeteleport[1])
doSendMagicEffect(prizeteleport[1], CONST_ME_ENERGYAREA)
addEvent(broadcastMessage, 150 , "You Killed The Beast", MESSAGE_EVENT_ADVANCE)
end
end
end
end
end
so any ideas?