BulawOw
Soul of Shinobi
- Joined
- Sep 15, 2014
- Messages
- 204
- Solutions
- 8
- Reaction score
- 62
Code:
function onCastSpell(creature, variant)
local baseSpeed = creature:getVocation():getBaseSpeed()
local speed = baseSpeed/2
local prevOutfit = creature:getOutfit()
if (prevOutfit.lookType == 904) then
creature:setOutfit{ lookType = 912 }
creature:changeSpeed(speed)
end
Like in title this script works fine but colors that i were using are not beging the same after transformation
Post automatically merged:
Got it fixed if anybody gonna have same problem there is my fix (yes i know it was obvious, but not for me
LUA:
function onCastSpell(creature, variant)
local baseSpeed = creature:getVocation():getBaseSpeed()
local speed = baseSpeed/2
local prevOutfit = creature:getOutfit()
if (prevOutfit.lookType == 904) then
creature:setOutfit{ lookHead = prevOutfit.lookHead, lookLegs = prevOutfit.lookLegs, lookBody = prevOutfit.lookBody, lookFeet = prevOutfit.lookFeet, lookType = 912 }
creature:changeSpeed(speed)
end
Last edited: