Alguem?
- Forums
- OTServ
- Pedidos
- Resolvidos
- [Resolvido] ajuda script
info
Group: Campones
Joined: 24/10/10
Posts: 40
Reputation: 0
Tibia Character: Nerd Zaum

info
Group: Campones
Joined: 01/03/16
Posts: 41
Reputation: +5
Gender: Masculino

function onUse(cid, item, frompos, item2, topos)
local sto = 874157 -- numero da storage
if getPlayerStorageValue(cid, sto) == -1 then
if getPlayerVocation(cid) == 6 then
doTeleportThing(cid,{x=134, y=2443, z=7})
else
doPlayerSendTextMessage(cid,22,"Voce não pode passar aqui")
end
else
doPlayerSendTextMessage(cid,22,"Only bio-alchimist may open this door.")
end
else
return true
end
info
Group: Campones
Joined: 24/10/10
Posts: 40
Reputation: 0
Tibia Character: Nerd Zaum

Em 13/09/2018 em 11:44, Marshmello2 disse:function onUse(cid, item, frompos, item2, topos)
local sto = 874157 -- numero da storage
if getPlayerStorageValue(cid, sto) == -1 then
if getPlayerVocation(cid) == 6 then
doTeleportThing(cid,{x=134, y=2443, z=7})
else
doPlayerSendTextMessage(cid,22,"Voce não pode passar aqui")
end
else
doPlayerSendTextMessage(cid,22,"Only bio-alchimist may open this door.")end
else
return true
end
vlw tava precisando pakas, vou dar uma testada aqui
Em 13/09/2018 em 11:44, Marshmello2 disse:function onUse(cid, item, frompos, item2, topos)
local sto = 874157 -- numero da storage
if getPlayerStorageValue(cid, sto) == -1 then
if getPlayerVocation(cid) == 6 then
doTeleportThing(cid,{x=134, y=2443, z=7})
else
doPlayerSendTextMessage(cid,22,"Voce não pode passar aqui")
end
else
doPlayerSendTextMessage(cid,22,"Only bio-alchimist may open this door.")end
else
return true
end
puts deu erro. :(
[Error - LuaScriptInterface::loadFile] data/actions/scripts/door/vocdoorp.lua:13
: 'end' expected (to close 'function' at line 1) near 'else'
[Warning - Event::loadScript] Cannot load script (data/actions/scripts/door/vocd
oorp.lua)
data/actions/scripts/door/vocdoorp.lua:13: 'end' expected (to close 'function' a
t line 1) near 'else'
[Error - LuaScriptInterface::loadFile] data/actions/scripts/door/vocdoord.lua:13
: 'end' expected (to close 'function' at line 1) near 'else'
[Warning - Event::loadScript] Cannot load script (data/actions/scripts/door/vocd
oord.lua)
data/actions/scripts/door/vocdoord.lua:13: 'end' expected (to close 'function' a
t line 1) near 'else'
[
info
Group: Campones
Joined: 01/03/16
Posts: 41
Reputation: +5
Gender: Masculino

function onUse(cid, item, frompos, item2, topos)
local sto = 874157 -- numero da storage
if getPlayerStorageValue(cid, sto) == -1 then
if getPlayerVocation(cid) == 6 then
doTeleportThing(cid,{x=134, y=2443, z=7})
else
doPlayerSendTextMessage(cid,22,"Voce não pode passar aqui") -- msg da vocation
end
else
doPlayerSendTextMessage(cid,22,"Voce não pode passar aqui") --- Msg da storage
end
return true
end
function onUse(cid, item, frompos, item2, topos) local storate,value = 874157,1 -- numero da storage, e o valor que ganha na quest da storage local vocationId = 6 if not getPlayerVocation(cid) == vocationId then return doPlayerSendTextMessage(cid,22,"Você precisa ser um ? para entrar na área especial.") elseif not getPlayerStorageValue(cid, storate) == value then return doPlayerSendTextMessage(cid,22,"Você precisa fazer a quest para entrar na área especial.") end doTeleportThing(cid,{x=134, y=2443, z=7}) doPlayerSendTextMessage(cid,22,"Você foi teleportado para área dos ?.") return true end
info
Group: Campones
Joined: 24/10/10
Posts: 40
Reputation: 0
Tibia Character: Nerd Zaum

11 horas atrás, Marshmello2 disse:function onUse(cid, item, frompos, item2, topos)
local sto = 874157 -- numero da storage
if getPlayerStorageValue(cid, sto) == -1 then
if getPlayerVocation(cid) == 6 then
doTeleportThing(cid,{x=134, y=2443, z=7})
else
doPlayerSendTextMessage(cid,22,"Voce não pode passar aqui") -- msg da vocation
end
else
doPlayerSendTextMessage(cid,22,"Voce não pode passar aqui") --- Msg da storageend
return true
end
tudo certo vlw
3 horas atrás, Crypter disse:function onUse(cid, item, frompos, item2, topos) local storate,value = 874157,1 -- numero da storage, e o valor que ganha na quest da storage local vocationId = 6 if not getPlayerVocation(cid) == vocationId then return doPlayerSendTextMessage(cid,22,"Você precisa ser um ? para entrar na área especial.") elseif not getPlayerStorageValue(cid, storate) == value then return doPlayerSendTextMessage(cid,22,"Você precisa fazer a quest para entrar na área especial.") end doTeleportThing(cid,{x=134, y=2443, z=7}) doPlayerSendTextMessage(cid,22,"Você foi teleportado para área dos ?.") return true end
vlw
@carlinhoo0ww marca como melhor resposta, para o tópico ser fechado
info
Group: Conde
Joined: 21/04/16
Posts: 831
Reputation: +271
Gender: Masculino




info
Group: Campones
Joined: 24/10/10
Posts: 40
Reputation: 0
Tibia Character: Nerd Zaum
e ai galera blz?
estou aqui precisando muito da ajuda de vocês pois queria deixa um script de uma porta
onde nao pode-se passar se tiver X storage.
exemplo: tal quest da a storage 1234, ai se voce tiver a storage 1234 nao pode passar pela porta.
o script que tenho é esse, alguem pode adicionar isso para mim pf.
function onUse(cid, item, frompos, item2, topos)
PlayerVoc = getPlayerVocation(cid)
if PlayerVoc == 6 then
doTeleportThing(cid,{x=134, y=2443, z=7})
else
doPlayerSendTextMessage(cid,22,"Only bio-alchimist may open this door.")
return 1
end
end
agradeço desde já.