Progenosis
Member
- Joined
- Sep 6, 2011
- Messages
- 131
- Reaction score
- 18
Something like this?
The creaturescript to create the teleport is this one:
How can I give an ActionID to the teleport created?
Then, the onStep function that you are talking about would be this one?
?
The creaturescript to create the teleport is this one:
Code:
local tpId = 12509
local tps = {
["Grand Ferumbras"] = {pos = {x=870, y=1389, z=12}, toPos = {x=898, y=1366, z=12}, time = 20},
}
function removeTp(tp)
local t = getTileItemById(tp.pos, tpId)
if t then
doRemoveItem(t.uid, 1)
doSendMagicEffect(tp.pos, CONST_ME_POFF)
end
end
function onDeath(cid)
local tp = tps[getCreatureName(cid)]
if tp then
doCreateTeleport(tpId, tp.toPos, tp.pos)
doCreatureSay(cid, "El teleport para salir de este lugar desaparecerá en "..tp.time.." segundos.", TALKTYPE_ORANGE_1)
addEvent(removeTp, tp.time*1000, tp)
end
return TRUE
end
Then, the onStep function that you are talking about would be this one?
Code:
function onStepIn(cid, item, pos)
if isPlayer(cid) == TRUE then
if (item.actionid == XXXX) then
doPlayerSetStorage(cid,2526,1)
end
end
?