• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

doSendMagicEffect how to add into a script?

xexam

New Member
Joined
Aug 3, 2010
Messages
172
Reaction score
1
Hello
here's my script

function onUse(cid, item, fromPosition, itemEx, toPosition)
local stone_id = 7824
local pos = {x = 1031, y = 1373, z = 13}
local stone = getTileItemById(pos, stone_id)
if stone.uid > 0 then
doRemoveItem(stone.uid)
doTransformItem(item.uid, item.itemid == 1945 and 1946 or 1945)
addEvent(function() doCreateItem(stone_id, 1, pos) end, 5*1000)
doCreatureSay(cid, "FCHHHHHHHH!", TALKTYPE_ORANGE_1)
return true
else
return doPlayerSendCancel(cid,"Sorry, not possible.")
end
end

when you push a lever, a dragon statue disappear. and i want to make a magic effect (fire damage effect) on dragon's place (pos). So when you push the lever dragon statue disappear and fire damage effect comes out of a dragon statue place

i added this line doSendMagicEffect(topos,15) but it doesnt work.
someone will help me?
 
it doesnt work anyway
attempt to index a nill value
C: in function 'do SendMagicEffect'

it looks like this now

function onUse(cid, item, fromPosition, itemEx, toPosition)
local stone_id = 7824
local pos = {x = 1031, y = 1373, z = 13}
local stone = getTileItemById(pos, stone_id)
if stone.uid > 0 then
doRemoveItem(stone.uid)
doSendMagicEffect(topos,15)
doTransformItem(item.uid, item.itemid == 1945 and 1946 or 1945)
addEvent(function() doCreateItem(stone_id, 1, pos) end, 5*1000)
doCreatureSay(cid, "FCHHHHHHHH!", TALKTYPE_ORANGE_1)
doSendMagicEffect(pos, 15)
return true
else
return doPlayerSendCancel(cid,"Sorry, not possible.")
end
end
 
ye because 15 is not anything? so try:
DoSendMagicEffect({x=1031, y=1373, z=13}, CONST_DAMAGE_FIREDAMAGE)
or
DoSendMagicEffect({x=1032, y=1373, z=13}, CONST_ME_FIREDAMAGE)
or
DoSendMagicEffect(pos, CONST_ME_FIREDAMAGE)
 
ye because 15 is not anything? so try:
DoSendMagicEffect({x=1031, y=1373, z=13}, CONST_DAMAGE_FIREDAMAGE)
or
DoSendMagicEffect({x=1032, y=1373, z=13}, CONST_ME_FIREDAMAGE)
or
DoSendMagicEffect(pos, CONST_ME_FIREDAMAGE)

nothing worked
so, anyone know how to get it work?
 
Back
Top