Ir para conteúdo

jNo

Membro
  • Registro em

  • Última visita

Tudo que jNo postou

  1. jNo postou uma resposta no tópico em Suporte Tibia OTServer
    Verifica se o /unban Fulano não funciona Se for sql, vai na tabela de bans e exclui o jogador da lista
  2. Olá amigo, não consigo, não sou programador, só sei quebrar uns galhos quando consigo. Deixa essa atividade pro @KotZletY
  3. Não tenho o script @KotZletY, não precisa ser necessariamente uma coisa complexa (spell), pode serl (talk) só que saia algum efeito, e um pop up ou mensagem no default dizendo quando o player utilizar o comando: ID 9942 spyexiva "Fulano" Fulano is hunting Demon (porque o script detecta o ultimo bicho que o jogador matou) (Você precisa possuir o item na bp para utilizar esse comando) (Espere 60 segundos para utilizar novamente o comando) obs: Obrigado pelo alerta, ficarei atento Caso seja meio que dificil, deixa quieto, dps procuro outra coisa pra dar função ao item.
  4. <channel id="10" active="no" logged="yes" name="Death Channel"/>
  5. Perfeito mestre Vod, desculpa ai, mas você podia acrescer mais uma informação no codigo acima? No caso, essa parte do meu codigo que mostra os critical e dogdge no look function getPlayerFrags(cid) local time = os.time() local times = {today = (time - 86400), week = (time - (7 * 86400))} local contents, result = {day = {}, week = {}, month = {}}, db.getResult("SELECT `pd`.`date`, `pd`.`level`, `p`.`name` FROM `player_killers` pk LEFT JOIN `killers` k ON `pk`.`kill_id` = `k`.`id` LEFT JOIN `player_deaths` pd ON `k`.`death_id` = `pd`.`id` LEFT JOIN `players` p ON `pd`.`player_id` = `p`.`id` WHERE `pk`.`player_id` = " .. getPlayerGUID(cid) .. " AND `k`.`unjustified` = 1 AND `pd`.`date` >= " .. (time - (30 * 86400)) .. " ORDER BY `pd`.`date` DESC") if(result:getID() ~= -1) then repeat local content = {date = result:getDataInt("date")} if(content.date > times.today) then table.insert(contents.day, content) elseif(content.date > times.week) then table.insert(contents.week, content) else table.insert(contents.month, content) end until not result:next() result:free() end local size = { day = table.maxn(contents.day), week = table.maxn(contents.week), month = table.maxn(contents.month) } return size.day + size.week + size.month end function onLogin(cid) registerCreatureEvent(cid, "fraglook") return true end function onLook(cid, thing, position, lookDistance) if isPlayer(thing.uid) and thing.uid ~= cid then doPlayerSetSpecialDescription(thing.uid,' [Frags: '..getPlayerFrags(thing.uid)..'], [Critical: '..math.max(0,(tonumber(getCreatureStorage(thing.uid,48903)) or 0))..'], [Dodge: '..math.max(0,(tonumber(getCreatureStorage(thing.uid,48902)) or 0))..']') return true elseif thing.uid == cid then doPlayerSetSpecialDescription(cid,' [Frags: '..getPlayerFrags(cid)..'], [Critical: '..math.max(0,(tonumber(getCreatureStorage(cid,48903)) or 0))..'], [Dodge: '..math.max(0,(tonumber(getCreatureStorage(cid,48902)) or 0))..']') local string = 'You see yourself.' if getPlayerFlagValue(cid, PLAYERFLAG_SHOWGROUPINSTEADOFVOCATION) then string = string..' You are '.. getPlayerGroupName(cid) ..'.' elseif getPlayerVocation(cid) ~= 0 then string = string..' You are '.. getPlayerVocationName(cid) ..'.' else string = string..' You have no vocation.' end string = string..getPlayerSpecialDescription(cid)..'' if getPlayerNameByGUID(getPlayerPartner(cid), false, false) ~= nil then string = string..' You are '.. (getPlayerSex(cid) == 0 and 'wife' or 'husband') ..' of '.. getPlayerNameByGUID(getPlayerPartner(cid)) ..'.' end if getPlayerGuildId(cid) > 0 then string = string..' You are ' .. (getPlayerGuildRank(cid) == '' and 'a member' or getPlayerGuildRank(cid)) ..' of the '.. getPlayerGuildName(cid) string = getPlayerGuildNick(cid) ~= '' and string..' ('.. getPlayerGuildNick(cid) ..').' or string..'.' end if getPlayerFlagValue(cid, PLAYERCUSTOMFLAG_CANSEECREATUREDETAILS) then string = string..'\nHealth: ['.. getCreatureHealth(cid) ..' / '.. getCreatureMaxHealth(cid) ..'], Mana: ['.. getCreatureMana(cid) ..' / '.. getCreatureMaxMana(cid) ..'].' string = string..'\nIP: '.. doConvertIntegerToIp(getPlayerIp(cid)) ..'.' end if getPlayerFlagValue(cid, PLAYERCUSTOMFLAG_CANSEEPOSITION) then string = string..'\nPosition: [X:'.. position.x..'] [Y:'.. position.y..'] [Z:'.. position.z..'].' end doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, string) return false end return true end
  6. jNo postou uma resposta no tópico em Suporte Tibia OTServer
    Da hora, compartilha ai esse script. obs: Eu jogava seu ot, mas você reseta um punhado de vez HSIAhuAHSiuahuiaS
  7. Pega um item, pode ser um fire bug, vai no actions e cria um renovador de stamina, e poe pra vender em um npc, mas facil assim function onUse(cid, item, fromPosition, itemEx, toPosition) local cfg = {} cfg.refuel = 42 * 60 * 1000 if(getPlayerStamina(cid) >= cfg.refuel) then doPlayerSendCancel(cid, "Sua stamina ja está completa.") elseif(not isPremium(cid)) then doPlayerSendCancel(cid, "Você precisa ser premium account.") else doPlayerSetStamina(cid, cfg.refuel) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Sua stamina foi recarregada, por favor relogue.") doRemoveItem(item.uid,1) end return true end
  8. rateStaminaGain = 3 muda o 3 por 15, ou no rateStaminaLoss = 1 poe 0 que nao perde stamina
  9. Coloca isso no config lua rateStaminaLoss = 1 rateStaminaGain = 3 rateStaminaThresholdGain = 12 staminaRatingLimitTop = 40 * 60 staminaRatingLimitBottom = 14 * 60 staminaLootLimit = 14 * 60 rateStaminaAboveNormal = 1.5 rateStaminaUnderNormal = 0.5 staminaThresholdOnlyPremium = true
  10. caralho, e mesmo, q otario que eu sou, apaga esse topico entao pra mim? vou arrumar agr
  11. Entendi, então, se eu por 100 no script da alavanca funciona? Deixa eu ver @KotZletY deu muito certo, obrigado, ainda bem que tem gente inteligente nesse mundo HuiHSuAHSiHSiAHSusA
  12. Coloca a area non pvp e coloca isso no creaturescript function onAreaCombat(cid, ground, position, aggressive) if aggressive == true and getWorldType() == 1 then return false end return true end registerCreatureEvent(cid, "BloquearMagia") <event type="areacombat" name="BloquearMagia" event="script" value="blokedmagia.lua"/>
  13. Olá, preciso de um item que, só permite o jogador utilizar um "exiva especial", se ele possui o item, (o item não some e tem delay de 60 segundos para usar) e caso ele possua, ao usar o "spyexiva", ele recebe uma mensagem dizendo qual foi o ultimo bicho que o player x matou E como faz para abrir os chat automaticamente quando loga? Como criar um chat, em que só apareça os loot dos bichos mortos? Loot Channel
  14. /i é o script que ja vem no ot pra fazer itens com god !aol do player, que esta a acima alavanca a cima também
  15. Está constando esse erro no distro: 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 coins = {[2148] = 1, [2152] = 100, [2160] = 10000} function countMoneyOnPos(pos) local money = 0 for stack = 1, 50 do pos.stackpos = stack local item = getThingFromPos(pos) if item and item.uid > 0 then if coins[item.itemid] then money = money + coins[item.itemid] * item.type end end end return money end local posCoal = {x = 988, y = 1004, z = 5} -- POSIÇÃO DO COAL, ONDE O GOLD DEVE ESTAR local posNpc = {x = 989, y = 1004, z = 5} -- POSIÇÃO DO NPC local pos = getPosByDir(getThingPos(cid), getCreatureLookDirection(cid), 1) -- NÃO ALTERAR if msgcontains(msg, 'l') or msgcontains(msg, 'L') or msgcontains(msg, 'low') or msgcontains(msg, 'Low') then if countMoneyOnPos(pos) > 0 then if math.random(1, 6) <= 3 then doPlayerAddMoney(cid, countMoneyOnPos(pos)*2) doRemoveItem(getTileItemById(pos, 2148).uid) repeat until not doRemoveItem(getTileItemById(pos, 2148).uid) doRemoveItem(getTileItemById(pos, 2152).uid) repeat until not doRemoveItem(getTileItemById(pos, 2152).uid) doRemoveItem(getTileItemById(pos, 2160).uid) repeat until not doRemoveItem(getTileItemById(pos, 2160).uid) doSendMagicEffect(posNpc, 26) doSendMagicEffect(posNpc, 28) doCreatureSay(getNpcId(), getCreatureName(cid)..' tirou o numero '..math.random(1, 3)..', parabéns!', TALKTYPE_ORANGE_1) else doRemoveItem(getTileItemById(pos, 2148).uid) repeat until not doRemoveItem(getTileItemById(pos, 2148).uid) doRemoveItem(getTileItemById(pos, 2152).uid) repeat until not doRemoveItem(getTileItemById(pos, 2152).uid) doRemoveItem(getTileItemById(pos, 2160).uid) repeat until not doRemoveItem(getTileItemById(pos, 2160).uid) doSendMagicEffect(posNpc, 2) doSendMagicEffect(posNpc, 26) doCreatureSay(getNpcId(), getCreatureName(cid)..' tirou o numero '..math.random(4, 6)..', tente novamente!', TALKTYPE_ORANGE_1) end else doCreatureSay(getNpcId(), getCreatureName(cid)..', coloque uma quantia de gold no recipiente para começar a apostar!', TALKTYPE_ORANGE_1) end elseif msgcontains(msg, 'h') or msgcontains(msg, 'H') or msgcontains(msg, 'high') or msgcontains(msg, 'High') then if countMoneyOnPos(pos) > 0 then if math.random(1, 6) <= 3 then doPlayerAddMoney(cid, countMoneyOnPos(pos)*2) doRemoveItem(getTileItemById(pos, 2148).uid) repeat until not doRemoveItem(getTileItemById(pos, 2148).uid) doRemoveItem(getTileItemById(pos, 2152).uid) repeat until not doRemoveItem(getTileItemById(pos, 2152).uid) doRemoveItem(getTileItemById(pos, 2160).uid) repeat until not doRemoveItem(getTileItemById(pos, 2160).uid) doSendMagicEffect(posNpc, 26) doSendMagicEffect(posNpc, 28) doCreatureSay(getNpcId(), getCreatureName(cid)..' tirou o numero '..math.random(4, 6)..', parabéns!', TALKTYPE_ORANGE_1) else doRemoveItem(getTileItemById(pos, 2148).uid) repeat until not doRemoveItem(getTileItemById(pos, 2148).uid) doRemoveItem(getTileItemById(pos, 2152).uid) repeat until not doRemoveItem(getTileItemById(pos, 2152).uid) doRemoveItem(getTileItemById(pos, 2160).uid) repeat until not doRemoveItem(getTileItemById(pos, 2160).uid) doSendMagicEffect(posNpc, 2) doSendMagicEffect(posNpc, 26) doCreatureSay(getNpcId(), getCreatureName(cid)..' tirou o numero '..math.random(1, 3)..', tente novamente!', TALKTYPE_ORANGE_1) end else doCreatureSay(getNpcId(), getCreatureName(cid)..', coloque uma quantia de gold no recipiente para começar a apostar!', TALKTYPE_ORANGE_1) end end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new())
  16. Meu aol tem 100 cargas, se eu fizer ele normalmente por comando !aol, ele vem com 1 carga, e se pegar ele por alavanca também, mas se eu fizer ele com comando do god, /i, fica com 100 cargas, que tipo de problema é esse? !aol function onSay(cid, words, param) if doPlayerRemoveMoney(cid, 20000) == TRUE then local bp = doPlayerAddItem(cid, 2138, 1) doSendMagicEffect(getCreaturePosition(cid),13) doCreatureSay(cid, "Você comprou um Aol", TALKTYPE_ORANGE_1) else doCreatureSay(cid, "Você não tem dinheiro para comprar um Quest Aol", TALKTYPE_ORANGE_1) doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF) end end Alavanca local config = { price = 50, -- Quantidade de items necessário para comprar. count = 1, -- Quantidade que irá vender. item = 2138, -- ID do item que vai vender. need = 9971, -- ID do item necessário. alavancaStr = 3332, -- Storage para salvar e checar o tempo time = 5 -- Tempo de espera para usar novamente } function onUse(cid, item) local pos = getCreaturePosition(cid) if item.itemid == 10030 then if getPlayerStorageValue(cid, config.alavancaStr) - os.time() <= 0 then if doPlayerRemoveItem(cid, config.need, config.price) then doPlayerAddItem(cid, config.item, config.count) doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, "Você acaba de comprar "..config.count.." "..getItemNameById(config.item)..".") doSendMagicEffect(pos, CONST_ME_MAGIC_BLUE) else doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, "Desculpe, você precisa de ".. config.price .." ".. getItemNameById(config.need) .." para comprar.") doSendMagicEffect(pos, CONST_ME_POFF) end setPlayerStorageValue(cid, config.alavancaStr, os.time() + config.time) else doPlayerSendCancel(cid, "Voce deve aguardar " ..getPlayerStorageValue(cid, config.alavancaStr) - os.time().." segundos para tentar novamente...") end end return true end
  17. Então, o problema desses 2 actions é que se o item estiver no chão e for usado, ele não some, já no corpo ou mochila, some, precisava de uma correção, ou algo que obriga-se o jogador por o item na bp para usar, o que for mais facil. local s = 19000 function onUse(cid, item, itemEx, toPosition, fromPosition) if getPlayerStorageValue(cid, s) <= 0 then setPlayerStorageValue(cid, s, 1) doPlayerSendTextMessage(cid, 22, "Parabéns! Você ganhou um novo outfit.") doSendMagicEffect(getCreaturePosition(cid), 30) doPlayerRemoveItem(cid, 8300, 1) doPlayerAddOutfitId(cid, 33, 1) else doPlayerSendCancel(cid, "Você já tem esse outfit.") end return true end local s = 19001 local outfit = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 33} function onUse(cid, item, itemEx, toPosition, fromPosition) if getPlayerStorageValue(cid, s) <= 0 then setPlayerStorageValue(cid, s, 1) doPlayerSendTextMessage(cid, 22, "Parabéns! Você tem todos outfit.") doSendMagicEffect(getCreaturePosition(cid), 30) doPlayerRemoveItem(cid, 2346, 1) for _, v in pairs(outfit) do doPlayerAddOutfitId(cid, v, 3) end else doPlayerSendCancel(cid, "Você já tem todos os outfits.") end return true end
  18. @Vodkart a xp ainda não esta ganhando quando esta em uso
  19. Está dando esse erro no distro de onthink desse script, e também quando esta em uso, não ganha xp... creaturescript.lua --[[ Gems System By Maxwell Denisson(MaXwEllDeN) V 1.0 --]] function onThink(cid) local gemid = getPlayerStorageValue(cid, 71473) if (getPlayerStorageValue(cid, 45783) > 0) and (checkGemTimeFinish(cid, gemid)) then deAtiveGem(cid, gemid) doRemoveCondition(cid, CONDITION_ATTRIBUTES) end return true end function onLogin(cid) local gemid = getPlayerStorageValue(cid, 71473) if (getPlayerStorageValue(cid, 45783) > 0) and (checkGemTimeFinish(cid, gemid)) then deAtiveGem(cid, gemid) end if (gemid > 0) and (not checkGemTimeFinish(cid, gemid)) then local pedra = pedras_add[gemid] if not (pedra) then return true end local skills = pedra.skills doAddCondition(cid, pedras_add_c[gemid]) doPlayerSendTextMessage(cid, 27, "O efeito da gema mágica foi retomado.") doPlayerSetExperienceRate(cid, pedra.xp) registerCreatureEvent(cid, "EffectCheck") sendGemEffect(cid, gemid) end registerCreatureEvent(cid, "EffectDeath") return true end lib.lua --[[ Gems System By Maxwell Denisson(MaXwEllDeN) V 1.0 --]] function getPrefixGEMs(val) -- By MaXwEllDeN return (val > 1) and "s" or "" end pedras_add = { [8299] = { -- Pedra Preta skills = { [0] = 15, -- Fist Fighting [1] = 15, -- Club Fighting [2] = 15, -- Sword Fighting [3] = 15, -- Axe Fighting [4] = 0, -- Distance Fighting [5] = 15, -- Shielding [6] = 0, -- Magic Level }, xp = 0, -- Ex, 2 x o Xp do serv time = 30, color = {50, 50, 50, 50}, }, [8303] = { -- Pedra Rosa skills = { [0] = 0, -- Fist Fighting [1] = 0, -- Club Fighting [2] = 0, -- Sword Fighting [3] = 0, -- Axe Fighting [4] = 15, -- Distance Fighting [5] = 15, -- Shielding [6] = 0, -- Magic Level }, xp = 0, -- Ex, 2 x o Xp do serv time = 30, color = {180, 180, 180}, }, [8301] = { -- Pedra Amarela skills = { [0] = 0, -- Fist Fighting [1] = 0, -- Club Fighting [2] = 0, -- Sword Fighting [3] = 0, -- Axe Fighting [4] = 0, -- Distance Fighting [5] = 15, -- Shielding [6] = 15, -- Magic Level }, xp = 0, -- Ex, 2 x o Xp do serv time = 30, color = {210, 210, 210}, }, [8302] = { -- Pedra Azul skills = { [0] = 0, -- Fist Fighting [1] = 0, -- Club Fighting [2] = 0, -- Sword Fighting [3] = 0, -- Axe Fighting [4] = 0, -- Distance Fighting [5] = 15, -- Shielding [6] = 15, -- Magic Level }, xp = 0, -- Ex, 2 x o Xp do serv time = 30, color = {35, 35, 35, 35}, }, } pedras_add_c = { [8299] = createConditionObject(CONDITION_ATTRIBUTES), [8303] = createConditionObject(CONDITION_ATTRIBUTES), [8301] = createConditionObject(CONDITION_ATTRIBUTES), [8302] = createConditionObject(CONDITION_ATTRIBUTES) } local conditions = {CONDITION_PARAM_SKILL_FIST, CONDITION_PARAM_SKILL_CLUB, CONDITION_PARAM_SKILL_SWORD,CONDITION_PARAM_SKILL_AXE, CONDITION_PARAM_SKILL_DISTANCE, CONDITION_PARAM_SKILL_SHIELD, CONDITION_PARAM_STAT_MAGICPOINTS} for a, b in pairs(pedras_add_c) do setConditionParam(pedras_add_c[a], CONDITION_PARAM_TICKS, pedras_add[a].time*60*1000) for c = 0, 6 do setConditionParam(pedras_add_c[a], conditions[c + 1], pedras_add[a].skills[c]) end end function sendGemEffect(uid, itemid) if (isCreature(uid)) then local pedra = pedras_add[itemid] local msgs = {"´ . ,", ". ´ ,", "` . ,", ", ` ."} if (getPlayerStorageValue(uid, 45783) > 0) then addEvent(sendGemEffect, 575, uid, itemid) doSendAnimatedText(getThingPos(uid), msgs[math.random(#msgs)], pedra.color[math.random(#pedra.color)]) end end return true end function isGemActivated(cid) return (getPlayerStorageValue(cid, gems.storage[getPlayerVocation(cid)]) > 0) and true or false end function checkGemTimeFinish(uid, gemid) local timpo = (getPlayerStorageValue(uid, 45783)-os.time())*(-1) return (timpo >= pedras_add[gemid].time*60) and true or false end function deAtiveGem(uid, gemid) local pedra = pedras_add[gemid] local skills = pedra.skills for a = 0, #skills-1 do doPlayerAddSkill(uid, a, -skills[a]) end doRemoveCondition(uid, pedras_add_c[gemid]) doPlayerSetExperienceRate(uid, 1) setPlayerStorageValue(uid, 45783, -1) setPlayerStorageValue(uid, 71473, -1) doPlayerSendTextMessage(uid, 27, "O efeito da sua gema acabou.") return true end function AtiveGem(uid, item) local pedra = pedras_add[item.itemid] if not (pedra) then return false end local skills = pedra.skills doAddCondition(uid, pedras_add_c[item.itemid]) doPlayerSendTextMessage(uid, 27, "Você está sob o efeito da gema mágica, e o efeito dela durará por ".. pedra.time .. " minuto".. getPrefixGEMs(pedra.time) .. ".") setPlayerStorageValue(uid, 71473, item.itemid) setPlayerStorageValue(uid, 45783, os.time()) sendGemEffect(uid, item.itemid) doPlayerSetExperienceRate(uid, pedra.xp) registerCreatureEvent(uid, "EffectCheck") doRemoveItem(item.uid, 1) return true end
  20. Simplesmente obrigada <3, reputadíssimo

Informação Importante

Confirmação de Termo