Ir para conteúdo
  • Cadastre-se

Posts Recomendados

TP wand para GM/GOD

 

TFS 1.x: http://i.imgur.com/ui2T1AV.mp4

<action itemid="12318" script="tpwand.lua" allowfaruse="1" blockwalls="0" checkfloor="0"/>

function spellTP(cid, frompos, topos)
    Player(cid):teleportTo(topos)
    
    local f = Position(frompos)
    local t = Position(topos)
    t:sendMagicEffect(CONST_ME_PURPLEENERGY)
    t:sendMagicEffect(CONST_ME_ENERGYAREA)
    f:sendMagicEffect(CONST_ME_PURPLEENERGY)
    f:sendMagicEffect(CONST_ME_ENERGYAREA)
end

function onUse(player, item, frompos, item2, topos)
    if not(player:getAccountType() < ACCOUNT_TYPE_GAMEMASTER or player:getGroup():getAccess()) then
        return false
    end
    
    local cid = player:getId()
    local i = getThingPos(item2.uid)
    if i.x > 0 and i.x < 65000 and i.y > 0 and i.y < 65000 then
        if player:isInGhostMode() then
            player:teleportTo(i)
            return true
        else
            local f = player:getPosition()
            Position(f):sendMagicEffect(CONST_ME_THUNDER)
            Position(i):sendMagicEffect(CONST_ME_THUNDER)
            addEvent(spellTP, 500, cid, f, i)
            return true
        end
    end    
return false
end

 

TFS 0.4: http://i.imgur.com/2r7zErz.mp4

<action itemid="12318" event="script" value="tpwand.lua" allowfaruse="1" blockwalls="0" checkfloor="0"/>

function spellTP(cid, frompos, topos)
    doTeleportThing(cid, topos)
    doSendMagicEffect(topos, CONST_ME_PURPLEENERGY)
    doSendMagicEffect(topos, CONST_ME_ENERGYAREA)
    doSendMagicEffect(frompos, CONST_ME_PURPLEENERGY)
    doSendMagicEffect(frompos, CONST_ME_ENERGYAREA)
end

function onUse(cid, item, frompos, item2, topos)
    if getPlayerAccess(cid) < 3 then
        return false
    end
    
    local i = getThingPos(item2.uid)
    if i.x > 0 and i.x < 65000 and i.y > 0 and i.y < 65000 then
        if isPlayerGhost(cid) then
            doTeleportThing(cid, i)
            return true
        else
            local f = getThingPos(cid)
            doSendMagicEffect(f, CONST_ME_POFF)
            doSendMagicEffect(i, CONST_ME_POFF)
            
            addEvent(spellTP, 500, cid, f, i)
            return true
        end
    end    
return false
end

Link para o post
Compartilhar em outros sites

Parabéns, seu tópico de conteúdo foi aprovado!
Muito obrigado pela sua contribuição, nós do Tibia King agradecemos.
Seu conteúdo com certeza ajudará à muitos outros, você recebeu +1 REP.

Spoiler

Congratulations, your content has been approved!
Thank you for your contribution, we of Tibia King we are grateful.
Your content will help many other users, you received +1 REP.

 

Link para o post
Compartilhar em outros sites

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.

Visitante
Responder

×   Você colou conteúdo com formatação.   Remover formatação

  Apenas 75 emojis são permitidos.

×   Seu link foi automaticamente incorporado.   Mostrar como link

×   Seu conteúdo anterior foi restaurado.   Limpar o editor

×   Não é possível colar imagens diretamente. Carregar ou inserir imagens do URL.

  • Quem Está Navegando   0 membros estão online

    Nenhum usuário registrado visualizando esta página.


  • Conteúdo Similar

    • Por Tricoder
      Preview

       
      Script
      data/items/items.xml
      <item id="8981" article="a" name="gold premium card"> <attribute key="weight" value="0" /> <attribute key="description" value="Use this card to receive 7 premium days." /> </item> data/actions/actions.xml
      <action itemid="8981" script="other/premiumcard.lua"/> data/actions/scripts/premium_card
      local t = { days = 7, effect = CONST_ME_HOLYAREA } function onUse(cid, item, fromPosition, itemEx, toPosition) doPlayerRemoveItem(cid, 8981, 1) return TRUE, doPlayerAddPremiumDays(cid, t.days), doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You now have +" .. t.days .. " premium days!"), doSendMagicEffect(fromPosition, t.effect) end Créditos: God Mythera
×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo