GA

Ajuda Com Creature Scripts!

Por galaverna, 11 de ago. de 2011 em Archived

script
3
950
galavernaG
11 de agosto de 2011 às 14:33

Eu queria um creature scripts que verifica quando o Summon morre... Quando ele morre ele "seta" uma storage==1

 

vlw ae

meubkM
12 de agosto de 2011 às 08:37

vc tem que registrar um evento no script que sumona o monstro, e depois setar a storage do master do summon, posta ai o sistema que faiz sumonar ele, que eu te explico

galavernaG
12 de agosto de 2011 às 13:33

Não Resolvido!!

Teria como fazer o código ?? me mostrar como usa o register e dps oq por no creature scripts??

ta ai :

function onSay(cid, words, param, itemEx, params)
local nsummon = getCreatureSummons(cid)
local pos = getPlayerPosition(cid)
local summons = {
["Wolf"] = {palavra ="wolf",levelm=1,levelma=9,vida=getCreatureMaxHealth(cid)},
["Fighter"] = {palavra = "fighter",levelm=10,levelma=15,vida=getCreatureMaxHealth(cid)},
["Raditz"] = {palavra = "raditz",levelm=16,levelma=100,vida=getCreatureMaxHealth(cid)}
}
for k,v in pairs(summons) do

if isCreature(cid) then
  if words == "!back" then
  doRemoveCreature(x) 
  end
end



if getPlayerStorageValue(cid,12122)==-1 then
   if (table.maxn(nsummon) < 1)then
      if getPlayerLevel(cid)>= v.levelm and getPlayerLevel(cid)<= v.levelma then 
         x = doSummonCreature(k, getCreaturePosition(cid))
         registerCreatureEvent(cid, "deathd")
         registerCreatureEvent(cid, deathd)
         doCreatureAddHealth(x,v.vida) 
         doCreatureSay(cid,"Go  "..k,TALKTYPE_ORANGE_1)
         doConvinceCreature(cid,x)
      end
   end
end
end
end

Editado Agosto 12 por galaverna