Postado Junho 3, 2015 10 anos Boa tarde pessoal, eu tenho uma script que muda o sexo do char por 5 dias de premium... queria que fosse por 1kk eu pesquisei mas só achei por itens ou por dias de vip :/ <?xml version="1.0" encoding="UTF-8"?> <mod name="Change gender command" version="1.0" author="The Forgotten Server" contact="otland.net" enabled="yes"> <description> This mod will add new command for players - !changesex. Players will be able to change gender, cost can be configured. </description> <config name="changender_config"><![CDATA[ config = { costPremiumDays = 3 } ]]></config> <talkaction words="!changesex" event="buffer"><![CDATA[ domodlib('changender_config') if(getPlayerSex(cid) >= 2) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You cannot change your gender.") return end if(getPlayerPremiumDays(cid) < config.costPremiumDays) then doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Sorry, not enough premium time - changing gender costs " .. config.costPremiumDays .. " premium days.") doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF) return end if(getPlayerPremiumDays(cid) < 65535) then doPlayerAddPremiumDays(cid, -config.costPremiumDays) end doPlayerSetSex(cid, getPlayerSex(cid) == PLAYERSEX_FEMALE and PLAYERSEX_MALE or PLAYERSEX_FEMALE) 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) ]]></talkaction> </mod> Não sei se tem diferença mas esse comando fica na pasta MODS... não na talkactions como normalmente... Editado Junho 3, 2015 10 anos por Mdcrf (veja o histórico de edições)
Postado Junho 3, 2015 10 anos Solução Tenta assim: <?xml version="1.0" encoding="UTF-8"?> <mod name="Change gender command" version="1.0" author="The Forgotten Server" contact="otland.net" enabled="yes"> <description> This mod will add new command for players - !changesex. Players will be able to change gender, cost can be configured. </description> <config name="changender_config"><![CDATA[ config = { costPrice = 1000000 } ]]></config> <talkaction words="!changesex" event="buffer"><![CDATA[ domodlib('changender_config') if(getPlayerSex(cid) >= 2) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You cannot change your gender.") return end if doPlayerRemoveMoney(cid, config.costPrice) then doPlayerSetSex(cid, getPlayerSex(cid) == PLAYERSEX_FEMALE and PLAYERSEX_MALE or PLAYERSEX_FEMALE) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have changed your gender and lost " .. config.costPrice .. " gold coins.") doSendMagicEffect(getCreaturePosition(cid), CONST_ME_MAGIC_RED) else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You need "..config.costPrice.." golds coins to change your sex.") return end ]]></talkaction> </mod> ➥ Regras | Seções OTServ | Seções BOT
Participe da conversa
Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.