Ir para conteúdo

Wakon

Héroi
  • Registro em

  • Última visita

Tudo que Wakon postou

  1. Wakon postou uma resposta no tópico em Suporte Tibia OTServer
    Retire o local bag = doPlayerAddItem(cid, backpackgmp_id, 1) na linha 10 e coloque doPlayerAddItem(cid, gmp_id, cargasgmp_id) no lugar, depois retire doAddContainerItem(bag, gmp_id, cargasgmp_id) na linha 14 e se quiser pode retirar a variável backpackgmp_id = 9774.
  2. Wakon postou uma resposta no tópico em Suporte Tibia OTServer
    Testa assim: local t = { gmpid = 7590, -- Item a ser vendido cost = 15000, -- Valor count = 100 -- Cargas } local name = getItemNameById(t.gmpid) ----- End Config ----- function onUse(cid, item, fromPosition, itemEx, toPosition) if doPlayerRemoveMoney(cid, t.cost) == TRUE then doPlayerAddItem(cid, t.gmpid, t.count) doSendAnimatedText(fromPosition, "", TEXTCOLOR_YELLOW) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You have purchased a "..t.count.." ".. name .."s for ".. t.cost .." gold.") for i=1,3 do end else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "You need ".. t.cost .." gold coins for buy "..t.count.." ".. name .."s.") end return FALSE end Editei seu script pra ficar mais organizado e pegar a quantidade na mensagem.
  3. Funcionar, funciona, eu uso esse volume serial a muito tempo, já tentou executar o Volume Serial como administrador?
  4. Troca pelo seu script de potions: Geralmente fica em "Data/actions/scripts/liquids/potions.lua". local config = { removeOnUse = "yes", usableOnTarget = "yes", -- can be used on target? (fe. healing friend) splashable = "no", range = -1, realAnimation = "no", -- make text effect visible only for players in range 1x1 multiplier = { health = 1.0, mana = 1.0 } } config.removeOnUse = getBooleanFromString(config.removeOnUse) config.usableOnTarget = getBooleanFromString(config.usableOnTarget) config.splashable = getBooleanFromString(config.splashable) config.realAnimation = getBooleanFromString(config.realAnimation) local POTIONS = { [8704] = {empty = 7636, splash = 42, health = {50, 100}}, -- small health potion [7618] = {empty = 7636, splash = 42, health = {100, 200}}, -- health potion [7588] = {empty = 7634, splash = 42, health = {200, 400}, level = 50, vocations = {3, 4, 7, 8}, vocStr = "knights and paladins"}, -- strong health potion [7591] = {empty = 7635, splash = 42, health = {500, 700}, level = 80, vocations = {4, 8}, vocStr = "knights"}, -- great health potion [8473] = {empty = 7635, splash = 42, health = {800, 1000}, level = 130, vocations = {4, 8}, vocStr = "knights"}, -- ultimate health potion [7620] = {empty = 7636, splash = 47, mana = {70, 130}}, -- mana potion [7589] = {empty = 7634, splash = 47, mana = {110, 190}, level = 50, vocations = {1, 2, 3, 5, 6, 7}, vocStr = "sorcerers, druids and paladins"}, -- strong mana potion [7590] = {empty = 7635, splash = 47, mana = {250, 350}, level = 80, vocations = {1, 2, 5, 6}, vocStr = "sorcerers and druids"}, -- great mana potion [8472] = {empty = 7635, splash = 43, health = {200, 400}, mana = {110, 190}, level = 80, vocations = {3, 7}, vocStr = "paladins"} } local exhaust = createConditionObject(CONDITION_EXHAUST) setConditionParam(exhaust, CONDITION_PARAM_TICKS, (getConfigInfo('timeBetweenExActions') - 100)) function onUse(cid, item, fromPosition, itemEx, toPosition) local potion = POTIONS[item.itemid] if(not potion) then return false end if(not isPlayer(itemEx.uid) or (not config.usableOnTarget and cid ~= itemEx.uid)) then if(not config.splashable) then return false end if(toPosition.x == CONTAINER_POSITION) then toPosition = getThingPosition(item.uid) end doDecayItem(doCreateItem(POOL, potion.splash, toPosition)) doRemoveItem(item.uid, 1) if(not potion.empty or config.removeOnUse) then return true end if(fromPosition.x ~= CONTAINER_POSITION) then doCreateItem(potion.empty, fromPosition) else doPlayerAddItem(cid, potion.empty, 1) end return true end if(hasCondition(cid, CONDITION_EXHAUST)) then doPlayerSendDefaultCancel(cid, RETURNVALUE_YOUAREEXHAUSTED) return true end if(((potion.level and getPlayerLevel(cid) < potion.level) or (potion.vocations and not isInArray(potion.vocations, getPlayerVocation(cid)))) and not getPlayerCustomFlagValue(cid, PLAYERCUSTOMFLAG_GAMEMASTERPRIVILEGES)) then doCreatureSay(itemEx.uid, "Only " .. potion.vocStr .. (potion.level and (" of level " .. potion.level) or "") .. " or above may drink this fluid.", TALKTYPE_ORANGE_1) return true end if(config.range > 0 and cid ~= itemEx.uid and getDistanceBetween(getCreaturePosition(cid), getCreaturePosition(itemEx.uid)) > config.range) then return false end local health = potion.health if(health and not doCreatureAddHealth(itemEx.uid, math.ceil(math.random(health[1], health[2]) * config.multiplier.health))) then return false end local mana = potion.mana if(mana and not doPlayerAddMana(itemEx.uid, math.ceil(math.random(mana[1], mana[2]) * config.multiplier.mana))) then return false end doSendMagicEffect(getThingPosition(itemEx.uid), CONST_ME_MAGIC_BLUE) if(not config.realAnimation) then doCreatureSay(itemEx.uid, "Aaaah...", TALKTYPE_ORANGE_1) else for i, tid in ipairs(getSpectators(getThingPosition(itemEx.uid), 1, 1)) do if(isPlayer(tid)) then doCreatureSay(itemEx.uid, "Aaaah...", TALKTYPE_ORANGE_1, false, tid) end end end doAddCondition(cid, exhaust) doRemoveItem(item.uid, 1) if(not potion.empty or config.removeOnUse) then return true end if(fromPosition.x ~= CONTAINER_POSITION) then doCreateItem(potion.empty, fromPosition) else doPlayerAddItem(cid, potion.empty, 1) end return true end Não esqueça de configurar ao seu gosto os heals.
  5. Pra novas versões creio que não, se tiver eu desconheço.
  6. Wakon postou uma resposta no tópico em Suporte Tibia OTServer
    Testa assim: local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE) setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, false) setCombatParam(combat, COMBAT_PARAM_DISPEL, CONDITION_CURSED) function onCastSpell(cid, var) return doCombat(cid, combat, var) end
  7. http://www.tibiaking.com/forum/topic/34344-otclient-067-1071/
  8. Se não me engano, Object Builder ainda está em produção então não liberou + que 10.53 isso no github. Terá que esperar eles atualizar pra versão 10.76!
  9. No Object Builder tem uma função para criar um novo em baixo dos outfits, tenta usar ele e compilar.
  10. Alguns items em "Data/items/items.xml", alguns em "data/movements/movements.xml" e "data/weapons/weapons.xml".
  11. Wakon postou uma resposta no tópico em Playground (Off-topic)
    O cara falou como se você tivesse a obrigação de parar o que tá fazendo pra ajudar ele, asokdaposk.
  12. Wakon postou uma resposta no tópico em Playground (Off-topic)
    Por que se não ajuda o cara, bruno? AEFUHAEUFH
  13. Modifiquei pra você, testa ai: 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 function creatureSayCallback(cid, type, msg) if(not npcHandler:isFocused(cid)) then return false end local talkUser = NPCHANDLER_CONVbehavior == CONVERSATION_DEFAULT and 0 or cid local item = 2159 -- ID Do item a ser cobrado. local price = 10 -- Quantidade a ser cobrada. local vocations = {5,6,7,8} if(msgcontains(msg, 'promotion') or msgcontains(msg, 'vip promotion')) then selfSay('Você quer ser promovido vip por '..price..' moedas? {yes} ', cid) talkState[talkUser] = 1 elseif msgcontains(msg, 'yes') and talkState[talkUser] == 1 then if isInArray(vocations, getPlayerVocation(cid)) then if getPlayerItemCount(cid, item) >= price then if getPlayerVocation(cid) == 5 then doPlayerSetVocation(cid, 9) doPlayerRemoveItem(cid, item, price) end if getPlayerVocation(cid) == 6 then doPlayerSetVocation(cid, 10) doPlayerRemoveItem(cid, item, price) end if getPlayerVocation(cid) == 7 then doPlayerSetVocation(cid, 11) doPlayerRemoveItem(cid, item, price) end if getPlayerVocation(cid) == 8 then doPlayerSetVocation(cid, 12) doPlayerRemoveItem(cid, item, price) end selfSay('Parabens! Você foi promovido vip! ', cid) talkState[talkUser] = 0 else selfSay('Você não tem ' .. price .. ' moedas para ser promovido a vip...', cid) talkState[talkUser] = 0 end else selfSay('Desculpe, você precisa ter a member promotion para ser promovido vip.', cid) talkState[talkUser] = 0 end elseif msg == "no" and talkState[talkUser] >= 1 then selfSay("Then not", cid) talkState[talkUser] = 0 npcHandler:releaseFocus(cid) end return TRUE end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) EDIT: Esqueci de colocar pra cobrar o item, mals.
  14. Testa ai: local config = { storage = 27364, exhauststorage = 20932, destino = {x = 1010, y = 1020, z = 7}, days = { ["Monday"] = {itemid = 2160, count = 15, storagevalue = 8}, ["Tuesday"] = {itemid = 2160, count = 20, storagevalue = 9}, ["Wednesday"] = {itemid = 6570, count = 1, storagevalue = 10}, ["Thursday"] = {itemid = 6570, count = 1, storagevalue = 11}, ["Friday"] = {itemid = 6570, count = 1, storagevalue = 12}, ["Saturday"] = {itemid = 6570, count = 1, storagevalue = 13}, ["Sunday"] = {itemid = 2160, count = 10, storagevalue = 14} } } function onUse(cid, item, fromPosition, itemEx, toPosition) local x = config.days[os.date("%A",os.time())] if(getPlayerStorageValue(cid, config.storage) == x.storagevalue and exhaustion.check(cid, config.exhauststorage)) then return doPlayerSendCancel(cid, "The chest is empty, come back tomorrow for a new reward.") end local info = getItemInfo(x.itemid) if(x.count > 1) then text = x.count .. " " .. info.plural else text = info.article .. " " .. info.name end local itm = doCreateItemEx(x.itemid, x.count) if(doPlayerAddItemEx(cid, itm, false) ~= RETURNVALUE_NOERROR) then doSendMagicEffect(getThingPos(cid), CONST_ME_POFF) text = "You have found a reward weighing " .. getItemWeight(itm) .. " oz. It is too heavy or you have not enough space." else text = "You have received " .. text .. "." setPlayerStorageValue(cid, config.storage, x.storagevalue) exhaustion.set(cid, config.exhauststorage, 24*60*60) doTeleportThing(cid, config.destino) doRemoveItem(item.uid, 1) end doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, text) return true end
  15. Criei o script de anuncio pra você: Em "Data/talkactions/scripts" copie e cole um arquivo .lua e renomeie para anuncio.lua, apague tudo e cole isso: function onSay(cid, words, param) local b = string.lower(param) local config = { tmp = 10, -- Tempo em minutos para usar novamente. storage = 45989, lvl = 20, -- Level minimo. cost = 50000 -- Custo para anunciar. } if param == "" then return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"Digite sua mensagem.") end if getPlayerStorageValue(cid, config.storage) > os.time() then return doPlayerSendTextMessage(cid, 25, "Você precisa esperar " .. getPlayerStorageValue(cid, config.storage) - os.time() .. ' segundo' .. (getPlayerStorageValue(cid, config.storage) - os.time() == 1 and "" or "s") .. " para usar novamente.") end if getPlayerLevel(cid) < config.lvl then return doPlayerSendCancel(cid, "Você precisa ser level "..config.lvl.." para usar esse comando!") end if doPlayerRemoveMoney(cid, config.cost) == TRUE then doBroadcastMessage("[Player:] "..getPlayerName(cid)..": "..b.."") doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Você enviou sua mensagem, aguarde "..config.tmp.." minutos para enviar novamente!") setPlayerStorageValue(cid, config.storage, os.time() + config.tmp*60) else return doPlayerSendCancel(cid, "Você precisa de "..config.cost.." gp's para usar este comando!") end return true end Depois em talkactions.xml, adicione a seguinte tag: <talkaction words="!anunciar" script="anuncio.lua" /> Quanto ao outro script, creio que seja possível sim, vamos ver se algum superior consegue fazer
  16. Tenta assim, tira o que eu te passei do login.lua e coloca isso no lugar: if getPlayerStorageValue(cid, 55885) <= 0 and getPlayerPremiumDays(cid) >= 1 then setPlayerStorageValue(cid, 55885, 1) doPlayerSetVocation(cid, getPlayerVocation(cid) + 4) return true end local vocstatus = getPlayerStorageValue(cid, 55885) if vocstatus == 1 and getPlayerPremiumDays(cid) >= 1 then doPlayerSetVocation(cid, getPlayerVocation(cid) + 4) end
  17. NPC: days = 30 vipcoins = 3031 quant = 10 local storage = 55885 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 function santaNPC(cid, message, keywords, parameters, node) if(not npcHandler:isFocused(cid)) then return false end if (parameters.present == true) then if isPlayer(cid) then if getPlayerItemCount(cid,vipcoins) >= quant and getPlayerVocation(cid) <= 4 and getPlayerVocation(cid) >= 1 then doPlayerAddPremiumDays(cid,days) doPlayerRemoveItem(cid,vipcoins,quant) npcHandler:say('Obrigado, aqui estao seus 30 dias de Premium', cid) doPlayerSendTextMessage(cid, 22, "Congratulations, you've been promoted..") doSendMagicEffect(getPlayerPosition(cid), 12) doPlayerSetVocation(cid, getPlayerVocation(cid) + 4) setPlayerStorageValue(cid, storage, 1) elseif getPlayerItemCount(cid,vipcoins) >= quant and getPlayerVocation(cid) > 4 then doPlayerAddPremiumDays(cid,days) doPlayerRemoveItem(cid,vipcoins,quant) npcHandler:say('Obrigado, aqui estao seus 30 dias de Premium', cid) else npcHandler:say('Voce nao tem Coins suficientes!', cid) end end npcHandler:resetNpc() return true end end npcHandler:setMessage(MESSAGE_GREET, "Ola. Eu vendo dias de {Premium}.") local noNode = KeywordNode:new({'no'}, santaNPC, {present = false}) local yesNode = KeywordNode:new({'yes'}, santaNPC, {present = true}) local node = keywordHandler:addKeyword({'premium'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Voce gostaria de comprar 30 dias de Premium por 10 Coins?'}) node:addChildKeywordNode(yesNode) node:addChildKeywordNode(noNode) npcHandler:addModule(FocusModule:new()) Vá em "Data/Creaturescripts/scripts" abra o login.lua e adicione o seguinte: local vocstatus = getPlayerStorageValue(cid, 55885) if vocstatus == 1 and getPlayerPremiumDays(cid) >= 1 then doPlayerSetVocation(cid, getPlayerVocation(cid) + 4) return TRUE end Testei aqui e tá de boa, ele tira a promotion se estiver free, caso de algum bug me fale.
  18. Wakon postou uma resposta no tópico em Suporte Tibia OTServer
    Tenta trocar pelo seu: local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_HEALING) setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE) setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, false) setCombatParam(combat, COMBAT_PARAM_TARGETPLAYERSORSUMMONS, true) setCombatParam(combat, COMBAT_PARAM_DISPEL, CONDITION_PARALYZE) setHealingFormula(combat, COMBAT_FORMULA_LEVELMAGIC, 5, 5, 10, 12) local area = createCombatArea(AREA_CIRCLE3X3) setCombatArea(combat, area) function onCastSpell(cid, var) return doCombat(cid, combat, var) end Script é o mass healing.lua!
  19. Wakon postou uma resposta no tópico em Suporte Tibia OTServer
    Testa ai: "Data/talkactions/scripts/banned.lua" function onSay(cid, words, param, channel) local t = param:explode(",") local name, days = t[1], tonumber(t[2]) local player = getPlayerByName(t[1]) if isPlayer(getPlayerByName(name)) == false then return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"O jogador "..name.." não esta online ou não existe.") end if name then if days then local acc = getAccountIdByName(name) if acc ~= 0 then local tempo = days * 24 * 3600 doAddAccountBanishment(acc, target, os.time() + tempo, 5, 2, 'Você foi banido pelo administrador' , 0) doRemoveCreature(player) else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Este player não existe.") end else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Você não pode adicionar essa quantidade de dia(s) de dias de banimento.") end end return TRUE end Tag em "Data/talkactions/talkactions.xml": <talkaction words="/ban" acess="5" event="script" value="banned.lua"/>
  20. Wakon postou uma resposta no tópico em Suporte Tibia OTServer
    Ainda não há servidores disponíveis, os projetos de Avatar como o "Avatar Online", são bases de Tibia totalmente modificas pela equipe deles.
  21. Usa MageBot, pode ser o Demo Version mesmo, só IPChanger funciona, se for windows 8+ recomendo executar como administrador: O Bruno comentou um negocio em outro post para resolver, se quiser tentar também: Amigo, utilizo o da OTLand normalmente aqui. Tenta assim: Seleciona a versão 10.76 e clica em Apply sem estar com o Tibia aberto, assim ele vai abrir o Tibia com o IP alterado.
  22. Crie o Cliente proprio alterando o IP pelo hex, segue o tutorial: http://www.tibiaking.com/forum/topic/28214-tutorial-criando-client-proprio-sem-vapus-completo/ E depois faz o tutorial de MC: http://www.tibiaking.com/forum/topic/43758-old-client-mc-todas-vers%C3%B5es-e-client-pr%C3%B3prio/
  23. Wakon postou uma resposta no tópico em Suporte Bots
    Neutral Bot, Xeno Bot, WindBot (Recomendo).
  24. Dei uma testada aqui, faltou definir tb: local configInv = { ["09:15"] = {nome = "Demon", pos = {x=1035, y=1028, z=7}, monster = {"2 Demon"}}, } function onThink(interval, lastExecution) local hours = tostring(os.date("%X")):sub(1, 5) local tb = configInv[hours] if configInv[hours] then if getGlobalStorageValue(95473) == hours then return true end doBroadcastMessage(hours .. " - " .. tb.nome .. " iniciou.") for _,x in pairs(tb.monster) do for s = 1, tonumber(x:match("%d+")) do doSummonCreature(x:match("%s(.+)"), tb.pos) end end setGlobalStorageValue(95473, hours) end return true end
  25. Tem sim amigo, testa esses dois tutoriais: http://www.tibiaking.com/forum/topic/11099-aprenda-a-fazer-seu-proprio-client/ http://www.tibiaking.com/forum/topic/28214-tutorial-criando-client-proprio-sem-vapus-completo/ Se tiver algum problema é só falar.

Informação Importante

Confirmação de Termo