Djowz
Djowz's Style
- Joined
- Dec 29, 2011
- Messages
- 47
- Reaction score
- 1
good people, I have a script error in the oil of POI
and here is the script
Thanks in advance
hugs djowz
[25/1/2012 22:46:49] [Error - Action Interface]
[25/1/2012 22:46:49] data/actions/scripts/PitsOfInferno/Oillever.luanUse
[25/1/2012 22:46:49] Description:
[25/1/2012 22:46:49] attempt to index a nil value
[25/1/2012 22:46:49] stack traceback:
[25/1/2012 22:46:49] [C]: in function 'getThingfromPos'
[25/1/2012 22:46:49] data/actions/scripts/PitsOfInferno/Oillever.lua:18: in function <data/actions/scripts/PitsOfInferno/Oillever.lua:7>
and here is the script
Code:
local bridgepos = {x=32801, y=32336, z=11} -- Position of the bridge tile
local dzwigniaPos = {x=32800, y=32339, z=11}
-- SSij pale sasir ;* Jak chciales umiescic tu vial z olejem to gz Ci nabie ;* Script by Seminari
local leverUID = 8933 -- Action ID of the lever
function onUse(cid, item, frompos, item2, topos)
local bridge = getThingfromPos(bridgepos)
--local function removalA(dzwigniaPos)
--if getThingfromPos(dzwigniaPos, 1946) then
--doSetItemActionId(itemEx.uid, 52282)
--doTransformItem(bridge.uid, 493)
--doTransformItem(item.uid, 1945)
-- return TRUE
-- end
local tile5 = getThingfromPos(tilepos5)
local tilepos5 = {x=32801, y=32336, z=11, stackpos=0}
-- and bridge.itemid == 493
if item.actionid == leverAID and item.itemid == 1945 then
doCreateItem(5770,1,tilepos5)
doSendMagicEffect(dzwigniaPos, CONST_ME_MAGIC_RED)
doTransformItem(item.uid, 1946)
--addEvent(removalA, 5 * 1000, dzwigniaPos)
elseif item.actionid == leverAID and item.itemid == 1946 and bridge.itemid == 5770 then
doPlayerSendCancel(cid, "Sorry, not possible.")
else
doCreatureSay(cid, "The lever is creaking and rusty.", TALKTYPE_ORANGE_1)
end
return true
end
PHP:
<action uniqueid="8933" event="script" value="PitsOfInferno/Oillever.lua"/>
Thanks in advance
hugs djowz