wafuboe
Active Member
- Joined
- Dec 24, 2010
- Messages
- 884
- Solutions
- 2
- Reaction score
- 26
Every time i kill a monster a message shows "You have 60 seconds to enter the teleport"
I think it has something to do with this script
Creaturescripts.xml
<event type="kill" name="CreateTeleport6" script="hellgoraktp.lua"/>
Login.
player:registerEvent("CreateTeleport5")
Any ideas?
I think it has something to do with this script
Code:
local config = {
["hellgorak"] = {time = 60, toPos = Position(1070, 1313, 6), tpPos = Position(1192, 1219, 5)}
}
local function deleteTeleport(position)
local teleport = Tile(position):getItemById(1387)
if teleport then
teleport:remove()
position:sendMagicEffect(CONST_ME_POFF)
end
end
function onKill(creature, target)
local monster = config[target:getName():lower()]
if not monster or target:isPlayer() then
return true
end
local item = Game.createItem(1387, 1, monster.tpPos)
if item:isTeleport() then
item:setDestination(monster.toPos)
end
creature:say("You have " .. monster.time .. " seconds to enter the teleport!", TALKTYPE_MONSTER_SAY)
addEvent(deleteTeleport, monster.time * 1000, monster.tpPos)
return true
end
Creaturescripts.xml
<event type="kill" name="CreateTeleport6" script="hellgoraktp.lua"/>
Login.
player:registerEvent("CreateTeleport5")
Any ideas?