Darqneez
ShaC-Ohhhh
I have a small problem. My script works, but console gives me an error, and there is also a small freeze while using my plant. Can someone rework my script so that there was no error?
Here's Code:
Here's error in console (When I use plant this error appears like 16 times ):
Here's Code:
Code:
-- Script made by Darqneez --
local blossom = {x=2073, y=1866, z=11} -- TOP LEFT tile
function onUse (cid, item, fromPosition, itemEx, toPosition)
if getPlayerStorageValue(cid, 60017) == -1 then
for itemid = 4144, 4147 do
for itemuid = 60017, 60020 do
if getThing(itemuid).itemid == getThing(itemid).itemid then
return TRUE
else
doPlayerSendTextMessage(cid,25,"It is not a good leaf.")
end
end
end
doPlayerSendTextMessage(cid,25,"You have cut a leaf from this mysterious plant.")
doSummonCreature("Serpent Spawn", {x=blossom.x,y=blossom.y + 4,z=blossom.z})
doSummonCreature("Serpent Spawn", {x=blossom.x,y=blossom.y - 2,z=blossom.z})
doSummonCreature("Serpent Spawn", {x=blossom.x + 3,y=blossom.y,z=blossom.z})
doSummonCreature("Serpent Spawn", {x=blossom.x - 2,y=blossom.y,z=blossom.z})
doSummonCreature("Serpent Spawn", {x=blossom.x - 1,y=blossom.y - 13,z=blossom.z - 1})
doSummonCreature("Serpent Spawn", {x=blossom.x + 1,y=blossom.y - 17,z=blossom.z -1})
doPlayerAddItem(cid,7249,1)
setPlayerStorageValue(cid, 60017, 1)
else
doPlayerSendTextMessage(cid,25,"You have nothing to do with this plant.")
end
return TRUE
end
Code:
[26/08/2010 10:17:45] [Error - Action Interface]
[26/08/2010 10:17:46] data/actions/scripts/quests/heavenblossom/heavenblossom.lua:onUse
[26/08/2010 10:17:46] Description:
[26/08/2010 10:17:46] (luaGetThing) Thing not found