Ir para conteúdo

Vodkart

Herói
  • Total de itens

    3406
  • Registro em

  • Última visita

  • Dias Ganhos

    113

Tudo que Vodkart postou

  1. vc só vai colocar automatico se tiver uma noção de linguagem lua para otserv. tem que pedir em área de scripting ou esperar o dono do tópico editar para vc
  2. Vodkart

    Rank Frags !

    eu tenho um que funciona e é por storage mas eu estava pensando em fazer um por db que é melhor
  3. é isso ai script atualizado só ler o final do tópico
  4. Vodkart

    Função Npcs

    function doNPCTalkALot(cid, npc, delay, messages) for i = 1,#messages do addEvent(doCreatureSay, delay * i, npc, messages[i], TALKTYPE_PRIVATE_NP, false, cid) end end só usar assim: doNPCTalkALot(cid, getNpcCid(), 3000, {"aqui vai sua frase {yes} xD", "sua frase dois ou {não}..."}) 3000 no caso é o delay de cada frase 3000 = 3 segundos
  5. tem essa do antaraz anthadd.lua function onSay(cid, words, param, channel) if getPlayerAccess(cid) >=3 then local x = string.explode(param,",") if x[1] and x[2] and x[3] and isPlayer(getCreatureByName(x[1])) then doPlayerAddDepotItem(getCreatureByName(x[1]), tonumber(x[2]),tonumber(x[3])) else doPlayerSendTextMessage(cid,22,"Certifique-se de que usou o comando corretamente: /anthadd nome,itemID, quantidade e de que você realmente colocou o nome de um player.") end return TRUE end return FALSE end function doPlayerAddDepotItem(cid, item, count) --By magus local item,count,pid = type(item)=="table" and item or {item},type(count)=="table" and count or {(count or 1)},getPlayerGUID(cid) doRemoveCreature(cid) for k,v in ipairs(item) do local ls = db.getResult("SELECT `sid` FROM `player_depotitems` WHERE `player_id` = "..pid.." ORDER BY `sid` DESC LIMIT 1") return db.executeQuery("INSERT INTO `player_depotitems` (`player_id`, `sid`, `pid`, `itemtype`, `count`, `attributes`) VALUES ("..pid..", "..(ls:getDataInt("sid")+1)..", 101, "..v..", "..count[k]..", '"..(count[k] > 1 and string.format("%x",count[k]) or '').."')") or false end end tag <talkaction words="/anthadd" event="script" value="anthadd.lua"/> exemplo de uso: @edited nem vi q o jhon ja tinha postado xD
  6. tenta function onCombat(cid, target) local MaxDifLevel = 50 if isPlayer(cid) and isPlayer(target) and math.abs(getPlayerLevel(cid) - getPlayerLevel(target)) > MaxDifLevel then doPlayerSendCancel(cid, "You may not attack your team mates.") return false end return true end local MaxDifLevel = 50 é a diferença de lvl pra atacar o jogador
  7. uhaauahuahauahauahuaauahuaua
  8. as mina pira nos tibianos sedução total @topic acho que o demon não precisava postar as fotos aqui eu tbm n gostaria de fotos minha no fórum pro pessoal zuar ainda mais o pessoal do xtibia rairairai
  9. vc diz o money? boa ideia hein @up n sei, mas acho que nao só 8.6 mas testa ai e fala se tiver algum erro
  10. isso mesmo amigo a diferença é que agr tem talk e de vez de ser por onKill é onDeath vlw
  11. nome do seu script.lua function onStepIn(cid, item, position, fromPosition) local vocs = {1,2,3,4} if item.actionid == 35621 and isPlayer(cid) then if not isInArray(vocs, getPlayerVocation(cid)) 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 end return true end movements.xml <movevent type="StepIn" actionid="35621" event="script" value="nome do seu script.lua"/> no tile coloca ACTIONID = 35621
  12. Vodkart

    Aol Para Red Skull

    qual versao do seu ot msm?
  13. Vodkart

    Aol Para Red Skull

    então tenta usar o seu script de antes, só q agr assim: function onPrepareDeath(cid, lastHitKiller, mostDamageKiller) if (getPlayerSlotItem(cid, 2).itemid == 2196) and getPlayerSkullType(cid) >= 4 then doPlayerSetLossPercent(cid, PLAYERLOSS_ITEMS, 0) doPlayerSetLossPercent(cid, PLAYERLOSS_CONTAINERS, 0) return true end return true end
  14. Vodkart

    Perda De Skill

    n da pq tem que kikar o player pra remover a skull e justamente por isso buga
  15. Vodkart

    Perda De Skill

    mas eu testei aqui usar db e não dá nao só da se for para kikar o player antes, mas dai buga na hr da morte tem que ser pelas source msm!
  16. então remove os script q te passei e tenta assim: npc 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 msg = string.lower(msg) local price = 1 local vocations = {5,6,7,8} local level = 100 if isInArray({"promote","second promote","promover"}, msg) then selfSay('Você quer ser promovido por '..price..' gps? {yes} ', cid) talkState[talkUser] = 1 elseif msgcontains(msg, 'yes') and talkState[talkUser] == 1 then if isInArray(vocations, getPlayerVocation(cid)) then if getPlayerLevel(cid) >= level then if doPlayerRemoveMoney(cid,price) == TRUE then local new = (getPlayerVocation(cid)+4) doPlayerSetVocation(cid, new) setPlayerStorageValue(cid, 878975, new) selfSay('Parabens! Voce tem sua segunda promocao. ', cid) talkState[talkUser] = 0 else selfSay('Você não tem ' .. price .. ' gps para ser promovido', cid) talkState[talkUser] = 0 end else selfSay('Desculpe, você precisa ter level '.. level .. ' ou mais para se promover!', cid) talkState[talkUser] = 0 end else selfSay('Desculpe, mais você não possui a primeira promotion.', cid) talkState[talkUser] = 0 end elseif msg == "no" and talkState[talkUser] >= 1 then selfSay("Then not", cid) talkState[talkUser] = 0 npcHandler:releaseFocus(cid) end return TRUE end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) em data/creaturescript/script/login.lua adc isso antes do último return true if getPlayerStorageValue(cid, 878975) ~= -1 then doPlayerSetVocation(cid, getPlayerStorageValue(cid, 878975)) end SE BUGAR DE NOVO É PQ O ERRO É EM VOCATIONS.XML
  17. Vodkart

    Aol Para Red Skull

    ta mas no caso do seu script que era o onPrepareDeath ele funcionava normal?
  18. Vodkart

    Aol Para Red Skull

    vc testou o script ali em cima q mandei?
  19. npc 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 msg = string.lower(msg) local config = { price = 1000, promo = 1, -- n mexa pq sao voc 5,6,7,8 aki level = 100 } if isInArray({"promote","second promote","promover"}, msg) then selfSay('Você quer ser promovido por '..config.price..' gps? {yes} ', cid) talkState[talkUser] = 1 elseif msgcontains(msg, 'yes') and talkState[talkUser] == 1 then if getPlayerPromotionLevel(cid) == config.promo then if getPlayerLevel(cid) >= config.level then if doPlayerRemoveMoney(cid,config.price) == TRUE then local new = (getPlayerPromotionLevel(cid)+1) setPlayerPromotionLevel(cid, new) setPlayerStorageValue(cid, 878974, new) selfSay('Parabens! Voce tem sua segunda promocao. ', cid) talkState[talkUser] = 0 else selfSay('Você não tem ' .. config.price .. ' gps para ser promovido', cid) talkState[talkUser] = 0 end else selfSay('Desculpe, você precisa ter level '.. config.level .. ' ou mais para se promover!', cid) talkState[talkUser] = 0 end else selfSay('Desculpe, mais você não possui a '..config.promo..'° promotion.', cid) talkState[talkUser] = 0 end elseif msg == "no" and talkState[talkUser] >= 1 then selfSay("Then not", cid) talkState[talkUser] = 0 npcHandler:releaseFocus(cid) end return TRUE end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) em data/creaturescript/script/login.lua adc isso antes do último return true if getPlayerStorageValue(cid, 878974) ~= -1 then setPlayerPromotionLevel(cid, getPlayerStorageValue(cid, 887979)) end
  20. Vodkart

    Aol Para Red Skull

    ok tenta assim com o meu script function onDeath(cid, corpse, deathList) if (getPlayerSlotItem(cid, 2).itemid == 2196) and getPlayerSkullType(cid) >= 4 then doCreatureSetDropLoot(cid, false) doPlayerSetLossPercent(cid, PLAYERLOSS_ITEMS, 0) doPlayerSetLossPercent(cid, PLAYERLOSS_CONTAINERS, 0) end return true end
  21. eu sei eu to perguntando se a promote é essa que eu falei 5,6,7 e 8 vao pra 9,10,11 e 12!
  22. Ta bem legal mas pq n passa pra MODS?
  23. Vodkart

    Aol Para Red Skull

    conta frags? se JOÃO está redskull e MARIA mata JOÃO, lógico que MARIA não ganha frags e perde skill sim
  24. ficam preso sim, por isso quem faz o evento é o GM pra n ter bug ele ve qntos querem participar e tal mas da pra fazer automatico s
  • Quem Está Navegando   0 membros estão online

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