-
Treyff alterou sua foto pessoal
-
-
-
-
-
-
-
Evento no mostro não responde ao onKill
Consegui era o creaturescripts que eu estava utilizando, não entendi o porque funciona para alguns scripts e para esse não, porem troquei e funcionou. segue o exemplo que estou utilizando agora: local bosses = { ['three-headed black dragon'] = {position = Position(32355, 31647, 1), storage = GlobalStorage.WrathOfTheEmperor.Bosses.Fury}, --['wrath of the emperor'] = {position = Position(33094, 31087, 15), storage = GlobalStorage.WrathOfTheEmperor.Bosses.Wrath}, --['scorn of the emperor'] = {position = Position(33095, 31110, 15), storage = GlobalStorage.WrathOfTheEmperor.Bosses.Scorn}, --['spite of the emperor'] = {position = Position(33048, 31111, 15), storage = GlobalStorage.WrathOfTheEmperor.Bosses.Spite}, } function onKill(creature, target) local targetMonster = target:getMonster() if not targetMonster then return true end local bossConfig = bosses[targetMonster:getName():lower()] if not bossConfig then return true end Game.setStorageValue(bossConfig.storage, 0) local tile = Tile(bossConfig.position) if tile then local thing = tile:getItemById(1423) if thing then thing:transform(1421) end end return true end
-
Evento no mostro não responde ao onKill
Sim é 1.2 mas tem exemplos de scripts que já funcionam assim em quests que vieram com o mapa <event type="kill" name="Three-Headed Black Dragon" script="torre/Three-Headed Black Dragon.lua"/>
-
Evento no mostro não responde ao onKill
Oi pessoas, mais uma vez eu com problemas nesse forum, bom dessa vez estou criando uma quest nova que funciona bem parecida com outras quests onde quando o player mata um monstro especifico ele deve acionar um evento onde uma pedra sai do caminho ou coisa do tipo. bom segue o meu creature script: local posfogo = {x=32355, y=31647, z=1} --function MoveStone2() --creates wall back --local criistal2 = getTileItemById(posdotp2, 1423) --if not criistal2 then --doCreateItem(1423,1,posdotp2)-- Stone pos --else --doCreateItem(1423,1,posdotp2) --end --return true -- --end -- --function RemoveStone2() -- local cristal2 = getTileItemById(posdotp2, 1423) -- Id do cristal azul que some para dar lugar ao tp -- if cristal2 then -- doRemoveItem(cristal2.uid, 1) -- end -- return true --end function onKill(cid, target, damage, flags, corpse) print("entrou no script") if(isMonster(target)) then if(string.lower(getCreatureName(target)) == "three-headed black dragon") then print("Está reconhecendo a morte do monstro!") --addEvent(RemoveStone2, 5 * 1000) --addEvent(MoveStone2, 300 * 1000) else print("não reconheceu!") end end return true end Detalhe: aqui estou apenas printando no console para ver se pelo menos o evento é ativado, e ai que está o erro, o evento não é nem ativado, então eu suponho que seja no meu monster.... Segue o monster: <?xml version="1.0" encoding="UTF-8"?> <monster name="Three-Headed Black Dragon" nameDescription="Three-Headed Black Dragon" race="blood" experience="5000000" speed="656" manacost="0"> <health now="10225000" max="10225000"/> <look type="563" corpse="21291"/> <targetchange interval="2000" chance="10"/> <strategy attack="90" defense="10"/> <flags> <flag rewardboss="1" /> <flag summonable="0"/> <flag attackable="1"/> <flag hostile="1"/> <flag illusionable="1"/> <flag convinceable="0"/> <flag pushable="0"/> <flag canpushitems="1"/> <flag canpushcreatures="1"/> <flag targetdistance="1"/> <flag staticattack="90"/> <flag runonhealth="300"/> </flags> <script> <event name="Three-Headed Black Dragon"/> </script> <attacks> <attack name="melee" interval="2000" min="-200" max="-10660"/> <attack name="curse" interval="2000" chance="17" length="8" spread="3" min="-2500" max="-10660"> <attribute key="areaEffect" value="blackspark"/> </attack> <attack name="death" interval="2000" chance="14" length="8" spread="3" min="-8000" max="-10450"> <attribute key="areaEffect" value="blacksmoke"/> </attack> <attack name="fire" interval="2000" chance="18" range="7" target="1" radius="4" min="-5500" max="-9700"> <attribute key="shootEffect" value="fire"/> <attribute key="areaEffect" value="fireattack"/> </attack> <attack name="death" interval="2000" chance="13" range="3" target="1" radius="1" min="-2200" max="-7230"> <attribute key="shootEffect" value="fire"/> <attribute key="areaEffect" value="mortarea"/> </attack> <attack name="the welter paralyze" interval="2000" chance="19"/> </attacks> <defenses armor="570" defense="445"> <defense name="healing" interval="3000" chance="17" min="2250" max="9600"> <attribute key="areaEffect" value="blueshimmer"/> </defense> <defense name="healing" interval="5000" chance="20" radius="5" min="2150" max="15700"> <attribute key="areaEffect" value="greenshimmer"/> </defense> <defense name="the welter heal" interval="2000" chance="8"/> </defenses> <elements> <element energyPercent="20"/> <element icePercent="20"/> <element holyPercent="-30"/> <element physicalPercent="10"/> </elements> <immunities> <immunity lifedrain="1"/> <immunity earth="1"/> <immunity fire="1"/> <immunity death="1"/> <immunity paralyze="1"/> <immunity invisible="1"/> </immunities> <summons maxSummons="3"> <summon name="black dragon spawn" interval="2000" chance="19"/> </summons> <voices interval="2000" chance="10"> <voice sentence="FCHHHHH" yell="1"/> <voice sentence="GROAAAAAARRRRRRR" yell="1"/> </voices> <loot> <item id="25377" countmax="5" chance="8200" /> <!-- gold token --> <item id="8927" chance="900"/> <!-- dark trinity staff --> <item id="26450" chance="900"/> <!-- haunted scytheblade --> <item id="25382" chance="6900"/> <!-- rift shield --> <item id="25383" chance="6900"/> <!-- rift lance --> <item id="2195" chance="10000"/> <!-- Boots of Haste --> <item id="2469" chance="2000"/> <!-- dragon scale legs --> <item id="11118" chance="5000"/> <!-- dragon scale boots --> <item id="2396" chance="20000"/> <!-- Ice Rapier --> <item id="2146" countmax="20" chance="20000"/> <!-- Small Sapphire --> <item id="2506" chance="8000"/> <!-- dragon scales helmet --> <item id="7588" countmax="100" chance="20000"/> <!-- Strong Health Potion --> <item id="2197" subtype="5" chance="20000"/> <!-- Stone Skin Amulet--> <item id="9971" countmax="10" chance="8800"/> <!-- Gold Ingot --> <item id="2498" chance="9500"/> <!-- Royal Helmet --> <item id="7632" chance="8600"/> <!-- Giant Shimmering Pearl --> <item id="7589" countmax="100" chance="20000"/> <!-- Strong Mana Potions--> <item id="2152" countmax="100" chance="20000"/> <!-- Platinum Coin --> <item id="2160" countmax="100" chance="20000"/> <!-- Platinum Coin --> <item id="2148" countmax="100" chance="20000"/> <!-- Gold Coins --> </loot> </monster> Espero que consigam me ajudar estou ficando louco já com isso! Estou esquecendo alguma coisa?
-
Problemas com o método getSize
Não estava pegando todos os itens só alguns, era no creaturescript mesmo no for
-
-
Problemas com o método getSize
Amigo primeiramente muito obrigado, infelizmente ainda não consegui resolver o problema, no meu servidor os dead body estão atribuidos assim: <item id="3084" article="a" name="dead rotworm"> <attribute key="weight" value="8500" /> <attribute key="containerSize" value="10" /> <attribute key="decayTo" value="2824" /> <attribute key="duration" value="600" /> <attribute key="corpse" /> <attribute key="corpseType" value="blood" /> <attribute key="fluidSource" value="blood" /> </item> <item id="3085" article="a" name="dead rotworm"> <attribute key="weight" value="8000" /> <attribute key="containerSize" value="10" /> <attribute key="decayTo" value="2825" /> <attribute key="duration" value="600" /> </item> <item id="3086" article="a" name="dead wolf" editorsuffix=" (no corpse)"> <attribute key="weight" value="21000" /> <attribute key="containerSize" value="5" /> <attribute key="corpseType" value="blood" /> <attribute key="fluidSource" value="blood" /> </item> <item id="3087" article="a" name="dead wolf" editorsuffix=" (no corpse)"> <attribute key="weight" value="15000" /> <attribute key="containerSize" value="4" /> </item> <item id="3088" article="a" name="dead wolf" editorsuffix=" (no corpse)"> <attribute key="weight" value="10000" /> </item> Consegue me explicar melhor como tem que ficar? Desde já agradeço. detalhe esse atributo corpse que eu coloquei não serviu =/ Consegui arrumar aqui, muito obrigado pelo seu tempo.
-
Problemas com o método getSize
Então depende do corpo é isso?
-
Loot aleatório para todos que matarem determinado monstro de evento
qual tfs?
-
Problemas com o método getSize
Boa noite meus queridos, sou administrador de um servidor Global TFS 1.2, implementei o autoloot deste tópico aqui: https://otland.net/threads/autoloot-system-for-tfs-1-x.237607/ (Desculpem se não achei o tópico em português que existe aqui no tibiaking porem eles são idênticos), bom o servidor começou a dar umas mensagens de erro, e mesmo assim o sistema funciona em partes a seguir o erro: Lua Script Error: [Main Interface] in a timer event called from: (Unknown scriptfile) data/creaturescripts/scripts/autoloot.lua:13: attempt to call method 'getSize' (a nil value) stack traceback: [C]: in function 'getSize' data/creaturescripts/scripts/autoloot.lua:13: in function já tentei de tudo mas esse método getSize do corpse não funciona, alguém pode me ajudar? vou colar aqui também a parte do creaturescripts onde esse método é implementado: local function scanContainer(cid, position) local player = Player(cid) if not player then return end local corpse = Tile(position):getTopDownItem() if not corpse or not corpse:isContainer() then return end if corpse:getType():isCorpse() and corpse:getAttribute(ITEM_ATTRIBUTE_CORPSEOWNER) == cid then for a = corpse:getSize() - 1, 0, -1 do local containerItem = corpse:getItem(a) if containerItem then for b = AUTOLOOT_STORAGE_START, AUTOLOOT_STORAGE_END do if player:getStorageValue(b) == containerItem:getId() then containerItem:moveTo(player) end end end end end end function onKill(player, target) if not target:isMonster() then return true end addEvent(scanContainer, 100, player:getId(), target:getPosition()) return true end Desde já agradeço a ajuda de vocês!
-
[TFS 1.x] AutoLoot System
desculpem reviver o tópico mas alguem sabe resolver esse erro no autoloot? "Lua Script Error: [Main Interface] in a timer event called from: (Unknown scriptfile) data/creaturescripts/scripts/autoloot.lua:13: attempt to call method 'getSize' (a nil value) stack traceback: [C]: in function 'getSize' data/creaturescripts/scripts/autoloot.lua:13: in function"
-
metodo isPlayer
Sim é isso mesmo, porem quando esse método é chamado no servidor por qualquer script que for ele reporta erro de valor booleano é igual a nulo. Não tenho um print aqui disso porque o erro acontece depois de um tempo do servidor online. Detalhes tenho saversave com shutdown todos os dias e uso TFS 1.2
-
-
metodo isPlayer
Galera não tenho muito oque dizer simplesmente o método isPlayer do meu servidor para de funcionar sem nenhum motivo aparente, e como alguns sabem esse método é muito importante para verificações se o player ou se varios players estão na posição correta para que quando uma action seja ativada algo aconteça, mas quando eu starto o server ele funciona daqui um tempo para de funcionar alguem consegue me ajudar?
-
-
Blockear ataque se nivel do player...
Pessoal boa tarde preciso de um script para impedir o pvp abusivo de players muito fortes. Por exemplo o ataque de um player 1000 leveis maiores que o players a ser atacado tem que ser muito baixo. será que é possível um script assim?
-
-
-
TFS1.2 Ultimate AOL (Aol VIP)
Olá pessoas do TibiaKing, A comunidade tibia king tem me ajudado por meses com conhecimentos para o meu server de tibia, então hoje ocorreu um problema lá no meu servidor e não havia nada atualizado para me suprir, o problema foi o seguinte: "Um player x lá era vip donatadaço" pegou red morreu e perdeu tudo! então para evitar problemas no pagseguro e na vida real eu decidi criar um AOL vip. e hoje vou ensinar a vocês como eu resolvi o problema: Eu apenas adicionei essas linhas no arquivo: "data/creaturescripts/scripts/others/droploot.lua" --AOL VIP local amulet = player:getSlotItem(CONST_SLOT_NECKLACE) if amulet and amulet.itemid == 24683 ) then local isPlayer = false if killer then if killer:isPlayer() then isPlayer = true else local master = killer:getMaster() if master and master:isPlayer() then isPlayer = true end end end Em "if amulet and amulet.itemid == 24683" é só mudar 24683 para o id do amuleto que você queira. bom dá pra ver que eu segui o exemplo do AOL e removi os requisitos para ele não funcionar. Espero que isso ajude alguém e desculpe o péssimo post pois esse aqui é meu primeiro conteúdo de agradecimento.
- OTClient 0.6.3 | 7.4 à 10.96
-
-
-
bosses you are not the owner
Boa noite pessoal tudo bem com vocês? Bom no meu servidor um Thornia 1096, alguns monstros com exclusividade os bosses como Ferumbras e outros estão dando "you are not the owner" quando um player mata eles. Alguém já viu esse bug? a proposito o meu servidor está hospedado em linux. Grato.