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

Removing spell

Spo teh pro

New Member
Joined
Jan 3, 2008
Messages
319
Reaction score
1
Hello I need a spell that removes a item (1499) in a area around you
tho it shouldnt have an effect, I mean you shouldnt see that the spell have been casted

Thanks pro scripterzz :D!
 
Code:
 local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_SLEEP)
setCombatParam(combat, COMBAT_PARAM_DELETEITEM, 1499)

local arr = {
{1, 1, 1},
{1, 2, 1},
{1, 1, 1}
}

local area = createCombatArea(arr)
setCombatArea(combat, area)

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

Thats my script atm, tho it dont work
Can some1 fix it or help me to make a new?
 
Here you go ernstjin:
Code:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_RED)

local area = createCombatArea(AREA_SQUARE1X1)
setCombatArea(combat, area)

function onTargetTile(cid, pos)
	local item = getTileItemById(pos, 1499)
	if item.itemid > 0 then
		doRemoveItem(item.uid)
	end
end

setCombatCallback(combat, CALLBACK_PARAM_TARGETTILE, "onTargetTile")

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


ALL CREDITS TO "THEGIG"
hes a great guy :thumbup:
 
Back
Top