hadamais 2 Postado Outubro 13, 2012 Share Postado Outubro 13, 2012 Gostaria de um Script que a pessoa digitasse !change sex, e mudasse de sexo por 10k! Meu servidor é 8.6, com Distro Real Server 3.0 Obrigado desde jah. Link para o comentário https://xtibia.com/forum/topic/196428-script-de-mudan%C3%A7a-de-sexo/ Compartilhar em outros sites More sharing options...
0 fokus090 36 Postado Outubro 13, 2012 Share Postado Outubro 13, 2012 (editado) Va em data/takaction/scripts crie um arquivo .LUA apague tudo q tem dentro e cole: function onSay(cid, words, param)if getPlayerPremiumDays(cid) > 2 then doPlayerRemovePremiumDays(cid, 3) if getPlayerSex(cid) == 0 then doPlayerSetSex(cid, 1) else doPlayerSetSex(cid, 0) end doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have changed your sex and lost three days of premium account.") else doPlayerSendCancel(cid, "You do not have enough premium days, changing sex costs three of your premium days.") doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF) end end Depois va em Talkaction.XML e adicione: <talkaction words="!changesex" script="changesex.lua"/> Editado Outubro 13, 2012 por Frenesy Link para o comentário https://xtibia.com/forum/topic/196428-script-de-mudan%C3%A7a-de-sexo/#findComment-1362923 Compartilhar em outros sites More sharing options...
0 SkyLigh 453 Postado Outubro 13, 2012 Share Postado Outubro 13, 2012 @Frenesy acho que você nao leu direito ! ele quer que custe 10k n que remova premium aki esta . function onSay(cid, words, param) local money = 1000 if getPlayerMoney(cid,money) == TRUE then if doPlayerRemoveMoney(cid,money) == TRUE then if getPlayerSex(cid) == 0 then doPlayerSetSex(cid, 1) else doPlayerSetSex(cid, 0) end doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Parabens voce troco de sexo.") else doPlayerSendCancel(cid, "Desculpe voce nao tem dinheiro suficiente.") doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF) end end end e em talkactions.xml <talkaction words="!changesex" script="changesex.lua"/> Link para o comentário https://xtibia.com/forum/topic/196428-script-de-mudan%C3%A7a-de-sexo/#findComment-1362943 Compartilhar em outros sites More sharing options...
0 CoGames 29 Postado Outubro 13, 2012 Share Postado Outubro 13, 2012 (editado) Crie um arquivo.lua em data/talkactions/scripts com o nome de changesex.lua, dentro do arquivo.lua cole: function onSay(cid, words, param) local money = 1000 -- aqui o tanto de dinheiro que o player gastara if getPlayerMoney(cid,money) == TRUE then -- aqui verifica se o player tem dinheiro if doPlayerRemoveMoney(cid,money) == TRUE then -- aqui remove o dinheiro do player para trocar de sexo if getPlayerSex(cid) == 0 then -- aqui muda o sexo do player doPlayerSetSex(cid, 1) -- aqui o sexo que ele mudará (0=feminino) (1=masculino) else doPlayerSetSex(cid, 0) -- aqui o sexo que ele mudará end -- FIM doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Aqui coloque a mensagem que quiser apos o player ter trocado de sexo") else doPlayerSendCancel(cid, "Aqui coloque a mensagem que quiser quando o player não tiver dinheiro") doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF) -- ali em POFF edite para o efeito que quiser quando ele não tiver dinheiro end -- FIM end -- FIM end -- FIM Após ter colado isto no changesex.lua, vá em data/talkactions/talkactions.xml e cole em alguma linha: <talkaction words="!changesex" script="changesex.lua"/> Ali em azul onde ta escrito !changesex, escreva o comando que você quer que o player de para mudar de sexo. Ali em roxo onde ta escrito changesex.lua, escreva o nome do arquivo.lua que você escreveu lá em cima, no caso é changesex.lua. Créditos: 60% OTServer (TODOS OS SERVERS JÁ VEM COM ISSO). 30% SkyLigh (POR TER MODIFICADO O SCRIPT PARA QUE REMOVA O DINHEIRO DO PLAYER). 10% CoGames (POR DAR UM TUTORIAL MELHOR DE ONDE COLOCAR ESTE ARQUIVO, E O QUE PODE MODIFICAR NELE, ETC...). Editado Outubro 13, 2012 por Cogames Link para o comentário https://xtibia.com/forum/topic/196428-script-de-mudan%C3%A7a-de-sexo/#findComment-1362954 Compartilhar em outros sites More sharing options...
0 SkyLigh 453 Postado Outubro 13, 2012 Share Postado Outubro 13, 2012 Cogames creio que nao era preciso postar com o meu acima mais parabéns pelo tutorial ! Link para o comentário https://xtibia.com/forum/topic/196428-script-de-mudan%C3%A7a-de-sexo/#findComment-1362955 Compartilhar em outros sites More sharing options...
0 hadamais 2 Postado Outubro 13, 2012 Autor Share Postado Outubro 13, 2012 do Cogames não deu! @ SkyLigh sem sucesso! Link para o comentário https://xtibia.com/forum/topic/196428-script-de-mudan%C3%A7a-de-sexo/#findComment-1362972 Compartilhar em outros sites More sharing options...
0 SkyLigh 453 Postado Outubro 13, 2012 Share Postado Outubro 13, 2012 (editado) @Hadamo refiz o meu testei aki e foi que no meu eu tinha colocado função que ainda nao existe no 8.60 function onSay(cid, words, param) if getPlayerSex(cid) == 0 then doPlayerSetSex(cid, 1) else doPlayerSetSex(cid, 0) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Parabens voce troco de sexo.") return true end if doPlayerRemoveMoney(cid, 1000) == TRUE then end return true end duvida sanada reportado Editado Outubro 13, 2012 por SkyLigh Link para o comentário https://xtibia.com/forum/topic/196428-script-de-mudan%C3%A7a-de-sexo/#findComment-1362977 Compartilhar em outros sites More sharing options...
0 hadamais 2 Postado Outubro 13, 2012 Autor Share Postado Outubro 13, 2012 Certinho, agora deu. pode fexar! Link para o comentário https://xtibia.com/forum/topic/196428-script-de-mudan%C3%A7a-de-sexo/#findComment-1362979 Compartilhar em outros sites More sharing options...
0 caotic 393 Postado Outubro 13, 2012 Share Postado Outubro 13, 2012 Pedido atendindo Tópico Movido Link para o comentário https://xtibia.com/forum/topic/196428-script-de-mudan%C3%A7a-de-sexo/#findComment-1363129 Compartilhar em outros sites More sharing options...
0 caotic 393 Postado Outubro 13, 2012 Share Postado Outubro 13, 2012 Tópico movido para a seção de dúvidas e pedidos resolvidos. Link para o comentário https://xtibia.com/forum/topic/196428-script-de-mudan%C3%A7a-de-sexo/#findComment-1363130 Compartilhar em outros sites More sharing options...
Pergunta
hadamais 2
Gostaria de um Script que a pessoa digitasse !change sex, e mudasse de sexo por 10k!
Meu servidor é 8.6, com Distro Real Server 3.0
Obrigado desde jah.
Link para o comentário
https://xtibia.com/forum/topic/196428-script-de-mudan%C3%A7a-de-sexo/Compartilhar em outros sites
9 respostass a esta questão
Posts Recomendados