Ir para conteúdo

jNo

Membro
  • Registro em

  • Última visita

Tudo que jNo postou

  1. Esse é o original
  2. Não estou entendendo, não preciso criar um distro novo com as modificações?
  3. Estou tentando criar um distro sem o bug do elf bot de fast attack e buy npc que contem nesse projeto. Acontece no final quando vou selecionar os arquivos para finalizar o compile @Sekk se tiver os codigos pra isso também, me passa, que os que eu encontrei é meio suspeito. Você compilou em que programa? Da erro aqui no dev-cpp
  4. Em teste Nota 10, uma dúvida, se eu por assim, funciona? E o exaust ta igual o de potion? local t = {level = 8, mana = {750, 1000}, health = {500, 750}, voc_add = { [1,5,9] = {"mana"}, -- [id da vocação] [2,6,10] = {"mana"}, [3,7,11] = {"mana", "health"}, [4,8,12] = {"health"}} } ou [1] = {"mana"}, -- [id da vocação] [2] = {"mana"}, [3] = {"mana", "health"}, [4] = {"health"}, [5] = {"mana"}, -- [id da vocação] [6] = {"mana"}, [7] = {"mana", "health"}, [8] = {"health"}, [9] = {"mana"}, -- [id da vocação] [10] = {"mana"}, [11] = {"mana", "health"}, [12] = {"health"}} }
  5. Tentei criar umas potions no arquivo liquids, porém não deu certo não. Então, peço 2 action scripts se possivel: 1 - Mana Potion editavel, configuração de quantidade que sobe de mana, no caso, podendo ser, subir apenas 1000, ou, 500 até 1000. 2 - Health Potion + Mp, nesse é mais dificil, precisa identificar a vocação, se for Knight, só heala o Health, se for paladin, heala mapa e life (tipo a spirit potion). Não esquecer de colocar uma mensagemzinha, "aaaah" ao usar, e também, sair em roxo igual um potion, ou vermelho. (tem que ser infinito) --[2099] = {empty = 2099, splash = 47, mana = {750, 1000}, level = 8, vocations = {1, 2, 5, 6, 9, 10}, vocStr = "sorcerers and druids"}, -- potion editavel
  6. Tem alguns criados sim, então deve ser isso, não tem solução? E esse erro também não da lag né?
  7. Segue o erro em anexo e o script. <?xml version="1.0" encoding="ISO-8859-1"?> <mod name="Loot System" version="1.0" author="Vodkart And Mkalo" contact="none.com" enabled="yes"> <config name="Loot_func"><![CDATA[ info = { AutomaticDeposit = true, BlockMonsters = {}, BlockItemsList = {2123,2515}, Max_Slots = {free = 2, premium = 5}, Storages = {27000,28008,28006,28007}, items_price = {[2432] = 1000,[2514] = 5000, [2151] = 100,[2150] = 100,[2393] = 2000} } function setPlayerStorageTable(cid, storage, tab) local tabstr = "&" for i,x in pairs(tab) do tabstr = tabstr .. i .. "," .. x .. ";" end setPlayerStorageValue(cid, storage, tabstr:sub(1, #tabstr-1)) end function getPlayerStorageTable(cid, storage) local tabstr = getPlayerStorageValue(cid, storage) local tab = {} if type(tabstr) ~= "string" then return {} end if tabstr:sub(1,1) ~= "&" then return {} end local tabstr = tabstr:sub(2, #tabstr) local a = string.explode(tabstr, ";") for i,x in pairs(a) do local b = string.explode(x, ",") tab[tonumber(b[1]) or b[1]] = tonumber(b[2]) or b[2] end return tab end function isInTable(cid, item) for _,i in pairs(getPlayerStorageTable(cid, info.Storages[1]))do if tonumber(i) == tonumber(item) then return true end end return false end function addItemTable(cid, item) local x = {} for i = 1,#getPlayerStorageTable(cid, info.Storages[1]) do table.insert(x,getPlayerStorageTable(cid, info.Storages[1])[i]) end if x ~= 0 then table.insert(x,tonumber(item)) setPlayerStorageTable(cid, info.Storages[1], x) else setPlayerStorageTable(cid, info.Storages[1], {item}) end end function removeItemTable(cid, item) local x = {} for i = 1,#getPlayerStorageTable(cid, info.Storages[1]) do table.insert(x,getPlayerStorageTable(cid, info.Storages[1])[i]) end for i,v in ipairs(x) do if tonumber(v) == tonumber(item) then table.remove(x,i) end end return setPlayerStorageTable(cid, info.Storages[1], x) end function ShowItemsTabble(cid) local n,str = 0,"[+] Auto Loot Commands [+]\n\n!autoloot item name --> To add ou Remove item from list.\n!autoloot money --> To collect gold automatically.\n!autoloot clear --> To clear the list.\n!autoloot on/off --> To enable or disable the collecting of items in the system.\n\n[+] Auto Loot Info [+]\n\nSystem: "..(getPlayerStorageValue(cid, info.Storages[3]) <= 0 and "Activated" or "Disabled")..".\nGold Collecting: "..(getPlayerStorageValue(cid, info.Storages[2]) > 0 and "Activated" or "Disabled")..".\nAutomatic Item Selling: "..(getPlayerStorageValue(cid, info.Storages[4]) > 0 and "Activated" or "Disabled")..".\nBalance Total: ["..getPlayerBalance(cid).."] gp's.\nMaximum Slots: ["..#getPlayerStorageTable(cid, info.Storages[1]).."/"..(isPremium(cid) and info.Max_Slots.premium or info.Max_Slots.free).."]\n\n[+] Auto Loot Slots [+]\n\n" for i = 1,#getPlayerStorageTable(cid, info.Storages[1]) do n = n + 1 str = str.."Slot "..n.." - "..getItemNameById(getPlayerStorageTable(cid, info.Storages[1])[i]).."\n" end return doPlayerPopupFYI(cid, str) end function getContainerItems(containeruid) local items = {} local containers = {} if type(getContainerSize(containeruid)) ~= "number" then return false end for slot = 0, getContainerSize(containeruid)-1 do local item = getContainerItem(containeruid, slot) if item.itemid == 0 then break end if isContainer(item.uid) then table.insert(containers, item.uid) end table.insert(items, item) end if #containers > 0 then for i,x in ipairs(getContainerItems(containers[1])) do table.insert(items, x) end table.remove(containers, 1) end return items end function getItemsInContainerById(container, itemid) -- Function By Kydrai local items = {} if isContainer(container) and getContainerSize(container) > 0 then for slot=0, (getContainerSize(container)-1) do local item = getContainerItem(container, slot) if isContainer(item.uid) then local itemsbag = getItemsInContainerById(item.uid, itemid) for i=0, #itemsbag do table.insert(items, itemsbag[i]) end else if itemid == item.itemid then table.insert(items, item.uid) end end end end return items end function doPlayerAddItemStacking(cid, itemid, amount) -- revisado local item, _G = getItemsInContainerById(getPlayerSlotItem(cid, 3).uid, itemid), 0 if #item > 0 then for _ ,x in pairs(item) do local ret = getThing(x) if ret.type < 100 then doTransformItem(ret.uid, itemid, ret.type+amount) if ret.type+amount > 100 then doPlayerAddItem(cid, itemid, ret.type+amount-100) end break else _G = _G+1 end end if _G == #item then doPlayerAddItem(cid, itemid, amount) end else return doPlayerAddItem(cid, itemid, amount) end end function AutomaticDeposit(cid,item,n) local deposit = item == tonumber(2160) and (n*10000) or tonumber(item) == 2152 and (n*100) or (n*1) return doPlayerDepositMoney(cid, deposit) end function AutomaticItensSelling(cid, x) return doPlayerAddMoney(cid, x) and doPlayerDepositMoney(cid, x) end function corpseRetireItems(cid, pos) local check = false for i = 0, 255 do pos.stackpos = i tile = getTileThingByPos(pos) if tile.uid > 0 and isCorpse(tile.uid) then check = true break end end if check == true then local items = getContainerItems(tile.uid) for i,x in pairs(items) do if isInArray(getPlayerStorageTable(cid, info.Storages[1]), tonumber(x.itemid)) or getPlayerStorageValue(cid, info.Storages[2]) > 0 and isInArray({2148,2152,2160},tonumber(x.itemid)) then if isItemStackable(x.itemid) then if getPlayerStorageValue(cid, info.Storages[4]) > 0 and info.items_price[tonumber(x.itemid)] then AutomaticItensSelling(cid, (info.items_price[tonumber(x.itemid)]*x.type)) else doPlayerAddItemStacking(cid, x.itemid, x.type) if info.AutomaticDeposit == true and isInArray({2148,2152,2160}, tonumber(x.itemid)) then AutomaticDeposit(cid,x.itemid,x.type) end end else if getPlayerStorageValue(cid, info.Storages[4]) > 0 and info.items_price[tonumber(x.itemid)] then AutomaticItensSelling(cid, info.items_price[tonumber(x.itemid)]) else doPlayerAddItem(cid, x.itemid) end end doRemoveItem(x.uid) end end end end]]></config> <event type="login" name="LootLogin" event="script"><![CDATA[ function onLogin(cid) registerCreatureEvent(cid, "LootEventKIll") if isPremium(cid) and getPlayerStorageValue(cid, 27001) <= 0 then setPlayerStorageValue(cid, 27001, 1) elseif getPlayerStorageValue(cid, 27001) > 0 and not isPremium(cid) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "[Auto Loot] You premium is Over, Start a new list!") setPlayerStorageValue(cid, 27001, -1) setPlayerStorageValue(cid, info.Storages[1], -1) end return true end]]></event> <event type="kill" name="LootEventKIll" event="script"><![CDATA[ domodlib('Loot_func') function onKill(cid, target, lastHit) if isPlayer(cid) and getPlayerStorageValue(cid, info.Storages[3]) <= 0 and isMonster(target) and not isInArray(info.BlockMonsters, getCreatureName(target):lower()) then addEvent(corpseRetireItems, 0, cid ,getThingPos(target)) end return true end]]></event> <talkaction words="!autoloot" event="buffer"><![CDATA[ domodlib('Loot_func') local param, slots = param:lower(), isPremium(cid) and info.Max_Slots.premium or info.Max_Slots.free if not param or param == "" then ShowItemsTabble(cid) return true elseif tonumber(param) then doPlayerSendCancel(cid, "enter commands: !autoloot item name [+] !autoloot clean [+] !autoloot money [+] !autoloot on/off") return true elseif isInArray({"clean","limpar", "clear"}, param) then setPlayerStorageValue(cid, info.Storages[1], -1) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,"[Auto Loot] Your list has been cleaned.") return true elseif isInArray({"start","stop","on","off"}, param) then setPlayerStorageValue(cid, info.Storages[3], getPlayerStorageValue(cid, info.Storages[3]) <= 0 and 1 or 0) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,"[Auto Loot] "..(getPlayerStorageValue(cid, info.Storages[3]) > 0 and "Stopped" or "Started")..".") return true elseif isInArray({"money","gold","gps","dinheiro"}, param) then setPlayerStorageValue(cid, info.Storages[2], getPlayerStorageValue(cid, info.Storages[2]) <= 0 and 1 or 0) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,"[Auto Loot] Gold Colleting "..(getPlayerStorageValue(cid, info.Storages[2]) > 0 and "Activated" or "disabled")..".") return true elseif isInArray({"autoselling","autosell","autovender","vender"}, param) then setPlayerStorageValue(cid, info.Storages[4], getPlayerStorageValue(cid, info.Storages[4]) <= 0 and 1 or 0) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,"[Auto Loot] Automatic Itens Selling "..(getPlayerStorageValue(cid, info.Storages[4]) > 0 and "Activated" or "disabled")..".") return true end local item = getItemIdByName(param, false) if not item then doPlayerSendCancel(cid, "This item does not exist.") return true end local var = isInTable(cid, item) if isInArray({2148,2152,2160},item) then doPlayerSendCancel(cid, "Enter !autoloot money to add money in your list!") return true elseif isInArray(info.BlockItemsList, item) then doPlayerSendCancel(cid, "You can not add this item in the list!") return true elseif not var and #getPlayerStorageTable(cid, info.Storages[1]) >= slots then doPlayerSendCancel(cid, "max "..slots.." from auto loot") return true end if not var then addItemTable(cid, item) else removeItemTable(cid, item) end doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,not var and "you added the item "..param.." in the list" or "you removed the item "..param.." from the list") return true]]></talkaction> </mod>
  8. Não é isso, eu vi em uns ot um tal de castle 48 hrs, qual é?
  9. Se esse aqui é o 24 horas, qual é o 48 horas?
  10. jNo postou uma resposta no tópico em Suporte Tibia OTServer
    Qual é o código, e como eu removo o bug da hotkey de comprar itens agrupáveis, e remover o fast attack do mesmo nas sources? Procurei pacas no portal, e como eu lembro que o em 2012 teve um reset, acho que foi apagado. 0.4
  11. jNo postou uma resposta no tópico em Suporte Tibia OTServer
    As vezes é direto no login.lua (creaturescript), tem uma função no meu
  12. 17:10 Welcome to house number 2! Não encontrei um que mostre todos que atacaram, ou por monstros, mais enfim, obrigado. function onKill(cid, target, lastHit) if not isPlayer(target) or not isPlayer(cid) then return true end doBroadcastMessage(""..getCreatureName(target).." on level ["..getPlayerLevel(target).."] just got killed for "..getCreatureName(cid).." on level ["..getPlayerLevel(cid).."].", MESSAGE_STATUS_CONSOLE_BLUE) return true end
  13. Um chat, onde se o player morrer para outro player, aparece em azul. Fulano level 500 died for Cilano level 100. E em vermelho Fulano level 500 died to Demon. E o outro script, quando o player entrar na house, exibir uma mensagem "Welcome to house number XXX", pois as houses no meu server são todas numeradas, tipo. It belongs to house 'Unnamed House #2'. Nobody owns this house. It costs 15700000 gold coins. ItemID: [1253].
  14. Exatamente isso, obrigado!
  15. Não está ignorando o teleport caso eu tenha a storage. Acho que eu vou tentar explicar novamente; Eu tenho uma sala de premios, onde o usuário vai clicar na porta, e vai ser teleportado para X posição dentro da sala, e tera 15 segundos para pegar o premio, se não vai tomar tp para outro local, certo? (È o que você fez acima) E a parte da storage, era para o seu proprio script verificar, no final desses 15 segundos, se ele tem essa storage, se ele tiver, não manda o mesmo para outra posição. Porque não vai mandar para outra posição? Pq no bau que ele vai abrir, vai dar essa storage, e automaticamente o script do proprio bau, vai kikar ele. O que aconteceu ate agr? Mesmo abrindo o bau, e ganhando a storage, ele toma kick do seu script. É uma estrategia que eu quero bolar pro player não ficar off na sala de premios, e muito menos pegar mais que 1 premio por vez. Script do meu bau. local items = { --[numeração] = {id = ID DO ITEM, count = QUANTIDADE DO ITEM, c = CHANCE} [1]={id=8884, count=1, c=10}, -- item 1 [2]={id=8890, count=1, c=10}, -- item 2 [3]={id=8888, count=1, c=10}, -- item 3 [4]={id=8905, count=1, c=10}, -- item 4 [5]={id=10511, count=1, c=10}, -- item 5 [6]={id=10515, count=1, c=10}, -- item 6 [7]={id=10514, count=1, c=10}, -- item 7 [8]={id=10139, count=1, c=10}, -- item 8 [9]={id=10719, count=1, c=10}, -- item 9 [10]={id=12608, count=75, c=10}, -- item 9 } function getRandomItem(t) local i = math.random(1, #t) i = t[i] if math.random(1, 100) <= i.c then return i end return getRandomItem(t) end function onUse(cid, item, fromPosition, itemEx, toPosition) local i = getRandomItem(items) local effect = 28, 29, 30 local Pos = {x = 1695, y = 1637, z = 7} local PlayerPos = {x = getPlayerPosition(cid).x + 0, y = getPlayerPosition(cid).y + 0, z = getPlayerPosition(cid).z} local stor = 98543 if getPlayerStorageValue(cid,stor) == -1 then doPlayerAddItem(cid, i.id, i.count) doTeleportThing(cid, Pos) doSendMagicEffect(PlayerPos,effect) doSendAnimatedText(getPlayerPosition(cid), "Event Box!", TEXTCOLOR_YELLOW) doPlayerSendTextMessage(cid, 27, "You opened a chest event and won "..i.count.."x "..getItemNameById(i.id)..(i.count > 1 and "s" or "")..".") doRemoveItem(item.uid, 1) setPlayerStorageValue(cid,stor,1) else doPlayerSendTextMessage(cid,25,"The chest event is empty.") end return true end Seu script: local t = { newpos = {x=1679,y=1638,z=7}, backpos = {x=1695,y=1637,z=7}, storage = 98543, tempo = 15 -- em segundos } function onUse(cid, item, fromPosition, itemEx, toPosition) doTeleportThing(cid, t.newpos) doSendMagicEffect(t.newpos, CONST_ME_TELEPORT) if getPlayerStorageValue(cid, t.storage) == -1 then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Você tem " .. t.tempo .. " segundos para pegar o prêmio.") addEvent(checkInativity, t.tempo*1000 ,cid) end return true end function checkInativity(cid) if isPlayer(cid) then doTeleportThing(cid, t.backpos) doSendMagicEffect(t.backpos, CONST_ME_TELEPORT) end end
  16. Um script básico, onde o jogador ao utilizar determinado item, seja estátua ou porta, seja teleportado para uma localização. Feito isso, no mesmo script, após ser teleportado recebe uma mensagem, "just time 15 seg", e inicia a contagem de 15 segundos, ao final do tempo, ele toma teleport para outra posição. Mas, se tiver uma storage após iniciar a contagem, cancela o teleport. (O script tem que funcionar toda vez que clicar na porta ou estátua) Se ficou difícil de compreender, tentarei explicar de outra forma. Enviado do meu iPhone usando Tapatalk
  17. Uma pergunta besta, se eu for compilar agora para Linux, todas essas modificações já estão salvas nas sources disponibilizadas ou terei que acrescentar novamente?
  18. Olá, gostaria de uma modificação se possível no script abaixo, caso o char deslogue ou morra, não perca o seu uso, no caso, ele continue recebendo a experiencia dobrada até o termino dos minutos. mod.xml <?xml version="1.0" encoding="UTF-8"?> <mod name="AdvancedExpPotionSystem" enabled="yes" author="MatheusMkalo" forum="XTibia.com"> <!-- Configs and Functions --> <config name="PotionExpConfigs"><![CDATA[ ------ CONFIGURE SEU SCRIPT ------ TRUE ou FALSE configs = { time = 30, ---- TIME IN MINUTES needpa = TRUE, needlvl = {TRUE, level = 1500}, costmana = {TRUE, mana = 500}, addrate = 100, -- Exp que vai adicionar em % removeonuse = TRUE } function getTime(s) local n = math.floor(s / 60) s = s - (60 * n) return n, s end CreatureEventChecker = function(event, ...) -- Colex if isCreature(arg[1]) then event(unpack(arg)) end end creatureEvent = function(event, delay, ...) -- Colex addEvent(CreatureEventChecker, delay, event, unpack(arg)) end function getPlayerExtraExpRate(cid) -- By MatheusMkalo return (getPlayerRates(cid)[8]-1)*100 end ]]></config> <!-- exppotion.lua --> <action itemid="12328" event="script"><![CDATA[ domodlib('PotionExpConfigs') if getPlayerStorageValue(cid, 49016) >= 1 then return doPlayerSendCancel(cid, "Voce ja esta sobre efeito de uma double exp potion.") end if configs.needpa and not isPremium(cid) then return doPlayerSendCancel(cid, "Voce precisar ser premium para usar.") end if configs.needlvl[1] and getPlayerLevel(cid) < configs.needlvl.level then return doPlayerSendCancel(cid, "Voce precisa ser " .. configs.needlvl.level .. " para usar a double exp potion.") end if configs.costmana[1] then if getCreatureMana(cid) < configs.costmana.mana then return doPlayerSendCancel(cid, "Voce precisar ter " .. configs.costmana.mana .. " de mana para usar a double exp potion.") else doCreatureAddMana(cid, -configs.costmana.mana) end end if configs.removeonuse then doRemoveItem(item.uid, 1) end for i = configs.time*60, 1, -1 do local a = math.floor(i/60) .. ":" .. i - (60 * math.floor(i/60)) if #a < 4 then a = string.sub(a,1,2) .. "0" .. string.sub(a, 3) end if i == configs.time*60 then creatureEvent(doPlayerSendCancel, configs.time*60*1000, cid, "Efeito Final da double exp potion.") end creatureEvent(doPlayerSendCancel, (configs.time*60-i)*1000, cid, "O efeito da double exp potion vai acabar em "..a..".") end doPlayerSetExperienceRate(cid, (1+(configs.addrate/100))+(getPlayerExtraExpRate(cid)/100)) creatureEvent(doPlayerSetExperienceRate, configs.time *60*1000, cid, 1+(getPlayerExtraExpRate(cid)/100-(configs.addrate/100))) doPlayerSendTextMessage(cid, 22, "Agora voce esta com a experiencia dobrada.") setPlayerStorageValue(cid, 49016, os.time()) creatureEvent(setPlayerStorageValue, configs.time *60*1000, cid, 49016, 0) return TRUE ]]></action> <creaturescript type="login" name="ExpPotion" event="script"><![CDATA[ domodlib('PotionExpConfigs') local time = configs.time if os.time()-getPlayerStorageValue(cid, 49016) < time *60 then doPlayerSetExperienceRate(cid, (1+(configs.addrate/100))+(getPlayerExtraExpRate(cid)/100)) creatureEvent(doPlayerSetExperienceRate, (time*60-(os.time()-getPlayerStorageValue(cid, 49016))) * 1000, cid, 1+(getPlayerExtraExpRate(cid)/100-(configs.addrate/100))) creatureEvent(setPlayerStorageValue, (time*60-(os.time()-getPlayerStorageValue(cid, 49016))) * 1000 , cid, 49016, 0) for i = (time*60-(os.time()-getPlayerStorageValue(cid, 49016))), 1, -1 do local a = math.floor(i/60) .. ":" .. i - (60 * math.floor(i/60)) if #a < 4 then a = string.sub(a,1,2) .. "0" .. string.sub(a, 3) end if i == (time*60-(os.time()-getPlayerStorageValue(cid, 49016))) then creatureEvent(doPlayerSendCancel, (time*60-(os.time()-getPlayerStorageValue(cid, 49016)))*1000, cid, "O efeito da double exp potion termina em.") end creatureEvent(doPlayerSendCancel, ((time*60-(os.time()-getPlayerStorageValue(cid, 49016)))-i)*1000, cid, "o efeito da double exp potion termina em "..a..".") end end return TRUE ]]></creaturescript> </mod> creaturescript.lua function onLogout(cid) local stor = 49016 local expfinal = 1 if getPlayerStorageValue(cid, stor) >= 1 then setPlayerStorageValue(cid, stor, 0) doPlayerSetExperienceRate(cid,expfinal) else end return true end creaturescripts/perderefeito.xml <event type="logout" name="perderefeito" event="script" value="perderefeito.lua"/> creaturescripts/login.lua registerCreatureEvent(cid, "perdereifeto")
  19. Consta esse erro no distro: --[[ Gems System By Maxwell Denisson(MaXwEllDeN) V 1.0 --]] function onUse(cid, item, frompos, item2, topos) if(isInArray({2, 6, 10}, getPlayerVocation(cid))) then AtiveGem(cid, item) end else (getPlayerStorageValue(cid, 45783) > 0) then doPlayerSendCancel(cid, "Você já está sob o efeito de uma Magic Gem.") return true end
  20. Valeu paixão, funcionou perfeitamente!
  21. Obrigado pela atenciosidade. Deu certo, dúvidas sanadas!
  22. Eu mudei aqui, farei o teste a noite, obrigado por enquanto

Informação Importante

Confirmação de Termo