Ir para conteúdo

Featured Replies

Postado

Eae galera blz? então, to precisando de um script que é o seguinte:

Ao matar monstro remove parede, aparece mensagem em laranja falando que tem 30 segundos pra passar, depois de 30 segundos a parede fecha.

Informações:

8.6

ID da parede: 1546

posição da parede: {x = 174, y = 568, z = 9}

Monstro: Orshabaal

 

Eu ja conheço o script do portal, que ao matar o monstro aparece um portal, mas eu acho que ficaria mais daora se tirasse a parede, alguém pode me ajudar? REP+

Então galera, eu achei esse script na internet mas não funciona também, alguém sabe outro ou sabe concertar esse?

Citar

local config = {
   ["demon"] = {time = 60, wallPos = {x = 992, y = 994, z = 7}},
}
local function deleteWall(tp)
  local wall = getTileItemById(tp, 1107).uid
  if(teleport > 0) then
    doRemoveItem(teleport)
    doSendMagicEffect(tp, CONST_ME_POFF)
  end
  return true
end

function onKill(cid, target)
  local monster = config[getCreatureName(target):lower()]

  if(isPlayer(target) or not monster) then
    return true
  end
  doRemoveWall(1107, monster.toPos, monster.tpPos)
  doCreatureSay(cid, "You have "..monster.time.." seconds to enter the teleport!", TALKTYPE_ORANGE_1)
  addEvent(deleteWall, monster.time * 1000, monster.tpPos)
  return true
end

 

Editado por Gruly (veja o histórico de edições)

Postado
On 23/04/2016 at 3:32 PM, Gruly said:

Eae galera blz? então, to precisando de um script que é o seguinte:

Ao matar monstro remove parede, aparece mensagem em laranja falando que tem 30 segundos pra passar, depois de 30 segundos a parede fecha.

Informações:

8.6

ID da parede: 1546

posição da parede: {x = 174, y = 568, z = 9}

Monstro: Orshabaal

 

Eu ja conheço o script do portal, que ao matar o monstro aparece um portal, mas eu acho que ficaria mais daora se tirasse a parede, alguém pode me ajudar? REP+

Então galera, eu achei esse script na internet mas não funciona também, alguém sabe outro ou sabe concertar esse?

 

Obs: o Nome do monstro deve ser colocado com Letra Maiuscula.

certo:
Demon
errado:
demon



[ Matar monstro e abrir Teleport ]
creaturescript\script

tp.lua
local tpId = 1387
local tps = {
["Orshabaal"] = {pos = {x=761, y=57, z=7}, toPos = {x=767, y=52, z=7}, time = 30},
}

function removeTp(tp)
local t = getTileItemById(tp.pos, tpId)
if t then
doRemoveItem(t.uid, 1)
doSendMagicEffect(tp.pos, CONST_ME_POFF)
end
end

function onDeath(cid)
local tp = tps[getCreatureName(cid)]
if tp then
doCreateTeleport(tpId, tp.toPos, tp.pos)
doCreatureSay(cid, "O teleport irá sumir em "..tp.time.." segundos.", TALKTYPE_ORANGE_1)
addEvent(removeTp, tp.time*1000, tp)
end
return TRUE
end



explicação:

["Orshabaal"] --------- Nome do monstro
pos = {x=761, y=57, z=7} ----------- onde o Teleport irá abrir
toPos = {x=767, y=52, z=7} ------- onde o teleport vai leva eles
time = 30 ------------ tempo em segundos que o teleport ficará aberto

 

em creaturescript adicione:

 <event type="death" name="tp" event="script" value="tp.lua"/>


no arquivo.xml do seu monstro adicione:



<script>
<event name="tp"/>
</script>





[ Matar Monstro e parede sumir por determinado tempo ]

creaturescript\script

removewall.lua
function onDeath(cid, corpse, killer)

local M ={
["rat"] = {Pos = {x=177,y=40,z=7},id= 1058 ,time = 20},
["necromancer"] = {Pos = {x=173, y=40, z=7},id= 10196 ,time = 10},
}

local x = M[getCreatureName(cid)]
function criar()
local parede = getTileItemById(x.Pos, x.id)
doCreateItem(x.id, 1, x.Pos)
end
if x then
local parede = getTileItemById(x.Pos, x.id)
if parede then
doRemoveItem(parede.uid, 1)
doCreatureSay(cid, "A parede Será criada Novamente em "..x.time.." segundos.", TALKTYPE_ORANGE_1)
addEvent(criar, x.time*1000)
end
end
return TRUE
end



em creaturescript.xml adicione a tag:

 &lt;event type="death" name="removeall" event="script" value="removeall.lua"/&gt;


No arquivo Xml do seu monstro adicione

&lt;script&gt;
&lt;event name="removeall"/&gt;
&lt;/script&gt;




[ Matar Monstro e ser teleportado ]


teleportmon.lua[/b]

[/b][b]function onDeath(cid, corpse, killer)[/b]
[b]local Ppos = {x = 160, y = 54, z = 7} -- posicao para onde ele vai ir
local monstName = "Rat" -- nome do monstro 
if isMonster(cid) and string.lower(getCreatureName(cid)) == string.lower(monstName) then
if isInParty(killer[1]) == TRUE then
local players = getPartyMembers(getPartyLeader(killer[1]))
for i, k in ipairs(players) do
doTeleportThing(k, Ppos)
end
else
doTeleportThing(killer[1], Ppos)
end 
end
return TRUE
end




em creaturescript.xml adicione a tag:

 &lt;event type="death" name="TelePort" event="script" value="teleportmon.lua"/&gt;



No arquivo Xml do seu monstro adicione
&lt;script&gt;
&lt;event name="TelePort"/&gt;
&lt;/script&gt;







[ Matar Monstro e Ganhar Storage ]


StorageMonster.lua
function onDeath(cid, corpse, killer)
local monstName = "Demon" -- nome do monstro
local Storage = 11543 -- storage que o jogador ira ganhar 
if isMonster(cid) and string.lower(getCreatureName(cid)) == string.lower(monstName) then
doCreatureSay(cid, "Você ganhou acesso para uma Secret Quest.", TALKTYPE_ORANGE_1)
if isInParty(killer[1]) == TRUE then
local players = getPartyMembers(getPartyLeader(killer[1]))
for i, k in ipairs(players) do
setPlayerStorageValue(k, Storage, 1)
end
else
setPlayerStorageValue(killer[1], Storage, 1)
end 
end
return TRUE
end




em creaturescript.xml adicione a tag:

 &lt;event type="death" name="StoraGe" event="script" value="StorageMonster.lua"/&gt;



No arquivo Xml do seu monstro adicione
&lt;script&gt;
&lt;event name="StoraGe"/&gt;
&lt;/script&gt;


Participe da conversa

Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.

Visitante
Responder

Quem Está Navegando 0

  • Nenhum usuário registrado visualizando esta página.

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.7k

Informação Importante

Confirmação de Termo