-
Total de itens
41 -
Registro em
-
Última visita
-
Dias Ganhos
1
Tudo que gusinhi postou
-
Spoiler
local positions = { {lugar = "Midgard", pos = {x=123, y=123, z=7}, price = 1000}, -- Nome do lugar, posicao do lugar {lugar = "Sao Paulo", pos = {x=123, y=123, z=7}, price = 13000}, {lugar = "Carlin", pos = {x=123, y=123, z=7}, price = 1000}, {lugar = "Venore", pos = {x=123, y=123, z=7}, price = 1000} } local needPz = false -- Precisa de pz? [true/false] local cooldown = 5 -- Tempo em segundos para poder se teleportar novamente. local needPrem = false -- Precisa ser premiu? [true/false] function onSay(cid, words, param, channel) local str = "" for i = 1, (#positions) do local cidades = positions[i].lugar local custo = positions[i].price str = str .. cidades .. ' - ' .. custo .. ' gps\n ' end if param == "" then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Para se teleportar diga !teleport LUGAR.\nLugares disponiveis:\n " .. str .. " \n Escolha seu destino e boa viagem!") end for _, abc in pairs(positions) do if param:lower() == abc.lugar:lower() then if needPz == true and getTilePzInfo(getCreaturePosition(cid)) == false then return doPlayerSendCancel(cid, "Voce precisa estar em PZ para teleportar.") elseif getPlayerStorageValue(cid, 23121) > os.time() then return doPlayerSendCancel(cid, "Voce deve esperar mais " .. getPlayerStorageValue(cid, 23121) - os.time() .. " segundos para se teleportar novamente.") elseif needPrem == true and not isPremium(cid) then return doPlayerSendCancel(cid, "Somente jogadores premium podem teleportar.") elseif getPlayerMoney(cid) < abc.price then return doPlayerSendCancel(cid, "Voce nao tem dinheiro.") end doPlayerSetStorageValue(cid, 23121, os.time() + cooldown) doPlayerRemoveMoney(cid, abc.price) doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT) doTeleportThing(cid, abc.pos) doPlayerSendTextMessage(cid, 25, "Bem vindo a " .. abc.lugar.. "!") doSendMagicEffect(abc.pos, CONST_ME_TELEPORT) end end return true end
opa eai mano, eu encotrei um script seu e gostaria de sua ajuda para modificar um pouco ele, em vez de cobrar por viagem teria como fazer que o player tenha um item X scroll por exemplo para poder usar o camando sem que remova o item
-
Eai mano eu achei um script em talkaction que cobra 1k para o player falar o comando, voce sabe como fazer para q o player tenha esse item 2345 para poder falar o comando sem remover o item para q o player use qnd quiser
Spoilerocal positions = {
{lugar = "1", pos = {x = 32957, y = 32076, z = 7}, price = 1000},
{lugar = "2", pos = {x = 32369, y = 32241, z = 7}, price = 1000},
{lugar = "3", pos = {x = 32649, y = 31925, z = 11}, price = 1000},
{lugar = "4", pos = {x = 32360, y = 31782, z = 7}, price = 1000},
{lugar = "5", pos = {x = 32732, y = 31634, z = 7}, price = 1000},
{lugar = "6", pos = {x = 32317, y = 32826, z = 7}, price = 1000}
}local needPz = false
local cooldown = 5
local needPrem = falsefunction onSay(cid, words, param, channel)
local str = ""
for i = 1, (#positions) do
local cidades = positions.lugar
local custo = positions.price
str = str .. cidades .. ' - ' .. custo .. ' gps\n '
endif param == "" then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Para se teleportar diga !teleport LUGAR.\nLugares disponiveis:\n " .. str .. " \n Escolha seu destino e boa viagem!")
end
for _, abc in pairs(positions) doif param:lower() == abc.lugar:lower() then
if needPz == true and getTilePzInfo(getCreaturePosition(cid)) == false then
return doPlayerSendCancel(cid, "Voce precisa estar em PZ para teleportar.")
elseif getPlayerStorageValue(cid, 23121) > os.time() then
return doPlayerSendCancel(cid, "Voce deve esperar mais " .. getPlayerStorageValue(cid, 23121) - os.time() .. " segundos para se teleportar novamente.")
elseif needPrem == true and not isPremium(cid) then
return doPlayerSendCancel(cid, "Somente jogadores premium podem teleportar.")
elseif getPlayerMoney(cid) < abc.price then
return doPlayerSendCancel(cid, "Voce nao tem dinheiro.")
enddoPlayerSetStorageValue(cid, 23121, os.time() + cooldown)
doPlayerRemoveMoney(cid, abc.price)
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT)
doTeleportThing(cid, abc.pos)
doPlayerSendTextMessage(cid, 25, "Bem vindo a " .. abc.lugar.. "!")
doSendMagicEffect(abc.pos, CONST_ME_TELEPORT)
end
end
return true
end-
https://www.facebook.com/profile.php?id=100011055639641
me adicionar no facebook para eu poder ajudar
-
-
Quem Está Navegando 0 membros estão online
- Nenhum usuário registrado visualizando esta página.