Blysco
New Member
- Joined
- Oct 12, 2013
- Messages
- 163
- Reaction score
- 2
Hey, want that when i kill a Monster "Orshabaal" that a Teleporter appear here x=32277, y= 32026, z=13.
I found some scripts but none of them wont really work for me.
The console say that a unenspectet Symbol is somewhere.
But some hours earlier it works without a Error. But no Teleporter appeared after i killed the Orshabaal.
And after that happend i just tried a little bit and changed some thing and now it wont work anymore.
Thx for all solutions.
Creaturscripts/scripts
movements/createteleport.lua
I found some scripts but none of them wont really work for me.
The console say that a unenspectet Symbol is somewhere.
But some hours earlier it works without a Error. But no Teleporter appeared after i killed the Orshabaal.
And after that happend i just tried a little bit and changed some thing and now it wont work anymore.
Thx for all solutions.
Creaturscripts/scripts
Code:
local config = {timeToRemove = 120, -- seconds
message = "TELEPORT HAS BEEN OPENED FOr 120 SECONDS",teleportId = ,bosses = { -- Monster Name, Teleport Position["MONSTER NAME"] = { pos={ x=32277, y= 32026, z=13 , stackpos=1 }, aid=1001 },
},local function removal(position)
doRemoveThing(getTileItemById(position, config.teleportId).uid, 1)
return TRUE
end
function onKill(cid, target, lastHit)
if(config.bosses[getCreatureName(target)]) then
local t = config.bosses[getCreatureName(target)]local teleport = doCreateItem(config.teleportId, t.pos)local position = t.pos
doItemSetAttribute(teleport, "aid", t.aid)
doCreatureSay(cid, config.message, TALKTYPE_ORANGE_1)
addEvent(removal, config.timeToRemove * 1000, position)
return TRUE
end
return TRUE
end
movements/createteleport.lua
Code:
local config = {
bosses={---aid of portal, position where it sends, value it sets, text it shows
[1001] = {pos={x=32277, y=32026, z=13, stackpos=1}, value=1, text="Entered the Cave"},
function onStepIn(cid, item, position, fromPosition)
if isPlayer(cid) == TRUE then
if(config.bosses[item.actionid]) then
local t= config.bosses[item.actionid]
if getPlayerStorageValue(cid, config.storage)< t.value then
setPlayerStorageValue(cid, config.storage, t.value)
end
doTeleportThing(cid, t.pos)
doSendMagicEffect(getCreaturePosition(cid),10)
doCreatureSay(cid,t.text,TALKTYPE_ORANGE_1)
elseif(config.mainroom[item.actionid]) then
local t= config.mainroom[item.actionid]
if getPlayerStorageValue(cid, config.storage)>=t.value then
doTeleportThing(cid, t.pos)
doSendMagicEffect(getCreaturePosition(cid),10)
doCreatureSay(cid,t.text,TALKTYPE_ORANGE_1)
else
doTeleportThing(cid, fromPosition)
doSendMagicEffect(getCreaturePosition(cid),10)
doCreatureSay(cid, 'You don\'t have enough energy to enter this portal', TALKTYPE_ORANGE_1)
end
elseif(config.portals[item.actionid]) then
local t= config.portals[item.actionid]
doTeleportThing(cid, t.pos)
doSendMagicEffect(getCreaturePosition(cid),10)
doCreatureSay(cid,t.text,TALKTYPE_ORANGE_1)
end
end