Ir para conteúdo

Vodkart

Héroi
  • Registro em

Tudo que Vodkart postou

  1. kkk assim que tiver um tempo ja adiciono e edito aqui!! function onSay(cid, words, param) if param == '' then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "/find item name") return true end local item_id = tonumber(param) if(not item_id) then item_id = getItemIdByName(tostring(param), false) if(not item_id) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Item wich such name does not exists.") return true end end local str, player_depotitems, players_items, tile_items = "",{},{},{} local dp = db.getResult("SELECT `player_id`, `count` FROM `player_depotitems` WHERE `itemtype` = "..item_id),{} if (dp:getID() ~= -1) then repeat player_depotitems[#player_depotitems+1] = {dp:getDataInt("player_id"), dp:getDataInt("count") } until not(dp:next()) dp:free() end local pi = db.getResult("SELECT `player_id`, `count` FROM `player_items` WHERE `itemtype` = "..item_id),{} if (pi:getID() ~= -1) then repeat players_items[#players_items+1] = {pi:getDataInt("player_id"), pi:getDataInt("count") } until not(pi:next()) pi:free() end local hi = db.getResult("SELECT `tile_id`, `count` FROM `tile_items` WHERE `itemtype` = "..item_id),{} if (hi:getID() ~= -1) then repeat local tile = db.getResult("SELECT `house_id`, `x`, `y`, `z` FROM `tiles` WHERE `id` = "..hi:getDataInt("tile_id")),{} tile_items[#tile_items+1] = {tile:getDataInt("house_id"),tile:getDataInt("x"),tile:getDataInt("y"),tile:getDataInt("z")} until not(hi:next()) hi:free() end if #player_depotitems > 0 then str = str .. "#DEPOT ITEMS#\nQuantidade - Jogador\n" for i = 1, table.maxn(player_depotitems) do local name = getPlayerNameByGUID(player_depotitems[1]) local target_online = getPlayerByNameWildcard(name) str = str .. player_depotitems[2] .. ' ' .. name ..' | '..(not isPlayer(target_online) and 'Offline' or 'Online')..'\n' end end if #players_items > 0 then str = str .. (str ~= "" and "--------------//-------------\n\n#PLAYER ITEMS#\nQuantidade - Jogador\n" or "#PLAYER ITEMS#\nQuantidade - Jogador\n") for i = 1, table.maxn(players_items) do local name = getPlayerNameByGUID(players_items[1]) local target_online = getPlayerByNameWildcard(name) str = str .. players_items[2] .. ' ' .. getPlayerNameByGUID(players_items[1]) ..' | '..(not isPlayer(target_online) and 'Offline' or 'Online')..'\n' end end if #tile_items > 0 then str = str .. (str ~= "" and "--------------//-------------\n\n#TILE ITEMS#\nHouse ID - Tile Position\n" or "#TILE ITEMS#\nHouse ID -Tile Position\n") for i = 1, table.maxn(tile_items) do str = str .. tile_items[1] .. ' - {x = ' .. tile_items[2] ..', y = ' .. tile_items[3] ..', z = ' .. tile_items[4] ..'} \n' end end return doShowTextDialog(cid,item_id, str) end
  2. @Matheuus Tente trocar essa linha: doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, str) por doShowTextDialog(cid, 8304, str) ou também você pode usar esta função doPlayerPopupFYI(cid, str) lembrando que as funções "doPlayerSendTextMessage" e "doPlayerPopupFYI" tem limite de caracteres.
  3. -- Coded by Zoom.. local info, win, lose = "%s [Level: %s] foi mort%s pelo %s %s%s", "%s obteve %s frags seguidos após derrotar %s.", "%s acabou de impedir que %s fizesse uma sequência de %s frags seguidos." local frags, storage = {10, 15, 20, 25, 30, 35, 40, 45, 50}, 30045 function onDeath(cid, corpse, deathList) if(not isPlayer(cid)) then return true end local target = deathList[1] if not isCreature(target) or not isPlayer(target) then return true end doCreatureSetStorage(target, storage, getCreatureStorage(target, storage) + (getCreatureStorage(target, storage) == -1 and 2 or 1)) for _, pid in ipairs(getPlayersOnline()) do doPlayerSendChannelMessage(pid, '', info:format(getCreatureName(cid), getPlayerLevel(cid), getPlayerSex(cid) == 1 and "o" or "a", isPlayer(target) and "player" or "monstro", getCreatureName(target), isPlayer(target) and " [Level: "..getPlayerLevel(target).."]." or "."), TALKTYPE_CHANNEL_O, 0xF) for _, frag in ipairs(frags) do if(getCreatureStorage(target, storage) == frag) then doPlayerSendChannelMessage(pid, '', win:format(getCreatureName(target), frag, getCreatureName(cid)), TALKTYPE_CHANNEL_W, 0xF) end if(getCreatureStorage(cid, storage) >= frag) then doPlayerSendChannelMessage(pid, '', lose:format(getCreatureName(target), getCreatureName(cid), getCreatureStorage(cid, storage)+1), TALKTYPE_CHANNEL_RN, 0xF) end end end doCreatureSetStorage(cid, storage, 0) return true end
  4. a variável "waittime" não está declarada remova esta linha: exhaustion.set(cid, storage, waittime)
  5. local min_group_id = 1 -- aqui vai contar a partir do 2, 3, 4 ... function onSay(cid, words, param, channel) local query, str = db.getResult("SELECT `name`, `group_id` FROM `players` WHERE `group_id` > "..min_group_id), "--> STAFF <--\n\n[Group]Nick | Status\n" if (query:getID() ~= -1) then repeat local _ = query:getDataString("name") local target_online = getPlayerByNameWildcard(_) str = str .. "\n ["..getGroupInfo(query:getDataInt("group_id")).name.."]".._.." | "..(not isPlayer(target_online) and "Offline" or "Online") until not(query:next()) query:free() end doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, str) return true end
  6. local exausted = 0.3 -- em minutos local time = 5 -- tempo em segundos para voltar local points = 20 -- o tanto de skills ele ficara mais forte local condition = createConditionObject(CONDITION_ATTRIBUTES) setConditionParam(condition, CONDITION_PARAM_TICKS, time*1000) setConditionParam(condition, CONDITION_PARAM_STAT_MAGICLEVEL, points) setConditionParam(condition, CONDITION_PARAM_SKILL_FIST, points) setConditionParam(condition, CONDITION_PARAM_SKILL_SWORD, points) setConditionParam(condition, CONDITION_PARAM_SKILL_AXE, points) setConditionParam(condition, CONDITION_PARAM_SKILL_CLUB, points) setConditionParam(condition, CONDITION_PARAM_SKILL_DISTANCE, points) setConditionParam(condition, CONDITION_PARAM_SKILL_SHIELD, points) function onCastSpell(cid, var) if isPlayer(cid) and getPlayerAccess(cid) < 3 and getPlayerStorageValue(cid, 998879)-os.time() > 1 then local seetime = getPlayerStorageValue(cid, 998879)-os.time() local minutes, seconds = math.floor(seetime/60), math.floor(seetime%60) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Aguarde "..minutes.." minuto(s) e "..seconds.." segundo(s) para usar novamente!") return false end setPlayerStorageValue(cid, 998879, exausted*60+os.time()) local tar = getCreatureTarget(cid) if hasCondition(tar, CONDITION_MUTED) == true then return false end local pos = getCreaturePosition(cid) local target = getCreatureTarget(cid) local targetpos = getCreaturePosition(target) local Tile1 = {x=1083, y=473, z=8} -- position onde o player sera teleportado local Tile2 = {x=1083, y=471, z=8} -- position onde o target sera teleportado local from,to = {x=154, y=57, z=7},{x=158, y=62, z=7} -- ponto 1 ao ponto 2 da area em que ele sera teleportado local from,to1 = {x=159, y=49, z=7},{x=165, y=56, z=7} -- ponto 1 ao ponto 2 da area em que ele sera teleportado local from,to2 = {x=159, y=49, z=7},{x=165, y=57, z=7} -- ponto 1 ao ponto 2 da area em que ele sera teleportado local from,to3 = {x=159, y=49, z=7},{x=165, y=58, z=7} -- ponto 1 ao ponto 2 da area em que ele sera teleportado local from,to4 = {x=159, y=49, z=7},{x=165, y=59, z=7} -- ponto 1 ao ponto 2 da area em que ele sera teleportado if isInRange(pos, from, to) and isInRange(pos, from1, to1) and isInRange(pos, from2, to2) and isInRange(pos, from3, to3) and isInRange(pos, from4, to4) then doPlayerSendCancel(cid, "Você nao pode usar o Tsukuyomi World aqui!") return FALSE end if not isPlayer(target) then doPlayerSendCancel(cid, "Você so pode usar essa magia em players!") return FALSE end local function Teleport_Player(cid) if not isCreature(cid) then return LUA_ERROR end doTeleportThing(cid,pos) end local function Teleport_Target(target) if not isCreature(target) then return LUA_ERROR end doCreatureSetNoMove(target, 0) doTeleportThing(target,targetpos) end doAddCondition(cid, condition) doCreatureSetNoMove(target, 1) doTeleportThing(cid,Tile1) doTeleportThing(target,Tile2) doSendMagicEffect(targetpos, 252) addEvent(Teleport_Player, time*1000, cid) addEvent(Teleport_Target, time*1000, target) exhaustion.set(cid, storage, waittime) return TRUE end
  7. Legal, mas poderia ser diário né? digamos que poderia atualizar o rank por exemplo, todo dia as 20:00 horas... o que acha?
  8. @Tomarasdaf Esse sistema de labia é do seu ot? teria que pegar algumas infos para saber como funciona alguns sistemas alI!
  9. function onSay(cid, words, param) local level = getPlayerLevel(cid) local vocation = getPlayerVocationName(cid) local health, maxhealth = getCreatureHealth(cid), getCreatureMaxHealth(cid) local mana, maxmana = getCreatureMana(cid), getCreatureMaxMana(cid) local balance, pdays = getPlayerBalance(cid), getPlayerPremiumDays(cid) local fist, club, sword, axe = getPlayerSkillLevel(cid, 0), getPlayerSkillLevel(cid, 1), getPlayerSkillLevel(cid, 2), getPlayerSkillLevel(cid, 3) local distance, shield, fishing, magic = getPlayerSkillLevel(cid, 4), getPlayerSkillLevel(cid, 5), getPlayerSkillLevel(cid, 6), getPlayerMagLevel(cid) local lvldodge, lvlcrit = getPlayerStorageValue(cid, 48902),getPlayerStorageValue(cid, 48903) local cap = getPlayerFreeCap(cid) local text = "Vocation: "..vocation.."\nLevel: ".. level .."\nHP: ".. health .."/".. maxhealth .."\nMP: ".. mana .."/".. maxmana .."\nCapacity: ".. cap .."\nBalance: "..balance.."\nPremium Days: "..pdays.."\nDodge Level: ".. lvldodge .."\nCritical Level: ".. lvlcrit .."\nMagic Level: ".. magic .."\n\nFist: ".. fist .."\nClub: ".. club .."\nSword: ".. sword .."\nAxe: ".. axe .."\nDistance: ".. distance .."\nShield: ".. shield .."\nFishing: ".. fishing .."" doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, text) return true end
  10. @BangxD Mas a premiação vai ser diária?
  11. Troca essa linha: doShowTextDialog(cid, 5808, text) por essa: doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, text) quais outras informações, por exemplo?
  12. é que faltou a parte do creaturescript: e no login.lua antes do ultimo 'return true' adc isso: local sagastor = 578744 if getPlayerStorageValue(cid, sagastor) ~= -1 then local w = tostring(getPlayerStorageValue(cid, sagastor)):gsub(':', ''):explode(',') doCreatureChangeOutfit(cid, {lookType = tonumber(w[1])}) doPlayerSetVocation(cid, tonumber(w[2])) end
  13. ----------------------------------- ---------SCRIPT por PC98------------ NAO REMOVA OS CREDITOS ----------------------------------- function onUse(cid, item, frompos, item2, topos) ------------------ Inicio das Config ------------ local castle_one_name = "Castle" -- Nome do castelo 1 local storages = {154154,54321,123123} -- Storages ( se vc eh iniciante, deixe como está...) -------PREMIOs I N D I V I D U A L --------- local premio_por_vezes = 1 -- Premio por vezes de conquista de castelo. (1) = Ativo (0) = Desativa. local premio_vezes = 1 -- Caso ativo, a quantidade de conquista que o player tem, para ganhar PREMIO. local premio = 5956 -- ID do Premio local premio_cont = 1 -- Quantidade do Premio local premio_reset = 1 -- Resetar o contador do premio depois que atingir a meta?? (1) = SIM (0) = NAO -------FIM PREMIOs I N D I V I D U A L --------- ----------------- FIM DAS CONFIG ----------------- local hours = os.date("%X"):sub(1, 2) local h = tonumber(hours) if h < 16 or h > 17 then -- arrume a hora aqui doPlayerSendTextMessage(cid,18,"O castelo só pode ser invadida entre as 16 e 17 horas.")return true end local sto_ativ = getGlobalStorageValue(storages[2]) position = getCreaturePosition(cid) if item.itemid == 9826 then doTransformItem(item.uid,item.itemid-1) doPlayerSendCancel(cid,"O castelo ja foi invadida hoje.") --- função que não esta funcionando corretamente return false end if item.itemid == 9825 then for posx = 1254,1256 do -- checar posição X, começo e final da sala for posy = 690,690 do -- checar posicao Y, começo e final da sala local pos = {x=posx, y=posy, z=6, stackpos=253} -- posição que ira verificar se existe creatures (stackpos = 253) local creature = getThingfromPos(pos) -- pega informações da creature da posição if isMonster(creature.uid) then -- verifica se é um monster doTransformItem(item.uid,item.itemid+1) doPlayerSendTextMessage(cid,18,"Para dominar o castelo é necessario matar os guardas.") return false end end end end if isPlayerGuild(cid) == TRUE then if sto_ativ == 1 or sto_ativ == -1 then guildname = getPlayerGuildName(cid) guild = getPlayerGuildId(cid) guild_sto = getGlobalStorageValue(storages[3]) if guild ~= guild_sto then setPlayerStorageValue(cid,guild_sto,guild) if getPlayerStorageValue(cid,storages[1]) == -1 then setPlayerStorageValue(cid,storages[1],0) end sto_vezes = getPlayerStorageValue(cid,storages[1]) setGlobalStorageValue(storages[3],getPlayerGuildId(cid)) setPlayerStorageValue(cid,storages[1], sto_vezes + 1) sto_vezes_total = getPlayerStorageValue(cid,storages[1]) doBroadcastMessage("A guild "..getPlayerGuildName(cid).." acaba de dominar o castelo!") if premio_por_vezes == 1 then if getPlayerStorageValue(cid,storages[1]) == premio_vezes then if getItemWeightById(premio,1) <= getPlayerFreeCap(cid) then doPlayerAddItem(cid, premio,premio_cont) ----------------------------------------------- -- if premio_reset == 1 then -- setPlayerStorageValue(cid,storages[1],0) -- Resetar a contagem end -- ----------------------------------------------- -- else doPlayerSendTextMessage(cid, 18, "Voce nao tem capacidade para ganhar o item. Vamos verificar novamente em 10 segundos!") addEvent(additem,10000,cid,premio,premio_cont,premio_reset) end end end else doPlayerSendCancel(cid,"Sua guild já está dominando o castelo.") doTransformItem(item.uid,item.itemid+1) end else doPlayerSendCancel(cid,"O sistema está desativado") end else doPlayerSendCancel(cid,"É nescessario ter guild para dominar o castelo.") doTransformItem(item.uid,item.itemid+1) end end ------------------------- por pc98 ------------------------- por pc98 function isPlayerGuild(cid) if getPlayerGuildName(cid) ~= "" then return TRUE else return FALSE end end
  14. function onSay(cid, words, param) local level = getPlayerLevel(cid) local vocation = getPlayerVocationName(cid) local health, maxhealth = getCreatureHealth(cid), getCreatureMaxHealth(cid) local mana, maxmana = getCreatureMana(cid), getCreatureMaxMana(cid) local fist, club, sword, axe = getPlayerSkillLevel(cid, 0), getPlayerSkillLevel(cid, 1), getPlayerSkillLevel(cid, 2), getPlayerSkillLevel(cid, 3) local distance, shield, fishing, magic = getPlayerSkillLevel(cid, 4), getPlayerSkillLevel(cid, 5), getPlayerSkillLevel(cid, 6), getPlayerMagLevel(cid) local lvldodge, lvlcrit = getPlayerStorageValue(cid, 48902),getPlayerStorageValue(cid, 48903) local cap = getPlayerFreeCap(cid) local text = "Vocation: "..vocation.."\nLevel: ".. level .."\nHP: ".. health .."/".. maxhealth .."\nMP: ".. mana .."/".. maxmana .."\nCapacity: ".. cap .."\n\nDodge Level: ".. lvldodge .."\nCritical Level: ".. lvlcrit .."\nMagic Level: ".. magic .."\n\nFist: ".. fist .."\nClub: ".. club .."\nSword: ".. sword .."\nAxe: ".. axe .."\nDistance: ".. distance .."\nShield: ".. shield .."\nFishing: ".. fishing .."" doShowTextDialog(cid, 5808, text) return true end
  15. @Jinx mas vc usa a versão mods ou por script mesmo?
  16. @Jinx Ah sim, você quer um tile? porque no caso eu fiz só uma door, mas no próprio tópico eu já fiz um tile ali nos posts.
  17. Já fiz esse sistema, tanto o rank storage online, como offline... Abraços!
  18. Vodkart postou uma resposta no tópico em Suporte OTServer Derivados
    como esta sua lib? deixa eu ver como vc configuro as pos no seu script ai.
  19. e vc ja tem esse rank de frags mensal?
  20. acho que o problema está na pos, tenta assim: function isWalkable(pos) -- by Nord / editado por Omega if getTileThingByPos({x = pos.x, y = pos.y, z = pos.z, stackpos = 0}).itemid == 0 then return false elseif isCreature(getTopCreature(pos).uid) then return false elseif getTileInfo(pos).protection then return false elseif hasProperty(getThingFromPos(pos).uid, 3) or hasProperty(getThingFromPos(pos).uid, 7) then return false end return true end local positions = { {x=1051, y=1060, z=7}, {x=1052, y=1060, z=7}, {X=1046, Y=1061, Z=7}, {X=1046, Y=1061, Z=7}, {X=1046, Y=1061, Z=7}, {X=1050, Y=1040, Z=7}, {X=1050, Y=1040, Z=7}, {X=1051, Y=1041, Z=7}, {X=1074, Y=1058, Z=7}, {X=1074, Y=1058, Z=7}, {X=1075, Y=1059, Z=7}, {X=1011, Y=1046, Z=7}, {X=1011, Y=1045, Z=7}, {X=1014, Y=1046, Z=7} } function onSay(cid) if getPlayerAccess(cid) < 2 then return true end for i = 1, #positions do if isWalkable(positions[i]) then doCreateMonster(i == 1 and 'HERO Demon Gengar' or 'HERO Venusaur', positions[i]) end end return broadcastMessage("Oh nao , Pokemons misteriosos estao invadiando saffron corra para proteger a cidade", MESSAGE_EVENT_ADVANCE) end
  21. Vodkart postou uma resposta no tópico em Suporte Tibia OTServer
    OBS: ERA MAIS FÁCIL SÓ FAZER COM A TAG, COLOQUEI NO SCRIPT PARA VOCÊ TER UM MODELO... DE QUALQUER JEITO, VAI FUNCIONAR EDITEI A TAG ALI EM CIMA.
  22. Vodkart postou uma resposta no tópico em Suporte Tibia OTServer
    local velocidade = 0.9 local life = 0.30 local periodo = 1.5 -- tempo em segundos condition = createConditionObject(CONDITION_PARALYZE) setConditionParam(condition, CONDITION_PARAM_TICKS, periodo*1000) setConditionFormula(condition, -velocidade, 0, -velocidade, 0) function onStepIn(cid, item, pos, fromPos) if isPlayer (cid) then if item.itemid == 1050 then if hasCondition(cid, CONDITION_INFIGHT) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "Você perdeu 25% de life e levou paralyze por utilizar a escada com pz.") doAddCondition(cid,condition) doCreatureAddHealth(cid,-(getCreatureHealth(cid)*life)) end end end return true end TAG <movevent type="StepIn" itemid="1050" event="script" value="NOME DO SEU SCRIPT.lua"/>
  23. pokes = { ["Bulbasaur"] = {offense = 0.7, defense = 6, specialattack = 5, vitality = 5.5, agility = 190, exp = 90, level = 1, wildLvl = 60, type = "grass", type2 = "poison"}, ["Ivysaur"] = {offense = 1.2, defense = 7, specialattack = 8, vitality = 8.7, agility = 200, exp = 130, level = 40, wildLvl = 100, type = "grass", type2 = "poison"} } local adicional_vitality = 2 -- quanto de vitality irá aumentar for var, ret in pairs(pokes) do if ret.vitality ~= nil then print(ret.vitality+adicional_vitality) end end seria mais ou menos isso! qualquer coisa me manda o script todo para eu olhar.
  24. seria mais ou menos isso: pokes = { ["Bulbasaur"] = {offense = 0.7, defense = 6, specialattack = 5, vitality = 5.5, agility = 190, exp = 90, level = 1, wildLvl = 60, type = "grass", type2 = "poison"}, ["Ivysaur"] = {offense = 1.2, defense = 7, specialattack = 8, vitality = 8.7, agility = 200, exp = 130, level = 40, wildLvl = 100, type = "grass", type2 = "poison"} } local names = {"Bulbasaur", "Ivysaur"} -- pokemons que irão aumentar a vitality local adicional_vitality = 2 -- quanto de vitality irá aumentar for var, ret in pairs(pokes) do if isInArray(names, var) and ret.vitality ~= nil then print(ret.vitality+adicional_vitality) end end ---------------------- acredito que sua tabela "pokes" tenha mais pokemons, por isso fiz uma tabela "names" para filtrar só os pokemons que deseja aumentar a vitality.

Informação Importante

Confirmação de Termo