Wezza
lua nOOb
- Joined
- May 31, 2008
- Messages
- 2,278
- Reaction score
- 31
Here's the error:
Here's the script: (Lever_Buy)
Lever (Roll)
picture for more details:
side note/
keep in mind this script works great on 8.50, once I tried it on 8.60 it didnt work, just so you know. and not to get far in thinking
thanks in advance.
Code:
data/actions/scripts/vip/lever_roll.lua:onUse
Description:
data/actions/scripts/vip/lever_roll.lua:7: attempt to call global 'comparePos' (a nil value)
stack traceback:
data/actions/scripts/vip/lever_roll.lua:7: in function <data/actions/scripts/vip/lever_roll.lua:5>
data/actions/scripts/vip/lever_buy.lua:onUse
Description:
data/actions/scripts/vip/lever_buy.lua:25: attempt to call global 'comparePos' (a nil value)
stack traceback:
[data/actions/scripts/vip/lever_buy.lua:25: in function <data/actions/scripts/vip/lever_buy.lua:14>
Here's the script: (Lever_Buy)
Code:
local itemList = {
[2261] = {6000, 15},
[2293] = {2000, 20},
[2268] = {5000, 40},
[2273] = {2000, 100},
[2173] = {40000, 1},
[2304] = {2000, 30},
[2305] = {7000, 5},
[2313] = {2000, 50},
[2265] = {1000, 100}
}
function onUse(cid, item)
if item.itemid == 1945 then
doTransformItem(item.uid, 1946)
else
doTransformItem(item.uid, 1945)
end
local pos = getCreaturePosition(cid)
local itemid = getThingfromPos({x=pos.x + 3, y=pos.y, z=pos.z, stackpos=2}).itemid
if comparePos(getCreaturePosition(cid), {x=836,y=702,z=7}) then
Lever (Roll)
Code:
local topPos = {x=839, y=698, z=7} -- first tile of NORTH
local tiles = 9 -- amount of tiles
function onUse(cid, item)
if comparePos(getCreaturePosition(cid), {x=836,y=702,z=7}) then
local runes = {}
for i = 0, (tiles - 1) do
runes[i + 1] = getThingfromPos({x = topPos.x, y = topPos.y + i, z = topPos.z, stackpos = 2})
end
picture for more details:
side note/
keep in mind this script works great on 8.50, once I tried it on 8.60 it didnt work, just so you know. and not to get far in thinking
thanks in advance.
Last edited: