YU

[Resolvido] Presiso De Um Script De Troca

Por YuriGrandstorm, 30 de mar. de 2010 em Archived

script
6
863
30 de março de 2010 às 13:28

tipo troca de Male - para Female

 

Obrigado

MatheusGladM
30 de março de 2010 às 13:35

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 ¬¬

Editado Março 30 por MatheusMkalo

AntiemoxlrA
30 de março de 2010 às 13:35

Dependendo da versao do servidor creio que nao possa pegar Uma dica antes de fazer o topicoi sempre adicione o protocolo ^^

Editado Março 30 por Antiemoxlr

30 de março de 2010 às 13:40

MatheusMkalo

 

Vei obrigado por você existir ja respondeu muitas duvidas minhas...

VildenV
30 de março de 2010 às 13:53

Dúvida sanada, tópico fechado.

 

Rep+ para MatheusMkalo

 

 

 

*Da próxima matheus posta da onde você pegou o script pelo menos.

Editado Março 30 por Vilden

10 meses depois...
08 de janeiro de 2011 às 21:11

nem funcionou no meu ot