• 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!

Lua Wrong Spell

Erikas Kontenis

Excellent OT User
Joined
Jul 3, 2009
Messages
1,937
Reaction score
682
Location
Lithuania
This Spell Should Summon A Skeletons But he just makes a mass heal what wrong here is?

i using 0.3.6 ths

Code:
function onTargetTile(cid, pos)
	local getPos = pos
	getPos.stackpos = STACKPOS_TOP_MOVEABLE_ITEM_OR_CREATURE

	local corpse = getThingFromPos(getPos)
	if(corpse.uid > 0 and isCorpse(corpse.uid) and isMoveable(corpse.uid) and getCreatureSkullType(cid) ~= SKULL_BLACK) then
		doRemoveItem(corpse.uid)
		doConvinceCreature(cid, doCreateMonster(cid, "Skeleton", pos))

		doSendMagicEffect(pos, CONST_ME_MAGIC_BLUE)
		return true
	end

	return false
end

local area, combat = createCombatArea(AREA_CIRCLE3X3), createCombatObject()
setCombatArea(combat, area)

setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
setCombatCallback(combat, CALLBACK_PARAM_TARGETTILE, "onTargetTile")

function onCastSpell(cid, var)
	return doCombat(cid, combat, var)
end
 
Try this one
LUA:
function onTargetTile(cid, pos)
	local getPos = pos
	getPos.stackpos = STACKPOS_TOP_MOVEABLE_ITEM_OR_CREATURE

	local corpse = getThingFromPos(getPos)
	if(corpse.uid > 0 and isCorpse(corpse.uid) and isMoveable(corpse.uid) and getCreatureSkullType(cid) ~= SKULL_BLACK) then
		doRemoveItem(corpse.uid)
		doConvinceCreature(cid, doCreateMonster("Skeleton", pos))

		doSendMagicEffect(pos, CONST_ME_MAGIC_BLUE)
		return true
	end

	return false
end

local area, combat = createCombatArea(AREA_CIRCLE3X3), createCombatObject()
setCombatArea(combat, area)

setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
setCombatCallback(combat, CALLBACK_PARAM_TARGETTILE, "onTargetTile")

function onCastSpell(cid, var)
	return doCombat(cid, combat, var)
end
 
Try this one
LUA:
function onTargetTile(cid, pos)
	local getPos = pos
	getPos.stackpos = STACKPOS_TOP_MOVEABLE_ITEM_OR_CREATURE

	local corpse = getThingFromPos(getPos)
	if(corpse.uid > 0 and isCorpse(corpse.uid) and isMoveable(corpse.uid) and getCreatureSkullType(cid) ~= SKULL_BLACK) then
		doRemoveItem(corpse.uid)
		doConvinceCreature(cid, doCreateMonster("Skeleton", pos))

		doSendMagicEffect(pos, CONST_ME_MAGIC_BLUE)
		return true
	end

	return false
end

local area, combat = createCombatArea(AREA_CIRCLE3X3), createCombatObject()
setCombatArea(combat, area)

setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
setCombatCallback(combat, CALLBACK_PARAM_TARGETTILE, "onTargetTile")

function onCastSpell(cid, var)
	return doCombat(cid, combat, var)
end

its same script lol !
 
No, it's not!
In your script there's
LUA:
		doConvinceCreature(cid, doCreateMonster(cid, "Skeleton", pos))

But in mine
LUA:
		doConvinceCreature(cid, doCreateMonster("Skeleton", pos))
 
Back
Top