Ir para conteúdo

Pesquisar na Comunidade

Mostrando resultados para as tags ''creatureevent''.

  • Pesquisar por Tags

    Digite tags separadas por vírgulas
  • Pesquisar por Autor

Tipo de Conteúdo


Fóruns

  • xTibia - Notícias e Suporte
    • Regras
    • Noticias
    • Soluções
    • Projetos Patrocinados
    • Tutoriais para Iniciantes
    • Imprensa
  • OTServ
    • Notícias e Debates
    • OTServlist
    • Downloads
    • Recursos
    • Suporte
    • Pedidos
    • Show-Off
    • Tutoriais
  • OFF-Topic
    • Barzinho do Éks
    • Design
    • Informática

Encontrar resultados em...

Encontrar resultados que contenham...


Data de Criação

  • Início

    FIM


Data de Atualização

  • Início

    FIM


Filtrar pelo número de...

Data de Registro

  • Início

    FIM


Grupo


Sou

  1. Esse é um script(pog) que eu fiz porque eu vi em um tópico um membro pedindo ele. - Ele foi feito para impedir que jogadores criem personagens com nome de monstros. /data/creaturescripts/scripts/blockNames: QtqquzuF[/pastebin] creaturescripts.xml <event type = "login" name = "nameBlock" event = "script" value = "blockNames.lua"/>
  2. Fala Ai Galera vi que varias pessoas precisam do System de Price nos loot Igual da PxG para Pokemon então achei esse System e irei Postar para vocês lembrando que o Autor desse Script vai para o ZerefShirou... Bom uma Print Sobre o System \/ Bom agora configurando. vai em data/creaturescript/scripts e vai no arquivo .lua chamado look.lua ai se Procura if isPokeball(thing.itemid) then e coloca antes disso /\ coloca isso \/ if not isPokeball(thing.itemid) then if priceList[getItemInfo(thing.itemid).name] then price = priceList[getItemInfo(thing.itemid).name].price if thing.type > 1 then str = "You see "..thing.type.." "..getItemInfo(thing.itemid).plural.."." price = price * thing.type else str = "You see "..getItemInfo(thing.itemid).article.." "..getItemInfo(thing.itemid).name.."." end str = str.." Price: $"..price.."." if getItemAttribute(thing.uid, "description") then str = str.."\n"..getItemAttribute(thing.uid, "description").."." end if getPlayerGroupId(cid) >= 4 and getPlayerGroupId(cid) <= 6 then str = str.."\nItemID: ["..thing.itemid.."]." --alterado v1.7 local pos = getThingPos(thing.uid) str = str.."\nPosition: [X: "..pos.x.."][Y: "..pos.y.."][Z: "..pos.z.."]" end doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, str) return false end end e no configuration.lua localizado em data/lib/configuration.lua desse tudo e add essas linhas \/ priceList = { ["water gem"] = {price = 0.50}, ["normal ball"] = {price = 50}, ["great ball"] = {price = 200}, ["super ball"] = {price = 500}, ["ultra ball"] = {price = 1300}, ["saffariball"] = {price = 1300}, ["Small potion"] = {price = 50}, ["Great potion"] = {price = 100}, ["Ultra potion"] = {price = 220}, ["Hyper potion"] = {price = 500}, ["Revive"] = {price = 2500}, ["Medicine"] = {price = 100}, ["Recording camera"] = {price = 10000}, ["Essence of fire"] = {price = 0.50}, ["Small stone"] = {price = 0.50}, ["Pot of moss bug"] = {price = 0.50}, ["Screw"] = {price = 0.50}, ["Straw"] = {price = 0.50}, ["Water gems"] = {price = 0.50}, ["Remains of magikarp"] = {price = 10}, ["Teeth"] = {price = 100}, ["Bottle of poison"] = {price = 100}, ["Water pendant"] = {price = 100}, ["Feather"] = {price = 7.50}, ["Seed"] = {price = 10}, ["Pair of leaves"] = {price = 30}, ["Apple bite"] = {price = 30}, ["Bat wing"] = {price = 50}, ["Bag of pollem"] = {price = 80}, ["Belt of Champion"] = {price =1000}, ["Bird Beak"] = {price = 100}, ["Blue Vines"] = {price = 400}, ["Bone"] = {price = 40}, ["Bulv"] = {price = 3250}, ["Chansey egg"] = {price = 1000}, ["Comb"] = {price =100}, ["Crab Claw"] = {price = 22}, ["Dragon Tooth"] = {price = 610}, ["Electric Box"] = {price = 20}, ["Electric Tail"] = {price = 000}, ["Farfetch'd Stick"] = {price = 610}, ["Fox Tail"] = {price = 50}, ["Fur"] = {price = 13}, ["Future Orb"] = {price = 15.50}, ["Gosme"] = {price = 2.50}, ["Gyarados Tail"] = {price = 800}, ["Horn"] = {price = 25}, ["Ice Orb"] = {price = 32.50}, ["Imam"] = {price = 60}, ["Iron Bracelet"] = {price = 250}, ["Locksmith of Shell"] = {price = 80}, ["Luck Medalion"] = {price = 1000}, ["Mimic Clothes"] = {price = 1000}, ["Mushroom"] = {price = 80}, ["Nail"] = {price = 10}, ["Onix Tail"] = {price = 1000}, ["Pot Of Lava"] = {price = 18}, ["Psychic Spoon"] = {price = 40}, ["Punch Machine"] = {price = 40}, ["Ruby"] = {price = 200}, ["Sandbag"] = {price = 15}, ["Scythe"] = {price = 1000}, ["Slow Tail"] = {price = 80}, ["Squirtle Hull"] = {price = 32.50}, ["Stone Orb"] = {price = 16.50}, ["Traces of ghost"] = {price = 26.50}, ["Venom Flute"] = {price = 300}, ["Wool Ball"] = {price = 80}, ["Thunder Feather"] = {price = 5000}, ["Ice Feather"] = {price = 5000}, ["Fire Feather"] = {price = 5000}, ["Psyduck Mug"] = {price = 610}, ["Tongue"] = {price = 1000} } essa lista eu que fiz com os preços da PxG galera se quiser add mais itens para dar look e ver o price só ir add como esta nessa Lista /\ haha é Isso galera Obrigado! fuiz \o/
  3. Olá galerinha do Xtibia, venho trazer um War System aqui para vocês exclusivo, não é igual ao War System ORIGINAL, esse é melhor na minha opnião (ESTILIZADO). Bem, abre a pasta do ot/data/creaturescripts/scripts/warsystem.lua - Se não tiver, você crie - ai dentro do warsystem você coloca: local guild, enemy, guildFrags, enemyFrags = getPlayerGuildId(cid) local fightingGuilds = {} local tmp = db.getResult("SELECT `guild_id`, `enemy_id`, `guild_kills`, `enemy_kills`, `frags` FROM `guild_wars` WHERE `status` = 1 and (`guild_id` = "..getPlayerGuildId(cid).." or `enemy_id` = "..getPlayerGuildId(cid).. ") ;") warString = "" if tmp:getID() ~= -1 then i = 1 repeat if tmp:getDataInt("guild_id") == guild then enemy = tmp:getDataInt("enemy_id") guildFrags = tmp:getDataInt("guild_kills") enemyFrags = tmp:getDataInt("enemy_kills") else enemy = tmp:getDataInt("guild_id") guildFrags = tmp:getDataInt("enemy_kills") enemyFrags = tmp:getDataInt("guild_kills") end local enemyName, _tmp = "", db.getResult("SELECT `name` FROM `guilds` WHERE `id` = " .. enemy) if(_tmp:getID() ~= -1) then enemyName = _tmp:getDataString("name") _tmp:free() end fightingGuilds[i] = {} fightingGuilds[i].name = enemyName fightingGuilds[i].guildFrags = guildFrags fightingGuilds[i].enemyFrags = enemyFrags fightingGuilds[i].limit = tmp:getDataInt("frags") i = i + 1 until not(tmp:next()) tmp:free() table.sort(fightingGuilds, function (a, B) return (a.name < b.name) end) for k, v in pairs(fightingGuilds) do if (v.guildFrags < v.limit and v.enemyFrags < v.limit ) then if (warString == "") then warString = "Your guild is currently in war with the " .. v.name .. " (" .. v.guildFrags .. ":" .. v.enemyFrags .. " frags, limit ".. v.limit ..")" else warString = warString .. " and with the " .. v.name .. " (" .. v.guildFrags .. ":" .. v.enemyFrags.." frags, limit ".. v.limit .. ")" end end end end if (warString ~= "") then doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, warString .. ".") end Agora abra o creaturescripts.xml e coloque isso: <event type="kill" name="warSystem" event="script" value="warsystem.lua"/> Agora abra o login.lua e coloca isso: registerCreatureEvent(cid, "warSystem") Testado no TFS 3.6, olhem a foto abaixo: OBS: Peguei esse tutorial de outro fórum.
  4. Area Experience Iae galera tudo bom? Hoje venho trazer para vocês com os créditos do nosso amigo Vodkart, um código que você coloca uma área, e nessa área se algum player matar um monstro ganha mais Exp. Pode ser usada bastante em área vips. Instalação Vá em data/creaturescripts/scripts, copie algum arquivo da pasta e cole, renomeie para area_exp.lua e adicione dentro: Na mesma pasta, abra o login.lua e adicione isso na penúltima linha: registerCreatureEvent(cid, "area_exp") Agora abra com o bloco de notas o arquivo creaturescripts.xml e adicione essa tag: <event type="kill" name="area_exp" event="script" value="area_exp.lua"/> Configuração No código, essa parte: local exp_area ={ {from = {x=1014,y=1016,z=7},to = {x=1017,y=1019,z=7}, exp = 0.5}, {from = {x=1008,y=1018,z=7},to = {x=1011,y=1021,z=7}, exp = 0.25} } "from" você coloca as coordenadas do canto superior esquerdo da área e "to" você coloca as coordenadas do canto direito inferior. "exp" você coloca a quantia de Experience que vai dar a mais para o player que estiver naquela área. O 5 representa 50% e 25 representa 25%. Finalizações É isso aí galerinha, boa sorte e espero que tenham gostado.
  5. Olá galera do Xtibia, estou precisando de ajuda em relação a um script que eu estou tentando arranjar mas ta difícil. É o seguinte, eu quero fazer um script que quando a pessoa matar por exemplo um "minotaur", ele aumente o valor da storage do player + 1. E quando acontecer isso aparecer na tela uma mensagem falando quantos minotaurs ela já matou. Eu sei que já existe vááááários scripts sobre isso em relação a quest Killing In The Name Of, mas eu preciso muito deste script. Atenção. Quero que o script aumente a storage somente se ela for IGUAL OU SUPERIOR A ZERO. storage = 28901 Explicação: Valor da storage (28901) do player: 0 Matou o minotaur, Valor da storage (28901) do player: 1 ( e assim sucessivamente) e assim até chegar em 5000. quando chegar a 5000 quero que o script pare de mostrar na tela a quantidade de minotaur que o player matou e escreva apenas que ele "já matou 5000 minotaurs". Espero obter ajuda em breve.
  6. Vejo muitos por ae precisando do sistema de task do global, e hoje eu vim aki postar um que e identico ao do global. Sou novo nessa bagaça se ficar ruim o topico flala q na prox eu tento melhorar. Entao Vamos la. 1°Va ate a pasta creaturescript e dentro de script crie um arquivo com nome killinginthenameof e cole isso dentro dps vá em creaturescripts.xml e coloke isso <event type="kill" name="KillingInTheNameOf" event="script" value="killinginthenameof.lua"/> 2° Na mesma pasta procure longin.lua abra e cole isso dentro 3° Agora o npc. Procure ou crie um arquivo.xml Grizzly Adams e cole isso dentro 5° Agora a parte mais xata que tem nessa bagaça. Em cada monstro da task adcione ou em baixo de imunnities ou em cima de loot essa linha 6° Agora o mais importante que quase ngm tem funfando perfeitamente. Va na pasta xml e procure um arquivo.xml com nome quests e substitua pelo arquivo que eu acabei de postar ai e pronto. OBS: O sistema esta configurado com os bosses nos lugares em que eles aparecem no global e em breve vou colocar o resto das tasks e postarei em breve os monstros com a tag <script> <event name="KillingInTheNameOf"/> </script> adicionada em todos eles e tambem os outros npcs de task(Lugri, Budrik, Raymond Striker, Gabel, Malor, Daniel Steelsoul). Bom como prometi os monstros e os npcs estao ai, mas sao da versao 9.81 entao cuidado na hora de add no seu server de preferencia q seja global. Espero que gostem! Creditos: Eu 100% quest log.rar monster.rar task npcs.rar
  7. Testado e funcionando no TFS 0.3.6pl1 (8.54) Vá em data/creaturescripts/scripts e crie um arquivo .lua com o nome de skillblock, adicione isto - Substitua 171 pelo limite desejado. Vá em login.lua e adicione isto - registerCreatureEvent(cid, "BlockSkills") Abra creaturescripts.xml e adicione a seguinte tag - <event type="advance" name="BlockSkills" event="script" value="skillblock.lua"/> Créditos - margoh
  8. É simples só serve para monstros não atacarem eles mesmo em alguns server's eles roubam a exp, há casos também de magias bugadas que os próprios jogadores se atacam. /data/creaturescripts/scripts/ crie um arquivo renomeie para antiAtk: function onStatsChange(cid, attacker, type, combat, value) if type == STATSCHANGE_HEALTHLOSS then if attacker == cid then return false end end return true end creaturescripts.xml <event type="statschange" name="antiAtk" event="script" value="antiAtk.lua"/> Tem que registar no xml dos monstros. @Tinha esquecido disso dalvo valeu.
  9. (Ajuda) Script Não Atacar Proprio Team Criei Um Server Do 0 Fiz Map Com TownId Para cada team ao morrer volta para base team Vermelha e Azul So que preciso De uma Script Que Não POssa atacar sua Equipe Alguem Pode ME ajuda +rep Qualquer coisa Me add Msn Jonathan_challos@hotmail.com
  10. Fala galera hoje estou aki trazendo um script que ira proteger o player ate um certo lvl a exp e o magic level mais agora na versão 2.0 irá proteger através de um amuleto vá em data / creaturescripts / scripts / renome algum arquivo para levelprotection.lua é adicione . function onDeath(cid, corpse, deathList) local level = 7121727 -- até que level irá proteger o player de não perder exp & ml if (getPlayerSlotItem(cid, 2).itemid == 2173) then -- id do amulet if isPlayer(cid) and getPlayerLevel(cid) <= level then doPlayerRemoveItem(cid, 2173, 1) -- id do amulet doPlayerSetLossPercent(cid, PLAYERLOSS_MANA, 0) doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, 0) end return true end end Em creaturescripts.xml <event type="death" name="ProtectExp" event="script" value="levelprotection.lua"/> registerCreatureEvent(cid, "ProtectExp") Até a próxima .
  11. Fala galera hoje vim ensinar a colocar aquelas mesagem quando o players entrao..Bem vamos ao que interesa.. em creaturescripts/scripts crie um arquivo .lua com o nome welcome.lua e dentro dele coloque isso: salve o arquivo. em seguida va em creaturescripts.xml e coloque a seguinte tag: Bem Galera e Isso Espero Ter Ajudado.. Creditos Kaiotp MasterDino
  12. Como o próprio titulo lá diz, cada vocação terá sua(s) próprias outfits, o sistema foi aperfeiçoado para ficar mais fácil de configurar. em data> creaturescript > script vocouts.lua function onLogin(cid) registerCreatureEvent(cid, "OutfitClass") return true end function onOutfit(cid, old, current) local class = { [1] = {[0] = {136, 140}, [1] = {128, 132}}, -- citizen, nobleman [2] = {[0] = {136, 138}, [1] = {128, 130}}, -- citizen, mage [3] = {[0] = {136, 137}, [1] = {128, 129}}, -- citizen, hunter [4] = {[0] = {136, 139}, [1] = {128, 131}}, -- citizen, knight [5] = {[0] = {136, 140, 141, 158}, [1] = {128, 132, 133, 154}}, -- citizen, nobleman, summoner e shaman [6] = {[0] = {136, 138, 148, 149}, [1] = {128, 130, 144, 145}}, -- citizen, mage, druid e wizard [7] = {[0] = {136, 137, 156, 155}, [1] = {128, 129, 152, 151}}, -- citizen, hunter, assassin e pirate [8] = {[0] = {136, 139, 142, 147}, [1] = {128, 131, 134, 143}} -- citizen, knight, warrior e barbarian } if getPlayerAccess(cid) > 2 then return true end local outfits = class[getPlayerVocation(cid)][getPlayerSex(cid)] return isInArray(outfits, current.lookType) and true or doPlayerSendCancel(cid, "você não tem vocação para usar essa outfit.") and false end creaturescript.xml <event type="login" name="LoginClass" event="script" value="vocouts.lua"/> <event type="outfit" name="OutfitClass" event="script" value="vocouts.lua"/> explicando: os números entre os colchetes [] significa as vocations, caso você não sabe os ID das voc abre o spoiler: agora os números [0] e [1] significam o sexo do jogador, para female é [0] e para male é [1], onde cada um tem sua outfit. exemplo sorcerer: [1] = { -- vocation sorcerer[0] = {136, 140}, -- outfits female citizen e nobleman [1] = {128, 132}} -- outfits male citizen e nobleman } basta adicionar entre as chaves {} as id das outfits que cada vocação poderá usar. qualquer dúvida só postar.
  13. Este script da uma quantidade a sua escolha de pontos aos players do seu server quando logar pela primeira vez. Vamos lá! Vá em data/creaturescripts/scripts, copie um arquivo .lua e renomeie para freeloginpoints.lua, adicione isso - Em creturescripts.xml, adicione a tag - <event type="login" name="freeloginpoints" event="script" value="freeloginpoints.lua"/> Ainda na pasta creturescripts/scripts, abra login.lua, procure por - registerCreatureEvent(cid, "Mail") Abaixo dele, adicione isso - registerCreatureEvent(cid, "freeloginpoints") Espero que gostem! Créditos - Slave
  14. Como muitos sistemas anti-bot, a sua base é de um código que é gerado aleatoriamente. Onde esta é diferente, porém, é um pouco no log de bate-papo, o código aparece em uma janela pop-up. Assim, os jogadores exigindo que quer lembrar, ou escrever no bloco de notas brevemente. Ele poderia facilmente ser alterado para não mostrar os símbolos também. Vamos Lá! Vá em data/creaturescripts/scripts, abra login.lua e adicione isso - local timeStorage = 65117 local codeStorage = 65118 local kickStorage = 65119 local timesStorage = 65121 registerCreatureEvent(cid, "Antibot") doCreatureSetStorage(cid, codeStorage, 0) doCreatureSetStorage(cid, kickStorage, 0) doCreatureSetStorage(cid, timesStorage, 0) doCreatureSetStorage(cid, timeStorage, 0) Ainda em creaturescripts/scripts, copie um arquivo .lua, renomeie para antibot e adicione isso - (OBS - Defina a cordenada de uma tile em sua trainer area ou templo. Atrás de uma porta, ou teleport é recomendado) Em creaturescripts.xml, adicione a seguinte tag - <event type="think" name="Antibot" event="script" value="antibot.lua"/> Agora vá em data/talkactions/scripts, copie um arquivo .lua e renomeie para antibot, adicione isso (LEMBRE DE ESCOLHER AS CORDENADAS NOVAMENTE!) - Adicione as tag's em talkactions.xml - <talkaction log="yes" access="4" words="/botcheck;!botcheck" event="script" value="botcheck.lua"/> <talkaction words="!antibot" event="script" value="antibot.lua"/> /botcheck player_name Utilizado de imediato requer um jogador para utilizar o código. Vá em data/talkactions/scripts, copie um arquivo .lua e renomeie para botcheck, adicione isso - OPCIONAL! Quer que seu server permita o treinamento em AFK? Vá em data/movements/scripts, copie um arquivo .lua e renomeie para Training Tiles, adicione isso - Vá em movements.xml, e adicione as seguintes tag's - <movement type="StepIn" actionid="8410" event="script" value="training tiles.lua"/> <movement type="StepIn" actionid="8411" event="script" value="training tiles.lua"/> Então você deve definir sua tile em trainers com a action 8410, e sua tile de saida para trainers com a actions 8411. (Em seu mapper editor!) Como explicado abaixo - e aqui - Bem, espero que gostem! Créditos - supomglol
  15. Olá povo. Vejo que tem muitos tópicos pedindo esse script, de ao criar conta ganhar certos dias de VIP. Já que não tem (eu acho), venho postar aqui pra vocês. #Descrição: Ao player criar sua conta, ele ganhará 2 dias de VIP automaticamente! Pasta do seu OT -> data -> creaturescripts -> scripts -> vipdays.lua: function onLogin(cid) local storage,days = (getPlayerAccountId(cid)+550),2 if getGlobalStorageValue(storage) <= 0 then setGlobalStorageValue(storage, 13500) vip.addVipByAccount(getPlayerAccount(cid) ,vip.getDays(tonumber(days))) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você recebeu "..days.." dias de VIP, bom jogo!") end return true end Pasta do seu OT -> data -> creaturescripts -> creaturescripts.xml: <event type="login" name="vipdays" event="script" value="vipdays.lua"/> Créditos: Vodkart, Renato (por editar o script) e thiagobji (postar). É isso galera. Bom utilização do script, até! Caso falte algum crédito, me avise.
  16. Fala galera hoje estou aki trazendo um script que ira proteger o player ate um certo lvl a exp e o magic level vamos lá . vá em data / creaturescripts / scripts / renome algum arquivo para levelprotection.lua é adicione . function onDeath(cid, corpse, deathList) local level = 7121727 -- até que level irá proteger o player de não perder exp & ml if isPlayer(cid) and getPlayerLevel(cid) <= level then doPlayerSetLossPercent(cid, PLAYERLOSS_MANA, 0) doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, 0) end return true end em creaturescripts.xml adicione. <event type="death" name="ProtecExp" event="script" value="levelprotection.lua"/> em data / creaturescripts / scripts / login.lua adicione . registerCreatureEvent(cid, "ProtectExp")
  17. Versão testada: 9.4+ (Pode funcionar em anteriores) Descrição: Você já perdeu a cabeça com aquela mensagem chata de boas vindas que aparece toda hora ou aparece quando você entra no servidor pela primeira vez e remove a janela de outfit? Um novo sistema desenvolvido por mim faz aparecer essa mensagem somente para quem entra no acc manager, mas só aparece no acc manager de quem digita 1/1. TAG: data/creaturescripts/creaturescripts.xml <event type="login" name="BoasVindas" event="script" value="boasvindas.lua"/> Script: data/creaturescripts/scripts/login.lua registerCreatureEvent(cid, "BoasVindas") data/creaturescripts/scripts/boasvindas.lua local message = [[seja bem vindo ao Alissow OTs! Utilize o canal help para maiores informações. Para começar, pedimos após a criação do char, vá ao bau do lado direito do templo para tentar pegar um bonus! Enjoy xD]] function onLogin(cid) local accountManager = getPlayerAccountManager(cid) if(accountManager == MANAGER_NEW) then doPlayerPopupFYI(cid, message) end return true end Config: Em local message = [[ adicione o texto que quiser até o final ]]. Creditos: Bruno Carvalho (Comedinhasss)
  18. Este é o novo script para matar em nome de ... Quest que eu fiz. Ele inclui recursos para mort real tíbia. características: Você pode começar apenas as tarefas de monitores segundo seu nível e / ou armazenamento Você pode repetir tarefas (Times pode ser alterado) Você pode começar a tarefa 3 ao mesmo tempo (Contagem pode ser alterado) Recompensas são fáceis de configurar e tem um monte de recursos Os tipos de vantagens são: dinheiro / REWARD_MONEY: Dá dinheiro para o jogador. exp experiência / / REWARD_EXP: Dá pontos de experiência para o jogador. realização / ach / REWARD_ACHIEVEMENT: Dá uma conquista para o jogador. Isso funciona com meu sistema de conquistas. armazenamento armazenamento / / REWARD_STORAGE: Dá uma de armazenamento para o jogador. pontos / ponto / REWARD_POINT: Dá pontos Paw & Fur ao jogador. itens / item / objeto / REWARD_ITEM: Dá um item para o jogador. As bandeiras de recompensa são: valor: Aqui você declarar as variáveis ​​para as recompensas. Tamanho da tabela depende do tipo de recompensa. Exemplo: Se o tipo de recompensa = "experiência" então o valor deve ser {1000}. Se o tipo de recompensa = "item" então o valor deve ser {2195, 1} (Itemid, cont) armazenamento: Esta bandeira é usada para definir um armazenamento para o jogador quando ele recebe a recompensa. Utilizado para evitar ser recompensado mais do que uma vez quando a tarefa é repetida. Exemplo: storage = {1250, 1}. Quando o jogador recebe uma recompensa, ele vai obter o armazenamento de 1250 com valor 1 e não receberá a mesma recompensa de novo depois de repetir a mesma tarefa. Você pode verificar as tarefas começou. Você pode verificar quantos pontos Paw & Fur que você tem, e também a sua classificação. Quando um monstro é morto, você receberá uma mensagem de como muitos já mortos. Tarefas nomes são declarados em 'raceName a variável, mas se você quiser dar um nome diferente para o' raceName 'você pode adicionar' nome 'da variável para a tarefa (Você pode ver o exemplo na segunda tarefa de Necromancers e sacerdotisa) Nota: O sistema para matar os patrões não é adicionado aqui. A única coisa que você pode fazer é adicionar uma ação-id para os teleports para chefes de quartos e verificar com um script se o jogador tem x armazenamento Primeiro de tudo, você precisa adicionar esta lib: RANK_NONE = 0 RANK_HUNTSMAN = 1 RANK_RANGER = 2 RANK_BIGGAMEHUNTER = 3 RANK_TROPHYHUNTER = 4 RANK_ELITEHUNTER = 5 REWARD_MONEY = 1 REWARD_EXP = 2 REWARD_ACHIEVEMENT = 3 REWARD_STORAGE = 4 REWARD_POINT = 5 REWARD_ITEM = 6 QUESTSTORAGE_BASE = 1500 KILLSSTORAGE_BASE = 65000 REPEATSTORAGE_BASE = 48950 POINTSSTORAGE = 2500 tasks = { --Tasks for level 6 to 49. [1] = {killsRequired = 100, raceName = "Trolls", level = {6, 19}, premium = true, creatures = {"troll", "troll champion", "island troll", "swamp troll"}, rewards = { {type = "exp", value = {200}}, {type = "money", value = {200}} }}, [2] = {killsRequired = 150, raceName = "Goblins", level = {6, 19}, premium = true, creatures = {"goblin", "goblin assassin", "goblin leader"}, rewards = { {type = "exp", value = {300}}, {type = "money", value = {250}} }}, [3] = {killsRequired = 300, raceName = "Crocodiles", level = {6, 49}, premium = true, creatures = {"crocodile"}, rewards = { {type = "exp", value = {800}}, {type = "achievement", value = {"Blood-Red Snapper"}}, {type = "storage", value = {35000, 1}}, {type = "points", value = {1}} }}, [4] = {killsRequired = 300, raceName = "Badgers", level = {6, 49}, premium = true, creatures = {"badger"}, rewards = { {type = "exp", value = {500}}, {type = "points", value = {1}} }}, [5] = {killsRequired = 300, raceName = "Tarantulas", level = {6, 49}, premium = true, creatures = {"tarantula"}, rewards = { {type = "exp", value = {1500}}, {type = "achievement", value = {"No More Hiding"}}, {type = "storage", value = {35001, 1}}, {type = "points", value = {2}} }}, [6] = {killsRequired = 150, raceName = "Carniphilas", level = {6, 49}, premium = true, creatures = {"carniphila"}, rewards = { {type = "exp", value = {2500}}, {type = "achievement", value = {"Rootless Behaviour"}}, {type = "storage", value = {35002, 1}}, {type = "points", value = {3}} }}, [7] = {killsRequired = 200, raceName = "Stone Golems", level = {6, 49}, premium = true, creatures = {"stone golem"}, rewards = { {type = "exp", value = {2000}}, {type = "points", value = {3}} }}, [8] = {killsRequired = 300, raceName = "Mammoths", level = {6, 49}, premium = true, creatures = {"mammoth"}, rewards = { {type = "exp", value = {4000}}, {type = "achievement", value = {"Meat Skewer"}}, {type = "storage", value = {35003, 1}}, {type = "points", value = {3}} }}, [9] = {killsRequired = 300, raceName = "Gnarlhounds", level = {6, 49}, premium = true, creatures = {"gnarlhound"}, rewards = { {type = "exp", value = {1000}}, {type = "points", value = {2}} }}, [10] = {killsRequired = 300, raceName = "Terramites", level = {6, 49}, premium = true, creatures = {"terramite"}, rewards = { {type = "exp", value = {1000}}, {type = "points", value = {2}} }}, [11] = {killsRequired = 300, raceName = "Apes", level = {6, 49}, premium = true, creatures = {"kongra", "sibang", "merklin"}, rewards = { {type = "exp", value = {1000}}, {type = "points", value = {2}} }}, [12] = {killsRequired = 300, raceName = "Thornback Tortoises", level = {6, 49}, premium = true, creatures = {"thornback tortoise"}, rewards = { {type = "exp", value = {1500}}, {type = "points", value = {2}} }}, [13] = {killsRequired = 300, raceName = "Gargoyles", level = {6, 49}, premium = true, creatures = {"gargoyle"}, rewards = { {type = "exp", value = {1500}} }}, --Tasks for level 50 to 79. [14] = {killsRequired = 300, raceName = "Ice Golems", level = {50, 79}, premium = true, creatures = {"ice golem"}, rewards = { {type = "exp", value = {12000}}, {type = "achievement", value = {"Breaking The Ice"}}, {type = "storage", value = {35004, 1}}, {type = "points", value = {2}} }}, [15] = {killsRequired = 400, raceName = "Quara Scouts", level = {50, 79}, premium = true, creatures = {"quara pincher scout", "quara predator scout", "quara hydromancer scout", "quara constrictor scout", "quara mantassin scout"}, rewards = { {type = "exp", value = {10000}}, {type = "points", value = {2}} }}, [16] = {killsRequired = 400, raceName = "Mutated Rats", level = {50, 79}, premium = true, creatures = {"mutated rat"}, rewards = { {type = "exp", value = {10000}}, {type = "achievement", value = {"Twisted Mutation"}}, {type = "storage", value = {35005, 1}}, {type = "points", value = {2}} }}, [17] = {killsRequired = 250, raceName = "Ancient Scarabs", level = {50, 79}, premium = true, creatures = {"ancient scarab"}, rewards = { {type = "exp", value = {15000}}, {type = "achievement", value = {"Crawling Death"}}, {type = "storage", value = {35006, 1}}, {type = "points", value = {2}} }}, [18] = {killsRequired = 300, raceName = "Wyverns", level = {50, 79}, premium = true, creatures = {"wyvern"}, rewards = { {type = "exp", value = {12000}}, {type = "points", value = {2}} }}, [19] = {killsRequired = 300, raceName = "Lancer Beetles", level = {50, 79}, premium = true, creatures = {"lancer beetle"}, rewards = { {type = "exp", value = {8000}}, {type = "points", value = {2}} }}, [20] = {killsRequired = 400, raceName = "Wailing Widows", level = {50, 79}, premium = true, creatures = {"wailing widow"}, rewards = { {type = "exp", value = {12000}}, {type = "points", value = {3}} }}, [21] = {killsRequired = 250, raceName = "Killer Caimans", level = {50, 79}, premium = true, creatures = {"killer caiman"}, rewards = { {type = "exp", value = {10000}}, {type = "points", value = {2}} }}, [22] = {killsRequired = 300, raceName = "Bonebeasts", level = {50, 79}, premium = true, creatures = {"bonebeast"}, rewards = { {type = "exp", value = {12000}}, {type = "achievement", value = {"Spareribs for Dinner"}}, {type = "storage", value = {35007, 1}}, {type = "points", value = {2}} }}, [23] = {killsRequired = 300, raceName = "Crystal Spiders", level = {50, 79}, creatures = {"crystal spider"}, premium = true, rewards = { {type = "exp", value = {15000}}, {type = "achievement", value = {"Arachnoise"}}, {type = "storage", value = {35008, 1}}, {type = "points", value = {3}} }}, [24] = {killsRequired = 300, raceName = "Mutated Tigers", level = {50, 79}, premium = true, creatures = {"mutated tiger"}, rewards = { {type = "exp", value = {12000}}, {type = "points", value = {2}} }}, --Taks for level 80 to 129. [25] = {killsRequired = 600, raceName = "Underwater Quara", level = {80, 129}, premium = true, creatures = {"quara hydromancer", "quara predator", "quara constrictor", "quara mantassin", "quara pincher"}, rewards = { {type = "exp", value = {15000}}, {type = "achievement", value = {"Back into the Abyss"}}, {type = "storage", value = {35009, 1}}, {type = "points", value = {3}} }}, [26] = {killsRequired = 500, raceName = "Giant Spiders", level = {80, 129}, premium = true, creatures = {"giant spider"}, rewards = { {type = "exp", value = {20000}}, {type = "achievement", value = {"Choking on Her Venom"}}, {type = "storage", value = {35010, 1}}, {type = "points", value = {3}} }}, [27] = {killsRequired = 300, raceName = "Werewolves", level = {80, 129}, premium = true, creatures = {"werewolf"}, rewards = { {type = "exp", value = {30000}}, {type = "achievement", value = {"Howly Silence"}}, {type = "storage", value = {35011, 1}}, {type = "points", value = {4}} }}, [28] = {killsRequired = 400, raceName = "Nightmares", level = {80, 129}, premium = true, creatures = {"nightmare", "nightmare scion"}, rewards = { {type = "exp", value = {25000}}, {type = "achievement", value = {"Dream is Over"}}, {type = "storage", value = {35012, 1}}, {type = "points", value = {3}} }}, [29] = {killsRequired = 600, raceName = "Hellspawns", level = {80, 129}, premium = true, creatures = {"hellspawn"}, rewards = { {type = "exp", value = {25000}}, {type = "achievement", value = {"Scorched Flames"}}, {type = "storage", value = {35013, 1}} }}, [30] = {killsRequired = 800, raceName = "High Class Lizards", level = {80, 129}, premium = true, creatures = {"lizard chosen", "lizard dragon priest", "lizard high guard", "lizard legionnaire"}, rewards = { {type = "exp", value = {30000}}, {type = "achievement", value = {"Zzztill Zzztanding!"}}, {type = "storage", value = {35014, 1}}, {type = "points", value = {3}} }}, [31] = {killsRequired = 600, raceName = "Stampors", level = {80, 129}, premium = true, creatures = {"stampor"}, rewards = { {type = "exp", value = {20000}}, {type = "achievement", value = {"Stepped on a Big Toe"}}, {type = "storage", value = {35015, 1}}, {type = "points", value = {3}} }}, [32] = {killsRequired = 500, raceName = "Brimstone Bugs", level = {80, 129}, premium = true, creatures = {"brimstone bug"}, rewards = { {type = "exp", value = {15000}}, {type = "achievement", value = {"Something Smells"}}, {type = "storage", value = {35016, 1}}, {type = "points", value = {3}} }}, [33] = {killsRequired = 400, raceName = "Mutated Bats", level = {80, 129}, premium = true, creatures = {"mutated bat"}, rewards = { {type = "exp", value = {20000}}, {type = "achievement", value = {"Kapow!"}}, {type = "storage", value = {35017, 1}}, {type = "points", value = {2}} }}, --Tasks for level 130+ [34] = {killsRequired = 650, raceName = "Hydras", level = {130, 9999}, premium = true, creatures = {"hydra"}, rewards = { {type = "exp", value = {30000}}, {type = "achievement", value = {"One Less"}}, {type = "storage", value = {35018, 1}}, {type = "points", value = {3}} }}, [35] = {killsRequired = 800, raceName = "Serpent Spawns", level = {130, 9999}, premium = true, creatures = {"serpent spawn"}, rewards = { {type = "exp", value = {30000}}, {type = "achievement", value = {"Hissing Downfall"}}, {type = "storage", value = {35019, 1}}, {type = "points", value = {4}} }}, [36] = {killsRequired = 500, raceName = "Medusae", level = {130, 9999}, premium = true, creatures = {"medusa"}, rewards = { {type = "exp", value = {40000}}, {type = "achievement", value = {"The Serpent's Bride"}}, {type = "storage", value = {35020, 1}}, {type = "points", value = {5}} }}, [37] = {killsRequired = 700, raceName = "Behemoths", level = {130, 9999}, premium = true, creatures = {"behemoth"}, rewards = { {type = "exp", value = {30000}}, {type = "achievement", value = {"Just Cracked Me Up!"}}, {type = "storage", value = {35021, 1}}, {type = "points", value = {4}} }}, [38] = {killsRequired = 900, raceName = "Sea Serpents and Young Sea Serpents", level = {130, 9999}, premium = true, creatures = {"sea serpent", "young sea serpent"}, rewards = { {type = "exp", value = {30000}}, {type = "achievement", value = {"The Drowned Sea God"}}, {type = "storage", value = {35022, 1}}, {type = "points", value = {4}} }}, [39] = {killsRequired = 250, raceName = "Hellhounds", level = {130, 9999}, premium = true, creatures = {"hellhound"}, rewards = { {type = "exp", value = {40000}}, {type = "achievement", value = {"The Gates of Hell"}}, {type = "storage", value = {35023, 1}}, {type = "points", value = {5}} }}, [40] = {killsRequired = 500, raceName = "Ghastly Dragons", level = {130, 9999}, premium = true, creatures = {"ghastly dragon"}, rewards = { {type = "exp", value = {30000}}, {type = "achievement", value = {"Beautiful Agony"}}, {type = "storage", value = {35024, 1}}, {type = "points", value = {5}} }}, [41] = {killsRequired = 900, raceName = "Drakens", level = {130, 9999}, premium = true, creatures = {"draken spellweaver", "draken warmaster", "draken abomination", "draken elite"} , rewards = { {type = "exp", value = {30000}}, {type = "achievement", value = {"Enter zze Draken!"}}, {type = "storage", value = {35025, 1}}, {type = "points", value = {3}} }}, [42] = {killsRequired = 650, raceName = "Destroyers", level = {130, 9999}, premium = true, creatures = {"destroyer"}, rewards = { {type = "exp", value = {30000}}, {type = "achievement", value = {"Best there was!"}}, {type = "storage", value = {35026, 1}}, {type = "points", value = {4}} }}, [43] = {killsRequired = 400, raceName = "Undead Dragons", level = {130, 9999}, premium = true, creatures = {"undead dragon"}, rewards = { {type = "exp", value = {50000}}, {type = "achievement", value = {"Back from the Dead"}}, {type = "storage", value = {35027, 1}}, {type = "points", value = {6}} }}, --Special tasks. [44] = {killsRequired = 6666, raceName = "Demons", level = {130, 9999}, rank = RANK_ELITEHUNTER, premium = true, creatures = {"demon"}, rewards = { {type = "storage", value = {41300, 1}} --Storage that let's you to start Demon Oak }}, [45] = {killsRequired = 500, raceName = "Green Djinns or Efreets", level = {1, 9999}, storage = {12500, 1}, premium = true, creatures = {"green djinn", "efreet"}, rewards = { --Requires an storage (Gained on The Djinn War - Marid Faction) {type = "exp", value = {10000}}, {type = "money", value = {5000}}, {type = "storage", value = {35028, 1}} }}, [46] = {killsRequired = 500, raceName = "Blue Djinns or Marids", level = {1, 9999}, storage = {12501, 1}, premium = true, creatures = {"blue djinn", "marid"}, rewards = { --Requires an storage (Gained on The Djinn War - Efreet Faction) {type = "exp", value = {10000}}, {type = "money", value = {5000}}, {type = "storage", value = {35029, 1}} }}, [47] = {killsRequired = 3000, raceName = "Pirates", level = {1, 9999}, storage = {12600, 1}, premium = true, creatures = {"pirate ghost", "pirate marauder", "pirate cutthroad", "pirate buccaneer", "pirate corsair", "pirate skeleton"}, rewards = { --Requires an storage (Gained on The Shattered Isles Quest) {type = "exp", value = {10000}}, {type = "money", value = {5000}}, {type = "storage", value = {35030, 1}} }}, [48] = {killsRequired = 3000, raceName = "Pirates second task", level = {1, 9999}, storage = {REPEATSTORAGE_BASE + 47, 3}, norepeatable = true, premium = true, creatures = {"pirate ghost", "pirate marauder", "pirate cutthroad", "pirate buccaneer", "pirate corsair", "pirate skeleton"}, rewards = { --Requires an storage (Gained completing Raymond Striker's first task three times.) NOTE: The required storage to start this task is: base + first pirate task id (47) {type = "exp", value = {10000}}, {type = "money", value = {5000}}, {type = "storage", value = {35031, 1}} }}, [49] = {killsRequired = 5000, raceName = "Minotaurs", level = {1, 40}, storage = {12700, 1}, norepeatable = true, premium = false, creatures = {"minotaur", "minotaur mage", "minotaur archer"}, rewards = { --Requires an storage (Gained on To Outfox a Fox Quest) {type = "storage", value = {35032, 1}} }}, [50] = {killsRequired = 4000, raceName = "Necromancers and Priestess", level = {60, 9999}, norepeatable = true, premium = true, creatures = {"necromancer", "priestess"}, rewards = { --Requires an storage (Gained on To Outfox a Fox Quest) {type = "storage", value = {35033, 1}}, {type = "storage", value = {12800, 1}} --storage to stark the second Necromancers and Priestess task. }}, [49] = {killsRequired = 1000, name = "Necromancers and Priestess second task", raceName = "Necromancers and Priestess", level = {60, 9999}, storage = {12800, 1}, norepeatable = true, premium = true, creatures = {"necromancer", "priestess"}, rewards = { --Requires an storage (Gained on To Outfox a Fox Quest) {type = "exp", value = {40000}}, {type = "storage", value = {35033, 1}} }}, } tasksByPlayer = 3 repeatTimes = 3 function getPlayerRank(cid) return (getPlayerStorageValue(cid, POINTSSTORAGE) >= 100 and RANK_ELITEHUNTER or getPlayerStorageValue(cid, POINTSSTORAGE) >= 70 and RANK_TROPHYHUNTER or getPlayerStorageValue(cid, POINTSSTORAGE) >= 40 and RANK_BIGGAMEHUNTER or getPlayerStorageValue(cid, POINTSSTORAGE) >= 20 and RANK_RANGER or getPlayerStorageValue(cid, POINTSSTORAGE) >= 10 and RANK_HUNTSMAN or RANK_NONE) end function getTaskByName(name, table) local t = (table and table or tasks) for k, v in pairs(t) do if v.name then if v.name:lower() == name:lower() then return k end else if v.raceName:lower() == name:lower() then return k end end end return false end function getTasksByPlayer(cid) local canmake = {} local able = {} for k, v in pairs(tasks) do if getCreatureStorage(cid, QUESTSTORAGE_BASE + k) < 1 and getCreatureStorage(cid, REPEATSTORAGE_BASE + k) < repeatTimes then able[k] = true if getPlayerLevel(cid) < v.level[1] or getPlayerLevel(cid) > v.level[2] then able[k] = false end if v.storage and getCreatureStorage(cid, v.storage[1]) < v.storage[2] then able[k] = false end if v.rank then if getPlayerRank(cid) < v.rank then able[k] = false end end if v.premium then if not isPremium(cid) then able[k] = false end end if able[k] then table.insert(canmake, k) end end end return canmake end function canStartTask(cid, name, table) local v = "" local id = 0 local t = (table and table or tasks) for k, i in pairs(t) do if i.name then if i.name:lower() == name:lower() then v = i id = k break end else if i.raceName:lower() == name:lower() then v = i id = k break end end end if v == "" then return false end if getCreatureStorage(cid, QUESTSTORAGE_BASE + id) > 0 then return false end if (getCreatureStorage(cid, REPEATSTORAGE_BASE + id) >= repeatTimes) or (v.norepeatable and getCreatureStorage(cid, REPEATSTORAGE_BASE + id) > 0) then return false end if getPlayerLevel(cid) >= v.level[1] and getPlayerLevel(cid) <= v.level[2] then if v.premium then if isPremium(cid) then if v.rank then if getPlayerRank(cid) >= v.rank then if v.storage then if getCreatureStorage(cid, v.storage[1]) >= v.storage[2] then return true end else return true end end else return true end end else return true end end return false end function getPlayerStartedTasks(cid) local tmp = {} for k, v in pairs(tasks) do if getCreatureStorage(cid, QUESTSTORAGE_BASE + k) > 0 and getCreatureStorage(cid, QUESTSTORAGE_BASE + k) < 2 then table.insert(tmp, k) end end return tmp end function isSummon(cid) return getCreatureMaster(cid) ~= cid or false end NOTA: Se você usa TFS 0.4Dev você deve fazer isso ou script não vai funcionar: substituindo: function isSummon(cid) return getCreatureMaster(cid) ~= cid or false end por: function isSummon(cid) return getCreatureMaster(cid) ~= nil or false end Na pasta Npcs abra Grizzly Adams.xml e coloque: <?xml version="1.0" encoding="UTF-8"?>[ <npc name="Grizzly Adams" 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> em data/npc/scripts/KillingInTheNameOf.lua: 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 local choose = {} local cancel = {} local available = {} function creatureSayCallback(cid, type, msg) if(not npcHandler:isFocused(cid)) then return false end local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_PRIVATE and 0 or cid if isInArray({"tasks", "task", "mission"}, msg:lower()) then local can = getTasksByPlayer(cid) if #can > 0 then local text = "" local sep = ", " table.sort(can, (function(a, b) return (a < b) end)) local t = 0 for _, id in ipairs(can) do t = t + 1 if t == #can - 1 then sep = " and " elseif t == #can then sep = "." end text = text .. "{" .. (tasks[id].name or tasks[id].raceName) .. "}" .. sep end selfSay("The current task" .. (#can > 1 and "s" or "") .. " that you can choose " .. (#can > 1 and "are" or "is") .. " " .. text, cid) talkState[talkUser] = 0 else selfSay("I don't have any task for you right now.", cid) end elseif msg ~= "" and canStartTask(cid, msg) then if #getPlayerStartedTasks(cid) >= tasksByPlayer then selfSay("Sorry, but you already started " .. tasksByPlayer .. " tasks.", cid) return true end local task = getTaskByName(msg) if task and getCreatureStorage(cid, QUESTSTORAGE_BASE + task) > 0 then return false end selfSay("In this task you must defeat " .. tasks[task].killsRequired .. " " .. tasks[task].raceName .. ". Are you sure that you want to start this task?", cid) choose[cid] = task talkState[talkUser] = 1 elseif msg:lower() == "yes" and talkState[talkUser] == 1 then doCreatureSetStorage(cid, QUESTSTORAGE_BASE + choose[cid], 1) selfSay("Excellent! You can check the status of your task saying report to me.", cid) choose[cid] = nil talkState[talkUser] = 0 elseif msg:lower() == "report" then local started = getPlayerStartedTasks(cid) local finishedAtLeastOne = false local finished = 0 if started and #started > 0 then for _, id in ipairs(started) do if getCreatureStorage(cid, KILLSSTORAGE_BASE + id) >= tasks[id].killsRequired then for _, reward in ipairs(tasks[id].rewards) do print("Rewards loaded") local deny = false if reward.storage then if getCreatureStorage(cid, reward.storage[1]) >= reward.storage[2] then deny = true end end if isInArray({REWARD_MONEY, "money"}, reward.type:lower()) and not deny then doPlayerAddMoney(cid, reward.value[1]) elseif isInArray({REWARD_EXP, "exp", "experience"}, reward.type:lower()) and not deny then doPlayerAddExperience(cid, reward.value[1]) doPlayerSendDefaultCancel(cid, "You gained " .. reward.value[1] .. " experience points.") elseif isInArray({REWARD_ACHIEVEMENT, "achievement", "ach"}, reward.type:lower()) and not deny then if doPlayerAddAchievement then doPlayerAddAchievement(cid, reward.value[1], true) end elseif isInArray({REWARD_STORAGE, "storage", "stor"}, reward.type:lower()) and not deny then doCreatureSetStorage(cid, reward.value[1], reward.value[2]) elseif isInArray({REWARD_POINT, "points", "point"}, reward.type:lower()) and not deny then doCreatureSetStorage(cid, POINTSSTORAGE, getCreatureStorage(cid, POINTSSTORAGE) + reward.value[1]) elseif isInArray({REWARD_ITEM, "item", "items", "object"}, reward.type:lower()) and not deny then doPlayerAddItem(cid, reward.value[1], reward.value[2]) end [color=#333333][font=Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif][size=3]if reward.storage then doCreatureSetStorage(cid, reward.storage[1], reward.storage[2]) end end [color=#333333][font=Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif][size=3]if tasks[id].norepeatable then doCreatureSetStorage(cid, QUESTSTORAGE_BASE + id, 2) else doCreatureSetStorage(cid, QUESTSTORAGE_BASE + id, 0) end doCreatureSetStorage(cid, KILLSSTORAGE_BASE + id, 0) if getCreatureStorage(cid, REPEATSTORAGE_BASE + id) < 1 then doCreatureSetStorage(cid, REPEATSTORAGE_BASE + id, 0) end doCreatureSetStorage(cid, REPEATSTORAGE_BASE + id, getCreatureStorage(cid, REPEATSTORAGE_BASE + id) + 1) finishedAtLeastOne = true finished = finished + 1 end end if not finishedAtLeastOne then selfSay("You haven't finished any task yet.", cid) else selfSay("Awesome! you finished " .. (finished > 1 and "various" or "a") .. " task" .. (finished > 1 and "s" or "") .. ". Talk to me again if you want to start a task.", cid) end else selfSay("You haven't started any task yet.", cid) end elseif msg:lower() == "started" then local started = getPlayerStartedTasks(cid) if started and #started > 0 then local text = "" local sep = ", " table.sort(started, (function(a, b) return (a < b) end)) local t = 0 for _, id in ipairs(started) do t = t + 1 if t == #started - 1 then sep = " and " elseif t == #started then sep = "." end text = text .. "{" .. (tasks[id].name or tasks[id].raceName) .. "}" .. sep end selfSay("The current task" .. (#started > 1 and "s" or "") .. " that you started " .. (#started > 1 and "are" or "is") .. " " .. text, cid) else selfSay("You haven't started any task yet.", cid) end elseif msg:lower() == "cancel" then local started = getPlayerStartedTasks(cid) if started and #started > 0 then selfSay("Cancelling a task will make the count restart. Wich task you want to cancel?", cid) talkState[talkUser] = 2 else selfSay("You haven't started any task yet.", cid) end elseif getTaskByName(msg) and talkState[talkUser] == 2 and isInArray(getPlayerStartedTasks(cid), getTaskByName(msg)) then local task = getTaskByName(msg) if getCreatureStorage(cid, KILLSSTORAGE_BASE + task) > 0 then selfSay("You currently killed " .. getCreatureStorage(cid, KILLSSTORAGE_BASE + task) .. "/" .. tasks[task].killsRequired .. " " .. tasks[task].raceName .. ". Cancelling this task will restart the count. Are you sure you want to cancel this task?", cid) else selfSay("Are you sure you want to cancel this task?", cid) end talkState[talkUser] = 3 cancel[cid] = task elseif msg:lower() == "yes" and talkState[talkUser] == 3 then doCreatureSetStorage(cid, QUESTSTORAGE_BASE + cancel[cid], -1) doCreatureSetStorage(cid, KILLSSTORAGE_BASE + cancel[cid], -1) selfSay("You have cancelled the task " .. (tasks[cancel[cid]].name or tasks[cancel[cid]].raceName) .. ".", cid) talkState[talkUser] = 0 elseif isInArray({"points", "rank"}, msg:lower()) then selfSay("At this time, you have " .. getCreatureStorage(cid, POINTSSTORAGE) .. " Paw & Fur points. You " .. (getPlayerRank(cid) == 5 and "are an Elite Hunter" or getPlayerRank(cid) == 4 and "are a Trophy Hunter" or getPlayerRank(cid) == 3 and "are a Big Game Hunter" or getPlayerRank(cid) == 2 and "are a Ranger" or getPlayerRank(cid) == 1 and "are a Huntsman" or "haven't been ranked yet") .. ".", cid) talkState[talkUser] = 0 end end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) Abra a pasta creatuscripts em creaturescripts.xml e add: <event type="kill" name="KillingInTheNameOf" event="script" value="killinginthenameof.lua"/> depois em data/creaturescripts/scripts/killinginthenameof.lua: function onKill(cid, target, lastHit) local started = getPlayerStartedTasks(cid) if isPlayer(target) or isSummon(target) then return true end if started and #started > 0 then for _, id in ipairs(started) do if isInArray(tasks[id].creatures, getCreatureName(target):lower()) then if getCreatureStorage(cid, KILLSSTORAGE_BASE + id) < 0 then doCreatureSetStorage(cid, KILLSSTORAGE_BASE + id, 0) end if getCreatureStorage(cid, KILLSSTORAGE_BASE + id) < tasks[id].killsRequired then doCreatureSetStorage(cid, KILLSSTORAGE_BASE + id, getCreatureStorage(cid, KILLSSTORAGE_BASE + id) + 1) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, getCreatureStorage(cid, KILLSSTORAGE_BASE + id) .. "/" .. tasks[id].killsRequired .. " " .. tasks[id].raceName .. " already killed.") end end end end return true end em login.lua: registerCreatureEvent(cid, "KillingInTheNameOf") Creditos: Darkhaos ArthurLuna - Pela tradução
  19. Olá, Galera do Xtibia eu hoje vou postar um script Infinity Aol No script possui um config onde pode ser alterado o ammyID = id do amuleto, lossExp = player perder exp, lossItems = player perder items. Va na pasta creaturescripts crie um arquivo chamdo newAol.lua Va em creaturescripts.xml adcione <event type="death" name="NewAol" event="script" value="newAol.lua"/> Adicione em "data/creaturescripts/login.lua" cole perto dos outros registercreatures. registerCreatureEvent(cid, "NewAol") Observações: Esse script serve para todos os players inclusive RedSkulls/BlackSkulls Creditos; Lucas Brito Mereçe; REP
  20. Estava sem nada para fazer e resolvi fazer este script. A ideia e que quando o player morre ele tem "vidas" e ele volta para a posição de onde estava. Você deve alterar somente a quantidade de vidas que cada player terá. Vá em creaturescripts crie um arquivo lua chamado de checkpoint e coloque isto: function onDeath(cid, corpse, killer) if getPlayerStorageValue(cid, 43242) == -1 then if getPlayerStorageValue(cid, 26124) ~= -1 then doPlayerSetLossSkill(cid, getPlayerStorageValue(cid, 26124)) end return true end function recordPos(cid) local pos = getThingPos(cid) setPlayerStorageValue(cid, 12356, pos.x) setPlayerStorageValue(cid, 12367, pos.y) setPlayerStorageValue(cid, 12378, pos.z) end function noLoseAttr(cid, corpse) setPlayerStorageValue(cid, 26124, getPlayerLossSkill(cid)) doPlayerSetLossSkill(cid, 0) doRemoveItem(corpse.uid) end recordPos(cid) noLoseAttr(cid, corpse) return true end function onLogin(cid) local vidas = 3 ---Quantas vidas o player vai ter function returnCheckPoint(cid) local record_pos = {x=getPlayerStorageValue(cid, 12356), y=getPlayerStorageValue(cid, 12367), z=getPlayerStorageValue(cid, 12378)} doTeleportThing(cid, record_pos) end function sendMens(cid) local vidas = getPlayerStorageValue(cid, 43242) local x = {"Você esta com "..vidas.." vidas","Resta "..vidas.." vidas para você", "Cuidado resta "..vidas.." vidas para você"} return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, x[math.random(1, #x)]) end if getPlayerStorageValue(cid, 43242) == -1 then return setPlayerStorageValue(cid, 43242, vidas) and true end sendMens(cid) returnCheckPoint(cid) setPlayerStorageValue(cid, 43242, getPlayerStorageValue(cid, 43242)-1) return true end Coloque esta tags em creaturescripts.xml: <event type="death" name="check" event="script" value="checkpoint.lua"/> <event type="login" name="record"" event="script" value="checkpoint.lua"/> Registre o evento em login.lua colocando isto antes do ultimo return true:
  21. Ola galera xtibiana venho monstra meu novo sistema o trainer off sytem. Como ele funciona? Bem... O player ao dizer uma talkaction ele paga um certo preço para pode upar quando estiver off. Ele paga o dinheiro de acordo com a hora que ele vai ficar treinando off. Se ele tentar logar na hora que ele estiver upando ele e recebido com uma mensagem e desloga. A talk funciona de tal maneira: /treiner (E a quantidade de horas que quer upar) Exemplo quero upar 4 horas eu falo: /treiner 4. Uma hora custa 100 platinum coins depende do dinheiro do seu otserv. Lets go. Crie uma arquivo lua em talkactions chamado de treiner e coloque este código: function onSay(cid, words, param, channel) function doSetTimeTrainer(cid, time) exhaustion.set(cid, 44226, time*36000*1000) end function doAddAllSkillTrainer(cid, quant) doPlayerAddSkill(cid, SKILL_FIST, quant) doPlayerAddSkill(cid, SKILL_CLUB, quant) doPlayerAddSkill(cid, SKILL_SWORD, quant) doPlayerAddSkill(cid, SKILL_AXE, quant) doPlayerAddSkill(cid, SKILL_DISTANCE, quant) doPlayerAddSkill(cid, SKILL_SHIELD, quant) doPlayerAddSkill(cid, SKILL_FISHING, quant) doRemoveCreature(cid) end local money = 9999 --- Quanto de money por hora local limit = 60 -- Qual e o limite de horas que ele pode upar local skill = 6 --- Quantos de skill ele vai ganhar por hora local t = string.explode(param, ",") if param == '' or param == " " or param == nil then return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você precisa colocar quanto de treino você quer") end if getPlayerGroupId(cid) >= 2 then return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não pode usar o sistema com pessoas da equipe(tutor,gm,cm,god) use com players") end if tonumber(t[1]) >= limit then return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "O limite de horas e "..limit.."") end local time = t[1] local gold = t[1]*money if getPlayerMoney(cid) <= money then return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você precisa ter pelo 100000 de money para treinar") end if gold >= getPlayerMoney(cid) then return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Para cada 1 hora de treino e necessario 100000 de money") end doPlayerRemoveMoney(cid, gold) doSetTimeTrainer(cid, time) doAddAllSkillTrainer(cid, t[1]*skill) return true end Agora coloque esta tag em talkactions.xml: <talkaction words="/trainer" event="script" value="trainer.lua"/> Agora vá em creaturescripts e crie um arquivo lua chamado de treiner e coloque isto: function onLogin(cid) function getTimeTrainer(cid) return exhaustion.get(cid, 44226) end if getTimeTrainer(cid) then doShowTextDialog(cid, 1952, "Você esta treinando não pode logar ate que seu treinamento termine") return addEvent(doRemoveCreature, 180, cid) end return true end Agora vá em creaturescripts e abra o login.lua e registre o evento colocando isto antes do ultimo return: registerCreatureEvent(cid, "treiner") Coloque a tag em creaturescripts.xml <event type="login" name="trainer" event="script" value="trainer.lua"/>
  22. Bom nao sei se esta no lugar certo se nao estiver descupe Bom to precisando do script tipo a anihi que so possa entra x player tipo eles fica no quadrado ai puxa a alavanca e tals Rep pra quem me ajuda
  23. Bom pessoal, certa vez perguntei aqui no fórum um script de certa forma complicado (ao meu ver), e aí acabou que o Demonbholder respondeu... Ele me ajudou muito, mas o tópico hoje está esquecido, e está como forma de resposta o script... Então venho postar aqui com totais créditos ao Demonbholder. A dúvida também não foi dada como resolvida, creio que se alguem procurasse não iria achar.. Como funciona o Script? Em todos os otservers, ao logar você fica com alguns segundos de pz contra pk's... isso ja é padrão. Mas se não me engano na versão 8.60 do tibia, foi implantado um sistema que ao logar você ficaria alguns segundos com pz incluindo para monsters... Nenhum pk, nem nenhum monstro poderia te atacar na hora que você logasse... E hoje venho trazer isso (100% de Créditos ao Demonbholder): Proteção para os monstros: 1º Em data/creaturescripts/lib, abra o arquivo creaturescripts.lua e cole isto no final dele: 2º Crie um arquivo .lua em data/creaturescripts/scripts, e cole isto nele: 3º Crie outro arquivo .lua na mesma pasta e cole isto nele: 4º Em data/creaturescripts, abra o arquivo creaturescripts.xml e cole isto em algum lugar dele: OBS: substitua onde diz NomeDoArquivo1 e NomeDoArquivo2.
  24. Tipo: Creaturescripts. Testado: No. Oque Faz: Ele muda a mensagem quando você upar de level, modifique-a a vontade. @Instalando Vá na pasta do seu servidor depois em data agora entre em outra pasta chamada creaturescripts e entre na pasta chamada scripts duplique um arquivo da extensão .lua e adicione o seguinte conteúdo dentro: function onAdvance(cid, skill, oldLevel, newLevel) local lvl = oldLevel - newLevel if skill == 8 then return false end doPlayerAddLevel(cid, lvl) doPlayerSendTextMessage(cid, 27, "Você avançou " .. lvl .. " " .. lvl > 1 and "níveis" or "nível" .. " parabéns[do " .. oldLevel .. " para o " .. newLevel .. "].") return true end agora volte uma pasta e entre no arquivo creaturescripts.xml e adicione a seguinte linha nele <event type = "advance" name = "level_message" script = "nome_do_script.lua"/> agora volte na pasta creaturescripts/scripts e entre no arquivo login.lua e adicione essa linha nele registerCreatureEvent(cid, "level_message") Lembrando que se não funcionar, então só nas sources para modificar.
×
×
  • Criar Novo...