muito foda cara
o outro script do demon oak não funcionava vamo ve se esse da certo
valeu
Por tibiaa4e, 06 de dez. de 2008 em Actions e Talkactions
muito foda cara
o outro script do demon oak não funcionava vamo ve se esse da certo
valeu
info
Grupo: Visconde
Registrado: 19/06/07
Posts: 267
Reputação: +1
Gênero: Masculino
Char no Tibia: Rambocop Infernus

Nussa desse jeito você me obriga a virar teu fan!
Tudo que você posta aqui tem sido util para mim :smile_positivo:
Adorei as magias quase iguais a do rl...
Até mais e parabenss" Você merece.
Ps¹: Rola um tutorial de como fazer aueheuheuae?
Tipow ta meio diferente da original, porque não tem que fikar batendo no passaro e nas mãos dela? E não tem
um Grave Stone que a gente usa para chegar na sala do premio?
______________________________________________________
Falas da arvore:





Ta faltando uma fala pelo que eu vi no portal tibia wiki...
Editado Dezembro 6 por Albert José
info
Grupo: Conde
Registrado: 18/12/05
Posts: 912
Reputação: +86
Gênero: Masculino
Char no Tibia: Kohzete

@up
opa depois qdo eu fazer o mapa eu vejo lah
Tem a gravestone sim...
Eu eskeci de avisar
tem q ter a uniqueid 32194
e funfa tudo o treco de bater
so q tem q ter os storage certo...
info
Grupo: Visconde
Registrado: 19/06/07
Posts: 267
Reputação: +1
Gênero: Masculino
Char no Tibia: Rambocop Infernus

@up
opa depois qdo eu fazer o mapa eu vejo lah
Tem a gravestone sim...
Eu eskeci de avisar
tem q ter a uniqueid 32194
e funfa tudo o treco de bater
so q tem q ter os storage certo...
Se você quiser eu fiz o mapa quase igual do tibia global só falto umas partes e to meio sem tempo!
Coloquei uns tiles pretos que é onde o player pisa e ela solta as falas... Só você terminar de editar.
Segue em anexo.
Posição: x:1000 z:1000 y:7

info
Grupo: Banidos
Registrado: 20/06/08
Posts: 50
Reputação: 0
Char no Tibia: Angel Of Distance

ROOOOX, Belo tutorial adorei vei... tava precisando disso para INQUISITION do meu mapa próprio...
Thannnks!
info
Grupo: Conde
Registrado: 18/12/05
Posts: 912
Reputação: +86
Gênero: Masculino
Char no Tibia: Kohzete

@albert
Opa vlw
Eu vou ver se edito
EH que não to em casa...
Qdo for pra lá eu dou uma ajeitada
info
Grupo: Visconde
Registrado: 19/06/07
Posts: 267
Reputação: +1
Gênero: Masculino
Char no Tibia: Rambocop Infernus

>> Loading script systems Warning: [Event::loadScript] Can not load script. data/actions/scripts/quests/demonoak/demon oak.lua data/actions/scripts/quests/demonoak/demon oak.lua:19: 'end' expected (to close 'function' at line 4 ) near 'elseif'
Ué tava fazendo o mapa agora fui abrir o otserv deu esse erro!
Lua Script Error: [MoveEvents Interface] data/movements/scripts/demon oak.lua:onStepIn data/movements/scripts/demon oak.lua:33: attempt to call global 'doCreatureSayWithDistance' (a nil v alue) stack traceback: data/movements/scripts/demon oak.lua:33: in function <data/movements/scripts/demon oak.lua:1 0>
Outro erro! Qual versão você usou como base?
Ps³: Você esqueceu de falar que para sair da demon oak tem que por a posição no teleport senão apenas
sai a fala e o player não é teleportado!
Editado Dezembro 6 por Albert José
info
Grupo: Campones
Registrado: 11/06/07
Posts: 46
Reputação: 0
Char no Tibia: Eternal Brucy

Cara tah mto boa essa demon oak, eu testei e deu quase tudo certo, soh nao deu certo o demon oak.lua q eu tenho q por na pasta action, da esse erro aki:
Warning: [Event::loadScript] Can not load script. data/actions/scripts/demon oak.luadata/actions/scripts/demon oak.lua:19: 'end' expected (to close 'function' at line 4) near 'if'
Warning: [Event::loadScript] Can not load script. data/actions/scripts/demon oak.lua
data/actions/scripts/demon oak.lua:19: 'end' expected (to close 'function' at line 4) near 'if'
Warning: [Event::loadScript] Can not load script. data/actions/scripts/demon oak.lua
data/actions/scripts/demon oak.lua:19: 'end' expected (to close 'function' at line 4) near 'if'
Warning: [Event::loadScript] Can not load script. data/actions/scripts/demon oak.lua
data/actions/scripts/demon oak.lua:19: 'end' expected (to close 'function' at line 4) near 'if'
Dai o gravestone nao funciona...
Se consegui arruma para mim?
Vlw cara abraço!!
Editado Dezembro 7 por profelezio
info
Grupo: Conde
Registrado: 18/12/05
Posts: 912
Reputação: +86
Gênero: Masculino
Char no Tibia: Kohzete

@ups
O erro acima era porque no meu ot eu tenho um arquivo para as quests e eu uso uma função estranha o0
Ai eu fiz rapidinho e juntei 2 arquivo e esqueci de arruma os elseif.
O do ALbert é memoria fraca
Eu vou poder postar o mapa só la pra segunda
Ai eu uso o z-tracker, e ele fica real...
Agora to terminado a dream challenge porém ela é osso de explciar com adiciona pq é grande pra kcete
Editado Dezembro 7 por tibiaa4e
info
Grupo: Visconde
Registrado: 19/06/07
Posts: 267
Reputação: +1
Gênero: Masculino
Char no Tibia: Rambocop Infernus

A parte que tem que adicionar action id 32193 na tree base ta meio confusa!
Como vo coloca isso na arvore se é um movement? O player vai passar sobre a arvore?
Edit:
Eu uso TFS (MS) REv 20, da para adicionar aquela função nele?
Ps: Adiciona no tutorial que alguns servers que não tem o arquivo functions.lua é só adicionar
no global que da certo ![]()
Editado Dezembro 7 por Albert José
info
Grupo: Conde
Registrado: 18/12/05
Posts: 912
Reputação: +86
Gênero: Masculino
Char no Tibia: Kohzete

@up
Sim
TIpo quando vc der use com o axe na arvore ele vira uma pedra
E nisso qdo se andar nela
Ela volta a ser arvore
para n entrar 2 espertinhos nela...
(meio genial, pena que não foi minha ideia)
Sim vc pode adicionar a função até mesmo nos arquivos
É que o tfs eles é meio condenado ai criaram esse treco para n encher o global.lua de trankeira
info
Grupo: Visconde
Registrado: 19/06/07
Posts: 267
Reputação: +1
Gênero: Masculino
Char no Tibia: Rambocop Infernus

Não teria como você fazer um npc para ots que não suportam o npc chat?
Aqui da um erro e o npc só reponde a fala "hi" e "demon oak"
Edited~~
A tree base que você fala é só a arvore ou os tiles antes ou depois dela?
Não consigo ver pela foto ja que onde você escreveu tree base é os sqm abaixo da mesma!
Editado Dezembro 7 por Albert José
info
Grupo: Conde
Registrado: 18/12/05
Posts: 912
Reputação: +86
Gênero: Masculino
Char no Tibia: Kohzete

@up
seu ot é q versão do tfs ?
E é só a arvore ![]()
info
Grupo: Visconde
Registrado: 19/06/07
Posts: 267
Reputação: +1
Gênero: Masculino
Char no Tibia: Rambocop Infernus

TFS Mystic Spirit Rev 20
Ps: A action demon oak.lua ainda esta apresentando problemas
Warning: [Event::loadScript] Can not load script. data/actions/scripts/quests/demonoak/demon oak.lua data/actions/scripts/quests/demonoak/demon oak.lua:16: 'end' expected (to close 'if' at line 11) nea r 'return'
info
Grupo: Conde
Registrado: 18/12/05
Posts: 912
Reputação: +86
Gênero: Masculino
Char no Tibia: Kohzete
Pequena atualização da Demon Oak para funcionar nos novos The Forgotten Server 0.4
Alguns scripts foram basedos na função 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.
Spoiler
1º Para começar a quest você deve andar nas 5 posições que no meu mapa tem um treco amarelo nelas...
2º Depois vai até o npc oldrak e fale
3º Agora vá até a arena do demon oak e use o machado na arvore que bloquea o caminho.
4º Agora bata 9x em cada lugar da arvore.
5º 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.
6º Ao sair vai ao Oldrak e Fale :
7º Agora procure a gravestone de use nela
E seja feliz com seu loot.
Mudançass
Aqui os uid, actions e storages usados :
Ele é dividido em quatro arquivos :
Para mapear crie uma area mais ou menos assim :
Nessa area deverá haver apenas os items descritos e nomeados. De preferencia use o mapa do download.
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ão 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 15006, 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, da esquerda para direita.
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
Incrementando
Em functions.lua ou global.lua adicione ao final:
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 function doSummonCreatures (monsters,positions) for _, positions in pairs (positions) do doSummonCreature(monsters, positions) end end function setPlayerMultiplyStorageValues(cid, storage, value) for _, storage in pairs(storage) do setPlayerStorageValue(cid, storage, value) end endNa pasta npc adicione oldrak.lua :
Em npcs/scripts adicione oldrak.lua :
-- Demon Oak 2.1 by ta4e-- -- Paradox 1.0-- 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 need know exactly location, go local and research more...' ,cid) elseif 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}.', cid) 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 else selfSay('You need get a {Hallowed Axe}', cid) end elseif msgcontains(msg, 'mission') then if getPlayerStorageValue(cid, 15005) <= 8 then selfSay('First you need defeat the demon oak. Later you make next mission.', cid) elseif getPlayerStorageValue(cid, 15005) == 9 and getPlayerStorageValue(cid, 15031) ~= 2 then selfSay('The next mission, you need kill the demon, as named {Ungreez}. He\'s located in Hero Cave.', cid) setPlayerStorageValue(cid,15031,1) elseif getPlayerStorageValue(cid, 15031) == 2 then selfSay('Congratulations. Now you receive your outfit {Demon Hunter}.', cid) setPlayerStorageValue(cid,15031,2) if getPlayerSex(cid) == 0 then setPlayerStorageValue(cid,40288,1) else setPlayerStorageValue(cid,40289,1) end 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 msgcontains(msg, 'hugo') then selfSay('Ah, the curse of the Plains of Havoc, the hidden beast, the unbeatable foe. I\'ve been living here for years and I\'m sure this is only a {myth}.', cid) talkState[talkUser] = 4 elseif talkState[talkUser] == 4 then if msgcontains(msg, 'myth') then selfSay('There are many tales about the fearsome Hugo. It\'s said it\'s an abnormality, accidentally created by {Yenny the Gentle}. It\'s half demon, halfsomething else and people say it\'s still alive after all these years.', cid) talkState[talkUser] = 5 end elseif talkState[talkUser] == 5 then if msgcontains(msg, 'yenny the gentle') then selfSay('Yenny, known as the Gentle, was one of the most powerful wielders of magic in ancient times. She was known throughout the world for her mercy and kindness.', cid) setPlayerStorageValue(cid,15200,1) 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('When you prepared regress to me.', 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('You don\'t have a money.', cid) end end elseif talkState[talkUser] == 3 then if msgcontains(msg, 'yes') then if doPlayerRemoveItem(cid,2386,1) == TRUE 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('You don\'t have a axe.', cid) end else selfSay('When you prepared regress to me.', cid) 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 2.1 by Ta4e-- --Some scripts based in script of Mazen-- function onUse(cid, item, frompos, item2, topos) 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} local starting={x=1856, y=966, z=7, stackpos=253} local ending={x=1883, y=982, z=7, stackpos=253} local trash= {x=1169, y=725, z=13} --Alternative Monsters--------------------------------------------------------------- local altmo = 0 -- If it 0 monsters not randomize. If it 1 randomize with this \/ 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 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 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 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-7, z=7} local gopos = {x=basepos.x-2, y=basepos.y-17, 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 == 2717 and item2.uid == 32193 then if getPlayerLevel(cid) >= 120 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) setPlayerMultiplyStorageValues(cid,{15001,15002,15003,15004},1) doTransformItem(item2.uid, 3669) doCreateTeleport(1387, gopos, crepos) local getrem1 = getThingfromPos({x=basepos.x-3, y=basepos.y-7, z=7, stackpos = 3}) doSetItemActionId(getrem1.uid,32195) end else doPlayerSendTextMessage(cid, "You need level 120 to enter in arena.", result) end elseif item2.itemid == 8288 then if gcorvo <10 then effect (cid,15001,gcorvo,topos) if gcorvo == 3 then doSummonCreatures(monster1, {fourposition1,fourposition2,fourposition3,fourposition4}) elseif gcorvo == 5 then doSummonCreatures(monster2, {threeposition1,threeposition2,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,fourposition2,fourposition3,fourposition4}) elseif gleft == 4 then doSummonCreatures(monster3, {modpos1,modpos2,modpos3}) doSummonCreature(monster3, fourposition2) elseif gleft == 7 then doSummonCreatures(monster1, {fourposition1,fourposition2,fourposition3,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 doSummonCreatures(monster4, {twopos,twopos1}) elseif gright == 4 then doSummonCreatures(monster1, {fourposition1,fourposition2,fourposition3,fourposition4}) elseif gright == 7 then doSummonCreatures(monster1, {fourposition1,fourposition2,fourposition3,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 doSummonCreatures(monster1, {fourposition1,fourposition2,fourposition3,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 end local 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) endNa mesma pasta adicione o Demon oak.lua :
--Demon Oak 2.1 by Ta4e-- --Some scripts based in script of Mazen-- function onUse(cid, item, fromPosition, itemEx, toPosition) 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 if getPlayerStorageValue(cid,2358) == -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) setPlayerMultiplyStorageValues (cid,{2358,15005},1) 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 if getPlayerStorageValue(cid,2358) == -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) setPlayerMultiplyStorageValues (cid,{2358,15005},1) 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 if getPlayerStorageValue(cid,2358) == -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) setPlayerMultiplyStorageValues (cid,{2358,15005},1) 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 if getPlayerStorageValue(cid,2358) == -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) setPlayerMultiplyStorageValues (cid,{2358,15005},1) 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 endE em actions.xml adicione :
Finalmente em movements/scripts adicione demon oak.lua :
--Demon Oak 2.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} if item.actionid == 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.") setPlayerMultiplyStorageValues (cid,{15001,15002,15003,15004,15005},1) end end if getPlayerStorageValue(cid, 15006) < 4 then if isPlayer(cid) == TRUE then yell = yell + 1 if item.actionid == 15005 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 == 15002 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 == 15003 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 == 15004 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 == 15005 and getPlayerStorageValue(cid, 15006) == 3 then setPlayerStorageValue(cid, 15006,yell) doCreatureSayWithDistance(cid, pos1, "What a nice and shinny golden armor. Come to me and you can have it!",TALKTYPE_ORANGE_1 ) end end elseif item.actionid == 15001 then if isPlayer(cid) == TRUE 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 endEm movements.xml adicione :
Caso seja The Forgotten Server 0.4.2
--UPDATE--
Eu acabei esquecendo de uma coisa que arruma alguns bugs caso o player empacote (morra)
Em creaturescripts/scritps no player death.lua depois de:
Adicione :
Isso evita que o player não possa entrar na quest e desfaz alguns bugs...
Se você é anormal como eu, pode querer adicionar no Quest Log essa quest para ajudar os players
Então em XML/quests.xml depois de:
Adicione :
Pra adicionar o encantamento do rainbow shield
entre em
http://www.xtibia.com/forum/84-Enchant-Sys...ld-t103742.html
Editado Julho 1 por tibiaa4e