Ir para conteúdo
Entre para seguir isso  
tibiaa4e

[8.31] Demon Oak 1.0

Recommended Posts

tibiaa4e    0
tibiaa4e

-------------------------------

 

Nome: Demon Oak

Versão: 8.31

Tipo do script: Action, movements

Servidor Testado: The Forgotten Server 0.3.0 Alpha 4

Autor: ta4e

 

-------------------------------

 

 

Bem depois de uma certa es

pera pois eu tive umas 500 prova na ETEC, eu finalmente terminei a primeira versão da minha Demon Oak

 

Alguns scripts tem creditos do mazen

 

Eu tentei fazer ela o mais simples possivel de adicionar

Porém ficou ainda um pouco complicado mais tentarei simplificar ao maximo a explicação dela...

 

Coloquei 2 tiles de gelo no mapa

O tile mais acima é a posição do starting e o mais baixo e a direita é o ending. Porém esse tem uma borda

A Unica coisa que falta no mapa é a gravestone que vc terá que fazer e colocar a uniqueid 32194 e configurar a newnposition

 

Quando for passar para seu mapa, retire já que ele é apenas para saber.

Para começar a quest você deve andar nas 5 posições que no meu mapa tem um treco amarelo nelas...

 

 

Depois vai até o npc oldrak e fale

 

 

Player : Hi

Oldrak : Hello, Player !

Player : Demon Oak

Oldrak : You found the demon oak ? For kill it's you need a Hallowed Axe. You want get this ?

Player : Yes

Oldrak : Great. You have 1000 gold coins to give me ?

Player : Yes

Oldrak : Great. Now you have a axe to me ?

Player : Yes

Oldrak : Great. Now go and defeat a Demon Oak. Later report me.

 

 

Agora vá até a arena do demon oak e use o machado na arvore que bloquea o caminho.

 

Agora bata 9x em cada lugar da arvore.

 

Ao final ande no teleport. Se você andar nele antes de matar as quatro partes, vc terá que entrar e mata-la novamente as 4x.

 

Ao sair vai ao Oldrak e Fale :

 

Player : Hi

Oldrak : Demon oak

Player : I can\'t believe, you really defeat the demon oak. Now is possible you get you reward. Search near cemitery.

 

 

Agora procure a gravestone de use nela

E seja feliz com seu loot.

 

 

Mudanças da 1.1

Teleport é criado na hora que o player entra na arena, e é configurado automaticamente as posições. Porém não some

quando ele sai por alguns problemas.

Script diminuido.

Mapa adicionado.

Teleport agora não é mais uniqueid e sim actionid.

Vou dizer os actionids,uniqueids e storages usados.

 

 

Storages

15001 até 15006

 

Uids

2358 a 2361

32193 a 32195

 

Actionids

15000 a 15005

Ao contrario da arena ele eh bem mais simples, então é divido em apenas 4 arquivos, sendo :

 

Hallowed axe e Demon oak em actions

Oldrak em npcs

demon oak em movements

Para mapear crie uma area mais ou menos assim :

demonoakfh1.jpg

 

Nela deve haver deve ter apenas os itens descritos como o teleport, a tree base e a arvore do mal. O resto pode ser a seu gosto.

De preferencia manter mais ou menos essas dimensões.

Na Tree Base adicione o actionids 32193

O tp 1 deve ter o uniqueid 32195 e deverá ter as coordenadas de saida, pois se o player n matar a arvore ele, sairá e terá que mata-la novamente.

Também adicione a gosto a actionid 15001 ao redor da arvore do mal, esse actionids faz o player toma dano da arvore, como se ela batesse nele.

 

Se vc conhece a quest, vc pode verificar que em certos pontos ao redor da arvore, ela "grita", vc deve adicionar os actionids 15002 até o 15005, em sentido anti horario.

Começando a oeste.

 

O resto está explicado nos arquivos. Você entenderá melhor se ver o spoil ou assistir algum video. Porém ela é muito simples de ser feita.

 

 

A sala de recompensa vc deve adicionar os uids 2358 até 2361 nos baus.

A ordem é da esquerda da direita.

 

questxp2.jpg

 

Também não esqueça de colocar a gravestone com o uid 32194.

Ao clicar nela vc irá para a sala de recompensa.

 

Download do mapa

 

 

Primeiro teremos que usar a função que eu eskeci quem crio, depois eu procuro. Adicione ela no functions.lua se vc usa tfs 0.3.0 alpha 4 +

 

function doCreatureSayWithDistance(cid, position, text, type)
   oldPosX = setPlayerStorageValue(cid, 10000, getCreaturePosition(cid).x)
   oldPosY = setPlayerStorageValue(cid, 10001, getCreaturePosition(cid).y)
   oldPosZ = setPlayerStorageValue(cid, 10002, getCreaturePosition(cid).z)
   oldPos = { x = getPlayerStorageValue(cid, 10000), y = getPlayerStorageValue(cid, 10001), z = getPlayerStorageValue(cid, 10002) }
   doTeleportThing(cid, position, 0)
   doCreatureSay(cid, text, type)
   doTeleportThing(cid, oldPos, 0)
   return
end

Vamos começar pelo Npcs, crie na pasta npc oldrak.xml e adicione :

<npc name="Oldrak" script="data/npc/scripts/oldrak.lua" walkinterval="2000" floorchange="0" access="3" level="1" maglevel="1">
   <health now="150" max="150"/>
   <look type="57" head="115" body="113" legs="31" feet="38" addons="3" corpse="2212"/>
   <parameters>
       <parameter key="message_greet" value="Hello, |PLAYERNAME|!" />
       <parameter key="message_needmoremoney" value="Try again when you have more money."/>
       <parameter key="message_decline" value="Why would you tease me like that?"/>
   </parameters>
</npc>

Em npcs/scripts adicione oldrak.lua :

--Demon Oak 1.1 by Ta4e--
--Some scripts based in script of Mazen--

function onStepOut(cid, item, position, fromPosition)

   if item.uid == 32193 and item.itemid == 3669 then
       doTransformItem(item.uid,2717)
   end
end

function onStepIn(cid, item, position, fromPosition)

local yell = getPlayerStorageValue(cid, 15006)
local pos1= {x=1866, y =973, z=7} --Aqui a posição do lado da arvore, de onde sairá o grito dela.

   if item.uid == 32195 and item.itemid == 1387 then
       if getPlayerStorageValue(cid, 15005) == 7 then
           doPlayerSendTextMessage(cid,21,"Tell Oldrak about your great victory against the demon oak.")
       else
           doPlayerSendTextMessage(cid,21,"You have escaped of Demon Oak.")
           setPlayerStorageValue(cid, 15001,1)
           setPlayerStorageValue(cid, 15002,1)
           setPlayerStorageValue(cid, 15003,1)
           setPlayerStorageValue(cid, 15004,1)
           setPlayerStorageValue(cid, 15005,3)
       end
   end


       if getPlayerStorageValue(cid, 15006) < 5 then
           yell = yell + 1            
                   if item.actionid == 15002 and getPlayerStorageValue(cid, 15006) == -1 then
                       setPlayerStorageValue(cid, 15006,yell)
                       doCreatureSayWithDistance(cid, pos1, "Find a way in here and release me! Pleeeease hurry!",TALKTYPE_ORANGE_1 )
                   elseif item.actionid == 15003 and getPlayerStorageValue(cid, 15006) == 0 then
                       setPlayerStorageValue(cid, 15006,yell)
                       doCreatureSayWithDistance(cid, pos1, "I can bring your beloved back from the dead,just release me!",TALKTYPE_ORANGE_1 )
                   elseif item.actionid == 15004 and getPlayerStorageValue(cid, 15006) == 1 then
                       setPlayerStorageValue(cid, 15006,yell)
                       doCreatureSayWithDistance(cid, pos1, "What is this? Demon legs lying here? Someone might have lost them.",TALKTYPE_ORANGE_1 )
                   elseif item.actionid == 15005 and getPlayerStorageValue(cid, 15006) == 2 then
                       setPlayerStorageValue(cid, 15006,yell)
                       doCreatureSayWithDistance(cid, pos1, "I'm trapped come here and free me, fast!!!",TALKTYPE_ORANGE_1 )
                   elseif item.actionid == 15006 and getPlayerStorageValue(cid, 15006) == 2 then
                       setPlayerStorageValue(cid, 15006,yell)
                       doCreatureSayWithDistance(cid, pos1, "I'm trapped come here and free me, fast!!!",TALKTYPE_ORANGE_1 )
                   end




   elseif item.actionid == 15001 then
       if getPlayerStorageValue(cid, 15005) <=7 then
           if math.random(1,4) == 2 then
               doTargetCombatHealth(0, cid, COMBAT_EARTHDAMAGE, -500, -500, CONST_ME_BIGPLANTS)
           end
       end
   end

end

local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)
local talkState = {}

function onCreatureAppear(cid)                npcHandler:onCreatureAppear(cid)            end
function onCreatureDisappear(cid)            npcHandler:onCreatureDisappear(cid)            end
function onCreatureSay(cid, type, msg)            npcHandler:onCreatureSay(cid, type, msg)        end
function onThink()                    npcHandler:onThink()                    end

function creatureSayCallback(cid, type, msg)
   if(not npcHandler:isFocused(cid)) then
       return false
   end

   local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid


   if msgcontains(msg, 'demon oak') then
       if getPlayerStorageValue(cid, 15006) == 4 and getPlayerStorageValue(cid, 15005) == -1 then
           selfSay('You found the demon oak ? For kill it\'s you need a {Hallowed Axe}. You want get this ?', cid)
           talkState[talkUser] = 1
       elseif getPlayerStorageValue(cid, 15005) == -1 and  getPlayerStorageValue(cid, 15006) <= 4 then
           selfSay('This a old demon , but we don\'t know where it\'s live.', cid)
       elseif getPlayerStorageValue(cid, 15005) == 3 then
               selfSay('Go defeat demon oak. When you do this report me.', cid)
               talkState[talkUser] = 0
       elseif getPlayerStorageValue(cid, 15005) == 7 then
               selfSay('I can\'t believe, you really defeat the demon oak. Now is possible you get you reward. Search near cemitery.', cid)
               setPlayerStorageValue(cid,15005,8)
               talkState[talkUser] = 0
       end


   elseif msgcontains(msg, 'hallowed axe') then
       if getPlayerStorageValue(cid, 15005) == -1 then
               selfSay('I can forge this but i need {1000 gold coins} and a {axe}. You interessed ?', cid)
               talkState[talkUser] = 1
       elseif getPlayerStorageValue(cid, 15005) == 1 then
               selfSay('Great. You have 1000 gold coins to give me ?.', cid)
               talkState[talkUser] = 2
       elseif getPlayerStorageValue(cid, 15005) == 2 then
               selfSay('Great. Now you have a {axe} to me ?.', cid)
               talkState[talkUser] = 3
           end

   elseif talkState[talkUser] == 1 then
       if msgcontains(msg, 'yes') then
               selfSay('Great. You have 1000 gold coins to give me ?.', cid)
               setPlayerStorageValue(cid,15005,1)
               talkState[talkUser] = 2
               else
               selfSay('Ok.', cid)
       end

   elseif talkState[talkUser] == 2 then
       if msgcontains(msg, 'yes') then
           if(doPlayerRemoveMoney(cid, 1000) == TRUE) then
               selfSay('Great. Now you have a {axe} to me ?.', cid)
               setPlayerStorageValue(cid,15005,2)
               talkState[talkUser] = 3
               else
               selfSay('Ok.', cid)
           end
       end

   elseif talkState[talkUser] == 3 then
       if msgcontains(msg, 'yes') then
           if doPlayerRemoveItem(cid,2386,1) == 1 then
               selfSay('Great. Now go and defeat a Demon Oak. Later report me.', cid)
               doPlayerAddItem(cid,8293,1)
               setPlayerStorageValue(cid,15005,3)
               talkState[talkUser] = 3
               else
               selfSay('Ok.', cid)
           end
       end

   end

   return true
end

npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())

Agora vamos em actions/scripts e adicione hallowed axe.lua :

 

Nos monster vc escolhe os monstros que a arvore irá sumonar. Em monstros alternativos se vc ativar o altmo, os monstros listado ali abaixo

Serão sorteados com o acima, gerando mais emoção e também sorte ou azar ao player.

--Demon Oak 1.1 by Ta4e--
--Some scripts based in script of Mazen--

function onUse(cid, item, frompos, item2, topos)

--Aqui vc escolhe os monstros bases que a arvore irá sumonar--
local monster1 = "Crypt Shambler"
local monster2 = "Lich"
local monster3 = "bone beast"
local monster4 = "banshee"
local monster5 = "giant spider"
local boss1 = "Blightwalker"
local boss2 = "Betrayed Wraith"
local boss3 = "diabolic imp"
local boss4 = "demon"

basepos = {x=1867, y=975, z=7} --Aqui é a posição do "rosto" da arvore
local starting={x=1856, y=966, z=7, stackpos=253} -- aqui é o mesma coisa da arena, pega a maior posição a noroeste
local ending={x=1883, y=982, z=7, stackpos=253} -- aqui a posição mais sudeste
local trash= {x=1169, y=725, z=13} --o Lixo pode ser o mesmo da arena ou da anihilator

local tree = 2717 -- id da arvore de entrada


--Monstros Alternativos------------------------------------------------------------------------------------------------------------------------------------------
local altmo = 0  --Escolhe se vai randomizar monstros ou não

local altmonst1 = "braindeath"
local altmonst2 = "necromancer"
local altmonst3 = "vampire"
local altmonst4 = "giant spider"
local altmonst5 = "demon skeleton"
local altboss1  = "plaguesmith"
local altboss2  = "phantasm"
local altboss3  = "hellhound"
local altboss4  = "behemoth"

----------------------------------------------------------------------------------------------------------------------------------

if altmo == 1 then
   if math.random (1,5) == 1 or math.random (1,5) == 5 then
       monster1 = altmonst1
       monster2 = altmonst2
       monster5 = altmonst5
       boss1 = altboss1
       boss3 = altboss3
   else
       monster3 = altmonst3
       monster4 = altmonst4
       boss2 = altboss2
       boss4 = altboss4
   end
end

local fourposition1 = {x=basepos.x-4, y=basepos.y-4, z=7}
local fourposition2 = {x=basepos.x-4, y=basepos.y+1, z=7}
local fourposition3 = {x=basepos.x+3, y=basepos.y-4, z=7}
local fourposition4 = {x=basepos.x+3, y=basepos.y+1, z=7}

local threeposition1 = {x=basepos.x+3, y=basepos.y+4, z=7}
local threeposition2 = {x=basepos.x+5, y=basepos.y+4, z=7}
local threeposition3 = {x=basepos.x+3, y=basepos.y+5, z=7}

local modpos1 = {x=basepos.x-3, y=basepos.y-5, z=7}
local modpos2 = {x=basepos.x, y=basepos.y-4, z=7}
local modpos3 = {x=basepos.x+2, y=basepos.y-5, z=7}

local twopos ={x=basepos.x+5, y=basepos.y+1, z=7}
local twopos1 = {x=basepos.x+2, y=basepos.y+2, z=7}

local doublepos = {x=basepos.x-3, y=basepos.y-1, z=7}

local leftpos = {x=basepos.x-4, y=basepos.y-5, z=7}
local crepos = {x=basepos.x-3, y=basepos.y-9, z=7}
local gopos = {x=basepos.x-3, y=basepos.y-18, z=7}

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

local gtotal = getPlayerStorageValue(cid, 15005)
local gcorvo = getPlayerStorageValue(cid, 15001)
local gleft = getPlayerStorageValue(cid, 15002)
local gright = getPlayerStorageValue(cid, 15003)
local gface = getPlayerStorageValue(cid, 15004)
checking={x=starting.x, y=starting.y, z=starting.z, stackpos=starting.stackpos}


   if item2.itemid == tree and item2.uid == 32193 and getPlayerLevel(cid) >= 120 and getPlayerStorageValue(cid, 15005)== 3 then
       players=0
       totalmonsters=0
       monster = {}
           repeat
           creature= getThingfromPos(checking)
               if creature.itemid > 0 then
                   if getPlayerAccess(creature.uid) == 0 then
                       players=players+1
                   end
                       if getPlayerAccess(creature.uid) ~= 0 and getPlayerAccess(creature.uid) ~= 3 then
                           totalmonsters=totalmonsters+1
                           monster[totalmonsters]=creature.uid
                       end
               end
                               checking.x=checking.x+1
                               if checking.x>ending.x then
                                   checking.x=starting.x
                                   checking.y=checking.y+1
                               end
           until checking.y>ending.y
                                   if players==0 then
                                       current=0
                                       repeat
                                           current=current+1
                                           doTeleportThing(monster[current],trash)
                                       until current>=totalmonsters
       doTeleportThing(cid, topos, 0)
       doTransformItem(item2.uid, 3669)
       setPlayerStorageValue(cid, 15001,1)
       setPlayerStorageValue(cid, 15002,1)
       setPlayerStorageValue(cid, 15003,1)
       setPlayerStorageValue(cid, 15004,1)
       doCreateTeleport(1387, gopos, crepos)
end


   elseif item2.itemid == 8288 then
       if gcorvo <10 then
           effect (cid,15001,gcorvo,topos)
               if gcorvo == 3 then
                   doSummonCreature(monster1, fourposition1)
                   doSummonCreature(monster1, fourposition2)
                   doSummonCreature(monster1, fourposition3)
                   doSummonCreature(monster1, fourposition4)
               elseif gcorvo == 5 then
                   doSummonCreature(monster2, threeposition1)
                   doSummonCreature(monster2, threeposition2)
                   doSummonCreature(monster2, threeposition3)
               elseif gcorvo == 7 then
                   doSummonCreature(boss1, fourposition3)
               elseif gcorvo == 9 then
                   gtotal = gtotal + 1
                   setPlayerStorageValue(cid, 15005,gtotal)
               end
       else
           doSendMagicEffect(topos, 2)
       end

   elseif item2.itemid == 8289 then
       if gleft <10 then
           effect (cid,15002,gleft,topos)
               if gleft == 3 then
                   doSummonCreature(monster1, fourposition1)
                   doSummonCreature(monster1, fourposition2)
                   doSummonCreature(monster1, fourposition3)
                   doSummonCreature(monster1, fourposition4)
               elseif gleft == 4 then
                   doSummonCreature(monster3, modpos1)
                   doSummonCreature(monster3, modpos2)
                   doSummonCreature(monster3, modpos3)
                   doSummonCreature(monster3, fourposition2)
               elseif gleft == 7 then
                   doSummonCreature(monster1, fourposition1)
                   doSummonCreature(monster1, fourposition2)
                   doSummonCreature(monster1, fourposition3)
                   doSummonCreature(monster1, fourposition4)
               elseif gleft == 9 then
                   doSummonCreature(boss2, leftpos)
                   gtotal = gtotal + 1
                   setPlayerStorageValue(cid, 15005,gtotal)
               end
       else
           doSendMagicEffect(topos, 2)
       end

   elseif item2.itemid == 8290 then
       if gright <10 then
           effect (cid,15003,gright,topos)
               if gright == 2 then
                   doSummonCreature(monster4, twopos)
                   doSummonCreature(monster4, twopos1)
               elseif gright == 4 then
                   doSummonCreature(monster1, fourposition1)
                   doSummonCreature(monster1, fourposition2)
                   doSummonCreature(monster1, fourposition3)
                   doSummonCreature(monster1, fourposition4)
               elseif gright == 7 then
                   doSummonCreature(monster1, fourposition1)
                   doSummonCreature(monster1, fourposition2)
                   doSummonCreature(monster1, fourposition3)
                   doSummonCreature(monster1, fourposition4)
               elseif gright == 9 then
                   doSummonCreature(boss3,leftpos)
                   gtotal = gtotal + 1
                   setPlayerStorageValue(cid, 15005,gtotal)
               end
       else
           doSendMagicEffect(topos, 2)
       end

   elseif item2.itemid == 8291 then
       if gface <10 then
           effect (cid,15004,gface,topos)
               if gface == 1 then
                   doSummonCreature(monster2, doublepos)
                   doSummonCreature(monster5, fourposition2)
               elseif gface == 4 then
                   doSummonCreature(monster1, fourposition1)
                   doSummonCreature(monster1, fourposition2)
                   doSummonCreature(monster1, fourposition3)
                   doSummonCreature(monster1, fourposition4)
               elseif gface == 6 then
                   doSummonCreature(boss4, leftpos)
               elseif gface == 9 then
                   gtotal = gtotal + 1
                   setPlayerStorageValue(cid, 15005,gtotal)
               end
       else
           doSendMagicEffect(topos, 2)
       end
   end
return 0
end


function effect (cid,storage,valor,topos)
valor = getPlayerStorageValue(cid, storage)
doTargetCombatHealth(0, cid, COMBAT_EARTHDAMAGE, -300, -300, CONST_ME_BIGPLANTS)
valor = valor + 1
setPlayerStorageValue(cid, storage,valor)
doSendMagicEffect(topos, 0)
end

Na mesma pasta adicione o Demon oak.lua :

--Demon Oak 1.1 by Ta4e--
--Some scripts based in script of Mazen--

function onUse(cid, item, fromPosition, itemEx, toPosition)
--Demon Oak 1.0 by Ta4e--
--Some scripts based in script of Mazen--

newnPosition  = {x=1904, y=1006, z=8} -- Aqui a posição da sala de recompensa

   if item.uid == 32194 and getPlayerStorageValue(cid,15005) == 8 then
       doTeleportThing(cid,newnPosition)
       doSendMagicEffect(newnPosition,10)

   elseif item.uid == 2358 then
 queststatus = getPlayerStorageValue(cid,2358)
 if queststatus == -1 and getPlayerStorageValue(cid,15005) == 8  then
if getPlayerFreeCap(cid) >= 54.00 then
doPlayerSendTextMessage(cid,24,"You have found demon legs.")
doPlayerAddItem(cid,2495,1)
 setPlayerStorageValue(cid,2358,1)
setPlayerStorageValue(cid,15005,9)
  else
    doPlayerSendTextMessage(cid,24,"You have found a demon legs. Weighing 54.00 oz it is too heavy.")
  end
 else
  doPlayerSendTextMessage(cid,24,"The chest is empty.")
 end

elseif item.uid == 2359 then
 queststatus = getPlayerStorageValue(cid,2358)
 if queststatus == -1 and getPlayerStorageValue(cid,15005) == 8  then
if getPlayerFreeCap(cid) >= 69.00 then
doPlayerSendTextMessage(cid,24,"You have found rainbow shield.")
doPlayerAddItem(cid,8905,1)
 setPlayerStorageValue(cid,2358,1)
setPlayerStorageValue(cid,15005,9)
  else
    doPlayerSendTextMessage(cid,24,"You have found a rainbow shield. Weighing 69.00 oz it is too heavy.")
  end
 else
     doPlayerSendTextMessage(cid,24,"The chest is empty.")
 end

elseif item.uid == 2360 then
 queststatus = getPlayerStorageValue(cid,2358)
 if queststatus == -1 and getPlayerStorageValue(cid,15005) == 8  then
if getPlayerFreeCap(cid) >= 12.00 then
doPlayerSendTextMessage(cid,24,"You have found royal crossbow.")
doPlayerAddItem(cid,8851,1)
 setPlayerStorageValue(cid,2358,1)
setPlayerStorageValue(cid,15005,9)
  else
    doPlayerSendTextMessage(cid,24,"You have found a royal crossbow. Weighing 12.00 oz it is too heavy.")
  end
 else
     doPlayerSendTextMessage(cid,24,"The chest is empty.")
 end

elseif item.uid == 2361 then
 queststatus = getPlayerStorageValue(cid,2358)
 if queststatus == -1 and getPlayerStorageValue(cid,15005) == 8  then
if getPlayerFreeCap(cid) >= 28.50 then
doPlayerSendTextMessage(cid,24,"You have found a spellbook of dark mysteries.")
doPlayerAddItem(cid,8918,1)
setPlayerStorageValue(cid,2358,1)
setPlayerStorageValue(cid,15005,9)
  else
    doPlayerSendTextMessage(cid,24,"You have found spellbook of dark mysteries. Weighing 28.50 oz it is too heavy.")
  end
 else
  doPlayerSendTextMessage(cid,24,"The chest is empty.")
 end

end

end

E em actions.xml adicione :

<action itemid="8293" script="Hallowed Axe.lua"/>
<action uniqueid="32194" script="demon oak.lua" />
<action uniqueid="2358" script="demon oak.lua" />
<action uniqueid="2359" script="demon oak.lua" />
<action uniqueid="2360" script="demon oak.lua" />
<action uniqueid="2361" script="demon oak.lua" />

Finalmente em movements/scripts adicione demon oak.lua :

--Demon Oak 1.0 by Ta4e--
--Some scripts based in script of Mazen--
function onStepOut(cid, item, position, fromPosition)

   if item.uid == 32193 and item.itemid == 3669 then
       doTransformItem(item.uid,2717)
   end
end

function onStepIn(cid, item, position, fromPosition)

local yell = getPlayerStorageValue(cid, 15006)
local pos1= {x=1866, y =973, z=7} --Aqui a posição do lado da arvore, de onde sairá o grito dela.

   if item.uid == 32195 and item.itemid == 1387 then
       if getPlayerStorageValue(cid, 15005) == 7 then
           doPlayerSendTextMessage(cid,21,"Tell Oldrak about your great victory against the demon oak.")
       else
           doPlayerSendTextMessage(cid,21,"You have escaped of Demon Oak.")
           setPlayerStorageValue(cid, 15001,1)
           setPlayerStorageValue(cid, 15002,1)
           setPlayerStorageValue(cid, 15003,1)
           setPlayerStorageValue(cid, 15004,1)
           setPlayerStorageValue(cid, 15005,3)
       end
   end


       if getPlayerStorageValue(cid, 15006) < 4 then
           yell = yell + 1

                   if item.actionid == 15002 and getPlayerStorageValue(cid, 15006) == -1 then
                       setPlayerStorageValue(cid, 15006,yell)
                       doCreatureSayWithDistance(cid, pos1, "Find a way in here and release me! Pleeeease hurry!",TALKTYPE_ORANGE_1 )
                   elseif item.actionid == 15003 and getPlayerStorageValue(cid, 15006) == 0 then
                       setPlayerStorageValue(cid, 15006,yell)
                       doCreatureSayWithDistance(cid, pos1, "I can bring your beloved back from the dead,just release me!",TALKTYPE_ORANGE_1 )

                   elseif item.actionid == 15004 and getPlayerStorageValue(cid, 15006) == 1 then
                       setPlayerStorageValue(cid, 15006,yell)
                       doCreatureSayWithDistance(cid, pos1, "What is this? Demon legs lying here? Someone might have lost them.",TALKTYPE_ORANGE_1 )

                   elseif item.actionid == 15005 and getPlayerStorageValue(cid, 15006) == 2 then
                       setPlayerStorageValue(cid, 15006,yell)
                       doCreatureSayWithDistance(cid, pos1, "I'm trapped come here and free me, fast!!!",TALKTYPE_ORANGE_1 )

                  elseif item.actionid == 15006 and getPlayerStorageValue(cid, 15006) == 3 then
                       setPlayerStorageValue(cid, 15006,yell)
                       doCreatureSayWithDistance(cid, pos1, "I'm trapped come here and free me, fast!!!",TALKTYPE_ORANGE_1 )
                   end


   elseif item.actionid == 15001 then
       if getPlayerStorageValue(cid, 15005) <=7 then
           if math.random(1,4) == 1 then
               doTargetCombatHealth(0, cid, COMBAT_EARTHDAMAGE, -500, -500, CONST_ME_BIGPLANTS)
           end
       end
   end

end

Em movements.xml adicione :

<movevent event="StepOut" uniqueid="32193" script="demon oak.lua" />
<movevent event="StepIn" uniqueid="32195" script="demon oak.lua" />
<movevent event="StepIn" actionid="15000" script="demon oak.lua" />
<movevent event="StepIn" actionid="15001" script="demon oak.lua" />
<movevent event="StepIn" actionid="15002" script="demon oak.lua" />
<movevent event="StepIn" actionid="15003" script="demon oak.lua" />
<movevent event="StepIn" actionid="15004" script="demon oak.lua" />
<movevent event="StepIn" actionid="15005" script="demon oak.lua" />

Editado por tibiaa4e

Compartilhar este post


Link para o post
Nord    2
Nord

Eu acabei de aprovar um desses, mas o seu tem imagens e é bem diferente.

 

Aprovado

Compartilhar este post


Link para o post
lipixd    0
lipixd

Opps manow Discupa me imtrometer Etcs.. mais Tip Eu Tava vendo sua kest eh bugada :P

Sabe akela runa desintegrate rune Intaam.. Vc Apaga aChest E pega os itens o.O Veio Eu Sou Hoster a Poko Tempo Primeiro Post Meu Intam issu eh bugado nao sei se no seu serv ta mais eh bug :P Vlws :yes:

Compartilhar este post


Link para o post
henrique_ms    0
henrique_ms

Nossa

Muito bom ja to utilizando no meu server =]

 

Ghenzy.servegame.com 8.31

VLW

Compartilhar este post


Link para o post
tibiaa4e    0
tibiaa4e

@lip

 

isso é erro do servidor

 

Apesar q nuna tentei fazer isso

 

Não é culpa do script e sim da distro

Compartilhar este post


Link para o post
Natanzera    0
Natanzera
Primeiro teremos que usar a função que eu eskeci quem crio, depois eu procuro. Adicione ela no functions.lua se vc usa tfs 0.3.0 alpha 4 +
Onde fika esse functions.lua ???

 

e no jogo, como eu consigu passar pelo tree base ???

Editado por Natanzera

Compartilhar este post


Link para o post
Entre para seguir isso  
  • Quem Está Navegando   0 membros estão online

    Nenhum usuário registrado visualizando esta página.

×