Ola tenho esse script de teleport mas queria acresentar nele o seguinte se o player estiver com a storage 1234 ele nao conseguir usar o teleport.
Substitui tudo por:
local config = {
pz = false, -- false
battle = true, -- trues
custo = false, -- false
need_level = false, -- false
premium = true, -- true
exhaust = 5,
}
local free = {
["azeroth"] ={
pos = {x=613, y=1056, z=7}, price = 0},
["esdra"] ={
pos = {x=1091, y=2272, z=4}, price = 0},
["elsera"] ={
pos = {x=342, y=101, z=6}, price = 0},
["saragoka"] ={
pos = {x=628, y=879, z=7}, price = 0},
["gloria"] ={
pos = {x=797, y=821, z=7}, price = 0},
["avalon"] ={
pos = {x=2096, y=949, z=7}, price = 0},
["edileia"] ={
pos = {x=581, y=2327, z=6}, price = 0},
["khalarar"] ={ --
pos = {x=1369, y=1122, z=7}, price = 0},
["varmor"] ={ --
pos = {x=407, y=633, z=7}, price = 0},
["nevasta"] ={ --
pos = {x=2431, y=1337, z=7}, price = 0},
["shurima"] ={ --
pos = {x=1833, y=2183, z=5}, price = 0},
["orcpromo"] ={ --
pos = {x=2569, y=2186, z=5}, price = 0},
["arena"] ={
pos = {x=2129, y=925, z=10}, price = 0},
["midgarde"] ={
pos = {x=3630, y=1870, z=6}, price = 0},
["formagor"] ={ --
pos = {x=2619, y=2086, z=4}, price = 0},
}
local premium = {
["arena"] ={
pos = {x=2129, y=925, z=10}, price = 0},
["treineroff"] ={ --
pos = {x=1514, y=1134, z=6}, price = 0},
["oxyurus"] ={
pos = {x=304, y=161, z=7}, price = 0}
}
function onSay(cid, words, param, channel)
if getPlayerCancel(cid) < 4 and getPlayerStorageValue(cid, 1234) < 1 then
return doPlayerSendCancel(cid, "Você não tem permissão para usar este comando.") and true ---By:Nysman
end
if(param == '') then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command param required.")
return true
end
function onSay(cid, words, param)
local param, str, var = param:lower(),"", isPremium(cid) and premium or free
if param == "" or param == "list" then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "--=[ FREE ]=--")
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "CIDADES: azeroth, avalon, gloria, saragoka, elsera, edileia, khalarar, varmor, nevasta, shurima, formagor, esdra, midgarde. ( orcpromo, arena )")
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "--=[ VIPS ]=--")
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "HUNT LEVEL 8 a 30: troll, amazon, mino1, mino2, elf1, dworc, barbarian1, barbarian2, bonelord, orc1, orc2. ( treineroff )")
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "HUNT LEVEL 30 a 50: cyclops1, cyclops2, cyclops3, cyclops4, pirate, vamp1, vamp2, lightvale, macacos, scarab, dwarf1, dwarf2, dragonhatchling1, dragonhatchling2.")
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "HUNT LEVEL 50 a 80: banshee, wyvern, hero1, hero2, dragon1, dragon2, dragon3, dragon4, dragon5, dragon6, dragon7, blacknight1, blacknight2, hydra1, hydra2, hydra3, hydra4, spider1, spider2, icespider1, icespider2.")
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "HUNT LEVEL 80 a 100: behemoth1, behemoth2, behemoth3, behemoth4, behemoth5, northland, frost1, frost2, frost3, frost4, frost5, volcan, rhun, defiler1, defiler2, bograider1, bograider2, nightmare1, nightmare2, quaras.")
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "HUNT LEVEL 100 a 200: hellhound1, hellhound2, hellhound3, fury, warlock1, warlock2, warlock3, demon1, demon2, demon3, undead1, undead2, deathvale, erediunvale, serpent1, serpent2, spiritfire, wyrm, dark, erechvale, behedemon, higelf.")
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "HUNT LEVEL 200+: northen, elemental, lizard1, lizard2, lizard3, medusa1, medusa2, oxyurus, terminator1, terminator2, jugger1, jugger2, solarian, bloodboil, valemordor, demonictoad.")
return true
end
local a = var[param]
if not(a) then
doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT,"Use comando /ir veja os lugares onde você pode ir.")
doSendMagicEffect(getCreaturePosition(cid), 2)
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 getCreatureCondition(cid, CONDITION_INFIGHT) then
doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "Você não pode se teleportar em uma batalha.")
return true
elseif config.custo == true and doPlayerRemoveMoney(cid, a.price) == FALSE then
doPlayerSendTextMessage(cid, 22, "Desculpe,voce nâo tem dinheiro suficiente. Voce precisa "..a.price.." gp para ser teleportado.")
return true
end
if getPlayerStorageValue(cid, 15000) - os.time() > 0 then
doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "Aguarde "..config.exhaust.." segundos para teleporta novamente.")
return true
end
setPlayerStorageValue(cid, 15000, os.time()+ config.exhaust)
doSendMagicEffect(getCreaturePosition(cid), 27)
doTeleportThing(cid, a.pos)
doSendMagicEffect(a.pos, CONST_ME_BIGCLOUDS)
return true
end
Teve um erro no script, já modifiquei, testa dnv
Tenta por
storage = 88888
no começo do código abaixo de
exhaust = 5,
Ai depois adiciona isso em qualquer lugar
if getPlayerStorageValue(cid,1234) == -1 then
doPlayerSendCancel(cid,"Você não pode usar.")
return TRUE
end
local config = {
pz = false, -- false
battle = true, -- trues
custo = false, -- false
need_level = false, -- false
premium = true, -- true
exhaust = 5,
}
local free = {
["azeroth"] ={
pos = {x=613, y=1056, z=7}, price = 0},
["esdra"] ={
pos = {x=1091, y=2272, z=4}, price = 0},
["elsera"] ={
pos = {x=342, y=101, z=6}, price = 0},
["saragoka"] ={
pos = {x=628, y=879, z=7}, price = 0},
["gloria"] ={
pos = {x=797, y=821, z=7}, price = 0},
["avalon"] ={
pos = {x=2096, y=949, z=7}, price = 0},
["edileia"] ={
pos = {x=581, y=2327, z=6}, price = 0},
["khalarar"] ={ --
pos = {x=1369, y=1122, z=7}, price = 0},
["varmor"] ={ --
pos = {x=407, y=633, z=7}, price = 0},
["nevasta"] ={ --
pos = {x=2431, y=1337, z=7}, price = 0},
["shurima"] ={ --
pos = {x=1833, y=2183, z=5}, price = 0},
["orcpromo"] ={ --
pos = {x=2569, y=2186, z=5}, price = 0},
["arena"] ={
pos = {x=2129, y=925, z=10}, price = 0},
["midgarde"] ={
pos = {x=3630, y=1870, z=6}, price = 0},
["formagor"] ={ --
pos = {x=2619, y=2086, z=4}, price = 0},
}
local premium = {
["arena"] ={
pos = {x=2129, y=925, z=10}, price = 0},
["treineroff"] ={ --
pos = {x=1514, y=1134, z=6}, price = 0},
["oxyurus"] ={
pos = {x=304, y=161, z=7}, price = 0}
}
function onSay(cid, words, param, channel)
if getPlayerCancel(cid) < 4 and getPlayerStorageValue(cid, 1234) < -1 then
return doPlayerSendCancel(cid, "Você não tem permissão para usar este comando.") and true --- By:Nysman
end
end
function onSay(cid, words, param)
local param, str, var = param:lower(),"", isPremium(cid) and premium or free
if param == "" or param == "list" then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "--=[ FREE ]=--")
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "CIDADES: azeroth, avalon, gloria, saragoka, elsera, edileia, khalarar, varmor, nevasta, shurima, formagor, esdra, midgarde. ( orcpromo, arena )")
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "--=[ VIPS ]=--")
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "HUNT LEVEL 8 a 30: troll, amazon, mino1, mino2, elf1, dworc, barbarian1, barbarian2, bonelord, orc1, orc2. ( treineroff )")
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "HUNT LEVEL 30 a 50: cyclops1, cyclops2, cyclops3, cyclops4, pirate, vamp1, vamp2, lightvale, macacos, scarab, dwarf1, dwarf2, dragonhatchling1, dragonhatchling2.")
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "HUNT LEVEL 50 a 80: banshee, wyvern, hero1, hero2, dragon1, dragon2, dragon3, dragon4, dragon5, dragon6, dragon7, blacknight1, blacknight2, hydra1, hydra2, hydra3, hydra4, spider1, spider2, icespider1, icespider2.")
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "HUNT LEVEL 80 a 100: behemoth1, behemoth2, behemoth3, behemoth4, behemoth5, northland, frost1, frost2, frost3, frost4, frost5, volcan, rhun, defiler1, defiler2, bograider1, bograider2, nightmare1, nightmare2, quaras.")
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "HUNT LEVEL 100 a 200: hellhound1, hellhound2, hellhound3, fury, warlock1, warlock2, warlock3, demon1, demon2, demon3, undead1, undead2, deathvale, erediunvale, serpent1, serpent2, spiritfire, wyrm, dark, erechvale, behedemon, higelf.")
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "HUNT LEVEL 200+: northen, elemental, lizard1, lizard2, lizard3, medusa1, medusa2, oxyurus, terminator1, terminator2, jugger1, jugger2, solarian, bloodboil, valemordor, demonictoad.")
return true
end
local a = var[param]
if not(a) then
doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT,"Use comando /ir veja os lugares onde você pode ir.")
doSendMagicEffect(getCreaturePosition(cid), 2)
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 getCreatureCondition(cid, CONDITION_INFIGHT) then
doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "Você não pode se teleportar em uma batalha.")
return true
elseif config.custo == true and doPlayerRemoveMoney(cid, a.price) == FALSE then
doPlayerSendTextMessage(cid, 22, "Desculpe,voce nâo tem dinheiro suficiente. Voce precisa "..a.price.." gp para ser teleportado.")
return true
end
if getPlayerStorageValue(cid, 15000) - os.time() > 0 then
doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "Aguarde "..config.exhaust.." segundos para teleporta novamente.")
return true
end
setPlayerStorageValue(cid, 15000, os.time()+ config.exhaust)
doSendMagicEffect(getCreaturePosition(cid), 27)
doTeleportThing(cid, a.pos)
doSendMagicEffect(a.pos, CONST_ME_BIGCLOUDS)
return true
end
1 hora atrás, zeruella disse:coloquei continua teleportando normal mesmo com a store 1234 no player!
voce nao testa os script e posta cara voce e louco!
Não tenho base de tibia para testar seus script, só estou tentando ajudar e você ainda reclama, fica ai tentando resolver ent