Eduardo170
Well-Known Member
Hello community, the script does not work just throws the message "You can not go there right now"
Likewise in killing the boss, it dont work.
Server : OTX 2 Lord Zedd(tfs 0.3.7)
Creaturescript
Likewise in killing the boss, it dont work.
Server : OTX 2 Lord Zedd(tfs 0.3.7)
Lua:
function onStepIn(cid, item, position, lastPosition, fromPosition, toPosition, actor)
local config = {
--[UID OF TP] = {storage = STORAGE NUMBER, position = {x=x, y=y, z=z}},
[9350] = {storage = 321631, position = {x=1590, y=1878, z=11}, msg = "You've reached mahrdis room"},
[9351] = {storage = 321632, position = {x=1554, y=1884, z=11}, msg = "You've reached morguthis room]"},
[9352] = {storage = 321633, position = {x=1518, y=1882, z=11}, msg = "You've reached omruc room"},
[9353] = {storage = 321634, position = {x=1495, y=1880, z=11}, msg = "You've reached rahemos room"},
[9354] = {storage = 321635, position = {x=1490, y=1862, z=11}, msg = "You've reached thalas room"},
[9355] = {storage = 321636, position = {x=1570, y=1859, z=11}, msg = "You've reached vashresamun room"},
[9356] = {storage = 321637, position = {x=1493, y=1819, z=11}, msg = "You've reached ashmunrah room"},
[9357] = {storage = 321638, position = {x=1589, y=1842, z=11}, msg = "You've reached reward room"},
}
local tp = config[item.uid]
if isPlayer(cid) then
if getCreatureStorage(cid, tp.storage) >= 0 then
doTeleportThing(cid, tp.position)
doSendMagicEffect(getCreaturePosition(cid),CONST_ME_TELEPORT)
doSendMagicEffect(tp.position, CONST_ME_TELEPORT)
else
doPlayerSendCancel(cid, "You can't go there right now")
end
end
return true
end
Creaturescript
Lua:
local Config = {
-- ['name] = {Storage Key}
['dipthrah'] = {321631},
['mahrdis'] = {321632},
['morguthis'] = {321633},
['omruc'] = {321634},
['rahemos'] = {321635},
['thalas'] = {321636},
['vashresamun'] = {321637},
['ashmunrah'] = {321638},
}
function onDeath(cid, corpse, deathList)
local v = Config[getCreatureName(cid):lower()]
if isMonster(cid) and v then
for _, killer in ipairs(deathList) do
if isPlayer(killer) then
if getPlayerStorageValue(killer, v[1]) ~= 1 then
setPlayerStorageValue(killer, v[1], 1)
addEvent(doPlayerSendTextMessage, 0.1, killer, MESSAGE_INFO_DESCR, 'Go to next room.')
end
end
end
end
return true
end
Last edited by a moderator: