• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!
  • 2026 staff recruitment is open! Check it out and consider applying!

Lua Scripting not working of Inquisition

Kojiiro

Nobody cares. Do yourself.
Joined
May 10, 2010
Messages
534
Reaction score
9
Location
Brazil
Helo ! the Inquisition Quest on my server is not functioning normally, before was giving debug when entered on teleport and i managed to straighten, but appeared one other problem in creaturescripts, and i not get straighten.
My server is TFS 0.4 ( 9.52 ) Help me PLEASE ! :(
data\creaturescripts\scripts\InquisitionBoss

Code:
config = {
        timeToRemove = 180, -- seconds
		message = "You now have 3 minutes to exit this room through the teleportr. It will bring you to the next room only during this time.",
        teleportId = 1387,
        bosses = { -- Monster Name,  Teleport Position
                ["Ushuriel"] = {  pos={ x=33069, y=31782, z=13, stackpos=2 }, aid=1001 },
				["Zugurosh"] = {  pos={ x=33372, y=31613, z=14, stackpos=2 }, aid=1002},
				["Madareth"] = {  pos={ x=33153, y=31782, z=12, stackpos=2 }, aid=1003},
                ["Annihilon"] = {  pos={ x=33199, y=31686, z=12, stackpos=2 }, aid=1005},
                ["Hellgorak"] = {  pos={ x=33110, y=31682, z=12, stackpos=2 }, aid=1006}
				},
		brothers ={
        ["Golgordan"] = {pos={ x=33038, y=31753, z=15, stackpos=1 },aid=1004, brother = "Latrivan"},
        ["Latrivan"] = {pos={ x=33038, y=31753, z=15, stackpos=1 },aid=1004, brother = "Golgordan"},
        brothersArea ={
                fromPos = {x = 33224, y = 31722, z = 11},
                toPos = {x = 33240, y = 31734, z = 11}	}	}
}
local function change(position)
	doItemSetAttribute(getTileItemById(position, config.teleportId).uid, "aid", 3000)
    return TRUE
end

function onDeath(cid, corpse, deathList)
 
	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)
				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
end
 
function doRemoveTeleport(position)
	if(getTileThingByPos(position).itemid > 0) then
		doRemoveItem(getTileThingByPos(position).uid)
		doSendMagicEffect(position, CONST_ME_POFF)
	end
end
 
Helo ! the Inquisition Quest on my server is not functioning normally, before was giving debug when entered on teleport and i managed to straighten, but appeared one other problem in creaturescripts, and i not get straighten.
My server is TFS 0.4 ( 9.52 ) Help me PLEASE ! :(
data\creaturescripts\scripts\InquisitionBoss


Whatahell is the another problem ?
 
LUA:
local t = {
	message	= "You now have 2 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",
	bosses	= { -- Monster Name,	Teleport To Position,	 	Teleport Position
		["Ushuriel"] = {ttp={x=1173,	y=1333,	z=12},	tp={x=1279,	y=1279,	z=10,	stackpos=1}},
		["Zugurosh"] = {ttp={x=1182,	y=1228,	z=11},	tp={x=1247,	y=1243,	z=10,	stackpos=1}},
		["Madareth"] = {ttp={x=1257,	y=1333,	z=11},	tp={x=1301,	y=1305,	z=10,	stackpos=1}},
		["Golgordan"] = {ttp={x=1142,	y=1304,	z=14},	tp={x=1336,	y=1273,	z=10,	stackpos=1}, bro = "Latrivan"},
		["Latrivan"] = {ttp={x=1142,	y=1304,	z=14},	tp={x=1336,	y=1273,	z=10,	stackpos=1}, bro = "Golgordan"},
		["Annihilon"] = {ttp={x=1303,	y=1237,	z=11},	tp={x=1301,	y=1239,	z=10,	stackpos=1}},
		["Hellgorak"] = {ttp={x=1214,	y=1233,	z=11},	tp={x=1208,	y=1277,	z=10,	stackpos=1}}
	}
}
 
function onKill(cid, target, lastHit)
	local k = t.bosses[getCreatureName(target)]
	if(not isPlayer(target)) and isPlayer(cid) and k and not(getCreatureMaster(target)) then		
			if(k.bro) then
			local bro = getCreatureByName(k.bro)
			if isMonster(bro) and getDistanceBetween(getThingPosition(cid), getThingPosition(bro)) < 12 then return true end
		end
		doCreateTeleport(5023, k.ttp, k.tp)		
		doCreatureSay(cid, t.message, TALKTYPE_ORANGE_1)
			addEvent(function()
			local itek = getTileItemById(k.tp, 5023)
			if itek.uid ~= 0 then
				doRemoveThing(itek.uid, 1)
				doSendMagicEffect(k.tp, CONST_ME_POFF)	
			end
		end, 120*1000, k.tp)
end
	return true
end

You can give me REP now :)
 
Back
Top