Ir para conteúdo
  • Cadastre-se

Posts Recomendados

Ae galera,alguem pode me fornecer um script de sitema !fly que só vips possa usar

exemplo: !fly darashia,!fly farmine,etc...

 

Aguardando resposta...Valendo Rep+ rsrs vlw ae

 

Link para o post
Compartilhar em outros sites
thais = {x= 32369, y= 32241, z= 7}
carlin = {x= 32360, y= 31782, z= 7}
venore = {x= 32957, y= 32076, z= 7}





function onSay(cid, words, param, channel)

        if getTilePzInfo(getPlayerPosition(cid)) then

if (param == 'carlin') then
                        doTeleportThing(cid, carlin)
                        doSendMagicEffect(getPlayerPosition(cid), 10)

                        elseif (param == 'venore') then
                        doTeleportThing(cid, venore)
                        doSendMagicEffect(getPlayerPosition(cid), 10)

                        elseif (param == 'thais') then
                        doTeleportThing(cid, thais)
                        doSendMagicEffect(getPlayerPosition(cid), 10)

                        else
                        local str = "AQUI COLOCA OS NOME DA CIDADE EXEMPLO (CARLIN \N THAIS \N) "
                        doShowTextDialog(cid, 2160, str)
                        end

        else
        doPlayerSendCancel(cid, "Voce so pode em area pz.")
        doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)
        end


end

Creditos : skydangerous

Link para o post
Compartilhar em outros sites

data/talkactions/scripts, crie um novo arquivo .lua, com o nome fly (ou o que preferir), e cole o script abaixo dentro do arquivo, salve. (É o mesmo script que lhe foi passado acima, apenas coloquei a parte premium).

thais = {x= 32369, y= 32241, z= 7}
carlin = {x= 32360, y= 31782, z= 7}
venore = {x= 32957, y= 32076, z= 7}





function onSay(cid, words, param, channel)

local days = getPlayerPremiumDays(cid)

 if   days == 0 or days <= 1 
     then
          doPlayerSendCancel(cid, 'Necessário premium account pra poder usar o Fly.')
               end

        if getTilePzInfo(getPlayerPosition(cid)) then

if (param == 'carlin') then
                        doTeleportThing(cid, carlin)
                        doSendMagicEffect(getPlayerPosition(cid), 10)

                        elseif (param == 'venore') then
                        doTeleportThing(cid, venore)
                        doSendMagicEffect(getPlayerPosition(cid), 10)

                        elseif (param == 'thais') then
                        doTeleportThing(cid, thais)
                        doSendMagicEffect(getPlayerPosition(cid), 10)

                        else
                        local str = "AQUI COLOCA OS NOME DA CIDADE EXEMPLO (CARLIN \N THAIS \N) "
                        doShowTextDialog(cid, 2160, str)
                        end

        else
        doPlayerSendCancel(cid, "Voce so pode em area pz.")
        doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)
        end


end
abra talkactions.xml, e adicione essa tag <talkaction words="!fly" event="script" value="fly.lua"/>
 
pronto.
 


spacer.png

 

 

Link para o post
Compartilhar em outros sites

Ei Mano Testei o Script Ele é Ótimo Cara Funciona Tudo pah Beleza

Só Tem Um Problema Players Vip Também Conseguem Usar o Comando !Fly

Ajuda Ai,Quero Só Vip Possa Usar o Comando.

 

 

 

A Vida é Bela! É Nóis Que Fode Ela..

Link para o post
Compartilhar em outros sites

Haha Escrevi Errado Desculpa Ai !

Tipo Assim: Players Free Também Conseguem Usar o Comando.

Quero que Só Os Vips Usem o Comando !fly

 

 

A Vida é Bela! É Nóis Que Fode Ela..

Link para o post
Compartilhar em outros sites

Que Paste Do Server Fica Isso?

hehe

 

 

 

 

A Vida é Bela! É Nóis Que Fode Ela..

Link para o post
Compartilhar em outros sites

Tirei Da Pasta Lib Creio Que Seja isso:

 

 

vip = {
   name = "Vip system";
   author = "Mock";
   version = "1.0.0.0";
   query="ALTER TABLE `accounts` ADD `vip_time` INTEGER";
   query2="ALTER TABLE `accounts` ADD `vip_time` INT(15) NOT NULL"
}

function vip.setTable()
   dofile('config.lua')
   if sqlType == "sqlite" then
       db.executeQuery(vip.query)
   else
        db.executeQuery(vip.query2)
   end
end

function vip.getVip(cid)
         assert(tonumber(cid),'Parameter must be a number')
         if isPlayer(cid) == FALSE then error('Player don\'t find') end;
         ae =  db.getResult("SELECT `vip_time` FROM `accounts` WHERE `name` = '"..getPlayerAccount(cid).."';")
         if ae:getID() == -1 then
            return 0
         end

local retee = ae:getDataInt("vip_time") or 0
ae:free()
         return retee
end

function vip.getVipByAcc(acc)
         assert(acc,'Account is nil')
         local a = db.getResult("SELECT `vip_time` FROM `accounts` WHERE `name` = '"..acc.."';")
         if a:getID() ~= -1 then
             return a:getDataInt("vip_time") or 0, a:free()
         else
             error('Account don\'t find.')
         end
end

function vip.setVip(cid,time)
         dofile("config.lua")
         assert(tonumber(cid),'Parameter must be a number')
         assert(tonumber(time),'Parameter must be a number')
         if isPlayer(cid) == FALSE then error('Player don\'t find') end;
         db.executeQuery("UPDATE `"..sqlDatabase.."`.`accounts` SET `vip_time` = '"..(os.time()+time).."' WHERE `accounts`.`name` ='".. getPlayerAccount(cid).."';")
end

function vip.getVipByAccount(acc)
         assert(acc,'Account is nil')
         return db.getResult("SELECT `vip_time` FROM `accounts` WHERE `name` = '"..acc.."';"):getDataInt("vip_time") or 0
end                                      

function vip.hasVip(cid)
         assert(tonumber(cid),'Parameter must be a number')
         if isPlayer(cid) == FALSE then return end;
         local t = vip.getVip(cid) or 0
         if os.time(day) < t then
            return TRUE
         else
            return FALSE
         end
end

function vip.hasVips(cid)
         assert(tonumber(cid),'Parameter must be a number')
         if isPlayer(cid) == FALSE then return end;
         local t = vip.getVip(cid)
         if os.time(day) < t then
            return TRUE
         else
            return FALSE
         end
end

function vip.accountHasVip(acc)
         assert(acc,'Account is nil')
         if os.time() < vip.getVipByAccount(acc) then
            return TRUE
         else
            return FALSE
         end
end
function vip.getDays(days)
   return (3600 * 24 * days)
end

function vip.addVipByAccount(acc,time)
   assert(acc,'Account is nil')
   assert(tonumber(time),'Parameter must be a number')
   local a = vip.getVipByAcc(acc)
   a = os.difftime(a,os.time())
   if a < 0 then a = 0 end;
   a = a+time
   return vip.setVipByAccount(acc,a)
end

function vip.setVipByAccount(acc,time)
         dofile("config.lua")
         assert(acc,'Account is nil')
         assert(tonumber(time),'Parameter must be a number')
         db.executeQuery("UPDATE `accounts` SET `vip_time` = '"..(os.time()+time).."' WHERE `accounts`.`name` ='"..acc.."';")
         return TRUE
end

function vip.returnVipString(cid)
   assert(tonumber(cid),'Parameter must be a number')
   if isPlayer(cid) == TRUE then
      return os.date("%d %B %Y %X ", vip.getVip(cid))
   end
end

Link para o post
Compartilhar em outros sites

Então Deve Ser Isso Tirei creaturescripts/scripts/vip:

 

vip = {
   name = "Vip system";
   author = "Mock";
   version = "1.0.0.0";
   query="ALTER TABLE `accounts` ADD `vip_time` INTEGER";
   query2="ALTER TABLE `accounts` ADD `vip_time` INT(15) NOT NULL"
}

function vip.setTable()
   dofile('config.lua')
   if sqlType == "sqlite" then
       db.executeQuery(vip.query)
   else
        db.executeQuery(vip.query2)
   end
end

function vip.getVip(cid)
         assert(tonumber(cid),'Parameter must be a number')
         if isPlayer(cid) == FALSE then error('Player don\'t find') end;
         ae =  db.getResult("SELECT `vip_time` FROM `accounts` WHERE `name` = '"..getPlayerAccount(cid).."';")
         if ae:getID() == -1 then
            return 0
         end

local retee = ae:getDataInt("vip_time") or 0
ae:free()
         return retee
end

function vip.getVipByAcc(acc)
         assert(acc,'Account is nil')
         local a = db.getResult("SELECT `vip_time` FROM `accounts` WHERE `name` = '"..acc.."';")
         if a:getID() ~= -1 then
             return a:getDataInt("vip_time") or 0, a:free()
         else
             error('Account don\'t find.')
         end
end

function vip.setVip(cid,time)
         dofile("config.lua")
         assert(tonumber(cid),'Parameter must be a number')
         assert(tonumber(time),'Parameter must be a number')
         if isPlayer(cid) == FALSE then error('Player don\'t find') end;
         db.executeQuery("UPDATE `"..sqlDatabase.."`.`accounts` SET `vip_time` = '"..(os.time()+time).."' WHERE `accounts`.`name` ='".. getPlayerAccount(cid).."';")
end

function vip.getVipByAccount(acc)
         assert(acc,'Account is nil')
         return db.getResult("SELECT `vip_time` FROM `accounts` WHERE `name` = '"..acc.."';"):getDataInt("vip_time") or 0
end                                      

function vip.hasVip(cid)
         assert(tonumber(cid),'Parameter must be a number')
         if isPlayer(cid) == FALSE then return end;
         local t = vip.getVip(cid) or 0
         if os.time(day) < t then
            return TRUE
         else
            return FALSE
         end
end

function vip.hasVips(cid)
         assert(tonumber(cid),'Parameter must be a number')
         if isPlayer(cid) == FALSE then return end;
         local t = vip.getVip(cid)
         if os.time(day) < t then
            return TRUE
         else
            return FALSE
         end
end

function vip.accountHasVip(acc)
         assert(acc,'Account is nil')
         if os.time() < vip.getVipByAccount(acc) then
            return TRUE
         else
            return FALSE
         end
end
function vip.getDays(days)
   return (3600 * 24 * days)
end

function vip.addVipByAccount(acc,time)
   assert(acc,'Account is nil')
   assert(tonumber(time),'Parameter must be a number')
   local a = vip.getVipByAcc(acc)
   a = os.difftime(a,os.time())
   if a < 0 then a = 0 end;
   a = a+time
   return vip.setVipByAccount(acc,a)
end

function vip.setVipByAccount(acc,time)
         dofile("config.lua")
         assert(acc,'Account is nil')
         assert(tonumber(time),'Parameter must be a number')
         db.executeQuery("UPDATE `accounts` SET `vip_time` = '"..(os.time()+time).."' WHERE `accounts`.`name` ='"..acc.."';")
         return TRUE
end

function vip.returnVipString(cid)
   assert(tonumber(cid),'Parameter must be a number')
   if isPlayer(cid) == TRUE then
      return os.date("%d %B %Y %X ", vip.getVip(cid))
   end
end


Affz malz compiei errado

correto é isso:

 

-- [( Script edited by: DoidinMapper )] --
function onLogin(cid)
local pos = {x=32360, y=31782, z=7}
pos = {x=32360, y=31782, z=7}
if vip.hasVip(cid) == TRUE then
if getPlayerStorageValue(cid,55555) ~= 1 then
setPlayerStorageValue(cid,55555,1)
end
elseif vip.hasVip(cid) ~= TRUE and vip.getVip(cid) ~= 0 then
if getPlayerStorageValue(cid,55555) == 1 then
doTeleportThing(cid, pos, TRUE)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Your VIP's over!")
doPlayerSendTextMessage(cid,22,"Your VIP's over!")
setPlayerPromotionLevel(cid, 1)
setPlayerStorageValue(cid,55555,2)
elseif getPlayerStorageValue(cid,55555) == -1 then
setPlayerStorageValue(cid,55555,2)
end
end
return TRUE
end

Link para o post
Compartilhar em outros sites

Não esqueça de configurar com o storageID 55555 :

function onSay(cid, words, param)

local config = {
pz = true, -- players precisam estar em protection zone para usar? (true or false)
battle = false, -- players deve estar sem battle (true or false)
custo = false, -- se os teleport irão custa (true or false)
need_level = false, -- se os teleport irão precisar de level (true or false)
vip = true, -- somente vip players poderam usar o comando? ("yes" or "no")
storage = 13500 -- Storage Id da sua vip account caso for usar somente vips
}

--[[ Config lugares]]--
local lugar = {
["depot"] = { -- nome do lugar
pos = {x=1016, y=1045, z=7},level = 8,price = 0},
["temple"] = { -- nome do lugar
pos = {x=1032, y=1016, z=7},level = 8, price = 0},
["arena"] = { -- nome do lugar
pos = {x=1016, y=1052, z=8},level = 8,price = 0},
["viparea"] ={ -- nome do lugar
pos = {x=701, y=1015, z=7},level = 8,price = 0},
["trainer"] ={ -- nome do lugar
pos = {x=965, y=1057, z=7},level = 8,price = 0}
}

--[[ Lista de Viagem (Não mexa) ]]--
if (param == "lista") then
local str = ""
str = str .. "lista de viagem :\n\n"
for name, pos in pairs(lugar) do
str = str..name.."\n"
end
str = str .. ""
doShowTextDialog(cid, 6579, str)
return TRUE
end


local a = lugar[param]
if not(a) then
doPlayerSendTextMessage(cid, 25, "desculpe,este lugar não existe")
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)
return TRUE
elseif config.pz == true and getTilePzInfo(getCreaturePosition(cid)) == FALSE then
doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT,"você precisa estar em protection zone pra poder teleportar.")
return TRUE
elseif config.premium == true and not isPremium(cid) then
doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "Apenas players com premium account podem teleportar.")
return TRUE
elseif config.battle == true and getCreatureCondition(cid, CONDITION_INFIGHT) == TRUE then
doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "Você precisa estar sem battler pra poder teleportar.")
return TRUE
elseif config.need_level == true and getPlayerLevel(cid) < a.level then
doPlayerSendTextMessage(cid, 25, "Desculpe,Voce não tem level. voce precisa "..a.level.." level ou mais para ser teleportado.")
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)
return TRUE
elseif config.custo == true and doPlayerRemoveMoney(cid, a.price) == FALSE then
doPlayerSendTextMessage(cid, 25, "Desculpe,voce nao tem dinheiro suficiente. Voce precisa "..a.price.." gp para ser teleportado.")
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)
return TRUE
elseif config.vip == true and getPlayerStorageValue(cid, tonumber(config.storage))  - os.time() <= 0 then
doPlayerSendTextMessage(cid, 25, "Desculpe,voce nao e Player vip Para Usar o !fly!.")
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)
return TRUE
end
doTeleportThing(cid, a.pos)
doSendMagicEffect(a.pos, CONST_ME_TELEPORT)
doBroadcastMessage("" .. getPlayerName(cid) .. " has flown to " .. param ..  " using !fly." ,MESSAGE_INFO_DESCR)
return TRUE
end

Creditos : Vodkart - Lfelipebsilva05.

Link para o post
Compartilhar em outros sites

Nessa Storage coloco 55555?

storage = 13500 -- Storage Id da sua vip account caso for usar somente vips

 

Se Funfa Te do rep+ durante 1 mês kkkkk pq to atras disso a muito tempo

Link para o post
Compartilhar em outros sites

O tópico foi movido para a área correta, preste mais atenção da próxima vez!

Leia as regras do fórum: http://tibiaking.com/forum/topic/1281-regras-gerais/?p=7680

Este tópico foi movido:

De: "OTServScriptingGeral"

Para: "OTServSuporte OTServSuporte de Scripts"

Bruno Carvalho / Ex-Administrador TibiaKing

[email protected]

 

Em 26/12/2016 em 03:47, Spraypaint disse:

A força da alienação vem dessa fragilidade dos indivíduos, quando apenas conseguem identificar o que os separa e não o que os une.

-miltinho

 

wMwSJFE.png?1

 

Link para o post
Compartilhar em outros sites

oi estava sem pc

agora poco testei não deu mesmo sendo vip ele diz que precisa de vip para usar !fly

eu coloquei certo a storage 55555

:facepalm:

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.

×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo