Ir para conteúdo

Vodkart

Herói
  • Total de itens

    3406
  • Registro em

  • Última visita

  • Dias Ganhos

    113

Tudo que Vodkart postou

  1. Vodkart

    Hunted System

    poderia postar o erro aqui? eu ainda não adivinho qual erro é...
  2. local config = { --[vocation id] = { level, nova voc, looktype, efeito} [1] = { 0, 2, 9, 108}, [2] = { 25, 3, 11, 108}, [3] = { 50, 4, 287, 108}, [4] = { 75, 5, 12, 108}, [5] = { 100, 6, 289, 108}, [6] = { 125, 7, 10, 30}, [7] = { 150, 8, 13, 30}, [8] = { 175, 9, 289, 30}, [9] = { 200, 10, 288, 30}, [10] = { 250, 10, 14, 30}, [11] = { 0, 12, 2, 108}, [12] = { 25, 13, 93, 108}, [13] = { 50, 14, 6, 108}, [14] = { 75, 15, 5, 108}, [15] = { 100, 16, 7, 108}, [16] = { 125, 17, 94, 110}, [17] = { 150, 18, 59, 110}, [18] = { 175, 19, 8, 110}, [19] = { 200, 20, 178, 110}, [20] = { 250, 20, 95, 110}, [21] = { 0, 22, 53, 194}, [22] = { 25, 23, 67, 194}, [23] = { 50, 24, 72, 194}, [24] = { 75, 25, 273, 194}, [25] = { 100, 26, 62, 194}, [26] = { 125, 27, 189, 194}, [27] = { 150, 28, 65, 194}, [28] = { 175, 29, 188, 194}, [29] = { 200, 30, 58, 194}, [30] = { 250, 30, 187, 194}, [31] = { 0, 32, 30, 191}, [32] = { 25, 33, 60, 191}, [33] = { 50, 34, 78, 191}, [34] = { 75, 35, 82, 191}, [35] = { 100, 36, 80, 191}, [36] = { 125, 37, 190, 191}, [37] = { 150, 38, 83, 191}, [38] = { 175, 39, 191, 191}, [39] = { 200, 40, 192, 191}, [40] = { 250, 40, 193, 191}, [41] = { 0, 42, 71, 3}, [42] = { 25, 43, 66, 3}, [43] = { 50, 44, 91, 3}, [44] = { 75, 45, 18, 3}, [45] = { 100, 46, 31, 3}, [46] = { 125, 47, 92, 3}, [47] = { 150, 48, 40, 3}, [48] = { 175, 49, 49, 3}, [49] = { 200, 51, 31, 3}, [51] = { 250, 51, 394, 68}, [52] = { 0, 53, 96, 109}, [53] = { 25, 54, 97, 109}, [54] = { 50, 55, 282, 109}, [55] = { 75, 56, 98, 109}, [56] = { 100, 57, 99, 109}, [57] = { 125, 58, 283, 109}, [58] = { 150, 59, 284, 109}, [59] = { 175, 60, 285, 109}, [60] = { 200, 61, 285, 109}, [61] = { 250, 61, 100, 109}, [62] = { 0, 63, 102, 109}, [63] = { 25, 64, 101, 109}, [64] = { 50, 65, 103, 109}, [65] = { 75, 66, 105, 109}, [66] = { 100, 67, 107, 109}, [67] = { 125, 68, 108, 109}, [68] = { 150, 69, 314, 109}, [69] = { 175, 70, 347, 109}, [70] = { 200, 71, 315, 109}, [71] = { 250, 71, 315, 109}, [72] = { 0, 73, 195, 109}, [73] = { 25, 74, 175, 109}, [74] = { 50, 75, 173, 109}, [75] = { 75, 76, 174, 109}, [76] = { 100, 77, 169, 109}, [77] = { 125, 78, 169, 109}, [78] = { 150, 79, 172, 109}, [79] = { 175, 80, 194, 109}, [80] = { 200, 81, 194, 109}, [81] = { 250, 81, 170, 109}, [82] = { 0, 83, 50, 109}, [83] = { 25, 84, 69, 109}, [84] = { 50, 85, 70, 109}, [85] = { 75, 86, 36, 109}, [86] = { 100, 87, 84, 109}, [87] = { 125, 88, 196, 109}, [88] = { 150, 89, 197, 109}, [89] = { 175, 90, 198, 109}, [90] = { 200, 91, 199, 109}, [91] = { 250, 91, 200, 109}, [92] = { 0, 93, 24, 109}, [93] = { 25, 94, 295, 109}, [94] = { 50, 95, 295, 109}, [95] = { 75, 96, 296, 109}, [96] = { 100, 97, 296, 109}, [97] = { 125, 98, 297, 109}, [98] = { 150, 99, 297, 109}, [99] = { 175, 100, 298, 109}, [100] = { 200, 101, 298, 109}, [101] = { 250, 101, 299, 109}, [102] = { 1, 103, 214, 179}, [103] = { 25, 104, 214, 179}, [104] = { 50, 105, 216, 179}, [105] = { 100, 106, 215, 179}, [106] = { 150, 107, 215, 179}, [107] = { 175, 108, 218, 179}, [108] = { 200, 109, 218, 179}, [109] = { 250, 109, 217, 179}, [110] = { 1, 111, 378, 3}, [111] = { 25, 112, 378, 3}, [112] = { 50, 113, 379, 3}, [113] = { 100, 114, 380, 3}, [114] = { 150, 115, 380, 3}, [115] = { 175, 116, 381, 3}, [116] = { 200, 117, 381, 3}, [117] = { 250, 117, 382, 3}, [118] = { 1, 119, 383, 122}, [119] = { 25, 120, 383, 122}, [120] = { 50, 121, 384, 122}, [121] = { 100, 122, 384, 122}, [122] = { 150, 123, 385, 122}, [123] = { 175, 124, 385, 122}, [124] = { 200, 125, 386, 122}, [125] = { 250, 125, 396, 122}, [126] = { 1, 127, 259, 211}, [127] = { 25, 128, 149, 211}, [128] = { 50, 129, 149, 211}, [129] = { 100, 130, 16, 211}, [130] = { 150, 131, 323, 211}, [131] = { 175, 132, 323, 211}, [132] = { 200, 133, 159, 211}, [133] = { 250, 133, 159, 211}, [134] = { 1, 135, 309, 190}, [135] = { 25, 136, 309, 190}, [136] = { 50, 137, 312, 190}, [137] = { 100, 138, 312, 190}, [138] = { 150, 139, 311, 190}, [139] = { 175, 140, 311, 190}, [140] = { 200, 141, 310, 190}, [141] = { 250, 141, 313, 190}, [142] = { 1, 143, 340, 189}, [143] = { 25, 144, 341, 189}, [144] = { 50, 145, 342, 189}, [145] = { 75, 146, 342, 189}, [146] = { 100, 147, 343, 189}, [147] = { 125, 148, 343, 189}, [148] = { 150, 149, 344, 189}, [149] = { 175, 150, 344, 189}, [150] = { 200, 151, 345, 189}, [151] = { 250, 151, 345, 189}, [152] = { 1, 153, 372, 68}, [153] = { 25, 154, 373, 68}, [154] = { 50, 155, 374, 68}, [155] = { 100, 156, 375, 68}, [156] = { 125, 157, 376, 68}, [157] = { 150, 158, 376, 68}, [158] = { 175, 159, 318, 68}, [159] = { 200, 160, 377, 68}, [160] = { 250, 160, 395, 68}, } function onSay(cid, words, param, channel) local voc = config[getPlayerVocation(cid)] if not voc then doPlayerSendCancel(cid, "Você não pode se Transformar!") return true elseif getPlayerLevel(cid) < voc[1] then doPlayerSendTextMessage(cid, MESSAGE_STATUS_WARNING, "Você precisa estar no level " .. voc[1] .. " ou mais para transformar.") return true end doPlayerSetVocation(cid, voc[2]) setPlayerStorageValue(cid, 888753, voc[2]) doPlayerSay(cid, "transformar") doPlayerSendTextMessage(cid, MESSAGE_STATUS_WARNING, "Você se Transformou!") doCreatureChangeOutfit(cid, {lookType = voc[3]}) doSendMagicEffect(getCreaturePosition(cid), voc[4]) return true end em data/creaturescript/script/login.lua adc isso antes do último return true if getPlayerStorageValue(cid, 888753) ~= -1 then doPlayerSetVocation(cid, getPlayerStorageValue(cid, 888753)) end
  3. Vodkart

    Hunted System

    não está pegando porque? algum erro?
  4. vc se transforma, e qndo vc reloga a voc some, é isso?
  5. pronto, se ele só digitar !rank vai mostrar o de level, alguém tem alguma idéia para adicionar algum outro rank?
  6. no servidor do matheus nunca funciona nada, incrível isso
  7. @up esse script é pra teleportar tds pra uma pos, até os que tao offline usa esse: function onSay(cid, words, param) local on = getPlayersOnline() for i = 1, #on do if getPlayerAccess(on[i]) < 3 then doTeleportThing(on[i], getTownTemplePosition(getPlayerTown(on[i]))) end end return true end
  8. data/npc Elemental.xml <?xml version="1.0"?> <npc name="Elemental" script="data/npc/scripts/elementos.lua" walkinterval="50000" floorchange="0"> <health now="100" max="100"/> <look type="129" head="95" body="116" legs="121" feet="115" addons="3"/> <parameters> <parameter key="message_greet" value="Ola |PLAYERNAME|. Qual elemento deseja aprender?"/> </parameters> </npc> data/npc/script elementos.lua 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 msg,stor = string.lower(msg),754487 local elements = { ["fire"] = {"Find Person","Flame Strike","Blood Rage","Challenge","Fierce Berserk"}, ["water"] = {"Find Person","Flame Strike","Blood Rage","Challenge","Fierce Berserk"}, ["earth"] = {"Find Person","Flame Strike","Blood Rage","Challenge","Fierce Berserk"}, ["air"] = {"Find Person","Flame Strike","Blood Rage","Challenge","Fierce Berserk"}, ["thunder"] = {"Find Person","Flame Strike","Blood Rage","Challenge","Fierce Berserk"} } if elements[msg] then if getPlayerStorageValue(cid, stor) <= 0 then for _, spells in ipairs(elements[msg]) do doPlayerLearnInstantSpell(cid, spells) end setPlayerStorageValue(cid,stor,1) npcHandler:say("Parabéns, voce aprendeu o elemento do "..msg, cid) else npcHandler:say("você já escolheu seu elemento.", cid) end else npcHandler:say("este elemento não existe.", cid) end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new())
  9. é o comando !rank que todo mundo conhece, mas agora reformulado e com alguns rank extras como frags, health, mana, magic level obs: caso alguém tenha alguma outra idéia de rank só postar que estaremos adicionando... --------------------------- data/talkactions/ranks.lua local config = { MaxPlayer = 20, fight_skills = { ['fist'] = 0, ['club'] = 1, ['sword'] = 2, ['axe'] = 3, ['distance'] = 4, ['shielding'] = 5, ['fishing'] = 6, ['dist'] = 4, ['shield'] = 5, ['fish'] = 6, }, other_skills = { [''] = "level", ['level'] = "level", ['magic'] = "maglevel", ['health'] = "healthmax", ['mana'] = "manamax" }, vocations = { ['sorcerer'] = {1,5}, ['druid'] = {2,6}, ['paladin'] = {3,7}, ['knight'] = {4,8} }, storages = { ['frags'] = 824544 } } function onSay(cid, words, param) local param,str = string.lower(param),"" if not config.fight_skills[param] and not config.other_skills[param] and not config.vocations[param] and not config.storages[param] then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "este rank não existe.") return true end str = "--[ RANK "..(param == "" and "LEVEL" or string.upper(param)).." ]--\n\n" query = config.fight_skills[param] and db.getResult("SELECT `player_id`, `value` FROM `player_skills` WHERE `skillid` = "..config.fight_skills[param].." ORDER BY `value` DESC;") or config.other_skills[param] and db.getResult("SELECT `name`, `"..config.other_skills[param].."` FROM `players` WHERE `id` > 6 AND `group_id` < 2 ORDER BY `"..config.other_skills[param].."` DESC, `name` ASC;") or config.storages[param] and db.getResult("SELECT `player_id`, `value` FROM `player_storage` WHERE `key` = "..config.storages[param].." ORDER BY cast(value as INTEGER) DESC;") or db.getResult("SELECT `name`, `level` FROM `players` WHERE `group_id` <= 2 AND `vocation` = "..config.vocations[param][1].." or `vocation` = "..config.vocations[param][2].." ORDER BY `level` DESC;") if (query:getID() ~= -1) then k = 1 while true do str = str .. "\n " .. k .. ". "..(config.fight_skills[param] and getPlayerNameByGUID(query:getDataString("player_id")) or config.storages[param] and getPlayerNameByGUID(query:getDataString("player_id")) or query:getDataString("name")).." - [" .. query:getDataInt((config.fight_skills[param] and "value" or config.storages[param] and "value" or config.vocations[param] and "level" or config.other_skills[param])) .. "]" k = k + 1 if not(query:next()) or k > config.MaxPlayer then break end end query:free() end doShowTextDialog(cid,6500, str) return true end Em data/lib/050-function.lua adc function setFrags(cid) if not isCreature(cid) then return LUA_ERROR end setPlayerStorageValue(cid, 824544, getPlayerFrags(cid)) return doPlayerSave(cid) end data/creaturescript/script rankfrags.lua function onKill(cid, target, lastHit) if isPlayer(cid) and isPlayer(target) then addEvent(setFrags, 1, cid) end return true end data/creaturescript/script/login.lua antes do último return true adc: registerCreatureEvent(cid, "Rankfrags") setFrags(cid)
  10. no caso cada elemento é uma vocação? exemplo: elemento fogo é voc 5 elemento terra é voc 4
  11. Vodkart

    Npc Horário

    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 msg,data = string.lower(msg),tostring(os.date("%X")):sub(1, 5) local hora = {"22:00","22:10"} local tabble = { ["andidote"] = {vocs = {1,2,3,4,5,6,7,8}, pergunta = {{"quanto de mana gasta essa magia?","18"},{"qualquer vocação pode usar essa magia? {yes} or {no}","yes"}}}, ["berseker"] = {vocs = {4,8}, pergunta = {{"quantos sqm essa magia atinge?","9"},{"quanto segundos é o Cooldown dessa magia?","4"}}} } if isInArray({"spells","responder","pergunta","aprender","spell","magia"}, msg) then if data >= hora[1] and data <= hora[2] then npcHandler:say("Qual magia você quer aprender meu amigo viajante?", cid) talkState[talkUser] = 1 else npcHandler:say("volte entre "..hora[1].." e "..hora[2], cid) end elseif talkState[talkUser] == 1 then if not tabble[msg] then npcHandler:say("você já aprendeu essa magia.", cid) return true elseif getPlayerLearnedInstantSpell(cid, msg) then talkState[talkUser] = 0 npcHandler:say("você já aprendeu essa magia.", cid) return true elseif not isInArray(tabble[msg].vocs, getPlayerVocation(cid)) then talkState[talkUser] = 0 npcHandler:say("você não tem vocação para aprender essa magia.", cid) return true end r,spell = tabble[msg].pergunta[math.random(#tabble[msg].pergunta)],msg npcHandler:say(r[1], cid) talkState[talkUser] = 2 elseif talkState[talkUser] == 2 then if msg == r[2] then doPlayerLearnInstantSpell(cid, spell) end npcHandler:say(msg == r[2] and "Resposta correta! você aprendeu uma nova magia chamada "..spell or "reposta errada!", cid) talkState[talkUser] = 0 elseif msg == "no" then selfSay("Tudo bem então", cid) talkState[talkUser] = 0 npcHandler:releaseFocus(cid) end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new())
  12. Vodkart

    Npc Horário

    só vocação? level , premium nd?
  13. Vodkart

    Npc Horário

    entendi, mas não tem requisitos para ganhar a magia? por exemplo a magia: "Andidote" vocs = {1,2,3,4,5,6,7,8} price = 100 level = 10 premium = false esses requisitos aí, ou só acertar e ganhar a magia?
  14. dá para fazer facilmente pelo onCombat amigo, não tem mistério nisso. eu estou indo trabalhar agr de tarde e estudar anoite, quando eu tiver um tempinho eu faço sem problema.
  15. acho que tem sim, mas porque alguém faria isso? lol é pra poketibia?
  16. Vodkart

    Npc Horário

    missão do que criatura? vou te falar oque vc faz então local data = tostring(os.date("%X")):sub(1, 5) if data >= "22:00" and data <= "22:10" then -- pegar missão else msg('vc soh podera fazer a missao no outro dia') end
  17. adc essa função na lib function doRemoveItemsFromList(cid,items) -- by vodka local count = 0 if table.maxn(items) > 0 then for i = 1, table.maxn(items) do if getPlayerItemCount(cid,items[i][1]) >= items[i][2] then count = count + 1 end end end if count == table.maxn(items) then for i = 1, table.maxn(items) do doPlayerRemoveItem(cid,items[i][1],items[i][2]) end else return false end return true end dps só usar assim: function onSay(cid, words, param) local remove = {{8262,1},{8263,1},{8264,1},{8265,1}} if not doRemoveItemsFromList(cid, remove) then doPlayerSendCancel(cid, 'Voce Precisa Das 4 Partes Do Amuleto Para Conseguir Formalo.') return true end doPlayerAddItem(cid,8266,1) doSendMagicEffect(getPlayerPosition(cid), CONST_ME_MORTAREA) doCreatureSay(cid, "!ShadownStaffQuest", TALKTYPE_ORANGE_1) return true end exemplo: local items = {{ID DO ITEM,QUANTIDADE}} dá para adc mais local items = {{2123,5},{2160,10},{2494,1}}
  18. vc tem que adc o npc no RME e dps colocar um respaw no mapa pra ele ficar lá
  19. vc quer colocar sem preço tanto pro casamento qnto por divorcio?
  20. colocar oq no RME? lol não entendo nd de mapping kk
  21. a última imagem ta fodasticamente foda achei q vc tinha parado de mappiar baiano
  22. local config = { useFragHandler = getBooleanFromString(getConfigValue('useFragHandler')), advancedFragList = getBooleanFromString(getConfigValue('advancedFragList')) } function onSay(cid, words, param, channel) if(not config.useFragHandler) then return false end 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 = { name = result:getDataString("name"), level = result:getDataInt("level"), 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) } if(config.advancedFragList) then local result = "Frags de hoje: " .. size.day .. ". Red skull= 5. Black Skull= 7." if(size.day > 0) then for _, content in ipairs(contents.day) do result = result .. "\n* " .. os.date("%d %B %Y %X at ", content.date) .. content.name .. " on level " .. content.level end result = result .. "\n" end result = result .. "\nFrags na semana: " .. (size.day + size.week) .. ". Red Skull= 15. Black Skull= 20." if(size.week > 0) then for _, content in ipairs(contents.week) do result = result .. "\n* " .. os.date("%d %B %Y %X at ", content.date) .. content.name .. " on level " .. content.level end result = result .. "\n" end result = result .. "\nFrags no mes: " .. (size.day + size.week + size.month) .. ". Red Skull= 25. Black Skull= 30." if(size.month > 0) then for _, content in ipairs(contents.month) do result = result .. "\n* " .. os.date("%d %B %Y %X at ", content.date) .. content.name .. " on level " .. content.level end result = result .. "\n" end local skullEnd = getPlayerSkullEnd(cid) if(skullEnd > 0) then result = result .. "\nYour " .. (getCreatureSkullType(cid) == SKULL_RED and "red" or "black") .. " skull will expire at " .. os.date("%d %B %Y %X", skullEnd) end doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, result) else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You currently have " .. size.day .. " frags today, " .. (size.day + size.week) .. " this week and " .. (size.day + size.week + size.month) .. " this month.") if(size.day > 0) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Last frag at " .. os.date("%d %B %Y %X", contents.day[1].date) .. " on level " .. contents.day[1].level .. " (" .. contents.day[1].name .. ").") end local skullEnd = getPlayerSkullEnd(cid) if(skullEnd > 0) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Your " .. (getCreatureSkullType(cid) == SKULL_RED and "red" or "black") .. " skull will expire at " .. os.date("%d %B %Y %X", skullEnd)) end end return true end
  23. nem to com vontade vou reportar o tópico para mover
  24. mas estava mandando em cor vermelha a broadcast aqui está a lista das cores: MESSAGE_FIRST = 18 MESSAGE_STATUS_CONSOLE_RED = MESSAGE_FIRST MESSAGE_EVENT_ORANGE = 19 MESSAGE_STATUS_CONSOLE_ORANGE = 20 MESSAGE_STATUS_WARNING = 21 MESSAGE_EVENT_ADVANCE = 22 MESSAGE_EVENT_DEFAULT = 23 MESSAGE_STATUS_DEFAULT = 24 MESSAGE_INFO_DESCR = 25 MESSAGE_STATUS_SMALL = 26 MESSAGE_STATUS_CONSOLE_BLUE = 27 MESSAGE_LAST = MESSAGE_STATUS_CONSOLE_BLUE
  • Quem Está Navegando   0 membros estão online

    • Nenhum usuário registrado visualizando esta página.
×
×
  • Criar Novo...