Crie um arquivo lua na pasta talkaction chamado trocadesexo e bote isto dentro:
local config = {costPremiumDays = 0
}
function onSay(cid, words, param, channel)
if(getPlayerSex(cid) >= 2) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You cannot change your gender.")
return TRUE
end
if(getPlayerPremiumDays(cid) < config.costPremiumDays) then
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Sorry, not enough premium time- changing gender costs " .. config.costPremiumDays .. " days.")
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)
return TRUE
end
if(getPlayerPremiumDays(cid) < 65535) then
doPlayerAddPremiumDays(cid, -config.costPremiumDays)
end
if(getPlayerSex(cid) == PLAYERSEX_FEMALE) then
doPlayerSetSex(cid, PLAYERSEX_MALE)
else
doPlayerSetSex(cid, PLAYERSEX_FEMALE)
end
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have changed your gender and lost " .. config.costPremiumDays .. " days of premium time.")
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_MAGIC_RED)
return TRUE
end
SCRIPT NAO EH MEU!!!!!!
Depois va em talkaction.xml e bote isto:
<talkaction words="!trocardesexo" script="trocadesexo.lua"/>
OBS:Nao precisava nem criar o topico era so pedir no msn ¬¬






info
Grupo: Campones
Registrado: 29/05/08
Posts: 27
Reputação: -3
tipo troca de Male - para Female
Obrigado