if creaturename == 'Brothers' then[
não entendi... quem é pra ser esse brothers?
Por coriel, 19 de out. de 2012 em Scripts
info
Grupo: Conde
Registrado: 25/04/12
Posts: 752
Reputação: +125
Gênero: Masculino

if creaturename == 'Brothers' then[
não entendi... quem é pra ser esse brothers?
Pois é, tá errado cara, vou postar um script correto que você pode se basear para atender o meu pedido.. Esses brothers, seriam o Latrivan e o Golgordan.
function onDeath(cid, corpse, killer)
registerCreatureEvent(cid, "inquisitionPortalsum")
local creaturename = getCreatureName(cid)
local ushuriel_in_position = {x=342, y=765, z=12, stackpos=2}
local ushuriel_to_position = {x=268, y=973, z=13, stackpos=1}
local time_to_pass = 180
local tpID = 5023
local doEffect = CONST_ME_ENERGYHIT
local message = "You now have 3 minutes to exit this room through the teleporter. It will bring you to the next room only during his time or the teleporter will disappear."
if creaturename == 'Ushuriel' then
teleport = doCreateTeleport(tpID, ushuriel_to_position, ushuriel_in_position)
doSendMagicEffect(ushuriel_in_position, CONST_ME_ENERGYHIT)
doCreatureSay(cid, message, TALKTYPE_ORANGE_1)
addEvent(removeTeleportInUshurielWard, (1000*time_to_pass))
end
return true
end
function removeTeleportInUshurielWard()
if getThingfromPos({x=342, y=765, z=12, stackpos=1}).itemid == 5023 then
doRemoveItem(getThingfromPos({x=342, y=765, z=12, stackpos=1}).uid,1)
doSendMagicEffect({x=342, y=765, z=12, stackpos=1}, CONST_ME_POFF)
return TRUE
end
end
EDIT: Vou repetir mais uma vez o meu pedido, seria: É o seguinte, esse script era pra funcionar da seguinte maneira: dois bosses Latrivan e Golgordan tinham que morrer para um teleport ser criado depois da morte dos dois, tipo, se eu matar o Latrivan, o teleport não pode ser criado antes do Golgordan ser morto e vice-versa. Em outras palavras, se matar um dos dois bosses, é como se o teleport já tivesse criado pela metade e quando matar o outro boss, o teleport é criado.
Editado Outubro 19 por coriel
info
Grupo: Conde
Registrado: 25/04/12
Posts: 752
Reputação: +125
Gênero: Masculino

#PERA agora que vi oq vc escreveu ;s to pegando do outro ¬¬
Editado Outubro 19 por Cleberadm
Não cleber, você mandou o script do Ushuriel.. Seria o Script do Latrivan e do Golgordam.. Quando matar os dois, o tp cria. Se matar só um, o tp não cria, tem que matar os dois pro tp ser criado.
info
Grupo: Conde
Registrado: 25/04/12
Posts: 752
Reputação: +125
Gênero: Masculino

AGORA acho que entendi.. tenta ai...
function onDeath(cid, corpse, killer)
registerCreatureEvent(cid, "inquisitionPortalsquatro")
local creaturename = getCreatureName(cid)
local brothers_in_position = {x=661, y=759, z=13, stackpos=1}
local brothers_to_position = {x=504, y=827, z=13, stackpos=1}
local time_to_pass = 180
local tpID = 5023
local doEffect = CONST_ME_ENERGYHIT
local message = "You now have 3 minutes to exit this room through the teleporter. It will bring you to the next room only during his time or the teleporter will disappear."
if creaturename == 'Latrivan' and 'Golgordam' then
teleport = doCreateTeleport(tpID, brothers_to_position, brothers_in_position)
doSendMagicEffect(brothers_in_position, CONST_ME_ENERGYHIT)
doCreatureSay(cid, message, TALKTYPE_ORANGE_1)
addEvent(removeTeleportInBrothersWard, (1000*time_to_pass))
end
return true
end
function removeTeleportInBrothersWard()
if getThingfromPos({x=661, y=759, z=13, stackpos=1}).itemid == 5023 then
doRemoveItem(getThingfromPos({x=661, y=759, z=13, stackpos=1}).uid,1)
doSendMagicEffect({x=661, y=759, z=13, stackpos=1}, CONST_ME_POFF)
return TRUE
end
end
Editado Outubro 19 por Cleberadm
Mas olha o script que você me enviou, ainda tem o nome ushuriel diversas vezes..
Editado Outubro 19 por coriel
info
Grupo: Conde
Registrado: 25/04/12
Posts: 752
Reputação: +125
Gênero: Masculino

Pega esse ultimo ali...
function onDeath(cid, corpse, killer)
registerCreatureEvent(cid, "inquisitionPortalsquatro")
local creaturename = getCreatureName(cid)
local brothers_in_position = {x=661, y=759, z=13, stackpos=1}
local brothers_to_position = {x=504, y=827, z=13, stackpos=1}
local time_to_pass = 180
local tpID = 5023
local doEffect = CONST_ME_ENERGYHIT
local message = "You now have 3 minutes to exit this room through the teleporter. It will bring you to the next room only during his time or the teleporter will disappear."
if creaturename == 'Latrivan' and 'Golgordam' then
teleport = doCreateTeleport(tpID, brothers_to_position, brothers_in_position)
doSendMagicEffect(brothers_in_position, CONST_ME_ENERGYHIT)
doCreatureSay(cid, message, TALKTYPE_ORANGE_1)
addEvent(removeTeleportInBrothersWard, (1000*time_to_pass))
end
return true
end
function removeTeleportInBrothersWard()
if getThingfromPos({x=661, y=759, z=13, stackpos=1}).itemid == 5023 then
doRemoveItem(getThingfromPos({x=661, y=759, z=13, stackpos=1}).uid,1)
doSendMagicEffect({x=661, y=759, z=13, stackpos=1}, CONST_ME_POFF)
return TRUE
end
end
info
Grupo: Marquês
Registrado: 22/07/12
Posts: 1.1k
Reputação: +400
Gênero: Masculino
Char no Tibia: Luck Oake

Fiz um melhor aqui pra você.
creaturescripts.xml:
<event type="death" name="TpBosses" script="tpbosses.lua"/>
tpbosses.lua:
function onDeath(cid, killer)
local tp = {x = 100, y = 100, z = 7} -- Posição do Teleport
local tpgo = {x = 100, y = 100, z = 7} -- Posição em que o teleport levará
local tempo = 30 -- Tempo em que o Teleport ficará aberto em segundos
local tpid = 1387 -- ID do teleport
local stor = 18291
if getGlobalStorageValue(stor) == -1 then
setGlobalStorageValue(stor, getGlobalStorageValue(stor)+1)
elseif getGlobalStorageValue(stor) == 0 then
doCreateTeleport(tpid, tpgo, tp)
setGlobalStorageValue(stor, -1)
addEvent(removeTp, tempo*1000)
end
return true
end
function removeTp()
local t = getTileItemById(tp, tpid)
doRemoveItem(t.uid, 1)
doSendMagicEffect(tp, CONST_ME_POFF)
end
No monstro que você quer que execute o script (No caso, Latrivan e Golgordan), adicione antes de </monster>:
<script> <event name="TpBosses"/> </script>
@Cleberadm
No seu vai dar erros, isso aqui não existe:
if creaturename == 'Latrivan' and 'Golgordam' then
Tinha que ser assim:
if creaturename == 'Latrivan' or creaturename == 'Golgordam' then
Editado Outubro 19 por LuckOake
info
Grupo: Conde
Registrado: 25/04/12
Posts: 752
Reputação: +125
Gênero: Masculino

if creaturename == 'Latrivan' or creaturename == 'Golgordam' then
nao teria que ser assim
if creaturename == 'Latrivan' and creaturename == 'Golgordam' then
e.e pq é pra verificar os 2 '-'
E nao 1 ou outro...
info
Grupo: Marquês
Registrado: 22/07/12
Posts: 1.1k
Reputação: +400
Gênero: Masculino
Char no Tibia: Luck Oake

@Cleberadm
Não pode ser assim, porque vejamos. Imagine que isso é pra ser pra um character. Se fizer verificação com and, o script vai executar só se o nome do char for Fulano e Ciclano ao mesmo tempo, o que é impossível, ninguém pode ter dois nomes. O or faz a verificação com mais de um, pois ele vai executar se o nome do char for Fulano OU Ciclano,
info
Grupo: Conde
Registrado: 25/04/12
Posts: 752
Reputação: +125
Gênero: Masculino

Mas seria o bixo ali g.g pq eu entendi pra verifica se o MONSTRO 1 E O MONSTRO 2 ESTIVEREM MORTOS...
e nao se o MONSTRO1 ou o MONSTRO2 estiver morto...
Ele quer fazer pra verificar se os 2 estão mortos e não se 1 ou outro...// ou eu to perdido ![]()
Galera, nenhum dos dois deu certo.. Por isso demorei pra responder..
EDIT: Testei o último script que o Cleberadm me mandou com isso aqui: "if creaturename =='Latrivan' or creaturename =='Golgordan' then" que o LuckOake enviou e "quase" deu certo. Tipo, se eu matar o Latrivan, o tp cria e se eu matar o Golgordan, o tp cria. O script era pra ser: matar os dois e o tp criar e não apenas 1 e o tp criar.
Editado Outubro 19 por coriel
info
Grupo: Conde
Registrado: 25/04/12
Posts: 752
Reputação: +125
Gênero: Masculino

Qual erro apareceu? o que aconteceu?
Entao tenta assim if creaturename == 'Latrivan' and creaturename == 'Golgordam' then
Editado Outubro 19 por Cleberadm
info
Grupo: Artesão
Registrado: 02/03/07
Posts: 119
Reputação: +1
Gênero: Masculino
Fala galera, tô com um novo probleminha aqui, meu script não tá funcionando.. É o seguinte, esse script era pra funcionar da seguinte maneira: dois bosses Latrivan e Golgordan tinham que morrer para um teleport ser criado depois da morte dos dois, tipo, se eu matar o Latrivan, o teleport não pode ser criado antes do Golgordan ser morto e vice-versa. Em outras palavras, se matar um dos dois bosses, é como se o teleport já tivesse criado pela metade e quando matar o outro boss, o teleport é criado. Vou passar os scripts para vocês.
Em creaturescripts.xml tá assim:
Em creaturescripts\scripts\teleports_inquisition4.lua tá assim:
function onDeath(cid, corpse, killer) registerCreatureEvent(cid, "inquisitionPortalsquatro") local creaturename = getCreatureName(cid) local brothers_in_position = {x=661, y=759, z=13, stackpos=1} local brothers_to_position = {x=504, y=827, z=13, stackpos=1} local time_to_pass = 180 local tpID = 5023 local doEffect = CONST_ME_ENERGYHIT local message = "You now have 3 minutes to exit this room through the teleporter. It will bring you to the next room only during his time or the teleporter will disappear." if creaturename == 'Brothers' then teleport = doCreateTeleport(tpID, brothers_to_position, brothers_in_position) doSendMagicEffect(brothers_in_position, CONST_ME_ENERGYHIT) doCreatureSay(cid, message, TALKTYPE_ORANGE_1) addEvent(removeTeleportInBrothersWard, (1000*time_to_pass)) end return true end function removeTeleportInBrothersWard() if getThingfromPos({x=661, y=759, z=13, stackpos=1}).itemid == 5023 then doRemoveItem(getThingfromPos({x=661, y=759, z=13, stackpos=1}).uid,1) doSendMagicEffect({x=661, y=759, z=13, stackpos=1}, CONST_ME_POFF) return TRUE end endEm creaturescripts\scripts\login.lua adicionei isso:
Nos meus bixos, no caso o Latrivan e o Golgordan, adicionei isso:
Quem ajudar, REP+
UP! Alguém pode me ajudar? Grato! Valendo REP+
Editado Outubro 19 por coriel