Ir para conteúdo

QuebradaZN

Membro
  • Registro em

  • Última visita

Tudo que QuebradaZN postou

  1. Acredito que mesmo compilando não vá resolver a questão de corrigir bugs de Scripts!
  2. Boa noite, recentemente fechei meu servidor Custom... De lá pra cá fiz a troca do PC por um Notebook No meu PC Abria normalmente o mapa no remeres... já no meu notebook não consigo abrir perfeitamente Caso eu estiver postando em Lugar errado, mova por Favor! Agradecido desde já!
  3. local MonsterDeath = CreatureEvent("BossDeath") local tpId = 1387 local tp = { info = { pos = {x = 33900, y = 31381, z = 12}, -- onde aparece o tp toPos = {x = 33880, y = 31450, z = 12}, -- Para onde o TP teleporta o player time = 15, -- tempo em segundos q o tp fica aberto }, kill = { ["Furious Boss"] = {count = 1, str = 10629}, -- ["monstro"] = {quantidade = 1, storage = n mexa }, } function checkTask() for name, info in pairs(tp.kill) do if getGlobalStorageValue(info.str) < info.count then return false end end return true end function removeTp(tp) local t = getTileItemById(tp.info.pos, tpId) if t then doRemoveItem(t.uid, 1) doSendMagicEffect(tp.info.pos, CONST_ME_POFF) end end function MonsterDeath.onDeath(cid) local m = tp.kill[getCreatureName(cid)] if not tp then return true end setGlobalStorageValue(m.str, getGlobalStorageValue(m.str) < 0 and 1 or getGlobalStorageValue(m.str) + 1) if checkTask() then doCreateTeleport(tpId, tp.info.toPos, tp.info.pos) doCreatureSay(cid, "O teleport irá sumir em "..tp.info.time.." segundos.", TALKTYPE_ORANGE_1) addEvent(removeTp, tp.info.time * 1000, tp) for _, info in pairs(tp.kill) do setGlobalStorageValue(info.str, -1) end end return true end MonsterDeath:register() e no monstro deve por o evento... monster.events = { "BossDeath" }
  4. Caso precisem! FREE ITEMS na coordenada {CENSURADO}
  5. Pois então, no Próprio nome do Post Coloquei a versão do TFS!
  6. Boa Tarde, Hoje venho trazer a vocês um Sistema de Aura! Feito pelo @bielzinhocrazy [Fakezim/BielzinhoCrazy/GMLeal] Mudanças que Foram feitas... Retirei a ativação da Aura por Talk e coloquei por Equip Fixei o Bug que a aura Não Girava em torno do Player Fixei o Bug que o Player Parava de receber a aura assim que Tinha o Efeito da Cura! Em Movements/scripts/ Crie um Arquivo com nome de aura.lua -- CONFIGURAÇÕES aurastr = 25950 -- storage da aura estr = 25951 -- storage para o exhaust porcentagem = 50 -- chance de curar em cada volta da aura, em porcentagem quantheal = 20 -- porcentagem do hp máximo que cada cura irá curar. (No caso, irá curar 10% do hp máximo cada cura) tempo = 1180 -- tempo para dar uma volta no player (este tempo foi o que achei mais agradável visualmente, é recomendável não mudar) tipoaura = 31 -- número do efeito da aura (efeito de distância, pode ser identificado com /x no jogo) efeitocura = 54 -- número do efeito quando a cura chega ao player (efeito de posição fixa, pode ser identificado com /z no jogo) -- Função que chama a aura function efeitosAura(i,tm,cid) if(isCreature(cid)) then local atual = getCreaturePosition(cid) local posaura = { {x=(atual.x)-1, y=(atual.y)-1, z=atual.z}, {x=atual.x, y=(atual.y)-1, z=atual.z}, {x=(atual.x)+1, y=(atual.y)-1, z=atual.z}, {x=(atual.x)+1, y=atual.y, z=atual.z}, {x=(atual.x)+1, y=(atual.y)+1, z=atual.z}, {x=atual.x, y=(atual.y)+1, z=atual.z}, {x=(atual.x)-1, y=(atual.y)+1, z=atual.z}, {x=(atual.x)-1, y=atual.y, z=atual.z}, } local chances = math.random(100) if(chances<=porcentagem/8 and getCreatureHealth(cid)<getCreatureMaxHealth(cid)) then doCreatureAddHealth(cid, getCreatureMaxHealth(cid)/quantheal) if(i<=8 and i>1) then doSendDistanceShoot({x=posaura[i].x, y=posaura[i].y, z=posaura[i].z}, atual, tipoaura) else doSendDistanceShoot({x=posaura[1].x, y=posaura[1].y, z=posaura[1].z}, atual, tipoaura) end doSendMagicEffect(atual, efeitocura) end if(i==8) then doSendDistanceShoot({x=posaura[i].x, y=posaura[i].y, z=posaura[i].z}, {x=posaura[1].x, y=posaura[1].y, z=posaura[1].z}, tipoaura) elseif(i<8) then doSendDistanceShoot({x=posaura[i].x, y=posaura[i].y, z=posaura[i].z}, {x=posaura[i+1].x, y=posaura[i+1].y, z=posaura[i+1].z}, tipoaura) end if(i<=8 and getPlayerStorageValue(cid, aurastr)==2) then i = i+1 tm = tempo/8 return addEvent(efeitosAura,tm,i,tm,cid) elseif(i>8 and getPlayerStorageValue(cid, aurastr)==2) then return efeitosAura(1,0,cid) else return TRUE end else return TRUE end end function onEquip(player, item, slot, isCheck) local slot_ = player:getSlotItem(CONST_SLOT_RING) if slot_ and slot_.itemid == item.itemid then return false end doPlayerSendCancel(player,"Você Ativou a Aura!") setPlayerStorageValue(player, aurastr, 2) efeitosAura(1,tempo/8,player.uid) return true end function onDeEquip(player, item, slot, isCheck) if(getPlayerStorageValue(player, aurastr)==2) then setPlayerStorageValue(player, estr, os.time()+2) setPlayerStorageValue(player, aurastr, -1) doPlayerSendCancel(player,"Você Desativou a Aura!") return true end end Feito Isso Vamos Registrar esse Script Em Movements/movements.xml <movevent event="Equip" itemid="9003" slot="ring" script="aura.lua" /> <movevent event="DeEquip" itemid="9003" slot="ring" script="aura.lua" /> OBS: Usei o Golden Falcon como Item Agora em Creaturescripts/scripts crie um Arquivos Chamado aura.lua function onLogin(cid) if(getPlayerStorageValue(cid, 25950)==2) then return efeitosAura(1,tempo/8,cid.uid) end return TRUE end Caso o Player Deslogue com a Aura Ativa, Quando retornar Online Continuará com a Aura! Registrando no Login.lua player:registerEvent("AuraLogin") Em Creaturescripts/creaturescripts.xml <event type="login" name="AuraLogin" script="others/aura.lua" /> Nesse Caso minha Aura.lua está na Pasta others! Então é isso Pessoal, Qualquer problema Tentarei ajudar todos por Aqui Espero ter ajudado!
  7. Boa Tarde Recentemente transformei meu Global 12.51 em Global Custom! Há Alguns dias venho procurando nos Fóruns Sobre Alavancas que compra Backpack de Potions, Não achei nem uma intuitiva... até que Encontrei do @luanluciano93! Fiz algumas modificações nela, Como exausted e talz. Mais oque eu mais queria era que o Player Pudesse comprar a BP Cheia e não um Pack de 100x por Vez! @EDIT: OBS TFS 1.3 e Gostaria esse Sistema por Vocação e Level! Agradeço desde já! Creio que Expliquei ao Certo!
  8. Se Você Estiver utilizando Windows e usando o xampp, Procure mais sobre "webdav" Valeu!
  9. QuebradaZN postou uma resposta no tópico em Suporte Tibia OTServer
    @Celulose Resolvido, Retirei o ADDONS do Shop!
  10. QuebradaZN postou uma resposta no tópico em Suporte Tibia OTServer
    Boa Tarde Galera, Estou tendo problemas com o ShopGuild, em Poucas Palavras... [Error - GlobalEvent Interface] data/globalevents/scripts/shopguild.lua:onThink Description: data/globalevents/scripts/shopguild.lua:39: attempt to compare boolean with number stack traceback: data/globalevents/scripts/shopguild.lua:39: in function <data/globalevents/scripts/shopguild.lua:5> [Error - GlobalEvents::think] Couldn't execute event: shopguild e Estou utilizando esse Aqui https://tibiaking.com/forums/topic/32149-shopguild-points-100-add-em-player-offline-atualizado/ Obrigado desde já!
  11. config.lua: packetsPerSecond = 1000
  12. instale o screen "apt-get screen" Acesse a Pasta do OT screen ./theforgottenserver apos abrir feche o putty! Ta LINDO!
  13. QuebradaZN postou uma resposta no tópico em Suporte Tibia OTServer
    Boa Noite Galera, Há Alguns dias venho sofrendo muito com o Retorno do PagSeguro, Achei que poderia ser problemas por falta de php5-curl... entre outros, mais tranquilo, depois de algumas pesquisas encontrei que o CSF bloqueia o API do Pagseguro, Alguem Sofre com isso ou alguem sabe resolver? Quando vou comprar Points donate no Gesior 2012... quando vou finalizar o Pedido me deparo com isso! http://prntscr.com/kfzipa Obrigado desde Já... VALENDO +REP!
  14. Estou com esse Problema! @Natanael Beckman
  15. -- Advanced NPC System (Created by Jiddo), -- Modified by Talaturen. if(NpcSystem == nil) then -- Loads the underlying classes of the npcsystem. dofile(getDataDir() .. 'npc/lib/npcsystem/keywordhandler.lua') dofile(getDataDir() .. 'npc/lib/npcsystem/queue.lua') dofile(getDataDir() .. 'npc/lib/npcsystem/npchandler.lua') dofile(getDataDir() .. 'npc/lib/npcsystem/modules.lua') -- Global npc constants: -- Keyword nestling behavior. For more information look at the top of keywordhandler.lua KEYWORD_BEHAVIOR = BEHAVIOR_NORMAL_EXTENDED -- Greeting and unGreeting keywords. For more information look at the top of modules.lua FOCUS_GREETWORDS = {'hi', 'hello', 'hey'} FOCUS_FAREWELLWORDS = {'bye', 'farewell', 'cya'} -- The word for requesting trade window. For more information look at the top of modules.lua SHOP_TRADEREQUEST = {'offer', 'trade'} -- The word for accepting/declining an offer. CAN ONLY CONTAIN ONE FIELD! For more information look at the top of modules.lua SHOP_YESWORD = {'yes'} SHOP_NOWORD = {'no'} -- Pattern used to get the amount of an item a player wants to buy/sell. PATTERN_COUNT = '%d+' -- Talkdelay behavior. For more information, look at the top of npchandler.lua. NPCHANDLER_TALKDELAY = TALKDELAY_ONTHINK -- Conversation behavior. For more information, look at the top of npchandler.lua. NPCHANDLER_CONVBEHAVIOR = CONVERSATION_PRIVATE -- Constant strings defining the keywords to replace in the default messages. -- For more information, look at the top of npchandler.lua... TAG_PLAYERNAME = '|PLAYERNAME|' TAG_ITEMCOUNT = '|ITEMCOUNT|' TAG_TOTALCOST = '|TOTALCOST|' TAG_ITEMNAME = '|ITEMNAME|' TAG_QUEUESIZE = '|QUEUESIZE|' NpcSystem = {} -- Gets an npcparameter with the specified key. Returns nil if no such parameter is found. function NpcSystem.getParameter(key) local ret = getNpcParameter(tostring(key)) if((type(ret) == 'number' and ret == 0) or ret == nil) then return nil else return ret end end -- Parses all known parameters for the npc. Also parses parseable modules. function NpcSystem.parseParameters(npcHandler) local ret = NpcSystem.getParameter('idletime') if(ret ~= nil) then npcHandler.idleTime = tonumber(ret) end local ret = NpcSystem.getParameter('talkradius') if(ret ~= nil) then npcHandler.talkRadius = tonumber(ret) end local ret = NpcSystem.getParameter('message_greet') if(ret ~= nil) then npcHandler:setMessage(MESSAGE_GREET, ret) end local ret = NpcSystem.getParameter('message_farewell') if(ret ~= nil) then npcHandler:setMessage(MESSAGE_FAREWELL, ret) end local ret = NpcSystem.getParameter('message_decline') if(ret ~= nil) then npcHandler:setMessage(MESSAGE_DECLINE, ret) end local ret = NpcSystem.getParameter('message_needmorespace') if(ret ~= nil) then npcHandler:setMessage(MESSAGE_NEEDMORESPACE, ret) end local ret = NpcSystem.getParameter('message_needspace') if(ret ~= nil) then npcHandler:setMessage(MESSAGE_NEEDSPACE, ret) end local ret = NpcSystem.getParameter('message_sendtrade') if(ret ~= nil) then npcHandler:setMessage(MESSAGE_SENDTRADE, ret) end local ret = NpcSystem.getParameter('message_noshop') if(ret ~= nil) then npcHandler:setMessage(MESSAGE_NOSHOP, ret) end local ret = NpcSystem.getParameter('message_oncloseshop') if(ret ~= nil) then npcHandler:setMessage(MESSAGE_ONCLOSESHOP, ret) end local ret = NpcSystem.getParameter('message_onbuy') if(ret ~= nil) then npcHandler:setMessage(MESSAGE_ONBUY, ret) end local ret = NpcSystem.getParameter('message_onsell') if(ret ~= nil) then npcHandler:setMessage(MESSAGE_ONSELL, ret) end local ret = NpcSystem.getParameter('message_missingmoney') if(ret ~= nil) then npcHandler:setMessage(MESSAGE_MISSINGMONEY, ret) end local ret = NpcSystem.getParameter('message_needmoney') if(ret ~= nil) then npcHandler:setMessage(MESSAGE_NEEDMONEY, ret) end local ret = NpcSystem.getParameter('message_missingitem') if(ret ~= nil) then npcHandler:setMessage(MESSAGE_MISSINGITEM, ret) end local ret = NpcSystem.getParameter('message_needitem') if(ret ~= nil) then npcHandler:setMessage(MESSAGE_NEEDITEM, ret) end local ret = NpcSystem.getParameter('message_idletimeout') if(ret ~= nil) then npcHandler:setMessage(MESSAGE_IDLETIMEOUT, ret) end local ret = NpcSystem.getParameter('message_walkaway') if(ret ~= nil) then npcHandler:setMessage(MESSAGE_WALKAWAY, ret) end local ret = NpcSystem.getParameter('message_alreadyfocused') if(ret ~= nil) then npcHandler:setMessage(MESSAGE_ALREADYFOCUSED, ret) end local ret = NpcSystem.getParameter('message_placedinqueue') if(ret ~= nil) then npcHandler:setMessage(MESSAGE_PLACEDINQUEUE, ret) end local ret = NpcSystem.getParameter('message_buy') if(ret ~= nil) then npcHandler:setMessage(MESSAGE_BUY, ret) end local ret = NpcSystem.getParameter('message_sell') if(ret ~= nil) then npcHandler:setMessage(MESSAGE_SELL, ret) end local ret = NpcSystem.getParameter('message_bought') if(ret ~= nil) then npcHandler:setMessage(MESSAGE_BOUGHT, ret) end local ret = NpcSystem.getParameter('message_sold') if(ret ~= nil) then npcHandler:setMessage(MESSAGE_SOLD, ret) end -- Parse modules. for parameter, module in pairs(Modules.parseableModules) do local ret = NpcSystem.getParameter(parameter) if(ret ~= nil) then local number = tonumber(ret) if(number ~= nil and number ~= 0) then npcHandler:addModule(module:new()) end end end end end @Vodkart
  16. Até Hoje nada? tbm preciso de ajuda
  17. Boa Noite, Tenho um OTServer 8.60, Recentemente Compilei ele em uma VPS Ubuntu 14.04 Com uma Source OTXServer... Só que Depois que compilei venho me deparando com muitos e muitos Erros... Um Deles é... [Error - NpcScript Interface] data/npc/scripts/Markwin.lua Description: data/npc/scripts/Markwin.lua:1: attempt to index global 'KeywordHandler' (a nil value) [Warning - NpcEvents::NpcEvents] Cannot load script: data/npc/scripts/Markwin.lua Script do NPC: local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) 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 npcHandler:addModule(FocusModule:new()) Meu keywordhandler: -- Advanced NPC System (Created by Jiddo), -- Modified by TheForgottenServer Team. if(KeywordHandler == nil) then BEHAVIOR_SIMPLE = 1 -- Does not support nested keywords. If you choose this setting you must use a variable such as 'talkState' to keep track of how to handle keywords. BEHAVIOR_NORMAL = 2 -- Default behvaior. If a sub-keyword is not found, then the root is searched, not the parent hierarchy, BEHAVIOR_NORMAL_EXTENDED = 3 -- Same as BEHAVIOR_NORMAL but it also searches through the last node's parent. BEHAVIOR_COMPLEX = 4 -- Extended behavior. It a sub-keyword is not found, then the entire keyword hierarchy is searched upwards until root is reached. -- BEHAVIOR_NORMAL_EXTENDED is recommended as it (probably) mimics the behavior of real Tibia's NPCs the most. -- However, you are strongly recommended to test some (or all) other settings as well as it might suit you better. -- Also note that not much difference can be seen with the different settings unless you have a npc with a quite heavy -- nestled keyword hierarchy. -- Note: BEHAVIOR_SIMPLE should not be used unless you have any special reason to do so as it forces you to keep track of talkStates etc. -- This was pretty much the method used in the 2.0x versions of this system. It is here mainly for compability issues. KEYWORD_BEHAVIOR = BEHAVIOR_NORMAL_EXTENDED KeywordNode = { keywords = nil, callback = nil, parameters = nil, children = nil, parent = nil } -- Created a new keywordnode with the given keywords, callback function and parameters and without any childNodes. function KeywordNode:new(keys, func, param) local obj = {} obj.keywords = keys obj.callback = func obj.parameters = param obj.children = {} setmetatable(obj, self) self.__index = self return obj end -- Calls the underlying callback function if it is not nil. function KeywordNode:processMessage(cid, message) return (self.callback == nil or self.callback(cid, message, self.keywords, self.parameters, self)) end -- Returns true if message contains all patterns/strings found in keywords. function KeywordNode:checkMessage(message) local ret = true if(self.keywords.callback ~= nil) then return self.keywords.callback(self.keywords, message) end for i,v in ipairs(self.keywords) do if(type(v) == 'string') then local a, b = string.find(message, v) if(a == nil or b == nil) then ret = false break end end end return ret end -- Returns the parent of this node or nil if no such node exists. function KeywordNode:getParent() return self.parent end -- Returns an array of the callback function parameters assosiated with this node. function KeywordNode:getParameters() return self.parameters end -- Returns an array of the triggering keywords assosiated with this node. function KeywordNode:getKeywords() return self.keywords end -- Adds a childNode to this node. Creates the childNode based on the parameters (k = keywords, c = callback, p = parameters) function KeywordNode:addChildKeyword(keywords, callback, parameters) local new = KeywordNode:new(keywords, callback, parameters) return self:addChildKeywordNode(new) end -- Adds a pre-created childNode to this node. Should be used for example if several nodes should have a common child. function KeywordNode:addChildKeywordNode(childNode) table.insert(self.children, childNode) childNode.parent = self return childNode end KeywordHandler = { root = nil, lastNode = nil } -- Creates a new keywordhandler with an empty rootnode. function KeywordHandler:new() local obj = {} obj.root = KeywordNode:new(nil, nil, nil) setmetatable(obj, self) self.__index = self return obj end -- Resets the lastNode field, and this resetting the current position in the node hierarchy to root. function KeywordHandler:reset() self.lastNode = nil end -- Makes sure the correct childNode of lastNode gets a chance to process the message. -- The behavior of this function depends much on the KEYWORD_BEHAVIOR. function KeywordHandler:processMessage(cid, message) local node = self:getLastNode() if(node == nil) then error('No root node found.') return false end if(KEYWORD_BEHAVIOR == BEHAVIOR_SIMPLE) then local ret = self:processNodeMessage(node, cid, message) if(ret) then return true end elseif(KEYWORD_BEHAVIOR == BEHAVIOR_NORMAL or KEYWORD_BEHAVIOR == BEHAVIOR_NORMAL_EXTENDED) then local ret = self:processNodeMessage(node, cid, message) if(ret) then return true end if(KEYWORD_BEHAVIOR == BEHAVIOR_NORMAL_EXTENDED and node:getParent()) then node = node:getParent() -- Search through the parent. local ret = self:processNodeMessage(node, cid, message) if(ret) then return true end end if(node ~= self:getRoot()) then node = self:getRoot() -- Search through the root. local ret = self:processNodeMessage(node, cid, message) if(ret) then return true end end elseif(KEYWORD_BEHAVIOR == BEHAVIOR_COMPLEX) then while true do local ret = self:processNodeMessage(node, cid, message) if(ret) then return true end if(node:getParent() ~= nil) then node = node:getParent() -- Move one step upwards in the hierarchy. else break end end else error('Unknown keyword behavior.') end return false end -- Tries to process the given message using the node parameter's children and calls the node's callback function if found. -- Returns the childNode which processed the message or nil if no such node was found. function KeywordHandler:processNodeMessage(node, cid, message) local messageLower = string.lower(message) for i, childNode in pairs(node.children) do if(childNode:checkMessage(messageLower)) then local oldLast = self.lastNode self.lastNode = childNode childNode.parent = node -- Make sure node is the parent of childNode (as one node can be parent to several nodes). if(childNode:processMessage(cid, message)) then return true else self.lastNode = oldLast end end end return false end -- Returns the root keywordnode function KeywordHandler:getRoot() return self.root end -- Returns the last processed keywordnode or root if no last node is found. function KeywordHandler:getLastNode() if(KEYWORD_BEHAVIOR == BEHAVIOR_SIMPLE) then return self:getRoot() else return self.lastNode or self:getRoot() end end -- Adds a new keyword to the root keywordnode. Returns the new node. function KeywordHandler:addKeyword(keys, callback, parameters) return self:getRoot():addChildKeyword(keys, callback, parameters) end -- Moves the current position in the keyword hierarchy count steps upwards. Count defalut value = 1. -- This function MIGHT not work properly yet. Use at your own risk. function KeywordHandler:moveUp(count) local steps = count if(steps == nil) then steps = 1 end for i = 1, steps,1 do if(self.lastNode == nil) then break else self.lastNode = self.lastNode:getParent() or self:getRoot() end end return self.lastNode end end Obrigado Pela Compreensão de Todos. Desde Já Grato!
  18. Sempre usei minha Source... Só que Hoje fui compilar ela e me deparei com Esse ERRO! In file included from house.h:20:0, from actions.cpp:36: otsystem.h:18:0: error: unterminated #ifndef #ifndef __OTSYSTEM__ ^ Makefile:540: recipe for target 'actions.o' failed make[1]: *** [actions.o] Error 1 Estou Sem saber pra onde ir, Pesquiso e não encontro nada, Alguém pra Ajudar?

Informação Importante

Confirmação de Termo