Ir para conteúdo

Test


nmaster

Posts Recomendados

<?xml version="1.0" encoding="UTF-8"?>

<mod name="Buy premium command" version="1.0" author="The Forgotten Server" contact="otland.net" enabled="yes">

<config name="buypremium_config"><![CDATA[

config = {

days = 30,

cost = 10000,

maxDays = 360

}

]]></config>

<talkaction words="!buypremium; !pacc; !buypremmy" event="buffer"><![CDATA[

domodlib('buypremium_config')

if(getPlayerPremiumDays(cid) > config.maxDays) then

doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You can not buy more than " .. config.days + config.maxDays .. " days of Premium Account.")

doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)

return

end

 

if(not doPlayerRemoveMoney(cid, config.cost)) then

doPlayerSendCancel(cid, "You don't have enough money, " .. config.days .. " days premium account costs " .. config.cost .. " gold coins.")

doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)

return

end

 

doPlayerAddPremiumDays(cid, config.days)

doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have bought " .. config.days .. " days of premium account.")

]]></talkaction>

</mod>

Link para o comentário
Compartilhar em outros sites

Visitante
Este tópico está impedido de receber novos posts.
  • Quem Está Navegando   0 membros estão online

    • Nenhum usuário registrado visualizando esta página.
×
×
  • Criar Novo...