VO
talkaction

[ Talkaction ]Teleport Por Talk. Para Vip

Por Vodkart, 09 de jun. de 2010 em Actions e Talkactions

script
77
18.5k
VodkartV
09 de junho de 2010 às 13:20

script é simples,jogadores vip poderão ser teleportado para os lugar por talkactions basta usar o comando

 

Comando:

!tp Lugar

exemplo

!tp depot -- teleporta para o local escolhido(no meu caso o depot)

 

para fazer a checkagem da lista de viagem é

!tp lista -- mostra em uma janela a lista de viagens que o player poderá usar

dffdd.png

 

 

teleportvip.lua

--[[script By Vodkart]]--

function onSay(cid, words, param)

local config = {
pz = true, -- players precisam estar em protection zone para usar? (true or false)
battle = true, -- players deve estar sem battle (true or false)
custo = true, -- se os teleport irão custa (true or false)
need_level = true, -- se os teleport irão precisar de level (true or false)
premium = true -- se precisa ser premium account (true or false)
}

--[[ Config lugares]]--
local lugar = {
["depot"] = { -- nome do lugar
pos = {x=129, y=54, z=6},level = 5,price = 1000},
["templo"] = { -- nome do lugar
pos = {x=160, y=54, z=7},level = 10, price = 2000},
["arena"] = { -- nome do lugar
pos = {x=125, y=351, z=9},level = 15,price = 3000},
["area vip"] ={ -- nome do lugar
pos = {x=280, y=87, z=4},level = 20,price = 4000}
}

--[[ 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, 22, "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, 22, "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, 22, "Desculpe,voce nao tem dinheiro suficiente. Voce precisa "..a.price.." gp para ser teleportado.")
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)
return TRUE
end
doTeleportThing(cid, a.pos)
doSendMagicEffect(a.pos, CONST_ME_TELEPORT)
doPlayerSendTextMessage(cid, 22, "" .. getPlayerName(cid) .. " foi teleportado para: \n " .. param .. ".")
return TRUE
end

 

em talkactions.xml adicione

<talkaction words="!tp" script="teleportvip.lua"/>

Editado Dezembro 28 por Vodkart

DoidinD
09 de junho de 2010 às 14:17

Gostei do script, ficou ótimo além de ser pratico para configurar... =)

Parabéns, REP+!

Henrique MouraH
09 de junho de 2010 às 14:23

Pela funcionalidade, o script até que ficou pequeno.

Parabéns.

edmollaE
09 de junho de 2010 às 16:27

tpw meu servidor ele tem o sistema vip incorporado na PREMIUM gostaria de saber se vc tem como editar e postar para que apenas players P.A possam utilizar o comando...seria legal...eu tenho uma lista cheia de funções lua porem acho que nao vou conseguir usar neste script (sou meio noobinho nisso)

VodkartV
09 de junho de 2010 às 17:37

usa esse:

 

 

 

function onSay(cid, words, param)

 

 

local config = {

pz = "yes", -- players precisam estar em protection zone para usar? ("yes" or "no").

battle = "yes", -- players deve estar sem battle ("yes" or "no")

custo = "yes", -- se os teleport irão custa ("yes" or "no")

premium = "yes" -- se precisa ser premium account ("yes" or "no")

}

 

-------------Config Lugares----------------

local lugar = {

["depot"] = {{x=129, y=54, z=6}, 1, 2000},

["templo"] = {{x=160, y=54, z=7}, 10, 1000},

["arena"] = {{x=162, y=54, z=7}, 10, 1000},

["area vip"] = {{x=163, y=54, z=7}, 10, 1000}

}

-------------/Config Checkar não mecha----------------

local lugar = lugar[param]

if (param == "check") then

for name, pos in pairs(lugar) do

text = "Destino: "..name..", Level necessario: "..pos[2]..","

if(config.battle == "yes") then

text = text.." Voce pode usar estando battler: SIM"

else

text = text.." Voce pode usar estando battler: Não"

end

if(config.pz == "yes") then

text = text.." Voce DeVe Usar estando PZ: SIM"

else

text = text.." Voce DeVe Usar estando PZ: Não"

end

if (pos[3] == TRUE) then

text = text..", Cost: "..pos[4]..";"

end

doPlayerSendTextMessage(cid, 20, ""..text.."")

end

return TRUE

end

 

if(config.pz == "yes") and (getTilePzInfo(getCreaturePosition(cid)) == FALSE) then

doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT,"você precisa estar em protection zone pra poder teleportar.")

return TRUE

end

 

if(config.premium == "yes") and (not isPremium(cid)) then

doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "apenas players com premium account podem teleportar.")

return TRUE

end

 

if(config.battle == "yes") and (getCreatureCondition(cid, CONDITION_INFIGHT) == TRUE) then

doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "Você precisa estar sem battler pra poder teleportar.")

return TRUE

end

 

if not(lugar) then

doPlayerSendTextMessage(cid, 22, "desculpe,este lugar não existe")

doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)

return TRUE

end

 

if (getPlayerLevel(cid) <= lugar[2]) then

doPlayerSendTextMessage(cid, 22, "Desculpe,Voce não tem level. voce precisa "..lugar[2].." level ou mais para ser teleportado.")

doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)

return TRUE

end

 

 

if(config.custo == "yes") and (doPlayerRemoveMoney(cid, lugar[3]) == FALSE) then

doPlayerSendTextMessage(cid, 22, "Desculpe,voce nao tem dinheiro suficiente. Voce precisa "..lugar[3].." gp para ser teleportado.")

doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)

return TRUE

end

doTeleportThing(cid, lugar[1])

doSendMagicEffect(lugar[1], CONST_ME_TELEPORT)

doPlayerSendTextMessage(cid, 22, "" .. getPlayerName(cid) .. " foi teleportado para: \n " .. param .. ".")

return TRUE

end

 

 

Editado Junho 15 por Vodkart

matheus1000M
09 de junho de 2010 às 19:20

Ótimo,

 

já vi esse script em vários Ot's, e ajuda muito.

 

REP+

 

EDIT --

Amanha eu dou, acabou o limite.

Editado Junho 14 por MasterMathw

DoidinD
11 de junho de 2010 às 04:04

MasterMathw dei por você. =)

Abraços...

matheus1000M
14 de junho de 2010 às 22:55

RETIRADO

Editado Junho 14 por MasterMathw

VodkartV
14 de junho de 2010 às 23:15

eu inveti o certo é

 

battle = "yes", -- players deve estar sem battle ("yes" or "no")

 

Valeu pelo aviso.

 

Obrigado MasterMathw

digo327D
15 de junho de 2010 às 14:46

Gostei desse script.

 

E bom para aqueles ot's em que se paga para vip, assim dá mais razões aos jogadores para comprar vip.

 

Parabéns, REP+!

ZaskxDZ
21 de junho de 2010 às 15:34

Muito bom o script!!

davialvesD
22 de junho de 2010 às 14:07

Muito , Muito bom mesmo.. parabens. Como sempre dando show em script, em vodkart ;]

 

Rep+

1 mês depois...
ciappabrotherC
16 de julho de 2010 às 20:14

Muito Bom Vod,

Me ajudou bastante!

Mas fis um Mais Simplesinho ,que voce pode escolher se Cobra ou Não Mudando o Preço e só VIPS podem usar ,

me basiei nesse Script veja:

 

function onSay(cid, words, param, channel)

 

local config = {

vip = "yes", -- somente vip players poderam usar o comando? ("yes" or "no")

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

}

 

local destinations = {

["Templo"] = {destino = {x=111, y=222, z=333}, money = 0},

["DP"] = {destino = {x=444, y=555, z=666}, money = 0},

["Caverna"] = {destino = {x=777, y=888, z=999}, money = 0},

}

local tp = destinations[param]

if(param == "") then

doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Viajar Para :Templo ,DP ,Caverna") < ----- Menssagem que aparesera no console quando o player falar /tp

return true

end

if (config.vip == "yes") and getPlayerStorageValue(cid, tonumber(config.storage)) - os.time() <= 0 then

doPlayerSendCancel(cid,"Você não possui uma conta Vip.")

return TRUE

end

if(getPlayerMoney(cid) < tp.money) then

doPlayerSendCancel(cid, "Você não tem dinheiro suficiente.")

elseif(isPlayerPzLocked(cid) == true) then

doPlayerSendCancel(cid, "Você tem que estar sem Batle para Viajar.")

else

doPlayerRemoveMoney(cid, tp.money)

doSendMagicEffect(getPlayerPosition(cid), 27)

doTeleportThing(cid, tp.destino)

doPlayerSendTextMessage(cid, 22, "Você foi teleportado para ".. param ..".")

doSendMagicEffect(getPlayerPosition(cid), 40)

end

return true

end

 

:D

VodkartV
16 de julho de 2010 às 20:36

sim fico bem simples,mais o resultado ficou ótimo

 

oque eu colocaria ai é para ser teleportado em Pz mesmo,se não ficaria ruim o pvp dp ot os cara tudo fugindo

 

abraços

GabriielYuriG
16 de julho de 2010 às 21:14

Muito bom,para ots com xp alta,aqueles que fica um war direto