Postado Maio 18, 2014 11 anos Se aparecer qualquer erro da um tok que resolvo pra ti Scripter: |||||||||| 10% Te ajudei?? REP + e ficamos quites... Atenciosamente, Lucas. Abraços!
Postado Maio 19, 2014 11 anos Autor opa amigo testei e dei esse errono distrito [18/5/2014 21:54:25] [Error - LuaInterface::loadFile] data/npc/scripts/Commanderstone.lua:53: 'end' expected (to close 'function' at line 37) near 'endnpcHandler' [18/5/2014 21:54:25] [Warning - NpcEvents::NpcEvents] Cannot load script: data/npc/scripts/Commanderstone.lua [18/5/2014 21:54:25] data/npc/scripts/Commanderstone.lua:53: 'end' expected (to close 'function' at line 37) near 'endnpcHandler' eu usei assim Commanderstone.lua local id1 = 12468 --id do item a ser trocado local stor = 4150 -- storage que o npc vai adr pelo item local quantidade = 150 -- quantos itens player deve ter para trocar por storage local palavra = "battle" --palavra chave pra falar com o npc pra trocar a storage local mensagem = "You need to be prepared for this fight, bring more {Minor Crystalline Token}." -- a mensagem que deve ser dita se ele não tiver o item 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 playerHaveItems(cid, itemid) local items = type(itemid) == "table" and itemid or {itemid} for i = 1, #items do if getPlayerItemCount(cid, items[i]) <= 0 then return false end end return true end function doPlayerRemoveItems(cid, itemid, count) local items = type(itemid) == "table" and itemid or {itemid} for i = 1, #items do doPlayerRemoveItem(cid, items[i], count ~= nil and count or 1) end return nil end function creatureSayCallback(cid, type, msg) if(not npcHandler:isFocused(cid)) then return false end if msgcontains(msg, palavra) then if playerHaveItems(cid, {id1}) then doPlayerRemoveItems(cid, {id1}, quantidade) setPlayerStorageValue(cid, stor, 1) else selfSay(mensagem) end end return true endnpcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) eno npc <?xml version="1.0" encoding="UTF-8"?> <npc name="Commander Stone" script="Commanderstone.lua" walkinterval="2000" floorchange="0"> <health now="100" max="100"/> <look type="146" head="123" body="74" legs="123" feet="0" addons="2"/> <parameters> <parameter key="message_greet" value="Hi ,Say {join} spoke to join our army!."/> </parameters> </npc> Editado Maio 19, 2014 11 anos por Skullphoenyx (veja o histórico de edições)
Postado Maio 19, 2014 11 anos Solução local id1 = 12468 --id do item a ser trocado local stor = 4150 -- storage que o npc vai adr pelo item local quantidade = 150 -- quantos itens player deve ter para trocar por storage local palavra = "battle" --palavra chave pra falar com o npc pra trocar a storage local mensagem = "You need to be prepared for this fight, bring more {Minor Crystalline Token}." -- a mensagem que deve ser dita se ele não tiver o item 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 playerHaveItems(cid, itemid) local items = type(itemid) == "table" and itemid or {itemid} for i = 1, #items do if getPlayerItemCount(cid, items[i]) <= 0 then return false end end return true end function doPlayerRemoveItems(cid, itemid, count) local items = type(itemid) == "table" and itemid or {itemid} for i = 1, #items do doPlayerRemoveItem(cid, items[i], count ~= nil and count or 1) end return nil end function creatureSayCallback(cid, type, msg) if(not npcHandler:isFocused(cid)) then return false end if msgcontains(msg, palavra) then if playerHaveItems(cid, {id1}) then doPlayerRemoveItems(cid, {id1}, quantidade) setPlayerStorageValue(cid, stor, 1) else selfSay(mensagem) end end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) Vê aí. Te ajudei?? REP + e ficamos quites... http://www.tibiaking.com/forum/uploads/emoticons/default_happyy.png' alt=';D'> Atenciosamente, Daniel. Abraços! Meus tutoriais: Programação: Resolvendo QUALQUER erro na data base. Scripts (system's, creaturescripts, mod's, NPC's, etc): (Sistema) GOD Ambient Light Full. Adicionando novas mounts ao servidor [NPC] Papai Noel que dá presente todo ano. Web-site: Resolvendo problema de caracteres especiais em PHP Formatando textos em PHP! Mudando a cor, tamanho, fonte, etc. Criando e configurando tabelas para paginas PHP
Postado Maio 19, 2014 11 anos Autor vlw ajudo muito amanhã ja ti do um gostei vo aproveita e pedi outro npc, um npc de task! preciso de um npc que pessa pro player matar 666 demon ai depois da pessoal mata 666 demon ela ganha uma storagem e um axe , é pra demon oak quest vlw essa eu do gostie por 1 semana
Postado Maio 19, 2014 11 anos Te passo um sistema de task se vc quiser configura-lo só pra uma quest faça... (vou deixar ele todo caso vc mude de ideia, mas é bem facil de configura-lo) killinginthenameof.lua Mostrar conteúdo oculto local questCreatures = { ["rotworm"] = {questStarted = 1530, questStorage = 65029, creatureStorage = 15075, killsRequired = 100, raceName = "rotworm"}, ["Rotworm Queen"] = {questStarted = 1530, questStorage = 65029, creatureStorage = 15076, killsRequired = 100, raceName = "rotworm"}, ["Carrion Worm"] = {questStarted = 1530, questStorage = 65029, creatureStorage = 15077, killsRequired = 100, raceName = "rotworm"}, ["cyclops"] = {questStarted = 1531, questStorage = 65030, creatureStorage = 15078, killsRequired = 300, raceName = "cyclops"}, ["dragon"] = {questStarted = 1532, questStorage = 65031, creatureStorage = 15079, killsRequired = 500, raceName = "dragon"}, ["dragon lord"] = {questStarted = 1532, questStorage = 65031, creatureStorage = 15080, killsRequired = 500, raceName = "dragon"}, ["dragon lord vip"] = {questStarted = 1532, questStorage = 65031, creatureStorage = 15080, killsRequired = 500, raceName = "dragon"}, ["dragon lord vip II"] = {questStarted = 1532, questStorage = 65031, creatureStorage = 15108, killsRequired = 500, raceName = "dragon"}, ["vampire"] = {questStarted = 1534, questStorage = 65033, creatureStorage = 15081, killsRequired = 500, raceName = "vampire"}, ["giant spider"] = {questStarted = 1535, questStorage = 65034, creatureStorage = 15082, killsRequired = 100, raceName = "giant spider"}, ["behemoth"] = {questStarted = 1536, questStorage = 65035, creatureStorage = 15083, killsRequired = 550, raceName = "bsehemoth"}, ["warlock"] = {questStarted = 1537, questStorage = 65036, creatureStorage = 15084, killsRequired = 1000, raceName = "warlock"}, ["warlock vip"] = {questStarted = 1537, questStorage = 65036, creatureStorage = 15085, killsRequired = 1000, raceName = "warlock"}, ["hydra"] = {questStarted = 1538, questStorage = 65037, creatureStorage = 15086, killsRequired = 1500, raceName = "hydra"}, ["hydra vip"] = {questStarted = 1538, questStorage = 65037, creatureStorage = 15087, killsRequired = 1500, raceName = "hydra"}, ["hydra vip II"] = {questStarted = 1538, questStorage = 65037, creatureStorage = 15109, killsRequired = 1500, raceName = "hydra"}, ["frost dragon"] = {questStarted = 1539, questStorage = 65038, creatureStorage = 15088, killsRequired = 5000, raceName = "frost dragon"}, ["frost dragon vip"] = {questStarted = 1539, questStorage = 65038, creatureStorage = 15089, killsRequired = 5000, raceName = "frost dragon"}, ["frost dragon vip II"] = {questStarted = 1539, questStorage = 65038, creatureStorage = 15110, killsRequired = 5000, raceName = "frost dragon"}, ["fury"] = {questStarted = 1540, questStorage = 65039, creatureStorage = 15090, killsRequired = 2000, raceName = "fury"}, ["medusa"] = {questStarted = 1541, questStorage = 65040, creatureStorage = 15091, killsRequired = 3000, raceName = "medusa"}, ["medusa vip"] = {questStarted = 1541, questStorage = 65040, creatureStorage = 15092, killsRequired = 3000, raceName = "medusa"}, ["medusa vip II"] = {questStarted = 1541, questStorage = 65040, creatureStorage = 15111, killsRequired = 3000, raceName = "medusa"}, ["ghastly dragon"] = {questStarted = 1542, questStorage = 65041, creatureStorage = 15093, killsRequired = 1500, raceName = "ghastly dragon"}, ["lizard chosen"] = {questStarted = 1543, questStorage = 65042, creatureStorage = 15094, killsRequired = 1850, raceName = "lizard chosen"}, ["draken warmaster"] = {questStarted = 1544, questStorage = 65043, creatureStorage = 15095, killsRequired = 4200, raceName = "draken"}, ["draken spellweaver"] = {questStarted = 1544, questStorage = 65043, creatureStorage = 15096, killsRequired = 4200, raceName = "draken"}, ["demon"] = {questStarted = 1545, questStorage = 65044, creatureStorage = 15097, killsRequired = 6666, raceName = "demon"}, ["demon vip"] = {questStarted = 1545, questStorage = 65044, creatureStorage = 15098, killsRequired = 6666, raceName = "demon"}, ["grim reaper vip II"] = {questStarted = 1546, questStorage = 65032, creatureStorage = 15112, killsRequired = 5000, raceName = "Grim reaper"}, ["Grim reper"] = {questStarted = 1546, questStorage = 65032, creatureStorage = 15113, killsRequired = 5000, raceName = "Grim reaper"}, ["Grim reaper vip"] = {questStarted = 1546, questStorage = 65032, creatureStorage = 15114, killsRequired = 5000, raceName = "Grim reaper"}, ["Lord Of Demon"] = {questStarted = 1547, questStorage = 65053, creatureStorage = 15115, killsRequired = 6666, raceName = "lord of demon"}, ["hellgorak"] = {questStarted = 1548, questStorage = 65045, creatureStorage = 15099, killsRequired = 1000, raceName = "hellgorak"}, ["abominator"] = {questStarted = 1549, questStorage = 65046, creatureStorage = 15100, killsRequired = 1700, raceName = "abominator"}, ["infernatil"] = {questStarted = 1550, questStorage = 65047, creatureStorage = 15101, killsRequired = 170, raceName = "Infernatil"}, ["war golem"] = {questStarted = 1551, questStorage = 65048, creatureStorage = 15102, killsRequired = 2399, raceName = "war golem"}, ["Apocalypse"] = {questStarted = 1552, questStorage = 65049, creatureStorage = 15103, killsRequired = 1000, raceName = "Apocalypse"}, ["black sheep"] = {questStarted = 1553, questStorage = 65050, creatureStorage = 15104, killsRequired = 2199, raceName = "black sheep"}, ["rift blood"] = {questStarted = 1554, questStorage = 65051, creatureStorage = 15105, killsRequired = 200, raceName = "Rift"}, ["rift brood"] = {questStarted = 1554, questStorage = 65051, creatureStorage = 15106, killsRequired = 200, raceName = "Rift"}, ["ajudante"] = {questStarted = 1555, questStorage = 65052, creatureStorage = 15107, killsRequired = 10, raceName = "Ajudante"} } local msgType = MESSAGE_STATUS_CONSOLE_ORANGE function onKill(cid, target, lastHit) local creature = questCreatures[getCreatureName(target):lower()] if creature then if isPlayer(target) then return true end if getCreatureStorage(cid, creature.questStarted) > 0 then if getCreatureStorage(cid, creature.questStorage) < creature.killsRequired then if getCreatureStorage(cid, creature.questStorage) < 0 then doCreatureSetStorage(cid, creature.questStorage, 0) end if getCreatureStorage(cid, creature.creatureStorage) < 0 then doCreatureSetStorage(cid, creature.creatureStorage, 0) end doCreatureSetStorage(cid, creature.questStorage, getCreatureStorage(cid, creature.questStorage) + 1) doCreatureSetStorage(cid, creature.creatureStorage, getCreatureStorage(cid, creature.creatureStorage) + 1) doPlayerSendTextMessage(cid, msgType, getCreatureStorage(cid, creature.creatureStorage) .. " " .. getCreatureName(target) .. " defeated. Total [" .. getCreatureStorage(cid, creature.questStorage) .. "/" .. creature.killsRequired .. "] " .. creature.raceName .. ".") end end end return true end creaturescript.xml Mostrar conteúdo oculto <event type="kill" name="KillingInTheNameOf" event="script" value="killinginthenameof.lua"/> npc Grizzly Adams.xml Mostrar conteúdo oculto <?xml version="1.0" encoding="UTF-8"?> <npc name="Task man" script="data/npc/scripts/killinginthenameof.lua" access="3" walkinterval="2000" lookdir="2"> <mana now="800" max="800"/> <health now="200" max="200"/> <look type="144" head="97" body="97" legs="94" feet="97" addons="3"/> </npc> killinginthenameof.lua Mostrar conteúdo oculto local stor1 = -- coloque aqui caso queira adicionar na recompensa, local stor2 = --coloque aqui caso queira adicionar numa recompensa. local tasks = { [1] = {questStarted = 1530, questStorage = 65029, killsRequired = 100, raceName = "Rotworm", rewards = {{enable = true, type = "exp", values = 100000}, {enable = true, type = "item", values = {2159,1}}}}, [2] = {questStarted = 1531, questStorage = 65030, killsRequired = 300, raceName = "cyclops", rewards = {{enable = true, type = "exp", values = 200000}, {enable = true, type = "item", values = {2159,1}}}}, [3] = {questStarted = 1532, questStorage = 65031, killsRequired = 500, raceName = "dragon", rewards = {{enable = true, type = "exp", values = 300000}, {enable = true, type = "item", values = {2159,1}}}}, [4] = {questStarted = 1534, questStorage = 65033, killsRequired = 500, raceName = "vampire", rewards = {{enable = true, type = "exp", values = 1000000}, {enable = true, type = "item", values = {2159,2}}}}, [5] = {questStarted = 1535, questStorage = 65034, killsRequired = 100, raceName = "giant spider", rewards = {{enable = true, type = "exp", values = 5000000}, {enable = true, type = "item", values = {2159,2}}}}, [6] = {questStarted = 1536, questStorage = 65035, killsRequired = 550, raceName = "behemoth", rewards = {{enable = true, type = "exp", values = 10000000}, {enable = true, type = "item", values = {2159,2}}}}, [7] = {questStarted = 1537, questStorage = 65036, killsRequired = 1000, raceName = "warlock", rewards = {{enable = true, type = "exp", values = 15000000}, {enable = true, type = "item", values = {2159,2}}}}, [8] = {questStarted = 1538, questStorage = 65037, killsRequired = 1500, raceName = "hydra", rewards = {{enable = true, type = "exp", values = 20000000}, {enable = true, type = "item", values = {2159,2}}}}, [9] = {questStarted = 1539, questStorage = 65038, killsRequired = 5000, raceName = "frost dragon", rewards = {{enable = true, type = "exp", values = 30000000}, {enable = true, type = "item", values = {2159,2}}}}, [10] = {questStarted = 1540, questStorage = 65039, killsRequired = 2000, raceName = "fury", rewards = {{enable = true, type = "exp", values = 40000000}, {enable = true, type = "item", values = {2159,2}}}}, [11] = {questStarted = 1541, questStorage = 65040, killsRequired = 3000, raceName = "medusa", rewards = {{enable = true, type = "exp", values = 50000000}, {enable = true, type = "item", values = {2159,2}}}}, [12] = {questStarted = 1542, questStorage = 65041, killsRequired = 1500, raceName = "ghastly dragon", rewards = {{enable = true, type = "exp", values = 1000000000}, {enable = true, type = "item", values = {2159,2}}}}, [13] = {questStarted = 1543, questStorage = 65042, killsRequired = 1850, raceName = "lizard chosen", rewards = {{enable = true, type = "exp", values = 130000000}, {enable = true, type = "item", values = {2159,2}}}}, [14] = {questStarted = 1544, questStorage = 65043, killsRequired = 4200, raceName = "draken", rewards = {{enable = true, type = "exp", values = 160000000}, {enable = true, type = "item", values = {2159,2}}}}, [15] = {questStarted = 1545, questStorage = 65044, killsRequired = 6666, raceName = "demon", rewards = {{enable = true, type = "exp", values = 200000000}, {enable = true, type = "item", values = {2159,4}}}}, [16] = {questStarted = 1546, questStorage = 65032, killsRequired = 5000, raceName = "Grim reaper", rewards = {{enable = true, type = "exp", values = 300000000}, {enable = true, type = "item", values = {2159,8}}}}, [17] = {questStarted = 1547, questStorage = 65053, killsRequired = 6666, raceName = "Lord of demon", rewards = {{enable = true, type = "exp", values = 350000000}, {enable = true, type = "item", values = {2159,8}}}}, [18] = {questStarted = 1548, questStorage = 65047, killsRequired = 1000, raceName = "hellgorak", rewards = {{enable = true, type = "exp", values = 400000000}, {enable = true, type = "item", values = {2159,10}}}}, [19] = {questStarted = 1549, questStorage = 65048, killsRequired = 300, raceName = "abominator", rewards = {{enable = true, type = "exp", values = 450000000}, {enable = true, type = "item", values = {2159,12}}}}, [20] = {questStarted = 1550, questStorage = 65049, killsRequired = 170, raceName = "infernatil", rewards = {{enable = true, type = "exp", values = 500000000}, {enable = true, type = "item", values = {2159,14}}}}, [21] = {questStarted = 1551, questStorage = 65050, killsRequired = 2399, raceName = "war golem", rewards = {{enable = true, type = "exp", values = 550000000}, {enable = true, type = "item", values = {2159,16}}}}, [22] = {questStarted = 1552, questStorage = 65051, killsRequired = 1000, raceName = "Apocalypse", rewards = {{enable = true, type = "exp", values = 600000000}, {enable = true, type = "item", values = {2159,18}}}}, [23] = {questStarted = 1553, questStorage = 65051, killsRequired = 2199, raceName = "black sheep", rewards = {{enable = true, type = "exp", values = 700000000}, {enable = true, type = "item", values = {2159,20}}}}, [24] = {questStarted = 1554, questStorage = 65051, killsRequired = 200, raceName = "Rift", rewards = {{enable = true, type = "exp", values = 800000000}, {enable = true, type = "item", values = {2159,20}}}}, [25] = {questStarted = 1555, questStorage = 65052, killsRequired = 10, raceName = "Ajudante", rewards = {{enable = true, type = "exp", values = 1000000000},{enable = true, type = "item", values = {2157,1}}, {enable = true, type = "item", values = {2159,30}}}}, } local rankStorage = 32150 local storage = 64521 local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) local talkState = {} local voc = {} 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) local s = getCreatureStorage(cid, storage) if(not npcHandler:isFocused(cid)) then return false end local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_PRIVATE and 0 or cid if msgcontains(msg, "task") then if(s < 1) then doCreatureSetStorage(cid, storage, 1) s = getCreatureStorage(cid, storage) end if(getCreatureStorage(cid, rankStorage) < 1) then doCreatureSetStorage(cid, rankStorage, 0) end if tasks then if(getCreatureStorage(cid, tasks.questStarted) < 1) then if(getCreatureStorage(cid, tasks.creatureStorage) < 0) then doCreatureSetStorage(cid, tasks.creatureStorage, 0) end if(getCreatureStorage(cid, tasks.questStorage) < 0) then doCreatureSetStorage(cid, tasks.questStorage, 0) end doCreatureSetStorage(cid, tasks.questStarted, 1) selfSay("Voce comecou a task numero " .. getPlayerStorageValue(cid, storage) .. ", nessa task voce precisa matar " .. tasks.killsRequired .. " " .. tasks.raceName .. ".", cid) else selfSay("Atualmente voce esta fazendo uma task sobre " .. tasks.raceName .. ", numero da task " .. getPlayerStorageValue(cid, storage) .. ". Ou se voce terminou sua task fale {reportar} para terminar sua task!", cid) end else print("[Warning - Error::Killing in the name of::Tasks config] Something is wrong.") end elseif msgcontains(msg, "reportar") then if tasks and tasks.questStarted > 0 then if(getCreatureStorage(cid, tasks.creatureStorage) < 0) then doCreatureSetStorage(cid, tasks.creatureStorage, 0) end if(getCreatureStorage(cid, tasks.questStorage) < 0) then doCreatureSetStorage(cid, tasks.questStorage, 0) end if(getCreatureStorage(cid, tasks.questStorage) >= tasks.killsRequired) then for i = 1, table.maxn(tasks.rewards) do if(tasks.rewards.enable) then if isInArray({"boss", "teleport", 1}, tasks.rewards.type) then doTeleportThing(cid, tasks.rewards.values) elseif isInArray({"exp", "experience", 2}, tasks.rewards.type) then doPlayerAddExperience(cid, tasks.rewards.values) elseif isInArray({"item", 3}, tasks.rewards.type) then doPlayerAddItem(cid, tasks.rewards.values[1], tasks.rewards.values[2]) elseif isInArray({"money", 4}, tasks.rewards.type) then doPlayerAddMoney(cid, tasks.rewards.values) elseif isInArray({"storage", "stor", 5}, tasks.rewards.type) then doCreatureSetStorage(cid, tasks.rewards.values[1], tasks.rewards.values[2]) elseif isInArray({"points", "rank", 2}, tasks.rewards.type) then doCreatureSetStorage(cid, rankStorage, getCreatureStorage(cid, rankStorage) + tasks.rewards.values) else print("[Warning - Error::Killing in the name of::Tasks config] Bad reward type: " .. tasks.rewards.type .. ", reward could not be loaded.") end end end local rank = getCreatureStorage(cid, rankStorage) selfSay("BOAA!... voce terminou a task numero " .. s .. "" .. (rank > 4 and ", you are a " or "") .. "" .. (((rank > 4 and rank < 10) and ("Huntsman") or (rank > 9 and rank < 20) and ("Ranger") or (rank > 19 and rank < 30) and ("Big Game Hunter") or (rank > 29 and rank < 50) and ("Trophy Hunter") or (rank > 49) and ("Elite Hunter")) or "") .. ". Good job.", cid) doCreatureSetStorage(cid, storage, s + 1) else selfSay("Atualmente " .. getCreatureStorage(cid, tasks.questStorage) .. " " .. tasks.raceName .. " mortos, voce precisa matar " .. tasks.killsRequired .. ".", cid) end else selfSay("voce não tem nenhuma task iniciada.", cid) end end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) Caso só queira dos demon msm exclua o resto só deixando [1] sendo a dos demons, faça msm coisa no script do creature script... [25] = {questStarted = 1555, questStorage = 65052, killsRequired = 10, raceName = "Ajudante", rewards = {{enable = true, type = "exp", values = 1000000000},{enable = true, type = "item", values = {2157,1}}, {enable = true, type = "item", values = {2159,30}}}}, Para adicionar uma storage deixe assim enable = true, type = "stor1", values = 1 e configure o stor1 lá em cima ...(teste e diga se esta totalmente funcional)(como testar coloque pra 1 demon ) A quase ia esquecendo adicione essa tag: em login.lua Mostrar conteúdo oculto registerCreatureEvent(cid, "KillingInTheNameOf") e essa tag nos monstros <event name="KillingInTheNameOf"/>(vou deixar o demon.xml de exemplo VV) Mostrar conteúdo oculto <?xml version="1.0" encoding="UTF-8"?> <monster name="Demon" nameDescription="a demon" race="fire" experience="6000" speed="275" manacost="10000"> <health now="8200" max="8200"/> <look type="35" corpse="5995"/> <targetchange interval="5000" chance="8"/> <strategy attack="90" defense="10"/> <flags> <flag summonable="0"/> <flag attackable="1"/> <flag hostile="1"/> <flag illusionable="0"/> <flag convinceable="0"/> <flag pushable="0"/> <flag canpushitems="1"/> <flag canpushcreatures="1"/> <flag targetdistance="1"/> <flag staticattack="90"/> <flag runonhealth="0"/> </flags> <attacks> <attack name="melee" interval="2000" skill="100" attack="110"/> <attack name="manadrain" interval="2000" chance="13" range="7" min="0" max="-120"/> <attack name="fire" interval="2000" chance="30" range="7" radius="7" target="1" min="-150" max="-250"> <attribute key="shootEffect" value="fire"/> <attribute key="areaEffect" value="firearea"/> </attack> <attack name="fire" interval="2000" chance="12" range="7" radius="1" target="1"> <attribute key="shootEffect" value="fire"/> </attack> <attack name="lifedrain" interval="1000" chance="12" length="8" spread="0" min="-300" max="-467"> <attribute key="areaEffect" value="purpleenergy"/> </attack> <attack name="speed" interval="2000" chance="15" target="1" speedchange="-750" duration="30000"> <attribute key="shootEffect" value="suddendeath"/> </attack> <attack name="energy" interval="3000" chance="10" range="1" target="1" min="-210" max="-300"> <attribute key="areaEffect" value="purpleenergy"/> </attack> </attacks> <defenses armor="55" defense="55"> <defense name="healing" interval="2000" chance="15" min="130" max="240"> <attribute key="areaEffect" value="blueshimmer"/> </defense> <defense name="speed" interval="1000" chance="8" speedchange="290" duration="5000"> <attribute key="areaEffect" value="redshimmer"/> </defense> </defenses> <elements> <element physicalPercent="30"/> <element energyPercent="50"/> <element earthPercent="20"/> <element icePercent="-15"/> <element holyPercent="-15"/> <element deathPercent="20"/> </elements> <immunities> <immunity fire="1"/> <immunity drown="1"/> <immunity paralyze="1"/> <immunity invisible="1"/> </immunities> <summons maxSummons="1"> <summon name="fire elemental" interval="1000" chance="12"/> </summons> <voices interval="5000" chance="10"> <voice sentence="MUHAHAHAHA!" yell="1"/> <voice sentence="I SMELL FEEEEEAAAR!" yell="1"/> <voice sentence="CHAMEK ATH UTHUL ARAK!" yell="1"/> <voice sentence="Your resistance is futile!"/> <voice sentence="Your soul will be mine!" yell="0"/> </voices> <script> <event name="KillingInTheNameOf"/> </script> <loot> <item id="2148" countmax="100" chance1="100000" chancemax="0"/> <item id="2148" countmax="100" chance1="100000" chancemax="0"/> <item id="2152" countmax="3" chance1="33333" chancemax="2000"/> <item id="2514" chance="1900"/> <item id="2472" chance="200"/> <item id="2795" countmax="6" chance1="7500"/> <item id="5906" countmax="1" chance="2000"/> <item id="5954" countmax="1" chance="2345"/> <item id="2164" chance="2100"/> <item id="2176" chance="3500"/> <item id="1982" chance="1300"/> <item id="2165" chance="2300"/> <item id="7591" chance="4500"/> <item id="1987" chance="100000"> <inside> <item id="2393" chance="3800"/> <item id="2432" chance="3800"/> <item id="2112" chance="4100"/> <item id="2396" chance="2600"/> <item id="2795" countmax="6" chance1="13000"/> <item id="2678" countmax="3" chance1="10000" chancemax="0"/> <item id="2148" countmax="100" chance1="100000" chancemax="0"/> <item id="2151" countmax="4" chance1="5500" chancemax="0"/> <item id="2462" chance="3200"/> <item id="2149" countmax="3" chance1="11000" chancemax="0"/> <item id="2171" chance="2200"/> <item id="2387" chance="32000"/> <item id="2470" chance="1350"/> <item id="7382" chance="300"/> <item id="7393" chance="1700"/> <item id="2520" chance="3100"/> <item id="2418" chance="1500"/> <item id="2377" chance="6666"/> </inside> </item> </loot> </monster> Scripter: |||||||||| 10% Te ajudei?? REP + e ficamos quites... Atenciosamente, Lucas. Abraços!
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.