• 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 that changes target outfit

  • Thread starter Thread starter Forsakenfate
  • Start date Start date
F

Forsakenfate

Guest
Like the title says i'm looking for a script that casts a spell/rune on the target (possibly temporarily skill loss for the target).
And changes the target's outfit for about 20 seconds.
I'm using TFS 0.3.6 Crying Damson.
Thanks for your time.
 
LUA:
local c = {
	time = 20 * 1000, -- 20 sek
	outf = {
		{lookType = 2, lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 0}, -- Orc warlord
		{lookType = 3, lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 0},-- Warwolf
		{lookType = 4, lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 0}, -- Orc rider
		{lookType = 131, lookHead = 95, lookBody = 95, lookLegs = 95, lookFeet = 95, lookTypeEx = 0, lookAddons = 0} -- Black Knight
	}
}

local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, true)

local condition = createConditionObject(CONDITION_ATTRIBUTES)
setConditionParam(condition, CONDITION_PARAM_TICKS, time)
setConditionParam(condition, CONDITION_PARAM_SKILL_SHIELD, -20)
setConditionParam(condition, CONDITION_PARAM_SKILL_MELEE, -20)
setConditionParam(condition, CONDITION_PARAM_SKILL_DISTANCE, -20)
setConditionParam(condition, CONDITION_PARAM_BUFF, true)
setCombatCondition(combat, condition)

local outfit = createConditionObject(CONDITION_OUTFIT)
setConditionParam(outfit, CONDITION_PARAM_TICKS, c.time)
addOutfitCondition(outfit, math.random(#c.outf))
setCombatCondition(combat, outfit)

function onCastSpell(cid, var)
	return doCombat(cid, combat, var)
end
something like that?
not tested, I don't have 0.3.6

and here outfits nr.
 
Edit: Nevermind I fixed it ^^ thanks for your help guys.
How I did it: Simply used a spell that transforms yourself, to a needtarget="1" in spells.xml lol. Stupid that I didn't think of that before.
 
Last edited by a moderator:
Back
Top