• 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!

CreatureEvent [Inquisition] Create Teleport When Boss Die!

Good job, but I have a problem with the stackpos thing i tried 0, 1, 2 and non of them work. :S
 
Yeah, i have fixed for 0.3.5... error is in monsters =oo
EX: zugurosh is Zugurosh

XD
 
[04/08/2009 23:00:24] Lua Script Error: [CreatureScript Interface]
[04/08/2009 23:00:24] data/creaturescripts/scripts/tele.lua:eek:nDeath

[04/08/2009 23:00:24] attempt to index a nil value
[04/08/2009 23:00:24] stack traceback:
[04/08/2009 23:00:24] [C]: in function 'doCreateTeleport'

H4LP PLAX?

EDIT: I fix the problem, thanks anyway, I RLLY NEED IT, Ya rlly.
 
Last edited:
I am having a problem. The script executes fine, but it will do everything except create the teleport. I assume the problem lies within the doCreateTeleport.

I am using the newest CryingDamson 0.3.5pl1
 
Im update script from post number 4 to work with TFS 0.3.5
(Credits to Emma Watson ? :p)
(Now you don't need to add event to monster file, and now it is onKill function!)

Lua:
local config = {
	message = "Go into the teleport in 60 seconds, else it will disappear.",
	timeToRemove = 60, -- seconds
	teleportId = 1387,
	bosses = { -- Monster Name, Teleport To Position, Teleport Position
		["Hellgorak"] = { { x = 44, y = 94, z = 7 }, { x = 228, y = 141, z = 7, stackpos = 1 } },
		["Zugurosh"] = { { x = 206, y = 25, z = 7 }, { x = 195, y = 88, z = 7, stackpos = 1 } },
		["Madareth"] = { { x = 339, y = 526, z = 7 }, { x = 344, y = 531, z = 0, stackpos = 1 } },
		["Morgaroth"] = { { x = 402, y = 425, z = 4 }, { x = 403, y = 425, z = 4, stackpos = 1 } }
	}
}

local function removal(position)
	if getThingfromPos(position).itemid == config.teleportId then
		doRemoveItem(getThingfromPos(position).uid)
	end
	return TRUE
end

function onKill(cid, target, lastHit)
	local position = getCreaturePosition(cid)
	for name, pos in pairs(config.bosses) do
		if name == getCreatureName(target) then
			teleport = doCreateTeleport(config.teleportId, pos[1], pos[2])
			doCreatureSay(cid, config.message, TALKTYPE_ORANGE_1)
			addEvent(removal, config.timeToRemove * 1000, pos[2])
		end
	end
	return TRUE
end
 
Last edited:
Im update script from post number 4 to work with TFS 0.3.5
(Credits to Emma Watson ? :p)
(Now you don't need to add event to monster file, and now it is onKill function!)

Lua:
local config = {
	message = "Go into the teleport in 60 seconds, else it will disappear.",
	timeToRemove = 60, -- seconds
	teleportId = 1387,
	bosses = { -- Monster Name, Teleport To Position, Teleport Position
		["hellgorak"] = { { x = 44, y = 94, z = 7 }, { x = 228, y = 141, z = 7, stackpos = 1 } },
		["zugurosh"] = { { x = 206, y = 25, z = 7 }, { x = 195, y = 88, z = 7, stackpos = 1 } },
		["madareth"] = { { x = 339, y = 526, z = 7 }, { x = 344, y = 531, z = 0, stackpos = 1 } },
		["Morgaroth"] = { { x = 402, y = 425, z = 4 }, { x = 403, y = 425, z = 4, stackpos = 1 } }
	}
}

local function removal(position)
	if getThingfromPos(position).itemid == config.teleportId then
		doRemoveItem(getThingfromPos(position).uid)
	end
	return TRUE
end

function onKill(cid, target, lastHit)
	local position = getCreaturePosition(cid)
	for name, pos in pairs(config.bosses) do
		if name == getCreatureName(target) then
			teleport = doCreateTeleport(config.teleportId, pos[1], pos[2])
			doCreatureSay(cid, config.message, TALKTYPE_ORANGE_1)
			addEvent(removal, config.timeToRemove * 1000, pos[2])
		end
	end
	return TRUE
end

It isn't working ffs.
 
It isn't working ffs.


Im test it on tfs 0.3.5pl1 and work perfectly.
But you need to start monster name with uppercase letter

example:
["hellgorak"] -- wrong
["Hellgorak"] -- good

So try now and rep++ me : D
 
Last edited:
Back
Top