Basicamente é o uso de um item que troca a outfit do player de acordo com o genêro e acrescenta speed.
Em Data/Actions/Scripts, crie um arquivo.lua e coloque:
-- Developed by: Denker
local configs = {
Speed = Value , -- Speed que será adicionada e removida
Outfit = {
[ItemID] = {looktype_male = Sprite , -- LOOKTYPE MASCULINO
looktype_female = Sprite , -- LOOKTYPE FEMININO
},
}
}
function onUse(cid, item, frompos, itemEx, topos)
local change_Outfit = configs.Outfit[item.itemid]
if getPlayerStorageValue(cid, 32011) == 1 then
doRemoveCondition(cid, CONDITION_OUTFIT)
doChangeSpeed(cid, -configs.Speed)
setPlayerStorageValue(cid, 32011, 0)
return true
end
if
getPlayerSex(cid) == 1 then -- Male
doChangeSpeed(cid, configs.Speed)
doSetCreatureOutfit(cid,{lookType = change_Outfit.looktype_male},-1)
setPlayerStorageValue(cid, 32011, 1)
elseif getPlayerSex(cid) == 0 then -- Female
doChangeSpeed(cid, configs.Speed)
doSetCreatureOutfit(cid,{lookType = change_Outfit.looktype_female},-1)
setPlayerStorageValue(cid, 32011, 1)
end
return true
end
Em Data/Actions/action.xml, adicione:
<action itemid="ItemID" event="script" value="arquivo.lua"