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

Help My Spell!!!

lol, i want someone that can help me make it that if you get battles you'll loose the transform.
There is no error because i dont know the code for that....
 
I wrote it in hurry, but try it

Lua:
local orcrider = {lookType = 4, lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 0}
setCombatCondition(combat, condition)

local speed = createConditionObject(CONDITION_HASTE)
setConditionParam(speed, CONDITION_PARAM_TICKS, time)
setConditionFormula(speed, 0.7, -56, 0.7, -56)
setCombatCondition(combat, speed)

local outfit = createConditionObject(CONDITION_OUTFIT)
setConditionParam(outfit, CONDITION_PARAM_TICKS, time)
addOutfitCondition(outfit, orcrider.lookTypeEx, orcrider.lookType, orcrider.lookHead, orcrider.lookBody, orcrider.lookLegs, orcrider.lookFeet)
setCombatCondition(combat, outfit)

function onCastSpell(cid, var)
	if (not isPlayerPzLocked(cid)) then
        return doCombat(cid, combat, var)
end
return true
end
 
Leave your orc file the way it is, but add this into creaturescripts, register it in login.lua and call it in the creaturescripts.xml file:

Lua:
function onAttack(cid, target)
	if isPlayer(target) == true then
		local outfit = getCreatureOutfit(target)
		local genderOutfit = 128+((1 - getPlayerSex(target))*8)
		if outfit.looktype == 4 then
			local colour = math.random(0,120)
			doSetCreatureOutfit(cid, {lookType = genderOutfit,lookHead = colour,lookBody = colour,lookLegs = colour,lookFeet = colour,lookAddons = 0}, 10000000000)
		end
	end
	return true
end
 
Back
Top