• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

spells - create item

Swiff

Member
Joined
Apr 6, 2009
Messages
366
Reaction score
12
Location
Sweden
Hello, I'm doing some custom spells and now I've hit a wall.

I'm trying to use this:
HTML:
setCombatParam(combat, COMBAT_PARAM_CREATEITEM, 1988)

In a wave spell.

I'm also confused why when I use such a spell/rune item on the ground/myself, the item will spawn on the ground, but when I use the spell on a monster it will not, why?

Here's example of a firewave that i want to make a little custom by creating items on the areas that are hit:

HTML:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_HITBYFIRE)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_FIRE)
setAttackFormula(combat, COMBAT_FORMULA_LEVELMAGIC, 5, 5, 1.2, 2)

local area = createCombatArea(AREA_WAVE4, AREADIAGONAL_WAVE4)
setCombatArea(combat, area)

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

Here's an example on my rune that I can shoot on myself to spawn and item, but not on a monster to apwn an item (the damage and all other effects plays when used on monster);
l
HTML:
ocal combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TARGETCASTERORTOPMOST, true)
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_HOLYDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_HOLYDAMAGE)
setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_HOLY)
setCombatParam(combat, COMBAT_PARAM_CREATEITEM, 1988)
setCombatFormula(combat, COMBAT_FORMULA_LEVELMAGIC, -1.5, -15, -2.5, -25)

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

I need support with why the item won't spawn on a monster, and I guess request on howto make area spell items (I remember I did this somehow with 8.0 xml server, but it has a different setup when reading spells)

Using TFS 3.6pl1
 
setCombatParam(combat, COMBAT_PARAM_CREATEITEM, 1988) <- that's what I did see :)
But it will only work when i shoot the rune at myself, the item will be created under me. However, when I use it on a monster it won't create an item under it, or anywhere.
 
setCombatParam(combat, COMBAT_PARAM_CREATEITEM, 1988) <- that's what I did see :)
But it will only work when i shoot the rune at myself, the item will be created under me. However, when I use it on a monster it won't create an item under it, or anywhere.

Theres some parameters in spells.xml you need to change.

I believe theres selfTarget = "" and others
 
bumping this cuz im trying to make weapon that creates a field under a monsters upon attacking but it just does not do it.
[solved via]
and adding library of spells into weapons for AREA's
 
Back
Top