Tryed a script example, but it was from a XML server, I changed some values and tryed it out, etc GetThingFromPos to GetThingPos, but then I got another message:
Here is the script:
Any ideas?
This was the result when using this script:
All the energy fields shoud be removed, and placed fire fields there instead, and the blue stone shoud be replaced with a red stone
Code:
[04/07/2008 19:25:50] Lua Script Error: [Action Interface]
[04/07/2008 19:25:50] data/actions/scripts/overlord_stonebomb.lua:onUse
[04/07/2008 19:25:50] attempt to index a nil value
[04/07/2008 19:25:50] stack traceback:
[04/07/2008 19:25:50] [C]: in function 'doCreateItem'
[04/07/2008 19:25:50] data/actions/scripts/overlord_stonebomb.lua:23: in function <data/actions/scripts/overlord_stonebomb.lua:1>
Here is the script:
Code:
function onUse(cid, item, frompos, item2, topos)
wall1 = {x=910, y=995, z=9, stackpos=1}
wall1 = {x=911, y=995, z=9, stackpos=1}
wall1 = {x=912, y=995, z=9, stackpos=1}
wall1 = {x=910, y=996, z=9, stackpos=1}
wall1 = {x=910, y=997, z=9, stackpos=1}
wall1 = {x=911, y=997, z=9, stackpos=1}
wall1 = {x=912, y=997, z=9, stackpos=1}
wall1 = {x=912, y=996, z=9, stackpos=1}
wall1 = {x=911, y=996, z=9, stackpos=1}
getwall1 = getThingPos(wall1)
getwall2 = getThingPos(wall2)
getwall3 = getThingPos(wall3)
getwall4 = getThingPos(wall4)
getwall5 = getThingPos(wall5)
getwall6 = getThingPos(wall6)
getwall7 = getThingPos(wall7)
getwall8 = getThingPos(wall8)
getwall9 = getThingPos(wall9)
if item.uid == 7882 and item.itemid == 1354 then
doCreateItem(1492,1,wall1)
doCreateItem(1492,1,wall2)
doCreateItem(1492,1,wall3)
doCreateItem(1492,1,wall4)
doCreateItem(1492,1,wall5)
doCreateItem(1492,1,wall6)
doCreateItem(1492,1,wall7)
doCreateItem(1492,1,wall8)
doCreateItem(1355,1,wall9)
doTransformItem(item.uid,item.itemid-1)
elseif item.uid == 7882 and item.itemid == 1355 then
doPlayerSendCancel(cid,"You can not use this object.")
else
doPlayerSendCancel(cid,"Sorry, not possible.")
end
return 1
end
Any ideas?
This was the result when using this script:
All the energy fields shoud be removed, and placed fire fields there instead, and the blue stone shoud be replaced with a red stone
Last edited: