Jump to content
Close

Vodkart

Hero
  • Content Count

    2754
  • Joined

  • Days Won

    110

Vodkart last won the day on August 30

Vodkart had the most liked content!

About Vodkart

  • Rank
    Systems Developer!
  • Birthday 09/05/1999

Profile Information

  • Gender
    Masculino
  • I am
    Scripter

Recent Profile Visitors

61833 profile views
  1. @bpm91 depois me passa o seu mods e npc por pm que eu vou fazer uma alteração pra você!!
  2. function getPlayerReset(cid) local check = db.getResult("SELECT `reset` FROM `players` WHERE `id`= "..getPlayerGUID(cid)) return check:getDataInt("reset") <= 0 and 0 or check:getDataInt("reset") end local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_TARGETCASTERORTOPMOST, true) setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_HOLYDAMAGE) setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_HOLYAREA) setCombatParam(combat, COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_HOLY) function onGetFormulaValues(cid, level, maglevel) min = -(level*2.6)*(getResets(cid)+ 5 ) max = -(level*2.6)*(getResets(cid)+ 5 ) return min, max end local arr = { {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, {0, 0, 1, 1, 1, 1, 2, 1, 1, 1, 1, 0, 0}, {0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0}, {0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} } local area = createCombatArea(arr) setCombatArea(combat, area) setCombatCallback(combat, CALLBACK_PARAM_LEVELMAGICVALUE, "onGetFormulaValues") local resetmin = 1 function onCastSpell(cid, var) if getPlayerReset(cid) >= resetmin then doCombat(cid, combat, var) else doPlayerSendCancel(cid, "DESCULPA, VOCE NAO TEM ".. resetmin .." RESET PARA USAR ESSA SPELL.") doSendMagicEffect(getThingPos(cid), CONST_ME_POFF) end return true end
  3. @Gabrieldsadaxas estranho, esta td certo, vou colocar um timer de 2 segundos, pode estar executando 2x seguidos. tenta assim: function onPrepareDeath(cid, deathList) if isPlayer(cid) and getPlayerStorageValue(cid, dota_config.storages[1]) > 0 then local strings = {""} local j, position, corpse = 1, 1, 0 for _, pid in ipairs(deathList) do if isCreature(pid) == true then strings[position] = j == 1 and "" or strings[position] .. ", " strings[position] = strings[position] .. getCreatureName(pid) .. "" j = j + 1 else strings[position] = j == 1 and "" or strings[position] .. ", " strings[position] = strings[position] .."a field item" j = j + 1 end end for i, str in ipairs(strings) do if(str:sub(str:len()) ~= ",") then str = str .. "." end desc = "You recognize " desc = desc .. "" .. getCreatureName(cid) .. ". He was killed by " .. str end if(getPlayerSex(cid) == 1) then corpse = doCreateItem(3058, getCreaturePosition(cid)) else corpse = doCreateItem(3065, getCreaturePosition(cid)) end doItemSetAttribute(corpse, "description", desc) doCreatureSetNoMove(cid, true) setPlayerStorageValue(cid, dota_config.storages[6], 1) noMoveAfterDeath(cid, dota_config.DeathDelay) setPlayerStorageValue(cid, 878756, 0) -- special kill doRemoveConditions(cid, false) doAddCondition(cid, getPlayerStorageValue(cid, dota_config.storages[3]) > 0 and conditionDotaBlue or conditionDotaRed) if isPlayer(deathList[1]) then dotaBroadSpecialKills(deathList[1], cid) end end return true end function onKill(cid, target, lastHit) local exausted = 2 if isPlayer(cid) and isMonster(target) then local var, jungle = DotaTowers_Lib[getCreatureName(target)],Monsters_Dota[getCreatureName(target)] if var then -- towers and nexus if var.winners == nil then local storage = isInArray({"Mid Tower Blue","Bot Tower Blue","Top Tower Blue"}, getCreatureName(target)) and dota_config.storages[5] or dota_config.storages[6] if getGlobalStorageValue((storage+1000)) - os.time() <= 0 then setGlobalStorageValue(storage, getGlobalStorageValue(storage)+1) if getGlobalStorageValue(storage) <= 2 then broadcastMessage("[Evento Dota] A "..getCreatureName(target).." Foi Destruida! ["..getGlobalStorageValue(storage).."/3]", MESSAGE_EVENT_ADVANCE) elseif getGlobalStorageValue(storage) == 3 then local ret = isInArray({"Mid Tower Blue","Bot Tower Blue","Top Tower Blue"}, getCreatureName(target)) and "Blue Nexus" or "Red Nexus" broadcastMessage("[Evento Dota] A última Torre "..getCreatureName(target).." Foi Destruido! O "..ret.." Surgiu!", MESSAGE_EVENT_ADVANCE) createNexus(ret) end setGlobalStorageValue((storage+1000), os.time()+exausted) end else broadcastMessage("[Evento Dota] "..getCreatureName(target).." Foi Destruido! Time "..(getCreatureName(target) == "Blue Nexus" and "Vermelho" or "Azul").." foi o Vencedor desta Rodada do Evento Dota!", MESSAGE_EVENT_ADVANCE) getDotaWinners(var.winners) OpenorClosedPortoes() RemoveAllTowers() removeDotaConditions() ZerarStorDota() end end end return true end function onLogin(cid) registerCreatureEvent(cid, "DotaAttack") registerCreatureEvent(cid, "KillGerador") registerCreatureEvent(cid, "DeathDota") registerCreatureEvent(cid, "TowerStats") if getPlayerStorageValue(cid, dota_config.storages[1]) > 0 or getPlayerStorageValue(cid, dota_config.storages[4]) > 0 or getPlayerStorageValue(cid, dota_config.storages[4]) > 0 then doPlayerSetTown(cid, 1) doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid))) end setPlayerStorageValue(cid, dota_config.storages[3], 0) setPlayerStorageValue(cid, dota_config.storages[4], 0) setPlayerStorageValue(cid, dota_config.storages[1], 0) setPlayerStorageValue(cid, dota_config.storages[6], 0) return true end function onStatsChange(cid, attacker, type, combat, value) if isPlayer(attacker) and isMonster(cid) then local tower = DotaTowers_Lib[getCreatureName(cid)] if type == STATSCHANGE_HEALTHLOSS and tower then local TowerPercent = 100/(getCreatureMaxHealth(cid)/getCreatureHealth(cid)) if TowerPercent <= 75 and TowerPercent >= 74 then sendMsgPlayersDota(getCreatureName(cid) .. " está com 75% de Vida, Corra para proteger!!", MESSAGE_STATUS_CONSOLE_RED) elseif TowerPercent <= 50 and TowerPercent >= 49 then sendMsgPlayersDota(getCreatureName(cid) .. " está com 50% de Vida!! Corra para proteger!!", MESSAGE_STATUS_CONSOLE_RED) elseif TowerPercent <= 25 and TowerPercent >= 24 then sendMsgPlayersDota(getCreatureName(cid) .. " está com 25% de Vida!! Corra para proteger!!", MESSAGE_STATUS_CONSOLE_RED) end end end return true end function onCombat(cid, target) if isPlayer(cid) and isPlayer(target) and getPlayerStorageValue(cid, dota_config.storages[3]) > 0 and getPlayerStorageValue(target, dota_config.storages[3]) > 0 or getPlayerStorageValue(cid, dota_config.storages[4]) > 0 and getPlayerStorageValue(target, dota_config.storages[4]) > 0 or getPlayerStorageValue(cid, dota_config.storages[6]) > 0 or getPlayerStorageValue(target, dota_config.storages[6]) > 0 then doPlayerSendCancel(cid, "You may not attack this player.") return false elseif isPlayer(cid) and isMonster(target) and getPlayerStorageValue(cid, dota_config.storages[3]) > 0 and isInArray({"Mid Tower Blue","Bot Tower Blue","Top Tower Blue","Blue Nexus"}, getCreatureName(target)) or getPlayerStorageValue(cid, dota_config.storages[4]) > 0 and isInArray({"Top Tower Red","Bot Tower Red","Mid Tower Red","Red Nexus"}, getCreatureName(target)) then doPlayerSendCancel(cid, "You may not attack this.") return false end return true end function onDeath(cid, corpse, deathList) if isPlayer(cid) or not Monsters_Dota[getCreatureName(cid)] then return true end local killer, jungle = deathList[1], Monsters_Dota[getCreatureName(cid)] if isPlayer(killer) and jungle then local conditions = getCreatureName(cid) == "Spider Of Jungle" and {condition_ps,dota_speed} or {condition_kd, dota_speed} local storage = getPlayerStorageValue(killer, dota_config.storages[3]) > 0 and dota_config.storages[3] or dota_config.storages[4] for _, pid in ipairs(deathList) do if isPlayer(pid) then doRemoveConditions(pid, CONDITION_PARALYZE) end end doBuffPlayer(conditions, storage, jungle.vocs) addEvent(doSpawnJungleMobs, jungle.respaw*1000*60, getCreatureName(cid), jungle.pos) end return true end
  4. function onSay(cid, words, param) local money = 500 local slots, param = {CONST_SLOT_LEFT, CONST_SLOT_RIGHT}, param:lower() local table = { ["wand"] = {id = 12609, toid = 7754, upgrade = 16}, ["sword"] = {id = 2408, toid = 7391, upgrade = 15}, } local t = table[param] if not t then doPlayerSendTextMessage(cid, 22, "eu nao troco esse item, apenas wand ou sword!") return true elseif getPlayerMoney(cid) < 500 then doPlayerSendTextMessage(cid, 22, "você nao tem 500 gps!") return true end for _, ret in pairs(slots) do if getPlayerSlotItem(cid, ret).itemid == t.id then -- aqui ja faz a verificação se tem o item local var = getItemNameById(getPlayerSlotItem(cid, ret).itemid) local z = var:match("(%d+)") if z == nil or z < t.upgrade then doPlayerSendTextMessage(cid, 22, "o item n tem o upgrade necessario!") return true end doPlayerSendTextMessage(cid, 22, "Você fez uma troca de items!") doPlayerRemoveItem(cid, t.id) doPlayerAddItem(cid, t.toid, 1) end end return true end
  5. @hiquezerah sim, todos os players recebem um time de 24 horas para voltar a fazer a quest, essa storage é ó para controlar esse time.
  6. local lvl = 400 local stor_time = 787687 local hours = 24 local pos_die = {x=1429, y=1549, z=9} local t = { {vocations = {1, 13},Pos = {{x=1397, y=1505, z=9},{x=1429, y=1549, z=9}},item= {2349,{x=1398, y=1502, z=9}}}, -- TANK OR DRUNK {vocations = {14, 15},Pos = {{x=1396, y=1505, z=9},{x=1429, y=1549, z=9}},item= {2349,{x=1398, y=1508, z=9}}}, -- ATTACK OR DRUNK {vocations = {16, 17},Pos = {{x=1395, y=1505, z=9},{x=1429, y=1549, z=9}},item= {2349,{x=1393, y=1508, z=9}}}, -- SUPPORT OR DRUNK {vocations = {18, 19},Pos = {{x=1394, y=1505, z=9},{x=1429, y=1549, z=9}},item= {2349,{x=1393, y=1502, z=9}}}, -- PARALYZE OR DRUNK {vocations = {18, 19},Pos = {{x=1394, y=1505, z=9},{x=1429, y=1549, z=9}},item= {2349,{x=1393, y=1502, z=9}}}, -- PARALYZE {vocations = {18, 19},Pos = {{x=1394, y=1505, z=9},{x=1429, y=1549, z=9}},item= {2349,{x=1393, y=1502, z=9}}} -- SUPPORT } function onUse(cid, item, fromPosition, itemEx, toPosition) local check = {} local items = {} for _, k in ipairs(t) do local x = getTopCreature(k.Pos[1]).uid local v = getTileItemById(k.item[2], k.item[1]) if x == 0 or not isPlayer(x) or getPlayerLevel(x) < lvl or isInArray(k.vocations, getPlayerVocation(x)) == FALSE or getPlayerStorageValue(x, stor_time) - os.time() > 0 then doPlayerSendCancel(cid, 'Está faltando player ou alguém não possui level '..lvl..' ou mais ou não tem a vocação ou so pode participar 1x no dia.') return true elseif v.uid == 0 then doPlayerSendCancel(cid, "Todos os itens precisão estar na posição.") return true end table.insert(check, x) table.insert(items, v) end local sort = check[math.random(1, #check)] for k, tid in ipairs(check) do doSendMagicEffect(getCreaturePosition(tid), CONST_ME_POFF) if tid ~= sort then doTeleportThing(tid, t[k].Pos[2]) else doTeleportThing(tid, pos_die) end doSendMagicEffect(getCreaturePosition(tid), CONST_ME_TELEPORT) setPlayerStorageValue(tid, stor_time, os.time()+hours*3600) end for _, remove in ipairs(items) do doRemoveItem(remove.uid) end doTransformItem(item.uid, item.itemid == 1945 and 1946 or 1945) return true end
  7. concordo, vou refazer as funções.
  8. @ITALOx @ITALOx é qndo vc usa a talk? poderia mostrar o erro todo no console?
  9. result = db.getResult("SELECT `id`,`name`,`account_id` FROM `players` WHERE `level` < ".. cleanup[i].level .." AND `name` NOT IN('Account Manager', 'Sorcerer Sample', 'Druid Sample', 'Paladin Sample', 'Knight Sample', 'Rook Sample') AND `group_id` < 2 AND `lastlogin` < UNIX_TIMESTAMP() - ".. cleanup[i].time .." AND `lastlogin` > 0;") onde está o group_id onde esta 2 , coloca para 3 `group_id` < 3
  10. pra quem tem o bug no distro que troca os números da storage por string. no mods: troca <event type="kill" name="KillTask" event="script"><![CDATA[ domodlib('task_func') function onKill(cid, target) if isPlayer(cid) and isMonster(target) and not isSummon(target) then local t,daily = task_sys[getTaskMission(cid)], daily_task[getDailyTaskMission(cid)] if t and getPlayerStorageValue(cid, t.start) > 0 and isInArray(t.monsters_list, getCreatureName(target):lower()) and getPlayerStorageValue(cid, task_sys_storages[3]) < t.count then setPlayerStorageValue(cid, task_sys_storages[3], getPlayerStorageValue(cid, task_sys_storages[3]) < 0 and 1 or (getPlayerStorageValue(cid, task_sys_storages[3])+1)) if getPlayerStorageValue(cid, task_sys_storages[8]) <= 0 and getPlayerStorageValue(cid, task_sys_storages[3]) < t.count then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,"[Task System] defeated Total [" .. getPlayerStorageValue(cid, task_sys_storages[3]) .. "/" .. t.count .. "] da Task do " .. t.name .. ".") end if getPlayerStorageValue(cid, task_sys_storages[3]) >= t.count then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,"[Task System] Parabéns! Você terminou a Task do "..t.name..", volte ao npc parece receber sua recompensa.") end end if daily and getPlayerStorageValue(cid, task_sys_storages[7]) > 0 and getPlayerStorageValue(cid, task_sys_storages[6]) - os.time() >= 0 and isInArray(daily.monsters_list, getCreatureName(target):lower()) and getPlayerStorageValue(cid, task_sys_storages[5]) < daily.count then setPlayerStorageValue(cid, task_sys_storages[5], getPlayerStorageValue(cid, task_sys_storages[5]) < 0 and 1 or (getPlayerStorageValue(cid, task_sys_storages[5])+1)) if getPlayerStorageValue(cid, task_sys_storages[8]) <= 0 and getPlayerStorageValue(cid, task_sys_storages[5]) < daily.count then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"[Daily Task System] defeated Total [" .. getPlayerStorageValue(cid, task_sys_storages[5]) .. "/" .. daily.count .. "] da Task do " .. daily.name .. ".") end if getPlayerStorageValue(cid, task_sys_storages[5]) >= daily.count then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,"[Daily Task System] Parabéns! Você terminou a Task do "..daily.name..", volte ao npc parece receber sua recompensa.") end end end return true end]]></event> por <event type="kill" name="KillTask" event="script"><![CDATA[ domodlib('task_func') function onKill(cid, target) if isPlayer(cid) and isMonster(target) and not isSummon(target) then local t,daily = task_sys[getTaskMission(cid)], daily_task[getDailyTaskMission(cid)] if t and getPlayerStorageValue(cid, t.start) > 0 and isInArray(t.monsters_list, getCreatureName(target):lower()) and tonumber(getPlayerStorageValue(cid, task_sys_storages[3])) < t.count then setPlayerStorageValue(cid, task_sys_storages[3], tonumber(getPlayerStorageValue(cid, task_sys_storages[3])) < 0 and 1 or (tonumber(getPlayerStorageValue(cid, task_sys_storages[3]))+1)) if getPlayerStorageValue(cid, task_sys_storages[8]) <= 0 and tonumber(getPlayerStorageValue(cid, task_sys_storages[3])) < t.count then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,"[Task System] defeated Total [" .. tonumber(getPlayerStorageValue(cid, task_sys_storages[3])) .. "/" .. t.count .. "] da Task do " .. t.name .. ".") end if tonumber(getPlayerStorageValue(cid, task_sys_storages[3])) >= t.count then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,"[Task System] Parabéns! Você terminou a Task do "..t.name..", volte ao npc parece receber sua recompensa.") end end if daily and getPlayerStorageValue(cid, task_sys_storages[7]) > 0 and getPlayerStorageValue(cid, task_sys_storages[6]) - os.time() >= 0 and isInArray(daily.monsters_list, getCreatureName(target):lower()) and tonumber(getPlayerStorageValue(cid, task_sys_storages[5])) < daily.count then setPlayerStorageValue(cid, task_sys_storages[5], getPlayerStorageValue(cid, task_sys_storages[5]) < 0 and 1 or (tonumber(getPlayerStorageValue(cid, task_sys_storages[5]))+1)) if getPlayerStorageValue(cid, task_sys_storages[8]) <= 0 and tonumber(getPlayerStorageValue(cid, task_sys_storages[5])) < daily.count then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"[Daily Task System] defeated Total [" .. tonumber(getPlayerStorageValue(cid, task_sys_storages[5])) .. "/" .. daily.count .. "] da Task do " .. daily.name .. ".") end if tonumber(getPlayerStorageValue(cid, task_sys_storages[5])) >= daily.count then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE,"[Daily Task System] Parabéns! Você terminou a Task do "..daily.name..", volte ao npc parece receber sua recompensa.") end end end return true end]]></event>
  11. Boa tarde Vodkart, quero entrar em contato com você pra contratar serviços de scripting.

    Por gentileza, me envie um email ou uma forma de contato direto, aguardo retorno.
     

    Aguardo respostas.

  12. é porque a criatura nao está viva no caso kkk é um onDeath e vc usa addEvent, ou seja, não vai aparecer mesmo. você pode colocar uma função diferente para ao invés de aparecer na criatura, faz o cid ser no jogador e a pos da onde vai sair a fala, ser onde o monstro morreu.
  13. addEvent(function() doCreatureSay(cid, "Corra enquanto á tempo o teleport irá desaparecer em breve.", TALKTYPE_ORANGE_1, false, cid, tp.info.pos) end, 100) por addEvent(function(cid) if not isCreature(cid) then return LUA_ERROR end doCreatureSay(cid, "Corra enquanto á tempo o teleport irá desaparecer em breve.", TALKTYPE_ORANGE_1, false, cid, tp.info.pos) end, 100, cid)
  14. é que estranho, parece que não tem essa função na sua source mesmo. o jeito é fazer o script de outro jeito, ao clicar fazer sumir aquela papel lá e depois de 2 segundos aparecer os monstros.

Open Tibia Server

Quer aprender a criar seu próprio servidor de Tibia? Então está no lugar certo, aqui você encontrará milhares de tutorias, scripts, códigos, mapas e utilitários para que você possa fazer o seu próprio servidor de Tibia partindo do zero.

Redes Sociais

Anuncie no Tibia King

Precisa de mais visibilidade em seus projetos? Quer publicidade para o seu servidor? Anuncie no Tibia King e faça sua divulgação, possuímos centenas de acessos simultâneos e milhares diários, com certeza será a sua solução! A publicação do seu anuncio é instantânea!

×
×
  • Create New...