Ir para conteúdo
  • Cadastre-se

Posts Recomendados

  • 2 months later...

ola no meu server nao esta catando o loot automatico.. pode me ajudar.. eu nao entendi bem esta parte

 

 

player:registerEvent("AutoLoot")
Link para o post
Compartilhar em outros sites

vou testar... no meu ot é assim

 

-- Events
    for i = 1, #events do
        player:registerEvent(events)
        player:registerEvent("AutoLoot")
    end

 

 

não player death nem droploot.. 

nao precisa colocar isso neh ?

Link para o post
Compartilhar em outros sites

Logo acima disso deve ter uma tabela ± assim: {"PlayerDeath", "DropLoot", "etc"}

É só adicionar mais um: {"PlayerDeath", "DropLoot", "etc", "AutoLoot"}

 

OBS.: se fizer isso não precisa fazer o que te disse no outro post!

Editado por Fir3element (veja o histórico de edições)
Link para o post
Compartilhar em outros sites

oi ta bem assim no meu ow...

 

olha la no final


-- ordered as in creaturescripts.xml
local events = {
    'TutorialCockroach',
    'ElementalSpheresOverlords',
    'BigfootBurdenVersperoth',
    'BigfootBurdenWarzone',
    'BigfootBurdenWeeper',
    'BigfootBurdenWiggler',
    'SvargrondArenaKill',
    'NewFrontierShardOfCorruption',
    'NewFrontierTirecz',
    'ServiceOfYalaharDiseasedTrio',
    'ServiceOfYalaharAzerus',
    'ServiceOfYalaharQuaraLeaders',
    'InquisitionBosses',
    'InquisitionUngreez',
    'KillingInTheNameOfKills',
    'MastersVoiceServants',
    'SecretServiceBlackKnight',
    'ThievesGuildNomad',
    'WotELizardMagistratus',
    'WotELizardNoble',
    'WotEKeeper',
    'WotEBosses',
    'WotEZalamon',
    'PlayerDeath',
    'AdvanceSave',
    'AdvanceRookgaard',
    'PythiusTheRotten',
    'DropLoot'
    'Autoloot'
}

Link para o post
Compartilhar em outros sites

11:02 gold coin has been added to the list.

 

 

MAIS ELE NAO PEGA AS COISAS

agora eu consegui :D

 

DEIXEI ASSIM

    -- Events
    for i = 1, #events do
        player:registerEvent(events)
        player:registerEvent("AutoLoot")
    end

Link para o post
Compartilhar em outros sites
  • 7 months later...
  • 2 weeks later...
  • 3 weeks later...

Erro nessa linha 

 

        local item = split[2]:gsub("%s+", "", 1)

 

Linha 6 e Linha 39 do autoloot.lua talkactions

 

TFS 1.2

Link para o post
Compartilhar em outros sites
  • 3 weeks later...
  • 2 months later...
  • 2 weeks later...

Olha, no meu pra funcionar eu tive que alterar o .lua do talkactions, Bem na instruçao onde vc adiciona o item

if action == "add" then
        local item = split[2] -- Alterei aki. Antes ele removia os espacos em branco de itens como (gold coin), ficando goldcoin, dai ele n achava esse nome nos loots 
        local itemType = ItemType(item)
        if itemType:getId() == 0 then --removi linhas aki. Se o player digitar o nome errado do item, nao sera adicionado na lista de loot
                player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "There is no item with that id or name.")
                return false
        end

Só testei com o item gold coin. Matei uns eskeletos e ele funcionou certinho

Link para o post
Compartilhar em outros sites
  • 3 weeks later...
  • 1 month later...

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"

 

Link para o post
Compartilhar em outros sites
  • 2 months later...
  • 1 month later...

Brother não entendi como eu adiciono isto no global.lua:

 

Citar

 

-- AutoLoot config AUTO_LOOT_MAX_ITEMS = 5 -- Reserved storage AUTOLOOT_STORAGE_START = 10000 AUTOLOOT_STORAGE_END = AUTOLOOT_STORAGE_START + AUTO_LOOT_MAX_ITEMS -- AutoLoot config end


 

 

Este é o meu Global.lua

 

Citar

dofile('data/lib/libs.lua')

NOT_MOVEABLE_ACTION = 8000
PARTY_PROTECTION = 1 -- Set to 0 to disable.
ADVANCED_SECURE_MODE = 1 -- Set to 0 to disable.

STORAGEVALUE_PROMOTION = 30018


ropeSpots = {384, 418, 8278, 8592, 13189, 14435, 14436, 15635, 19518, 26019}

doors = {
    [1209] = 1211, [1210] = 1211, [1212] = 1214, [1213] = 1214, [1219] = 1220, [1221] = 1222, [1231] = 1233, [1232] = 1233, [1234] = 1236,
    [1235] = 1236, [1237] = 1238, [1239] = 1240, [1249] = 1251, [1250] = 1251, [1252] = 1254, [1253] = 1254, [1539] = 1540, [1541] = 1542,
    [3535] = 3537, [3536] = 3537, [3538] = 3539, [3544] = 3546, [3545] = 3546, [3547] = 3548, [4913] = 4915, [4914] = 4915, [4916] = 4918,
    [4917] = 4918, [5082] = 5083, [5084] = 5085, [5098] = 5100, [5099] = 5100, [5101] = 5102, [5107] = 5109, [5108] = 5109, [5110] = 5111,
    [5116] = 5118, [5117] = 5118, [5119] = 5120, [5125] = 5127, [5126] = 5127, [5128] = 5129, [5134] = 5136, [5135] = 5136, [5137] = 5139,
    [5138] = 5139, [5140] = 5142, [5141] = 5142, [5143] = 5145, [5144] = 5145, [5278] = 5280, [5279] = 5280, [5281] = 5283, [5282] = 5283,
    [5284] = 5285, [5286] = 5287, [5515] = 5516, [5517] = 5518, [5732] = 5734, [5733] = 5734, [5735] = 5737, [5736] = 5737, [6192] = 6194,
    [6193] = 6194, [6195] = 6197, [6196] = 6197, [6198] = 6199, [6200] = 6201, [6249] = 6251, [6250] = 6251, [6252] = 6254, [6253] = 6254,
    [6255] = 6256, [6257] = 6258, [6795] = 6796, [6797] = 6798, [6799] = 6800, [6801] = 6802, [6891] = 6893, [6892] = 6893, [6894] = 6895,
    [6900] = 6902, [6901] = 6902, [6903] = 6904, [7033] = 7035, [7034] = 7035, [7036] = 7037, [7042] = 7044, [7043] = 7044, [7045] = 7046,
    [7054] = 7055, [7056] = 7057, [8541] = 8543, [8542] = 8543, [8544] = 8546, [8545] = 8546, [8547] = 8548, [8549] = 8550, [9165] = 9167,
    [9166] = 9167, [9168] = 9170, [9169] = 9170, [9171] = 9172, [9173] = 9174, [9267] = 9269, [9268] = 9269, [9270] = 9272, [9271] = 9272,
    [9273] = 9274, [9275] = 9276, [10276] = 10277, [10274] = 10275, [10268] = 10270, [10269] = 10270, [10271] = 10273, [10272] = 10273, [10471] = 10472,
    [10480] = 10481, [10477] = 10479, [10478] = 10479, [10468] = 10470, [10469] = 10470, [10775] = 10777, [10776] = 10777, [12092] = 12094, [12093] = 12094,
    [12188] = 12190, [12189] = 12190, [19840] = 19842, [19841] = 19842, [19843] = 19844, [19980] = 19982, [19981] = 19982, [19983] = 19984, [20273] = 20275,
    [20274] = 20275, [20276] = 20277, [17235] = 17236, [18208] = 18209, [13022] = 13023, [10784] = 10786, [10785] = 10786, [12099] = 12101, [12100] = 12101,
    [12197] = 12199, [12198] = 12199, [19849] = 19851, [19850] = 19851, [19852] = 19853, [19989] = 19991, [19990] = 19991, [19992] = 19993, [20282] = 20284,
    [20283] = 20284, [20285] = 20286, [17237] = 17238, [13020] = 13021, [10780] = 10781, [12095] = 12096, [12195] = 12196, [19845] = 19846, [19985] = 19986,
    [20278] = 20279, [10789] = 10790, [12102] = 12103, [12204] = 12205, [19854] = 19855, [19994] = 19995, [20287] = 20288, [10782] = 10783, [12097] = 12098,
    [12193] = 12194, [19847] = 19848, [19987] = 19988, [20280] = 20281, [10791] = 10792, [12104] = 12105, [12202] = 12203, [19856] = 19857, [19996] = 19997,
    [20289] = 20290, [22814] = 22815, [22815] = 22816, [22817] = 22818, [22819] = 22820, [22823] = 22825, [22824] = 22825, [22826] = 22827, [22828] = 22829
}

verticalOpenDoors = {
    1211, 1220, 1224, 1228, 1233, 1238, 1242, 1246, 1251, 1256, 1260, 1540, 3546, 3548, 3550, 3552, 4915, 5083, 5109, 5111, 5113, 5115, 5127, 5129, 5131,
    5133, 5142, 5145, 5283, 5285, 5289, 5293, 5516, 5737, 5749, 6194, 6199, 6203, 6207, 6251, 6256, 6260, 6264, 6798, 6802, 6902, 6904, 6906, 6908, 7044,
    7046, 7048, 7050, 7055, 8543, 8548, 8552, 8556, 9167, 9172, 9269, 9274, 9274, 9269, 9278, 9282, 10270, 10275, 10279, 10283, 10479, 10481, 10485, 10483,
    10786, 12101, 12199, 19851, 19853, 19991, 19993, 20284, 20286, 17238, 13021, 10790, 12103, 12205, 19855, 19995, 20288, 10792, 12105, 12203, 19857, 19997,
    20290, 22825, 22827, 22829, 22831
}

horizontalOpenDoors = {
    1214, 1222, 1226, 1230, 1236, 1240, 1244, 1248, 1254, 1258, 1262, 1542, 3537, 3539, 3541, 3543, 4918, 5085, 5100, 5102, 5104, 5106, 5118,
    5120, 5122, 5124, 5136, 5139, 5280, 5287, 5291, 5295, 5518, 5734, 5746, 6197, 6201, 6205, 6209, 6254, 6258, 6262, 6266, 6796, 6800, 6893,
    6895, 6897, 6899, 7035, 7037, 7039, 7041, 7057, 8546, 8550, 8554, 8558, 9170, 9174, 9272, 9276, 9280, 9284, 10273, 10277, 10281, 10285,
    10470, 10472, 10476, 10474, 10777, 12094, 12190, 19842, 19844, 19982, 19984, 20275, 20277, 17236, 18209, 13023, 10781, 12096, 12196,
    19846, 19986, 20279, 10783, 12098, 12194, 19848, 19988, 20281, 22816, 22818, 22820, 22822
}

openSpecialDoors = {
    1224, 1226, 1228, 1230, 1242, 1244, 1246, 1248, 1256, 1258, 1260, 1262, 3541, 3543, 3550, 3552, 5104, 5106, 5113, 5115, 5122, 5124, 5131, 5133,
    5289, 5291, 5293, 5295, 6203, 6205, 6207, 6209, 6260, 6262, 6264, 6266, 6897, 6899, 6906, 6908, 7039, 7041, 7048, 7050, 8552, 8554, 8556, 8558,
    9176, 9178, 9180, 9182, 9278, 9280, 9282, 9284, 10279, 10281, 10283, 10285, 10474, 10476, 10483, 10485, 10781, 12096, 12196, 19846, 19986, 20279,
    10783, 12098, 12194, 19848, 19988, 20281, 10790, 12103, 12205, 19855, 19995, 20288, 10792, 12105, 12203, 19857, 19997, 20290
}

questDoors = {
    1223, 1225, 1241, 1243, 1255, 1257, 3542, 3551, 5105, 5114, 5123, 5132, 5288, 5290, 5745, 5748, 6202, 6204, 6259, 6261, 6898, 6907, 7040, 7049,
    8551, 8553, 9175,9177, 9277, 9279, 10278, 10280, 10475, 10484, 10782, 12097, 19847, 19987, 20280, 10791, 12104, 12204, 12195, 19856, 19996, 20289,
    22821, 22830
}

levelDoors = {
    1227, 1229, 1245, 1247, 1259, 1261, 3540, 3549, 5103, 5112, 5121, 5130, 5292, 5294, 6206, 6208, 6263, 6265, 6896, 6905, 7038, 7047, 8555, 8557,9179, 9181,
    9281, 9283, 10282, 10284, 10473, 10482, 10780, 10789, 10780, 12095, 12195, 19845, 19985, 20278, 10789, 12102, 12193, 12202, 19854, 19994, 20287
}

keys = {2086, 2087, 2088, 2089, 2090, 2091, 2092, 10032}

function doCreatureSayWithRadius(cid, text, type, radiusx, radiusy, position)
    if not position then
        position = Creature(cid):getPosition()
    end

    local spectators, spectator = Game.getSpectators(position, false, true, radiusx, radiusx, radiusy, radiusy)
    for i = 1, #spectators do
        spectator = spectators
        spectator:say(text, type, false, spectator, position)
    end
end


function getBlessingsCost(level)
    if level <= 30 then
        return 2000
    elseif level >= 120 then
        return 20000
    else
        return (level - 20) * 200
    end
end

function getPvpBlessingCost(level)
    if level <= 30 then
        return 2000
    elseif level >= 270 then
        return 50000
    else
        return (level - 20) * 200
    end
end

function isInRange(pos, fromPos, toPos)
    return pos.x >= fromPos.x and pos.y >= fromPos.y and pos.z >= fromPos.z and pos.x <= toPos.x and pos.y <= toPos.y and pos.z <= toPos.z
end

function isNumber(str)
    return tonumber(str) ~= nil
end

function Creature.getMonster(self)
return self:isMonster() and self or nil
end

function getTibianTime()
    local worldTime = getWorldTime()
    local hours = math.floor(worldTime / 60)

    local minutes = worldTime % 60
    if minutes < 10 then
        minutes = '0' .. minutes
    end
    return hours .. ':' .. minutes
end

function getDistanceBetween(firstPosition, secondPosition)
    local xDif = math.abs(firstPosition.x - secondPosition.x)
    local yDif = math.abs(firstPosition.y - secondPosition.y)
    local posDif = math.max(xDif, yDif)
    if firstPosition.z ~= secondPosition.z then
        posDif = posDif + 15
    end
    return posDif
end

table.contains = function(array, value)
    for _, targetColumn in pairs(array) do
        if targetColumn == value then
            return true
        end
    end
    return false
end

string.split = function(str, sep)
    local res = {}
    for v in str:gmatch("([^" .. sep .. "]+)") do
        res[#res + 1] = v
    end
    return res
end

string.trim = function(str)
    return str:match'^()%s*$' and '' or str:match'^%s*(.*%S)'
end

-- Stamina
if nextUseStaminaTime == nil then
    nextUseStaminaTime = {}
end

if nextUseStaminaPrey == nil then
    nextUseStaminaPrey = {}
end

if nextUseXpStamina == nil then
    nextUseXpStamina = {}
end

if lastItemImbuing == nil then
    lastItemImbuing = {}
end

--Boss entry
if not bosssPlayers then
    bosssPlayers = {
        addPlayers = function (self, cid)
            local player = Player(cid)
            if not player then return false end
            if not self.players then
                self.players = {}
            end
            self.players[player:getId()] = 1
        end,
        removePlayer = function (self, cid)
            local player = Player(cid)
            if not player then  return false end
            if not self.players then return false end
            self.players[player:getId()] = nil
        end,
        getPlayersCount = function (self)
            if not self.players then return 0 end
            local c = 0
            for _ in pairs(self.players) do  c = c + 1 end
            return c
        end
    }
end

-- CASAMENTO MARRY 

PROPOSED_STATUS = 1
MARRIED_STATUS = 2
PROPACCEPT_STATUS = 3
LOOK_MARRIAGE_DESCR = TRUE
ITEM_WEDDING_RING = 2121
ITEM_ENGRAVED_WEDDING_RING = 10502

function getPlayerSpouse(id)
    local resultQuery = db.storeQuery("SELECT `marriage_spouse` FROM `players` WHERE `id` = " .. db.escapeString(id))
    if resultQuery ~= false then
        local ret = result.getDataInt(resultQuery, "marriage_spouse")
        result.free(resultQuery)
        return ret
    end
    return -1
end

function setPlayerSpouse(id, val)
    db.query("UPDATE `players` SET `marriage_spouse` = " .. val .. " WHERE `id` = " .. id)
end

function getPlayerMarriageStatus(id)
    local resultQuery = db.storeQuery("SELECT `marriage_status` FROM `players` WHERE `id` = " .. db.escapeString(id))
    if resultQuery ~= false then
        local ret = result.getDataInt(resultQuery, "marriage_status")
        result.free(resultQuery)
        return ret
    end
    return -1
end

function setPlayerMarriageStatus(id, val)
    db.query("UPDATE `players` SET `marriage_status` = " .. val .. " WHERE `id` = " .. id)
end

function Player:getMarriageDescription(thing)
    local descr = ""
    if getPlayerMarriageStatus(thing:getGuid()) == MARRIED_STATUS then
        playerSpouse = getPlayerSpouse(thing:getGuid())
        if self == thing then
            descr = descr .. " You are "
        elseif thing:getSex() == PLAYERSEX_FEMALE then
            descr = descr .. " She is "
        else
            descr = descr .. " He is "
        end
        descr = descr .. "married to " .. getPlayerNameById(playerSpouse) .. '.'
    end
    return descr
end

-- The following 2 functions can be used for delayed shouted text

function say(param)
selfSay(text)
doCreatureSay(param.cid, param.text, 1)
end

function delayedSay(text, delay)
local delay = delay or 0
local cid = getNpcCid()
addEvent(say, delay, {cid = cid, text = text})
end

 

E está dando este problema na distro, como eu arrumo, alguém consegue me ajudar?

 

 

Lua Script Error: [TalkAction Interface]
data/talkactions/scripts/autoloot.lua:onSay
data/talkactions/scripts/autoloot.lua:18: 'for' initial value must be a number
stack traceback:
        [C]: in ?
        data/talkactions/scripts/autoloot.lua:18: in function <data/talkactions/scripts/autoloot.lua:1>

Link para o post
Compartilhar em outros sites

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.

Visitante
Responder

×   Você colou conteúdo com formatação.   Remover formatação

  Apenas 75 emojis são permitidos.

×   Seu link foi automaticamente incorporado.   Mostrar como link

×   Seu conteúdo anterior foi restaurado.   Limpar o editor

×   Não é possível colar imagens diretamente. Carregar ou inserir imagens do URL.

  • Quem Está Navegando   0 membros estão online

    Nenhum usuário registrado visualizando esta página.


  • Conteúdo Similar

    • Por chateadoagr
      Bem-vindo ao Genesis Online Tibia (GOT), um mundo onde a civilização foi devastada por um apocalipse zumbi. Inspirado em referências como The Walking Dead e Resident Evil, o GOT desafia você a sobreviver em meio ao caos, enfrentando hordas de mortos-vivos, explorando ruínas perigosas e formando alianças estratégicas. Embarque nesta jornada épica de sobrevivência e descoberta, onde cada escolha molda seu destino em um cenário hostil repleto de desafios e perigos iminentes.
       
       
      Adentre o universo de Genesis Online Tibia (GOT), um jogo repleto de sistemas inovadores e emocionantes. Equipe-se com um vasto arsenal de armas para enfrentar as ameaças do apocalipse zumbi, enquanto o sistema autoloot simplifica suas conquistas. Desenvolva seu personagem através de um sistema de upgrade único, aprimorando habilidades e atributos para enfrentar desafios cada vez mais formidáveis.
       
      Explore um mundo imersivo onde o som desempenha um papel crucial, criando uma atmosfera envolvente e realista. Vasculhe cada canto em busca de recursos vitais, desvendando segredos e tesouros ocultos. Siga uma cativante história através de missões que expandem o enredo, revelando os mistérios por trás do apocalipse e oferecendo recompensas valiosas.
       
      Em Genesis Online Tibia, a jornada pela sobrevivência é repleta de ação, estratégia e emoção, convidando você a se aventurar em um mundo onde cada decisão molda seu destino e determina sua capacidade de enfrentar os desafios que aguardam.

      Em breve imagens do servidor!
       
       
    • Por prot def
      Versão Beta já disponível no site: http://otshinobi.servegame.com/ 
      Servidor Online, aproveite e crie sua conta e baixe o client para Pc ou Android, todos os dados do seu personagem permanecerão intactos na versão definitiva que será lançada em breve!









      Já disponível em: Client 8.54 (Old) / New Client e Client Mobile para Android
      Temos 27 Vocações disponíveis
      Personagens FREE: Naruto, Sasuke, Sakura, Kakashi, Rock Lee, Shikamaru, Neji, Tenten, Hinata, Killer Bee, Gaara, Kiba, Temari, Kankuro, Shisui e Jiraiya.
      Personagens Shop Free (compre com Gold dentro do game): Obito, Tsunade, Kisame e Itachi.
      Personagens Shop VIP: Itachi (Shop), Obito (Shop) Minato (Shop) Madara (Shop) Tsunade (Shop) Hashirama (Shop) Nidaime (Tobirama) (Shop) Nagato (Shop) Raikage (Shop) Kisame (Shop)  (Você pode donatar pelo LivePix)
      Personagens Especiais obtidos através de eventos dentro do game: Orochimaru e Yamato.
      Transformações, jutsus e habilidades exclusivas para cada vocação
      Upe se divertindo pelo mapa, rate de experiência desafiante, ganhe jutsus e transformações exclusivas ao upar 
      Mapa exclusivo que terá atualizações periódicas:
      -> vilas disponíveis até o momento: Vila da Folha, Vila da Areia, Vila da Névoa, Vila da Pedra, Vila da Nuvem Vila da Chuva (Konoha, Kirigakure, Sunagakure, Iwagakure, Kumogakure, Amegakure) e País das Ondas.
      -> Area Vip: Várias Hunts para upar e farmar (Zetsu Covil, Member Akatsuki Covil, Northwest Island, Hunt Nagato, Hunt Samurais, Paper Island, Orochimaru Island) e Vila Shinobi Exclusiva para usuários Vip
      Sistema de graduação ninja: genin, chunin, jounin e anbu - Evolua seu ranking shinobi, apenas os merecedores se tornarão Kage.
      Exame Chunin completo, reviva o nostálgico arco do anime para se tornar Chunin
      Crie sua própria guild ou entre em uma existente
      Organização Akatsuki - torne-se membro da maior organização criminosa do mundo ninja
      Rank level (Figure entre os melhores jogadores do jogo)
      Reviva as sagas de Naruto Clássico e Naruto Shippuden
      Sistema de guilds - crie ou entre em uma guild e divirta-se com seus amigos
      Mundo PVP
      Eventos PVP
      Eventos de invasão, proteja a vila da destruição: Invasões em Konoha (Pain e Orochimaru) e Invasão de Deidara e Sasori em Sunagakure
      Compra e venda de casas para usuários Vip
      Npc Shop e NPC Shop Event - compre sua VIP ACCOUNT E VOCAÇÃO VIP ''totalmente'' GRÁTIS utilizando a moeda do jogo (GOLD).
      Npc Minoru - leva você diretamente para outras vilas e várias hunts do mapa. Area Free: Konoha, Kirigakure, Sunagakure, Iwagakure, Kumogakure, Amegakure, Valley of the End, South Forest, South Island, West Desert. Area VIP: Zetsu Covil, Member Akatsuki Covil, Northwest Island, Hunt Nagato, Hunt Samurais, Paper Island, Orochimaru Island, Vila Shinobi area com casas exclusivas para compra.
      Reviva vários arcos do Anime: Lute contra diversos personagens do anime com habilidades únicas
      Sistema Chakra Bijuu - torne-se jinchuuriki das bestas de cauda e utilize seu poder em batalha
      Diversas armas e equipamentos do anime
      Tasks da Tsunade - derrote os shinobi mais poderosos do mundo ninja e ganhe recompensas em Gold: 
      deidara da pedra 
      hidan das fonte
      itachi da folha 
      kabuto da folha
      kakuzo da cachoeira 
      kisame da nevoa
      konan da chuva
      madara da folha
      nagato da chuva
      orochimaru da folha
      pain da chuva
      sasori da areia
      tobi da folha
      Vários Npcs de Tasks espalhados pelo mapa: derrote inimigos e traga itens em troca de experiência e recompensas.
      Quests: Temos várias Quests Disponíveis e várias outras em desenvolvimento:
      ->Quest Nto Points FREE - Ganhe Nto Points para comprar itens vip com o Npc Shop (compre Premium Account, Vocações e itens)
      -> Shukaku Quest - Quest realizada em quatro pessoas 
      -> Sambi Quest - Quest realizada em duas pessoas 
      -> Akatsuki Ring Quest 
      -> Kurama Quest
      -> Quest Templo do Fogo
      -> Minato Quest
      -> Itachi Quest 
      -> Sasuke Boss Quest 
      -> Hidan Quest
      -> Kakuzo Quest 
      -> Sasori Quest 
      ->Pain Quest
      ->Tobirama Quest
      Jogo utiliza base parecida com o ntoultimate dos velhos tempos.
      Jogue e ajude a manter o servidor aberto até o lançamento da versão final
      Crie sua conta e baixe o jogo no site oficial: otshinobi.servegame.com 
      DIVIRTA-SE!
      DISPONÍVEL TAMBÉM CLIENT MOBILE!

    • Por Imperius
      O propósito é criar uma nova função em creaturescripts que será acionada toda vez que um novo report (CTRL + R) for aberto.
       
      Eu implementei para enviar uma notificação no grupo do Telegram, contendo os dados do report.
       
      Isso garantirá que os GMs tenham acesso aos reports dos jogadores mesmo quando não estiverem logados, e também evitará que algum report seja perdido caso o jogador saia do servidor.
      A parte do Telegram é apenas um exemplo. Você pode ajustar o script para executar outras ações desejadas.
       
      creatureevent.cpp:
      Dentro deste arquivo, localize a função:
       
      uint32_t CreatureEvent::executeChannelLeave(Player* player, uint16_t channelId, UsersMap usersMap)  
      abaixo dela, adicione:
       
      uint32_t CreatureEvent::executeOpenRuleViolation(Player* player, std::string message) { if (!m_interface->reserveEnv()) { std::clog << "[Error - CreatureEvent::executeOpenRuleViolation] Call stack overflow." << std::endl; return 0; } ScriptEnviroment* env = m_interface->getEnv(); env->setScriptId(m_scriptId, m_interface); lua_State* L = m_interface->getState(); m_interface->pushFunction(m_scriptId); lua_pushnumber(L, env->addThing(player)); lua_pushstring(L, message.c_str()); bool result = m_interface->callFunction(2); m_interface->releaseEnv(); return result; }  
      Após, procure por:
       
      std::string CreatureEvent::getScriptEventName() const  
      abaixo de:
       
      case CREATURE_EVENT_CHANNEL_LEAVE: return "onLeaveChannel";  
      adicione:
       
      case CREATURE_EVENT_OPEN_RULE_VIOLATION: return "onOpenRuleViolation";  
      Agora, procure por:
       
      std::string CreatureEvent::getScriptEventParams() const  
      abaixo de:
       
      case CREATURE_EVENT_CHANNEL_LEAVE: return "cid, channel, users";  
      adicione:
       
      case CREATURE_EVENT_OPEN_RULE_VIOLATION: return "cid, message";  
      Procure por:
       
      bool CreatureEvent::configureEvent(xmlNodePtr p)  
      abaixo de:
       
      else if(tmpStr == "leavechannel") m_type = CREATURE_EVENT_CHANNEL_LEAVE;  
      adicione:
       
      else if(tmpStr == "openruleviolation") m_type = CREATURE_EVENT_OPEN_RULE_VIOLATION;  
       
      creatureevent.h:
      Dentro deste arquivo, localize:
       
      enum CreatureEventType_t  
      adicione "CREATURE_EVENT_OPEN_RULE_VIOLATION" como o último item de enum CreatureEventType_t
       
      Exemplo:
       
      enum CreatureEventType_t { // ... CREATURE_EVENT_OPEN_RULE_VIOLATION };  
      Agora, procure por:
       
      uint32_t executeChannelLeave(Player* player, uint16_t channelId, UsersMap usersMap);  
      abaixo dela, adicione:
       
      uint32_t executeOpenRuleViolation(Player* player, std::string message);  
      game.cpp:
      Dentro deste arquivo, localize:
       
      bool Game::playerReportRuleViolation(Player* player, const std::string& text)  
      e substitua por:
       
      bool Game::playerReportRuleViolation(Player* player, const std::string& text) { //Do not allow reports on multiclones worlds since reports are name-based if(g_config.getNumber(ConfigManager::ALLOW_CLONES)) { player->sendTextMessage(MSG_INFO_DESCR, "Rule violation reports are disabled."); return false; } cancelRuleViolation(player); boost::shared_ptr<RuleViolation> rvr(new RuleViolation(player, text, time(NULL))); ruleViolations[player->getID()] = rvr; ChatChannel* channel = g_chat.getChannelById(CHANNEL_RVR); if(!channel) return false; for(UsersMap::const_iterator it = channel->getUsers().begin(); it != channel->getUsers().end(); ++it) it->second->sendToChannel(player, SPEAK_RVR_CHANNEL, text, CHANNEL_RVR, rvr->time); CreatureEventList joinEvents = player->getCreatureEvents(CREATURE_EVENT_OPEN_RULE_VIOLATION); for(CreatureEventList::iterator it = joinEvents.begin(); it != joinEvents.end(); ++it) (*it)->executeOpenRuleViolation(player, text); return true; }  
      Agora é só compilar a source.
       
      depois em "data > creaturescripts > creaturescripts.xml", adicione:
       
      <event type="login" name="loginNotifyRuleViolation" script="notifyRuleViolation.lua"/> <event type="openruleviolation" name="openNotifyRuleViolation" script="notifyRuleViolation.lua"/>  
      em "data > creaturescripts > scripts", crie um arquivo notifyRuleViolation.lua e adicione:
       
      function onOpenRuleViolation(cid, message) local config = { token = "", -- Token do seu BOT no Telegram chatId = "" -- ID do chat do Telegram que será enviado a notificação. } local message = "Player: "..getCreatureName(cid).."\n\nReport:\n"..message.."" message = string.gsub(message, "\n", "%%0A") local url = "https://api.telegram.org/bot"..config.token.."/sendMessage" local data = "chat_id="..config.chatId.."&text="..message.."" local curl = io.popen('curl -d "'..data..'" "'..url..'"'):read("*a") return true end function onLogin(cid) registerCreatureEvent(cid, "openNotifyRuleViolation") return true end  
       
      Demonstração:
      1. Jogador abre um novo report (CTRL + R)

      2. notifyRuleViolation.lua, definido em creaturescripts.xml, é acionado para enviar uma notificação ao grupo do Telegram.
       

       
×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo