Hello.
My script not working
If it's items on right and left position script is still not working ;/
Anyone can fix it, what's wrong with this script ?
- - - Updated - - -
bumpy dumpy
My script not working
LUA:
local left = {x=750, y=708, z=7}
local right = {x=751, y=708, z=7}
local summon = {x=750, y=707, z=7}
local from = {x=747, y=706, z=7} -- top left corner
local to = {x=758, y=723, z=7} -- bottom right corner
function onUse(cid, item, fromPosition, itemEx, toPosition)
if item.itemid == 1945 then
local a = getThingfromPos(left)
if a.itemid == 12412 and a.type >= 1 then
local b = getThingfromPos(right)
if b.itemid == 8614 and b.type >= 3 then
for x = from.x, to.x do
for y = from.y, to.y do
local f = getTopCreature({x=x, y=y, z=from.z}).uid
if f ~= 0 and isMonster(f) and getCreatureMaster(f) == f and getCreatureName(f):lower() == 'triceratops' then
return doPlayerSendCancel(cid, 'There is already monster.')
end
end
end
doRemoveItem(a.uid, 2)
doRemoveItem(b.uid, 2)
doCreateMonster('Triceratops', summon)
doCreateMonster('Triceratops', summon)
doSendMagicEffect(summon, 64)
return doTransformItem(item.uid, 1946)
end
end
return doPlayerSendCancel(cid, 'You need one triceratops skin and three tusks to use that lever.') and doSendMagicEffect(getCreaturePosition(cid), 2)
end
return doTransformItem(item.uid, 1945)
end
If it's items on right and left position script is still not working ;/
Anyone can fix it, what's wrong with this script ?
- - - Updated - - -
bumpy dumpy