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

Lua The elemental spheres quest

Smygarn

New Member
Joined
Feb 24, 2009
Messages
31
Reaction score
1
I'm getting this error and dont know how to fix this, can someone help me?

ImageShack� - Online Photo and Video Hosting

Lua:
 local t = {
	[8568] = {
		corpse = 8967,
		charged = 1495
		boss = 'Energy Overlord',
		effect = CONST_ME_BIGCLOUDS,
		summonPos = {x=33095, y=32194, z=13},
		pos = {
			{x=33094, y=32189, z=13},
			{x=33097, y=32189, z=13},
			{x=33099, y=32191, z=13},
			{x=33099, y=32194, z=13},
			{x=33097, y=32196, z=13},
			{x=33094, y=32196, z=13},
			{x=33092, y=32194, z=13},
			{x=33092, y=32191, z=13}
		}
	},
	[8569] = {
		corpse = 8969,
		charged = 8575,
		boss = 'Fire Overlord',
		effect = CONST_ME_FIREAREA,
		summonPos = {x=33199, y=32103, z=13},
		pos = {
			{x=33198, y=32102, z=13},
			{x=33201, y=32102, z=13},
			{x=33203, y=32104, z=13},
			{x=33203, y=32107, z=13},
			{x=33201, y=32109, z=13},
			{x=33198, y=32109, z=13},
			{x=33196, y=32107, z=13},
			{x=33196, y=32104, z=13}
		}
	},
	[8570] = {
		corpse = 8968,
		charged = 8574,
		boss = 'Ice Overlord',
		effect = CONST_ME_ICETORNADO,
		summonEffect = CONST_ME_ICEAREA,
		summonPos = {x=33286, y=32102, z=13},
		pos = {
			{x=33285, y=32097, z=13},
			{x=33288, y=32097, z=13},
			{x=33290, y=32099, z=13},
			{x=33290, y=32102, z=13},
			{x=33288, y=32104, z=13},
			{x=33285, y=32104, z=13},
			{x=33283, y=32102, z=13},
			{x=33283, y=32099, z=13}
		}
	},
	[8578] = {
		corpse = 8934,
		charged = 8576,
		boss = 'Earth Overlord',
		effect = CONST_ME_BIGPLANTS,
		summonPos = {x=33347, y=32208, z=13},
		pos = {
			{x=33346, y=32203, z=13},
			{x=33349, y=32203, z=13},
			{x=33351, y=32205, z=13},
			{x=33351, y=32208, z=13},
			{x=33349, y=32210, z=13},
			{x=33346, y=32210, z=13},
			{x=33344, y=32208, z=13},
			{x=33344, y=32205, z=13}
		}
	}
}
function onAddItem(moveitem, tileitem, position)
	local v = t[tileitem.itemid]
	if v and v.corpse == moveitem.itemid and getGlobalStorageValue(tileitem.itemid) < 1 then
		for i = 1, #v.pos do
			if getTileItemById(v.pos[i], v.charged).uid < 1 then
				return
			end
		end
		doRemoveItem(moveitem.uid)
		doSendMagicEffect(position, v.effect)
		doSummonCreature(v.boss, v.summonPos)
		doSendMagicEffect(v.summonPos, v.summonEffect or v.effect)
		setGlobalStorageValue(tileitem.itemid, 1)
	end
end
 
Lua:
 local t = {
	[8568] = {
		corpse = 8967,
		charged = 1495,
		boss = 'Energy Overlord',
		effect = CONST_ME_BIGCLOUDS,
		summonPos = {x=33095, y=32194, z=13},
		pos = {
			{x=33094, y=32189, z=13},
			{x=33097, y=32189, z=13},
			{x=33099, y=32191, z=13},
			{x=33099, y=32194, z=13},
			{x=33097, y=32196, z=13},
			{x=33094, y=32196, z=13},
			{x=33092, y=32194, z=13},
			{x=33092, y=32191, z=13}
		}
	},
	[8569] = {
		corpse = 8969,
		charged = 8575,
		boss = 'Fire Overlord',
		effect = CONST_ME_FIREAREA,
		summonPos = {x=33199, y=32103, z=13},
		pos = {
			{x=33198, y=32102, z=13},
			{x=33201, y=32102, z=13},
			{x=33203, y=32104, z=13},
			{x=33203, y=32107, z=13},
			{x=33201, y=32109, z=13},
			{x=33198, y=32109, z=13},
			{x=33196, y=32107, z=13},
			{x=33196, y=32104, z=13}
		}
	},
	[8570] = {
		corpse = 8968,
		charged = 8574,
		boss = 'Ice Overlord',
		effect = CONST_ME_ICETORNADO,
		summonEffect = CONST_ME_ICEAREA,
		summonPos = {x=33286, y=32102, z=13},
		pos = {
			{x=33285, y=32097, z=13},
			{x=33288, y=32097, z=13},
			{x=33290, y=32099, z=13},
			{x=33290, y=32102, z=13},
			{x=33288, y=32104, z=13},
			{x=33285, y=32104, z=13},
			{x=33283, y=32102, z=13},
			{x=33283, y=32099, z=13}
		}
	},
	[8578] = {
		corpse = 8934,
		charged = 8576,
		boss = 'Earth Overlord',
		effect = CONST_ME_BIGPLANTS,
		summonPos = {x=33347, y=32208, z=13},
		pos = {
			{x=33346, y=32203, z=13},
			{x=33349, y=32203, z=13},
			{x=33351, y=32205, z=13},
			{x=33351, y=32208, z=13},
			{x=33349, y=32210, z=13},
			{x=33346, y=32210, z=13},
			{x=33344, y=32208, z=13},
			{x=33344, y=32205, z=13}
		}
	}
}
function onAddItem(moveitem, tileitem, position)
	local v = t[tileitem.itemid]
	if v and v.corpse == moveitem.itemid and getGlobalStorageValue(tileitem.itemid) < 1 then
		for i = 1, #v.pos do
			if getTileItemById(v.pos[i], v.charged).uid < 1 then
				return
			end
		end
		doRemoveItem(moveitem.uid)
		doSendMagicEffect(position, v.effect)
		doSummonCreature(v.boss, v.summonPos)
		doSendMagicEffect(v.summonPos, v.summonEffect or v.effect)
		setGlobalStorageValue(tileitem.itemid, 1)
	end
end
 
Lua:
local t = {
	[1] = {x=33183, y=32197, z=13},
	[2] = {x=33331, y=32076, z=13},
	[3] = {x=33265, y=32202, z=13},
	[4] = {x=33183, y=32197, z=13}
}
function onUse(cid, item, fromPosition, itemEx, toPosition)
	if isInRange(toPosition, {x=33238, y=31806, z=12}, {x=33297, y=31865, z=12}) == FALSE then
		if isInArray({7911, 7912}, item.itemid) == TRUE then
			if isInArray({33268, 33269}, toPosition.x) == TRUE and toPosition.y == 31830 and toPosition.z == 10 and getPlayerStorageValue(cid, 65102) >= 20 then
				local v = getPlayerVocation(cid)
				if v > 4 then
					v = v - 4
				end
				setPlayerStorageValue(cid, 65102, getPlayerStorageValue(cid, 65102) - 20)
				doSendMagicEffect(getThingPos(cid), CONST_ME_TELEPORT)
				doTeleportThing(cid, t[v])
				doSendMagicEffect(t[v], CONST_ME_TELEPORT)
			end
			toPosition.x = toPosition.x + (item.itemid == 7911 and 1 or -1)
			local get = getTileItemById(toPosition, item.itemid == 7911 and 7912 or 7911)
			doTransformItem(get.uid, get.itemid + 4)
			doTransformItem(item.uid, item.itemid + 4)
		else
			toPosition.x = toPosition.x + (item.itemid == 7915 and 1 or -1)
			local get = getTileItemById(toPosition, item.itemid == 7915 and 7916 or 7915)
			doTransformItem(get.uid, get.itemid - 4)
			doTransformItem(item.uid, item.itemid - 4)
		end
		return TRUE
	end
end

that was what i thought aswell but i have no idea what to change here, something with a lever id... i don't really know Sir.
Lever ID is ItemID: [1946], UniqueID: [23071].
 
if you know how the quest works, you should be able to immediately recognize what is each script for

the first script is for teleporting players to room, use uid 49105 on lever
it is also for final 4 levers (uids 49101 - 49104) - vocations ids are last digit in uid (1,2,3,4)
 
I have never done the quest myself but that's what i need Cykotitan, they are actually being teleported in the room now but with an error ofc elemental~.jpg

Lua:
local t = {
	[8298] = {useOn = 8572, transform = 8576, effect = CONST_ME_BIGPLANTS},
	[8299] = {useOn = 8573, transform = 8575},
	[8302] = {useOn = 8571, transform = 8574, effect = CONST_ME_ICEATTACK},
	[8303] = {useOn = 8567, create = 1495}
}
local machine = {
	[8304] = {49106, 49107},
	[8305] = {49108, 49109},
	[8300] = {49110, 49111},
	[8306] = {49112, 49113}
}
 
function onUse(cid, item, fromPosition, itemEx, toPosition)
	local v = t[item.itemid]
	if v and v.useOn == itemEx.itemid then
		if v.transform then
			doTransformItem(itemEx.uid, v.transform)
			doDecayItem(itemEx.uid)
		elseif v.create then
			doDecayItem(doCreateItem(v.create, 1, toPosition))
		end
		if v.effect then
			doSendMagicEffect(toPosition, v.effect)
		end
		doChangeTypeItem(item.uid, item.type - 1)
		return TRUE
	end
 
	v = machine[item.itemid]
	if v and isInArray(v, itemEx.uid) == TRUE and itemEx.itemid < 7915 then
		doSendMagicEffect(toPosition, CONST_ME_ENERGYHIT)
		doRemoveItem(item.uid)
		for _, x in ipairs(v) do
			doTransformItem(x, getThing(x).itemid + 983)
		end
		return TRUE
	end
end
 
What kind of quest is it, what is it supposed to do exactly, I might can make a script for you. The last script you have posted doesn't work because there is no link to the getThing on the end of the script, so the server doesn't know what it is.
 
Last edited:
why do you keep posting the wrong script? that isn't the script you're getting the error with
also read last paragraph of my previous post (uids on 4 levers)
 
why do you keep posting the wrong script? that isn't the script you're getting the error with
also read last paragraph of my previous post (uids on 4 levers)


I have already added 4 UIDS on the 4 levers bit this is coming when you are geting teleported from edron into the first room, and it clearly says levers.lua?
 
Script found here third post down..

Well I'm having some trouble figuring out part of this script... Everything seems fine up to storage value 65102. The machine sets my players storage value +1 everytime I use an enchanted gem on the machine, but when I turn it on it doesn't teleport me anywhere... Can anyone help me out?

I'm assuming there is an action ID or something I've set improperly in this file... not sure why it is not working.

Lua:
local t = {
    [1] = {x=33183, y=32197, z=13},
    [2] = {x=33331, y=32076, z=13},
    [3] = {x=33265, y=32202, z=13},
    [4] = {x=33183, y=32197, z=13}
}
function onUse(cid, item, fromPosition, itemEx, toPosition)
    if isInRange(toPosition, {x=33233, y=31801, z=12}, {x=33297, y=31866, z=12}) == FALSE then
        if isInArray({7911, 7912}, item.itemid) == TRUE then
            if isInArray({33268, 33269}, toPosition.x) == TRUE and toPosition.y == 31831 and toPosition.z == 10 and getPlayerStorageValue(cid, 65102) >= 20 then
                local v = getPlayerVocation(cid)
                if v > 4 then
                    v = v - 4
                end
                setPlayerStorageValue(cid, 65102, getPlayerStorageValue(cid, 65102) - 20)
                doSendMagicEffect(getThingPos(cid), CONST_ME_TELEPORT)
                doTeleportThing(cid, t[v])
                doSendMagicEffect(t[v], CONST_ME_TELEPORT)
            end
            toPosition.x = toPosition.x + (item.itemid == 7911 and 1 or -1)
            local get = getTileItemById(toPosition, item.itemid == 7911 and 7912 or 7911)
            doTransformItem(get.uid, get.itemid + 4)
            doTransformItem(item.uid, item.itemid + 4)
        else
            toPosition.x = toPosition.x + (item.itemid == 7915 and 1 or -1)
            local get = getTileItemById(toPosition, item.itemid == 7915 and 7916 or 7915)
            doTransformItem(get.uid, get.itemid - 4)
            doTransformItem(item.uid, item.itemid - 4)
        end
        return TRUE
    end
end

Thankyou for your time.
~Justin

- - - Updated - - -

this line of script is not executing..
Lua:
                setPlayerStorageValue(cid, 65102, getPlayerStorageValue(cid, 65102) - 20)
                doSendMagicEffect(getThingPos(cid), CONST_ME_TELEPORT)
                doTeleportThing(cid, t[v])
                doSendMagicEffect(t[v], CONST_ME_TELEPORT)

- - - Updated - - -

Players 65102 storage value is @50.
Machine id is 7911/7912.

But onUse player is not teleported~
 
Back
Top