witmar
New Member
Witam mam blad ze skryptem na teleporty do inq. Oto blad:
A oto skrypt:
Prosze Was o pomoc. Rep++ za pomoc.
[Error - LuaScriptInterface::loadFile] data/creaturescripts/scripts/inquisition.lua:39: '<eof>' expected near 'function'
[Warning - Event::loadScript] Cannot load script (data/creaturescripts/scripts/inquisition.lua)
data/creaturescripts/scripts/inquisition.lua:39: '<eof>' expected near 'function'
A oto skrypt:
local monsters =
{
["Ushuriel"] = {teleportPos = {x = 1100, y = 1214, z = 12, stackpos = 1}, toPos = {x = 1188, y = 1213, z = 12}},
["Annihilon"] = {teleportPos = {x = 1187, y = 1199, z = 12, stackpos = 1}, toPos = {x = 1193, y = 1255, z = 12}},
["Hellgorak"] = {teleportPos = {x = 1192, y = 1241, z = 12, stackpos = 1}, toPos = {x = 1113, y = 1253, z = 12}},
["Madareth"] = {teleportPos = {x = 1112, y = 1241, z = 12, stackpos = 1}, toPos = {x = 1130, y = 1214, z = 12}},
["Zugurosh"] = {teleportPos = {x = 1148, y = 1214, z = 12, stackpos = 1}, toPos = {x = 1148, y = 1253, z = 12}},
["Golgordan"] = {teleportPos = {x = 1147, y = 1245, z = 12}, toPos = {x = 1065, y = 1308, z = 13}}
}
local time = 180 --seconds(3 minutes)
function onKill(cid, target, lastHit)
if(monsters[getCreatureName(target)]) then
local t = monsters[getCreatureName(target)]
doCreateTeleport(1387, t.toPos, t.teleportPos)
doSendMagicEffect(t.teleportPos, CONST_ME_POFF)
doCreatureSay(cid, "You now have 3 minutes to exit this room through the teleporter. It will bring you to the next room only during his time or the teleporter will disappear", TALKTYPE_MONSTER, getCreaturePosition(target))
addEvent(doRemoveTeleport, time * 1000, t.teleportPos)
elseif(brothers[getCreatureName(target)]) then
t = brothers[getCreatureName(target)]
local brother = getCreatureByName(t.brother)
if(isMonster(brother) == true) then
if(isInRange(getCreaturePosition(brother), brothers.brothersArea.fromPos, brothers.brothersArea.toPos) == true) then
return true
else
doCreateTeleport(1387, t.toPos, t.teleportPos)
doSendMagicEffect(t.teleportPos, CONST_ME_POFF)
end
doCreatureSay(cid, "You now have 3 minutes to exit this room through the teleporter. It will bring you to the next room only during his time or the teleporter will disappear", TALKTYPE_MONSTER, getCreaturePosition(target))
addEvent(doRemoveTeleport, time * 1000, t.teleportPos)
end
end
end
return true
function doRemoveTeleport(position)
if(getTileThingByPos(position).itemid > 0) then
doRemoveItem(getTileThingByPos(position).uid)
doSendMagicEffect(position, CONST_ME_POFF)
end
end
Prosze Was o pomoc. Rep++ za pomoc.
Last edited: