Azor
Cze
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
if item.itemid == 2121 then
local pos = getCreaturePosition(cid)
local monster = doCreateMonster("demon", pos)
doConvinceCreature(cid, monster)
return 1
end
end
function onUse(cid, item, fromPosition, itemEx, toPosition)
if item.itemid == 2121 then
local pos = getCreaturePosition(cid)
local monster = doCreateMonster("demon", pos)
doConvinceCreature(cid, monster)
return 1
end
end
function onUse(cid, item, fromPosition, itemEx, toPosition)
if item.itemid == 2121 then
local pos = getCreaturePosition(cid)
local monster = doCreateMonster("demon", pos)
doSendMagicEffect(fromPosition, CONST_ME_FIREAREA)
doConvinceCreature(cid, monster)
return 1
end
end
local monster = doCreateMonster("demon", pos.x + 1)
[12/11/2009 19:33:33] attempt to index a number value
[12/11/2009 19:33:33] stack traceback:
[12/11/2009 19:33:33] [C]: in function 'doCreateMonster'
[12/11/2009 19:33:33] data/actions/scripts/omg/summon.lua:4: in function <data/actions/scripts/omg/summon.lua:1>
If I do this, summon does not apper.Code:local monster = doCreateMonster("demon", pos.x + 1)
function onUse(cid, item, fromPosition, itemEx, toPosition)
if item.itemid == 2121 then
doSendMagicEffect(fromPosition, CONST_ME_FIREAREA)
local pos = getCreaturePosition(cid)
local monster = doCreateMonster("demon", pos.x + 1)
doConvinceCreature(cid, monster)
return 1
end
end
function onUse(cid, item, fromPosition, itemEx, toPosition)
if item.itemid == 2121 then
local pos = getCreaturePosition(cid)
local monster = doCreateMonster("demon", pos)
doSendMagicEffect(getCreaturePosition(monster), CONST_ME_FIREAREA)
doConvinceCreature(cid, monster)
return 1
end
end
LUA:function onUse(cid, item, fromPosition, itemEx, toPosition) if item.itemid == 2121 then local pos = getCreaturePosition(cid) local monster = doCreateMonster("demon", pos) doSendMagicEffect(getCreaturePosition(monster), CONST_ME_FIREAREA) doConvinceCreature(cid, monster) return 1 end end