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

spell to heal summons

etehepaladino

New Member
Joined
Nov 16, 2009
Messages
8
Reaction score
0
I searched a lot but could not get a concrete answer on how I can do to create a spell that heals my summons not know much about scripts so wished they could tell me where to put the script if anyone has a solution!
 
Take a look at mass healing druid spell (the lua file) look for this: (without the combat param at top)

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

Modify it, add checks to verify the monster is a summon, and that it is your summon, or any players summon.
If it is, then, and only then return the "doCombat" thingy. That should work.

Edit: Just did a quick edit, might work:
Lua:
function onCastSpell(cid, var)
	local summons = getCreatureSummons(cid)
	if(table.maxn(summons) <= 0) then -- no summons
		doPlayerSendCalcel(cid, "You don't have any summons to heal in range.")
		return false
	end
	for _, pid in ipairs(summons) do
		return doCombat(cid, combat, var)
	end
end

Sample 90% taken from TFS/docs/LUA_FUNCTIONS

Save the file and call it etc "summonHealing". Duplicate mass healing from spells.xml and change the name and mana cost and stuff.

If you look in lua functions you see its really easy to edit, you can make the spell only heal party members, you can make it heal only people with certain storage id, or town id (heal only allies from same town) etc... Only your mind stops the customization the spell is capable of.
 
Last edited:
Back
Top