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

Action Working Demon Oak Quest

[21/06/2012 18:46:46] [!] -> Checking demon oak lib...
[21/06/2012 18:46:47] [!] --> [Warning - Lib::DemonOak] Table: summons, Id: 4, Monster Hand Of Cursed Fate does not exists.
[21/06/2012 18:46:47] [!] --> [Warning - Lib::DemonOak] Table: summons, Id: 5, Monster Bonebeast does not exists.
[21/06/2012 18:46:47] [!] --> [Warning - Lib::DemonOak] Table: summons, Id: 3, Monster Bonebeast does not exists.
[21/06/2012 18:46:47] [!] --> [Warning - Lib::DemonOak] Table: summons, Id: 6, Monster Bonebeast does not exists.
[21/06/2012 18:46:47] [!] --> [Warning - Lib::DemonOak] Table: summons, Id: 11, Monster Hand Of Cursed Fate does not exists.


Can someone help me?
 
actually i have those monsters on my folder, Im using TFS 0.3.6

<monster name="BoneBeast" file="skeletons/bonebeast.xml"/>
<monster name="Hand of Cursed Fate" file="demons/hand of cursed fate.xml"/>
 
i have all of them, any idea?

The problem is that the names in script aren't the same as you monster.xml file

In Script...........................................In your monster.xml file
Hand Of Cursed Fate...........................Hand of Cursed Fate
Bonebeast.........................................BoneBeast

Anyways, i'll change the names to lower case in the script and also scripts will checks if monsters exists, no matter if in monster.xml file is in upper/lower case.

- - - Updated - - -

Updated to V0.7.0 Rev: 1.

A shorter version of the script. This version doesn't check lib for errors.
Lua:
--PLEASE SPECIFY HERE WHAT DISTRO VERSION YOU ARE USING. IF YOU ARE USING (0.40/0.4.0)DEV SPECIFY IT AS 040
--IF YOU ARE USING 0.3.7/0.3.7PL1/0.3.6/0.3.5.... OR ANY OTHER VERSION OF 0.3, SPECIFY IT AS 037/036/035, ETC...
--THE IDEA IS TO SPECIFY IT WITHOUT ANY STRING CHARACTER, JUST NUMBERS
--MUST SPECIFY THIS PROPERLY TO MAKE SCRIPT WORKS CORRECTLY
DISTRO_VERSION = 040
--END

ITEM_DEADTREE = 2709
 
HALLOWEDAXE_PRICE = 1000
 
ERROR_NOERROR = 0
ERROR_TREEPOSITION = 1
ERROR_NOTENOUGHLEVEL = 2
ERROR_ALREADYDONE = 3
ERROR_ALREADYCUT = 4
ERROR_PLAYERINAREA = 5
ERROR_MISSINGINFO = 6
 
TYPE_PLAYER = 1
TYPE_MONSTER = 2
TYPE_NPC = 3
TYPE_ALL = 4
 
GET_COUNT = 1
GET_UID = 2
 
STORAGE_LIB = 11257
STORAGE_OAKTHINK = 11258
 
OAKTHINK_TIME = 10000
OAKTHINK_CHANCE = 30
 
oneInArea = true
killAllBeforeCut = true
oakThink = true
 
level = 120
waves = 11
positions =
{
	kick = {x = 110, y = 75, z = 7},
	summon =
	{
		{x = 104, y = 83, z = 7},
		{x = 101, y = 82, z = 7},
		{x = 105, y = 81, z = 7},
		{x = 102, y = 78, z = 7},
		{x = 103, y = 80, z = 7},
		{x = 102, y = 82, z = 7},
		{x = 103, y = 79, z = 7},
		{x = 100, y = 78, z = 7}
	},
	rewardRoom = {x = 586, y = 630, z = 8},
	demonOak = {x = 105, y = 82, z = 7}
}
 
summons =
{
	[1] = {"demon", "grim reaper", "elder beholder", "demon skeleton"},
	[2] = {"dark torturer", "banshee", "betrayed wraith", "blightwalker"},
	[3] = {"bonebeast", "braindeath", "diabolic imp", "giant spider"},
	[4] = {"hand of cursed fate", "lich", "undead dragon", "vampire"},
	[5] = {"braindeath", "demon", "bonebeast", "diabolic imp"},
	[6] = {"demon skeleton", "banshee", "elder beholder", "bonebeast"},
	[7] = {"dark torturer", "undead dragon", "demon", "demon"},
	[8] = {"elder beholder", "betrayed wraith", "demon skeleton", "giant spider"},
	[9] = {"demon", "banshee", "blightwalker", "demon skeleton"},
	[10] = {"grim reaper", "demon", "diabolic imp", "braindeath"},
	[11] = {"banshee", "grim reaper", "hand of cursed fate", "demon"}
}
 
questAreaPosition =
{
	{x = 94, y = 75, z = 7, stackpos = 255},
	{x = 112, y = 86, z = 7, stackpos = 255}
}
 
demonOak = {8288, 8289, 8290, 8291}
 
storages =
{
	done = 35712,
	treeCut = 38551
}
 
blockingTree =
{
	[ITEM_DEADTREE] = {32193, 3614}
}
 
floorDamage =
{
	min = 270,
	max = 310,
	type = COMBAT_EARTHDAMAGE,
	effect = CONST_ME_BIGPLANTS
}
 
rewards =
{
	[12901] = {done = 12900, reward = 2495, count = 1},
	[12902] = {done = 12900, reward = 8905, count = 1},
	[12903] = {done = 12900, reward = 8918, count = 1},
	[12904] = {done = 12900, reward = 8851, count = 1}
}
 
sounds =
{
	[1] = --Messages shown when you wlak on special tiles
	{
		"Release me and you will be rewarded greatefully!",
		"What is this? Demon Legs lying here? Someone might have lost them!",
		"I'm trapped, come here and free me fast!!",
		"I can bring your beloved back from the dead, just release me!",
		"What a nice shiny golden armor. Come to me and you can have it!",
		"Find a way in here and release me! Pleeeease hurry!",
		"You can have my demon set, if you help me get out of here!"
	},
	[2] = --Messages shown when you use axe on Demon Oak
	{
		"MY ROOTS ARE SHARP AS A SCYTHE! FEEL IT?!?",
		"CURSE YOU!",
		"RISE, MINIONS, RISE FROM THE DEAD!!!!",
		"AHHHH! YOUR BLOOD MAKES ME STRONG!",
		"GET THE BONES, HELLHOUND! GET THEM!!",
		"GET THERE WHERE I CAN REACH YOU!!!",
		"ETERNAL PAIN AWAITS YOU! NICE REWARD, HUH?!?!",
		"YOU ARE GOING TO PAY FOR EACH HIT WITH DECADES OF TORTURE!!",
		"ARGG! TORTURE IT!! KILL IT SLOWLY MY MINION!!"
	}
}

function canEnter(cid, tree)
	if type(questAreaPosition) == "table" and type(questAreaPosition[1]) == "table" and type(questAreaPosition[2]) == "table" and level and type(storages) == "table" then
		if isInRange(tree, questAreaPosition[1], questAreaPosition[2]) then
			return ERROR_TREEPOSITION
		elseif getPlayerLevel(cid) < level then
			return ERROR_NOTENOUGHLEVEL
		elseif getCreatureStorage(cid, storages.done) > 0 then
			return ERROR_ALREADYDONE
		elseif getCreatureStorage(cid, storages.treeCut) > 0 then
			return ERROR_ALREADYCUT
		elseif oneInArea then
			if getCreaturesInQuestArea(TYPE_PLAYER, questAreaPosition[1], questAreaPosition[2], GET_COUNT) > 0 then
				return ERROR_PLAYERINAREA
			end
		end
	else
		return ERROR_MISSINGINFO
	end
	return ERROR_NOERROR
end
 
 
function getError(data, tree)
	if data == ERROR_TREEPOSITION then
		return print("[!] --> [Warning - Action::Demon Oak Script] Dead tree position is inside the quest area positions.\nDead tree position: (x: " .. tree.x .. ", y: " .. tree.y .. ", z: " .. tree.z .. ")\nNorth-West area position (x: " .. questAreaPosition[1].x .. ", y: " .. questAreaPosition[1].y .. ", z: " .. questAreaPosition[1].z .. ")\nSouth-West area position (x: " .. questAreaPosition[2].x .. ", y: " .. questAreaPosition[2].y .. ", z: " .. questAreaPosition[2].z .. ")\nScript will not work correctly, please fix it.") and "Something is wrong, please contact a staff member."
	elseif data == ERROR_NOTENOUGHLEVEL then
		return "You need level " .. level .. " or higher to enter to the quest area."
	elseif data == ERROR_ALREADYDONE then
		return "You already done this quest."
	elseif data == ERROR_ALREADYCUT then
		return "You can not leave the quest area by here."
	elseif data == ERROR_PLAYERINAREA then
		return "Wait until the player inside the quest area finishes the quest."
	elseif data == ERROR_MISSINGINFO then
		return "Sorry, not possible."
	end
	return ""
end
 
function getCreaturesInQuestArea(type, fromPos, toPos, get, countSummon)
 
	local types = 
	{
		[TYPE_PLAYER] = isPlayer,
		[TYPE_MONSTER] = isMonster,
		[TYPE_NPC] = isNpc,
		[TYPE_ALL] = isCreature
	}
 
	local tmp = {}
	local t = types[type]
	if not t then
		return print("[!] --> [Warning - Function::getCreaturesInQuestArea] Unknow type " .. (type or "(nil value)"))
	end
 
	local thing
	local pos
	for x = fromPos.x, toPos.x do
		for y = fromPos.y, toPos.y do
			for z = fromPos.z, toPos.z do
				pos = {x = x, y = y, z = z}
				thing = getTopCreature(pos)
				if t(thing.uid) then
					table.insert(tmp, thing.uid)
					if not countSummon and isSummon(thing.uid) then
						for i = 1, #tmp do
							if tmp[i] == thing.uid then
								table.remove(tmp, i)
								break
							end
						end
					end
				end
			end
		end
	end
	return (get == GET_COUNT and #tmp or get == GET_UID and tmp or print("[Warning - Function::getCreaturesInQuestArea] Unknow type to get " .. (get or "(nil value)")))
end

function monsterExists(name)
 
	local file = "data/monster/monsters.xml"
	local openFile = io.open(file, "r")
	local m_name, getName, getFile, m_file = 0, 0, 0, 0
	local monsterExists, fileExists = false, false
	if openFile ~= nil then
		for line in io.lines(file) do
			if line:find('name=".*".*') and line:find('file=".*".*') then
				getName = string.match(line, 'name=".*".*')
				getFile = string.match(line, 'file=".*".*')
				if getName and getFile then
					m_name = string.sub(getName, string.find(getName, '="') + 2, (string.find(getName, '" ') or string.find(getName, '"f') or 1) - 1)
					m_file = string.sub(getFile, string.find(getFile, '="') + 2, (string.find(getFile, '"/') or string.find(getFile, '" ') or 1) - 1)
					if m_name:lower() == name:lower() then
						monsterExists = true
						mfile = io.open("data/monster/" .. m_file, "r")
						if mfile ~= nil then
							fileExists = true
							mfile:close()
						end
					end
				end
			end
		end
		openFile:close()
	end
	return monsterExists and fileExists or false
end
 
function isSummon(cid)
	if DISTRO_VERSION < 040 then
		return getCreatureMaster(cid) ~= cid or false
	else
		return getCreatureMaster(cid) ~= nil or false
	end
end
 
function isLastCut(cid)
	local k, s = 0, 0
	if not demonOak or type(demonOak) ~= "table" then
		return false
	end
	for i = demonOak[1], demonOak[#demonOak] do
		if getCreatureStorage(cid, i) == #summons + 1 then
			k = k + 1
		end
		if getCreatureStorage(cid, i) == #summons then
			s = s + 1
		end
	end
	return (k == 3 and s == 1 and true or false)
end
 
function demonOakThink()
 
	if getGameState() == GAMESTATE_NORMAL then
		if math.random(100) <= OAKTHINK_CHANCE then
			if positions and positions.demonOak and type(positions.demonOak) == "table" and questAreaPosition and questAreaPosition[1] and type(questAreaPosition[1]) == "table" and questAreaPosition[2] and type(questAreaPosition[2]) == "table" then
				local rangeX, rangeY = getDistanceBetween(positions.demonOak, questAreaPosition[1]) + 3, getDistanceBetween(positions.demonOak, questAreaPosition[2]) + 3
				local list = getSpectators(positions.demonOak, rangeX, rangeY)
				if list and #list > 0 then
					for _, uid in ipairs(list) do
						if isPlayer(uid) and not isInArea(getCreaturePosition(uid), questAreaPosition[1], questAreaPosition[2]) and getCreaturesInQuestArea(TYPE_PLAYER, questAreaPosition[1], questAreaPosition[2], GET_COUNT) == 0 then
							doCreatureSay(uid, sounds[1][math.random(#sounds[1])], TALKTYPE_MONSTER_YELL, false, uid, positions.demonOak)
						end
					end
				end
			end
		end
	end
 
	addEvent(demonOakThink, OAKTHINK_TIME)
end
 
if getStorage(STORAGE_OAKTHINK) < 1 and oakThink then
	demonOakThink()
	doSetStorage(STORAGE_OAKTHINK, 1)
end
 
The problem is that the names in script aren't the same as you monster.xml file

In Script...........................................In your monster.xml file
Hand Of Cursed Fate...........................Hand of Cursed Fate
Bonebeast.........................................BoneBeast

Anyways, i'll change the names to lower case in the script and also scripts will checks if monsters exists, no matter if in monster.xml file is in upper/lower case.

- - - Updated - - -

Updated to V0.7.0 Rev: 1.

A shorter version of the script. This version doesn't check lib for errors.
Lua:
--PLEASE SPECIFY HERE WHAT DISTRO VERSION YOU ARE USING. IF YOU ARE USING (0.40/0.4.0)DEV SPECIFY IT AS 040
--IF YOU ARE USING 0.3.7/0.3.7PL1/0.3.6/0.3.5.... OR ANY OTHER VERSION OF 0.3, SPECIFY IT AS 037/036/035, ETC...
--THE IDEA IS TO SPECIFY IT WITHOUT ANY STRING CHARACTER, JUST NUMBERS
--MUST SPECIFY THIS PROPERLY TO MAKE SCRIPT WORKS CORRECTLY
DISTRO_VERSION = 040
--END

ITEM_DEADTREE = 2709
 
HALLOWEDAXE_PRICE = 1000
 
ERROR_NOERROR = 0
ERROR_TREEPOSITION = 1
ERROR_NOTENOUGHLEVEL = 2
ERROR_ALREADYDONE = 3
ERROR_ALREADYCUT = 4
ERROR_PLAYERINAREA = 5
ERROR_MISSINGINFO = 6
 
TYPE_PLAYER = 1
TYPE_MONSTER = 2
TYPE_NPC = 3
TYPE_ALL = 4
 
GET_COUNT = 1
GET_UID = 2
 
STORAGE_LIB = 11257
STORAGE_OAKTHINK = 11258
 
OAKTHINK_TIME = 10000
OAKTHINK_CHANCE = 30
 
oneInArea = true
killAllBeforeCut = true
oakThink = true
 
level = 120
waves = 11
positions =
{
	kick = {x = 110, y = 75, z = 7},
	summon =
	{
		{x = 104, y = 83, z = 7},
		{x = 101, y = 82, z = 7},
		{x = 105, y = 81, z = 7},
		{x = 102, y = 78, z = 7},
		{x = 103, y = 80, z = 7},
		{x = 102, y = 82, z = 7},
		{x = 103, y = 79, z = 7},
		{x = 100, y = 78, z = 7}
	},
	rewardRoom = {x = 586, y = 630, z = 8},
	demonOak = {x = 105, y = 82, z = 7}
}
 
summons =
{
	[1] = {"demon", "grim reaper", "elder beholder", "demon skeleton"},
	[2] = {"dark torturer", "banshee", "betrayed wraith", "blightwalker"},
	[3] = {"bonebeast", "braindeath", "diabolic imp", "giant spider"},
	[4] = {"hand of cursed fate", "lich", "undead dragon", "vampire"},
	[5] = {"braindeath", "demon", "bonebeast", "diabolic imp"},
	[6] = {"demon skeleton", "banshee", "elder beholder", "bonebeast"},
	[7] = {"dark torturer", "undead dragon", "demon", "demon"},
	[8] = {"elder beholder", "betrayed wraith", "demon skeleton", "giant spider"},
	[9] = {"demon", "banshee", "blightwalker", "demon skeleton"},
	[10] = {"grim reaper", "demon", "diabolic imp", "braindeath"},
	[11] = {"banshee", "grim reaper", "hand of cursed fate", "demon"}
}
 
questAreaPosition =
{
	{x = 94, y = 75, z = 7, stackpos = 255},
	{x = 112, y = 86, z = 7, stackpos = 255}
}
 
demonOak = {8288, 8289, 8290, 8291}
 
storages =
{
	done = 35712,
	treeCut = 38551
}
 
blockingTree =
{
	[ITEM_DEADTREE] = {32193, 3614}
}
 
floorDamage =
{
	min = 270,
	max = 310,
	type = COMBAT_EARTHDAMAGE,
	effect = CONST_ME_BIGPLANTS
}
 
rewards =
{
	[12901] = {done = 12900, reward = 2495, count = 1},
	[12902] = {done = 12900, reward = 8905, count = 1},
	[12903] = {done = 12900, reward = 8918, count = 1},
	[12904] = {done = 12900, reward = 8851, count = 1}
}
 
sounds =
{
	[1] = --Messages shown when you wlak on special tiles
	{
		"Release me and you will be rewarded greatefully!",
		"What is this? Demon Legs lying here? Someone might have lost them!",
		"I'm trapped, come here and free me fast!!",
		"I can bring your beloved back from the dead, just release me!",
		"What a nice shiny golden armor. Come to me and you can have it!",
		"Find a way in here and release me! Pleeeease hurry!",
		"You can have my demon set, if you help me get out of here!"
	},
	[2] = --Messages shown when you use axe on Demon Oak
	{
		"MY ROOTS ARE SHARP AS A SCYTHE! FEEL IT?!?",
		"CURSE YOU!",
		"RISE, MINIONS, RISE FROM THE DEAD!!!!",
		"AHHHH! YOUR BLOOD MAKES ME STRONG!",
		"GET THE BONES, HELLHOUND! GET THEM!!",
		"GET THERE WHERE I CAN REACH YOU!!!",
		"ETERNAL PAIN AWAITS YOU! NICE REWARD, HUH?!?!",
		"YOU ARE GOING TO PAY FOR EACH HIT WITH DECADES OF TORTURE!!",
		"ARGG! TORTURE IT!! KILL IT SLOWLY MY MINION!!"
	}
}

function canEnter(cid, tree)
	if type(questAreaPosition) == "table" and type(questAreaPosition[1]) == "table" and type(questAreaPosition[2]) == "table" and level and type(storages) == "table" then
		if isInRange(tree, questAreaPosition[1], questAreaPosition[2]) then
			return ERROR_TREEPOSITION
		elseif getPlayerLevel(cid) < level then
			return ERROR_NOTENOUGHLEVEL
		elseif getCreatureStorage(cid, storages.done) > 0 then
			return ERROR_ALREADYDONE
		elseif getCreatureStorage(cid, storages.treeCut) > 0 then
			return ERROR_ALREADYCUT
		elseif oneInArea then
			if getCreaturesInQuestArea(TYPE_PLAYER, questAreaPosition[1], questAreaPosition[2], GET_COUNT) > 0 then
				return ERROR_PLAYERINAREA
			end
		end
	else
		return ERROR_MISSINGINFO
	end
	return ERROR_NOERROR
end
 
 
function getError(data, tree)
	if data == ERROR_TREEPOSITION then
		return print("[!] --> [Warning - Action::Demon Oak Script] Dead tree position is inside the quest area positions.\nDead tree position: (x: " .. tree.x .. ", y: " .. tree.y .. ", z: " .. tree.z .. ")\nNorth-West area position (x: " .. questAreaPosition[1].x .. ", y: " .. questAreaPosition[1].y .. ", z: " .. questAreaPosition[1].z .. ")\nSouth-West area position (x: " .. questAreaPosition[2].x .. ", y: " .. questAreaPosition[2].y .. ", z: " .. questAreaPosition[2].z .. ")\nScript will not work correctly, please fix it.") and "Something is wrong, please contact a staff member."
	elseif data == ERROR_NOTENOUGHLEVEL then
		return "You need level " .. level .. " or higher to enter to the quest area."
	elseif data == ERROR_ALREADYDONE then
		return "You already done this quest."
	elseif data == ERROR_ALREADYCUT then
		return "You can not leave the quest area by here."
	elseif data == ERROR_PLAYERINAREA then
		return "Wait until the player inside the quest area finishes the quest."
	elseif data == ERROR_MISSINGINFO then
		return "Sorry, not possible."
	end
	return ""
end
 
function getCreaturesInQuestArea(type, fromPos, toPos, get, countSummon)
 
	local types = 
	{
		[TYPE_PLAYER] = isPlayer,
		[TYPE_MONSTER] = isMonster,
		[TYPE_NPC] = isNpc,
		[TYPE_ALL] = isCreature
	}
 
	local tmp = {}
	local t = types[type]
	if not t then
		return print("[!] --> [Warning - Function::getCreaturesInQuestArea] Unknow type " .. (type or "(nil value)"))
	end
 
	local thing
	local pos
	for x = fromPos.x, toPos.x do
		for y = fromPos.y, toPos.y do
			for z = fromPos.z, toPos.z do
				pos = {x = x, y = y, z = z}
				thing = getTopCreature(pos)
				if t(thing.uid) then
					table.insert(tmp, thing.uid)
					if not countSummon and isSummon(thing.uid) then
						for i = 1, #tmp do
							if tmp[i] == thing.uid then
								table.remove(tmp, i)
								break
							end
						end
					end
				end
			end
		end
	end
	return (get == GET_COUNT and #tmp or get == GET_UID and tmp or print("[Warning - Function::getCreaturesInQuestArea] Unknow type to get " .. (get or "(nil value)")))
end

function monsterExists(name)
 
	local file = "data/monster/monsters.xml"
	local openFile = io.open(file, "r")
	local m_name, getName, getFile, m_file = 0, 0, 0, 0
	local monsterExists, fileExists = false, false
	if openFile ~= nil then
		for line in io.lines(file) do
			if line:find('name=".*".*') and line:find('file=".*".*') then
				getName = string.match(line, 'name=".*".*')
				getFile = string.match(line, 'file=".*".*')
				if getName and getFile then
					m_name = string.sub(getName, string.find(getName, '="') + 2, (string.find(getName, '" ') or string.find(getName, '"f') or 1) - 1)
					m_file = string.sub(getFile, string.find(getFile, '="') + 2, (string.find(getFile, '"/') or string.find(getFile, '" ') or 1) - 1)
					if m_name:lower() == name:lower() then
						monsterExists = true
						mfile = io.open("data/monster/" .. m_file, "r")
						if mfile ~= nil then
							fileExists = true
							mfile:close()
						end
					end
				end
			end
		end
		openFile:close()
	end
	return monsterExists and fileExists or false
end
 
function isSummon(cid)
	if DISTRO_VERSION < 040 then
		return getCreatureMaster(cid) ~= cid or false
	else
		return getCreatureMaster(cid) ~= nil or false
	end
end
 
function isLastCut(cid)
	local k, s = 0, 0
	if not demonOak or type(demonOak) ~= "table" then
		return false
	end
	for i = demonOak[1], demonOak[#demonOak] do
		if getCreatureStorage(cid, i) == #summons + 1 then
			k = k + 1
		end
		if getCreatureStorage(cid, i) == #summons then
			s = s + 1
		end
	end
	return (k == 3 and s == 1 and true or false)
end
 
function demonOakThink()
 
	if getGameState() == GAMESTATE_NORMAL then
		if math.random(100) <= OAKTHINK_CHANCE then
			if positions and positions.demonOak and type(positions.demonOak) == "table" and questAreaPosition and questAreaPosition[1] and type(questAreaPosition[1]) == "table" and questAreaPosition[2] and type(questAreaPosition[2]) == "table" then
				local rangeX, rangeY = getDistanceBetween(positions.demonOak, questAreaPosition[1]) + 3, getDistanceBetween(positions.demonOak, questAreaPosition[2]) + 3
				local list = getSpectators(positions.demonOak, rangeX, rangeY)
				if list and #list > 0 then
					for _, uid in ipairs(list) do
						if isPlayer(uid) and not isInArea(getCreaturePosition(uid), questAreaPosition[1], questAreaPosition[2]) and getCreaturesInQuestArea(TYPE_PLAYER, questAreaPosition[1], questAreaPosition[2], GET_COUNT) == 0 then
							doCreatureSay(uid, sounds[1][math.random(#sounds[1])], TALKTYPE_MONSTER_YELL, false, uid, positions.demonOak)
						end
					end
				end
			end
		end
	end
 
	addEvent(demonOakThink, OAKTHINK_TIME)
end
 
if getStorage(STORAGE_OAKTHINK) < 1 and oakThink then
	demonOakThink()
	doSetStorage(STORAGE_OAKTHINK, 1)
end

Thanks Darkhaos it worked!!!!!! REP+++ :)
 
[07/07/2012 16:07:41] [Error - Action Interface]
[07/07/2012 16:07:41] data/actions/scripts/DemonOak/demonOak.lua:eek:nUse
[07/07/2012 16:07:41] Description:
[07/07/2012 16:07:41] data/lib/032-position.lua:2: attempt to index global 'position' (a nil value)
[07/07/2012 16:07:41] stack traceback:
[07/07/2012 16:07:41] data/lib/032-position.lua:2: in function 'isInRange'
[07/07/2012 16:07:41] data/lib/102-demonOak.lua:153: in function 'canEnter'
[07/07/2012 16:07:41] data/actions/scripts/DemonOak/demonOak.lua:6: in function <data/actions/scripts/DemonOak/demonOak.lua:1>


HELPME
 
[07/07/2012 16:07:41] [Error - Action Interface]
[07/07/2012 16:07:41] data/actions/scripts/DemonOak/demonOak.lua:eek:nUse
[07/07/2012 16:07:41] Description:
[07/07/2012 16:07:41] data/lib/032-position.lua:2: attempt to index global 'position' (a nil value)
[07/07/2012 16:07:41] stack traceback:
[07/07/2012 16:07:41] data/lib/032-position.lua:2: in function 'isInRange'
[07/07/2012 16:07:41] data/lib/102-demonOak.lua:153: in function 'canEnter'
[07/07/2012 16:07:41] data/actions/scripts/DemonOak/demonOak.lua:6: in function <data/actions/scripts/DemonOak/demonOak.lua:1>


HELPME

Go to data/lib open file 032-position.lua and replacE:
Lua:
function isInRange(pos, fromPosition, toPosition)
	return (position.x >= fromPosition.x and position.y >= fromPosition.y and position.z >= fromPosition.z and position.x <= toPosition.x and position.y <= toPosition.y and position.z <= toPosition.z)
end

with
Lua:
function isInRange(position, fromPosition, toPosition)
	return (position.x >= fromPosition.x and position.y >= fromPosition.y and position.z >= fromPosition.z and position.x <= toPosition.x and position.y <= toPosition.y and position.z <= toPosition.z)
end
 
There is no data/lib folder in the latest tfs, Mystic Spirit. For tibia client 9,54
 
@ up
Did
Getting this error now..
[16/07/2012 00:51:23] Error: [MoveEvent::configureMoveEvent] No valid event name script
[16/07/2012 00:51:23] Warning: [BaseEvents::loadFromXml] Can not configure event
[16/07/2012 00:51:23] Error: [MoveEvent::configureMoveEvent] No valid event name script
[16/07/2012 00:51:23] Warning: [BaseEvents::loadFromXml] Can not configure event
[16/07/2012 00:51:23] Error: [MoveEvent::configureMoveEvent] No valid event name script
[16/07/2012 00:51:23] Warning: [BaseEvents::loadFromXml] Can not configure event
[16/07/2012 00:51:23] [Error - CreatureEvent::configureEvent] No valid type for creature event.attack
[16/07/2012 00:51:23] Warning: [BaseEvents::loadFromXml] Can not configure event
 
help me please,


[25/07/2012 19:27:47] [!] --> [Warning - Action::Demon Oak Script] Dead tree position is inside the quest area positions.
[25/07/2012 19:27:47] Dead tree position: (x: 1074, y: 1155, z: 7)
[25/07/2012 19:27:48] North-West area position (x: 1074, y: 1154, z: 7)
[25/07/2012 19:27:48] South-West area position (x: 1074, y: 1156, z: 7)
[25/07/2012 19:27:48] Script will not work correctly, please fix it.


Dead tree position: (x: 1074, y: 1155, z: 7) <-- this right
NOT SO SURE THAT THIS CUT THE TREE
 
help me please,


[25/07/2012 19:27:47] [!] --> [Warning - Action::Demon Oak Script] Dead tree position is inside the quest area positions.
[25/07/2012 19:27:47] Dead tree position: (x: 1074, y: 1155, z: 7)
[25/07/2012 19:27:48] North-West area position (x: 1074, y: 1154, z: 7)
[25/07/2012 19:27:48] South-West area position (x: 1074, y: 1156, z: 7)
[25/07/2012 19:27:48] Script will not work correctly, please fix it.


Dead tree position: (x: 1074, y: 1155, z: 7) <-- this right
NOT SO SURE THAT THIS CUT THE TREE

same error...
 
all work very well just when the player die show me this error in console

Code:
[26/11/2012 21:10:17] [Error - CreatureScript Interface] 
[26/11/2012 21:10:17] data/creaturescripts/scripts/demonOakDeath.lua:onDeath
[26/11/2012 21:10:17] Description: 
[26/11/2012 21:10:17] data/creaturescripts/scripts/demonOakDeath.lua:4: attempt to index global 'questAreaPosition' (a nil value)
[26/11/2012 21:10:17] stack traceback:
[26/11/2012 21:10:18] 	data/creaturescripts/scripts/demonOakDeath.lua:4: in function <data/creaturescripts/scripts/demonOakDeath.lua:1>

is because the tree? must i change the position?
 
Back
Top