Ir para conteúdo

Vodkart

Herói
  • Total de itens

    3406
  • Registro em

  • Última visita

  • Dias Ganhos

    113

Tudo que Vodkart postou

  1. quem me tem no msn ja me viu n preciso postar aqui para me chamaram de lindo e gostoso além disso varias mina vao se cadrasta pra pedir meu msn
  2. ele tem namorada lol
  3. Mas já não existe a função 'isInRange' para esse tipo de coisa?
  4. que erro cara?
  5. function onThink(interval, lastExecution) local config = { pos = {x = 179, y = 54, z = 3}, topos = {x=794, y=228, z=7}, timer = 3 } function removeTp() local t = getTileItemById(config.pos, 1387) if t then doRemoveItem(t.uid, 1) doSendMagicEffect(config.pos, CONST_ME_POFF) end end doCreateTeleport(1387, config.topos, config.pos) doBroadcastMessage("O teleport para Boss event esta aberto e fechara em ".. config.timer .." minutos.") addEvent(removeTp, config.timer*1000*60) return true end
  6. hm tem algum char com uma vocação que não existe tenta mudar as voc de todos pelo sqlite pra ve se loga
  7. tenta executa isso na sua db UPDATE `players` SET `posx` = 165, `posy` = 54, `posz` = 7 e dps logar
  8. Acho que não é necessário tutorial desse tipo, pois é só uma simples alteração em um código... Tutorial reprovado.
  9. não vai funcionar, o do marcelo é por db e não por storage xD 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", ['reset'] = "reset" }, vocations = { ['sorcerer'] = {1,5}, ['druid'] = {2,6}, ['paladin'] = {3,7}, ['knight'] = {4,8} } } function onSay(cid, words, param) local param,str = string.lower(param),"" if param ~= "frags" and not config.fight_skills[param] and not config.other_skills[param] and not config.vocations[param] then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "este rank não existe.") return true end str,k = "--[ RANK "..(param == "" and "LEVEL" or string.upper(param)).." ]--\n\n",1 if param == "frags" then local time,T = os.time(),{} local times = {today = (time - 86400), week = (time - (7 * 86400))} local getPlayer = db.getResult("SELECT `id` FROM `players`;") repeat if (getPlayer:getID() ~= -1) then local getGuid = getPlayer:getDataInt("id") 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` = "..tonumber(getGuid).." 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 size = {day = table.maxn(contents.day),week = table.maxn(contents.week),month = table.maxn(contents.month)} until not result:next() table.insert(T,{getGuid,size.day+size.week+size.month}) result:free() end end until not getPlayer:next() table.sort(T, function(x,y) return x[2] > y[2] end) for _, rank in pairs(T) do str = str .."\n"..k..". "..getPlayerNameByGUID(rank[1]).." - ["..rank[2].."]" k = k + 1 if k > config.MaxPlayer then break end end doShowTextDialog(cid,6500, str) return true end 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 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 while true do str = str .. "\n " .. k .. ". "..(config.fight_skills[param] and getPlayerNameByGUID(query:getDataString("player_id")) or query:getDataString("name")).." - [" .. query:getDataInt(config.fight_skills[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 além de rank reset esse que eu te passei tem: rank magic rank health rank mana rank frags rank vocs
  10. Vodkart

    Change Map

    <?xml version="1.0" encoding="ISO-8859-1"?> <mod name="ChangeMap" version="1.0" author="Vodkart" contact="xtibia.com" enabled="yes"> <config name="map_func"><![CDATA[ info = { [0] = {x=160,y= 54,z=7}, [1] = {x=144,y= 45,z=7}, [2] = {x=133,y= 39,z=7}, [3] = {x=174,y= 39,z=7} } storage = {60002,61002} positions = { {{x = 135,y = 45, z = 7},{x = 138,y = 45, z = 7}}, {{x = 172,y = 57, z = 7},{x = 176,y = 60, z = 7}}, {{x = 186,y = 55, z = 7},{x = 190,y = 55, z = 7}} } ]]></config> <event type="login" name="Check Map" event="script"><![CDATA[ domodlib('map_func') function onLogin(cid) if getGlobalStorageValue(storage[1]) == -1 then setGlobalStorageValue(storage[1], 0) end doTeleportThing(cid,info[getGlobalStorageValue(storage[1])]) return true end ]]></event> <talkaction words="/changemap" access="5" event="buffer"><![CDATA[ domodlib('map_func') local param = string.lower(param) setGlobalStorageValue(storage[2], getGlobalStorageValue(storage[2]) == -1 and 1 or -1) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"você acabou de dar "..(getGlobalStorageValue(storage[2]) == -1 and "start" or "stop").." no map change.") return true ]]></talkaction> <globalevent name="ChangeMap" interval="1200" event="script"><![CDATA[ domodlib('map_func') function onThink(interval, lastExecution) if getGlobalStorageValue(storage[2]) <= 0 then doBroadcastMessage('O mapa será mudado novamente em 20 minutos.') setGlobalStorageValue(storage[1], getGlobalStorageValue(storage[1]) < #info and getGlobalStorageValue(storage[1])+1 or 0) for _, pid in ipairs(getPlayersOnline()) do local check = true for _, pos in ipairs(positions) do if isInRange(getCreaturePosition(pid), pos[1], pos[2]) then check = false end end if check == true then doRemoveConditions(pid, true) addEvent(doRemoveConditions, 2000, pid, true) doCreatureAddHealth(pid, getCreatureMaxHealth(pid)) doCreatureAddMana(pid, getCreatureMaxMana(pid)) doTeleportThing(pid, info[getGlobalStorageValue(storage[1])]) end end end return true end]]></globalevent> </mod> aqui é a alteração 1° positions = { {{x = 135,y = 45, z = 7},{x = 138,y = 45, z = 7}}, {{x = 172,y = 57, z = 7},{x = 176,y = 60, z = 7}}, {{x = 186,y = 55, z = 7},{x = 190,y = 55, z = 7}} } se eles estiverem por exemplo entra a posição {x = 135,y = 45, z = 7} e a posição {x = 138,y = 45, z = 7} eles não serão teleportados pode adicionar mais... a 2° alteração eu coloquei um Event pra depois de 2 segundos retirar as conditions de novo ._. addEvent(doRemoveConditions, 2000, pid, true) -- 2000 = 2 segundo a 3° alteração é o comando que eu coloquei, é só usar o comando: /changemap
  11. 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 = string.lower(msg) local storage,pos = 15551,{x=1083, y=919, z=7} if isInArray({"lutar","fight","entrar","participar"}, msg) then npcHandler:say("HAHAHAHA, um mero academico quer mesmo lutar contra um Chunin, sabes que nao tem chance, esta mesmo preparado? {yes}", cid) talkState[talkUser] = 1 elseif isInArray({"yes","sim"}, msg) and talkState[talkUser] == 1 then if getPlayerStorageValue(cid, storage) <= 0 then npcHandler:say("Então vá!", cid) talkState[talkUser] = 0 doTeleportThing(cid, pos) else npcHandler:say("Você já terminou a missão", cid) talkState[talkUser] = 0 end elseif msg == "no" then selfSay("Hahahaha, sabia que voce era fraco, fuja seu verme, fuja pra bem longe", cid) talkState[talkUser] = 0 npcHandler:releaseFocus(cid) end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) tile function onStepIn(cid, item, position, fromPosition) local storage = 15551 if item.actionid == 28530 and getPlayerStorageValue(cid, storage) > 0 then doTeleportThing(cid, fromPosition, true) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE,"você não pode passar aqui.") doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_BLUE) return true end return true end movements.xml <movevent type="StepIn" actionid="28530" event="script" value="nome do seu script.lua"/>
  12. ah sim, entendi porque o npc que eu te mandei não funcionou, porque o parametro 'storage' no seu serve se usa como 'storageId' testa assim o npc: 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 local travelNode = keywordHandler:addKeyword({'lutar'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'HAHAHAHA, um mero academico quer mesmo lutar contra um Chunin, sabes que nao tem chance, esta mesmo preparado?{yes}'}) travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, level = 1, storageId = 15551, cost = 0, destination = {x=1083, y=919, z=7} }) travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'Hahahaha, sabia que voce era fraco, fuja seu verme, fuja pra bem longe.'}) -- Makes sure the npc reacts when you say hi, bye etc. npcHandler:addModule(FocusModule:new())
  13. o xtibia quebra a indentação
  14. Para primeira versão até que ficou boa xD REP + espero update, próxima versão é para players
  15. oq eh isso mano james e o pêssego gigante
  16. resolvido, vou reportar para moverem!
  17. cuidado com o double topic amigo! fechado
  18. cuidado com o double topic! fechado
  19. Uma amiga minha ficou de fazer o mapa, assim que ela fizer, e se fizer, eu anexo junto ao tópico! abraços fmz cara... vlw , vlw msm! reep + e outra coisa.. funciona em linux normal ? não sei te dizer, se você puder testar eu agradeceria
  20. Uma amiga minha ficou de fazer o mapa, assim que ela fizer, e se fizer, eu anexo junto ao tópico! abraços
  21. tempo continua contando sim
  22. Você que sabe, a gente pode editar na lib do npc para teleportar só tem terminou as quest ou fazer o tile... se decide ai parceiro xd vai em data/np/lib/npcsystem/modules.lua e posta toda a function StdModule.travel
  23. É só adicionar as funções em: Data > lib > 050-function.lua
  24. Vodkart

    Script Do Sobrevivencia

    tente trocar essa parte: <movevent type="StepIn" actionid="2941" event="script"><![CDATA[ domodlib('arena_config') if getPlayerAccess(cid) > config.acesso then doTeleportThing(cid, config.posicaoPlayer) return false end -- GM nao conta doSetStorage(config.storage,getStorage(config.storage) - 1) doTeleportThing(cid, config.posicaoPlayer) registerCreatureEvent(cid, "naoAtacarPlayer") registerCreatureEvent(cid, "morrerNaArena") if getStorage(config.storage) <= 0 then fecharTPeAguardarEvento() end return true ]]></movevent> por essa <movevent type="StepIn" actionid="2941" event="script"><![CDATA[ domodlib('arena_config') if getPlayerAccess(cid) > config.acesso then doTeleportThing(cid, config.posicaoPlayer) return false elseif getPlayerAccess(cid) < config.acesso then doSetStorage(config.storage,getStorage(config.storage) - 1) doTeleportThing(cid, config.posicaoPlayer) registerCreatureEvent(cid, "naoAtacarPlayer") registerCreatureEvent(cid, "morrerNaArena") if getStorage(config.storage) <= 0 then fecharTPeAguardarEvento() end end return true ]]></movevent>
  • Quem Está Navegando   0 membros estão online

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