Jump to content

(Resolvido){Pedido} Teleportar quando acabar a Premium

Go to solution Solved by Danves,

Recommended Posts

  • Solution
Fiz um creaturescripts que talvez só ele já funcione.
Crie um com o nome vip.lua e cole dentro

function onLogin(cid)
    if getPlayerPremiumDays(cid) > 0 and getPlayerStorageValue(cid, 95498) == -1 then
        setPlayerStorageValue(cid, 95498, 1)
    if getPlayerPremiumDays(cid) <= 0 and getPlayerStorageValue(cid, 95498) == 1 then
        setPlayerStorageValue(cid, 95498, -1)
        local temple = getTownTemplePosition(getPlayerTown(cid))
        doTeleportThing(cid, temple)
        doPlayerPopupFYI(cid, "Sua vip acabou.") 
 return true
Se não quer que teleporte pro templo, edite essa parte de vermelho com as pos e tal
  local temple = getTownTemplePosition(getPlayerTown(cid))

No creaturescripts.xml
<event type="login" name="Vip" script="vip.lua"/>
No login.lua
registerCreatureEvent(cid, "Vip")
Edited by Danves (see edit history)


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...

Important Information

Confirmação de Termo