Ir para conteúdo
  • Cadastre-se

ZoR

Membro
  • Total de itens

    835
  • Registro em

  • Última visita

  • Dias Ganhos

    3

Posts postados por ZoR

  1. se você passar por "or" simplesmente se ele tiver level abaixo quanto ele não tiver a storage irá passar @Endless

     

    local vocation = 233
    local STORAGE = 30023
    local Level = 50
    local msg = 'Voce já ultilizou esse item'
    
    function onUse(cid, item, frompos, item2, topos)
    if getPlayerStorageValue(cid, STORAGE) == 1 and getPlayerLevel(cid) <= Level then
        doPlayerSendTextMessage(cid, 21, msg)
      else
        doRemoveItem(item.uid, 1)
        doPlayerSetVocation(cid, vocation)
        doSendMagicEffect(getThingPos(cid), 14)
        doPlayerSendTextMessage(cid, 20, "Você percente á vocação ["..getPlayerVocationName(cid).."]. Relogue para que as alterações sejam feitas.")
        return true
    end

    @isac001 testa agora

  2. local vocation = 233
    local STORAGE = 30023
    local Level = 50
    local msg = 'Voce já ultilizou esse item'
    
    function onUse(cid, item, frompos, item2, topos)
    if getPlayerStorageValue(cid, STORAGE) == 1 and getPlayerLevel(cid) >= Level then
        return doPlayerSendCancel(cid, msg)
    end
        doRemoveItem(item.uid, 1)
        doPlayerSetVocation(cid, vocation)
        doSendMagicEffect(getThingPos(cid), 14)
        doPlayerSendTextMessage(cid, 20, "Você percente á vocação ["..getPlayerVocationName(cid).."]. Relogue para que as alterações sejam feitas.")
        return true
    end

    @isac001

  3. @leozincorsair 

    local exausted = 1 -- em minutos
    local combat = createCombatObject()
    setCombatParam(combat, COMBAT_PARAM_EFFECT, 13)
    setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, false)
    
    local condition = createConditionObject(CONDITION_MANASHIELD)
    setConditionParam(condition, CONDITION_PARAM_TICKS, 120000)
    setCombatCondition(combat, condition)
    
    function onCastSpell(cid, var)
    if isPlayer(cid) and getPlayerAccess(cid) < 3 and getPlayerStorageValue(cid, 998877)-os.time() > 1 then
       local seetime = getPlayerStorageValue(cid, 998878) - os.time()
       local seconds = math.floor(seetime % 10)
       doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Aguarde: " .. seconds .. " para usar novamente!" )
      return false
    end
    setPlayerStorageValue(cid, 998877, exausted*10+os.time())
        return doCombat(cid, combat, var)
    end

    pronto tá ae a segunda!

     

     

    Se ajudei rep+

     

  4. @leozincorsair 

    local exausted = 6
    local combat = createCombatObject()
    setCombatParam(combat, COMBAT_PARAM_EFFECT, 10)
    setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, false)
    
    function onCastSpell(cid, var)
    if isPlayer(cid) and getPlayerAccess(cid) < 3 and getPlayerStorageValue(cid, 998878) - os.time() > 1 then
       local seetime = getPlayerStorageValue(cid, 998878) - os.time()
       local seconds = math.floor(seetime % 10)
       doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Aguarde: " .. seconds .. " para usar novamente!" )
      return false
    end
      setPlayerStorageValue(cid, 998878, exausted + os.time() )
      doRemoveCondition(cid, CONDITION_MANASHIELD)
      return doCombat(cid, combat, var)
    end

    editado!

  5. @leozincorsair 

    local exausted = 1 -- em minutos
    local combat = createCombatObject()
    setCombatParam(combat, COMBAT_PARAM_EFFECT, 10)
    setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, false)
    
     
    
    function onCastSpell(cid, var)
        if isPlayer(cid) and getPlayerAccess(cid) < 3 and getPlayerStorageValue(cid, 998878)-os.time() > 1 then
    local seetime = getPlayerStorageValue(cid, 998878) - os.time()
    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Aguarde " .. seetime)
    return false
    end
    setPlayerStorageValue(cid, 998878, exausted * 10 + os.time() )
    doRemoveCondition(cid, CONDITION_MANASHIELD)
    return doCombat(cid, combat, var)
    end

     

    2

     

    
    local exausted = 1 -- em minutos
    local combat = createCombatObject()
    setCombatParam(combat, COMBAT_PARAM_EFFECT, 13)
    setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, false)
    
     
    
    local condition = createConditionObject(CONDITION_MANASHIELD)
    setConditionParam(condition, CONDITION_PARAM_TICKS, 120000)
    setCombatCondition(combat, condition)
    
     
    
    function onCastSpell(cid, var)
    if isPlayer(cid) and getPlayerAccess(cid) < 3 and getPlayerStorageValue(cid, 998877) - os.time() > 1 then
      local seetime = getPlayerStorageValue(cid, 998878) - os.time()
    	doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Aguarde " .. seetime)
      return false
    end
      setPlayerStorageValue(cid, 998877, exausted * 10 + os.time() )
        return doCombat(cid, combat, var)
    end

     

  6. @Zazeros 

    Spoiler
    
    local config = {
    cooldown = 10, -- tempo entre uma magia e outra
    time = 10, -- tempo em segundos que ficará healando
    percent = 5, --- porcentagem da vida que cura
    storage = 19330,
    effect = 12, --- efeito que vai sair
    mana = 10
    
    }
    function onCastSpell(cid, var)
    if getPlayerParty(cid) then
    if getCreatureMana(cid) >= config.mana then
    if os.time() - getPlayerStorageValue(cid, config.storage) >= config.cooldown then
    doPlayerSetStorageValue(cid, config.storage, os.time())
    local i = 0
    while i < config.time do
    i = i+1
    addEvent(function()
     if isCreature(cid) then
     if getCreatureMaxHealth(cid) ~= getCreatureHealth(cid) then
     local lifedraw = math.ceil(getCreatureMaxHealth(cid) * (config.percent)/100)
     local pos = getPlayerPosition(cid)
                doSendMagicEffect(pos, config.effect)
                getPartyMembers(doCreatureAddHealth(cid, lifedraw, 1))
    end
    end
    end, 1000*i)
    end
    else
    doPlayerSendCancel(cid, "COOLDOWN: "..(config.cooldown - (os.time() - getPlayerStorageValue(cid, config.storage))).." seconds.")
    end
    else
    doPlayerSendCancel(cid, 36)
    end
    return false
    end

     

    coloquei para curar membros da party

  7. @Zazeros bom na tabela faltava a parte "MANA" ou seja o script chamava algo vazio, não tinha a variavel mana na tabela

    olhe a parte do code que falta a variavel mana!

     

    local config = {
    cooldown = 10, -- tempo entre uma magia e outra
    time = 10, -- tempo em segundos que ficará healando
    percent = 5, --- porcentagem da vida que cura
    storage = 19330,
    effect = 12, --- efeito que vai sair
    
    }
    function onCastSpell(cid, var)
    if getCreatureMana(cid) >= config.mana then

    este acima é a parte do seu script que eu editei e coloquei a "MANA"

     

  8. @Zazeros 

    local config = {
    cooldown = 10, -- tempo entre uma magia e outra
    time = 10, -- tempo em segundos que ficará healando
    percent = 5, --- porcentagem da vida que cura
    storage = 19330,
    effect = 12, --- efeito que vai sair
    mana = 10
    
    }
    function onCastSpell(cid, var)
    if getCreatureMana(cid) >= config.mana then
    if os.time() - getPlayerStorageValue(cid, config.storage) >= config.cooldown then
    doPlayerSetStorageValue(cid, config.storage, os.time())
    local i = 0
    while i < config.time do
    i = i+1
    addEvent(function()
     if isCreature(cid) then
     if getCreatureMaxHealth(cid) ~= getCreatureHealth(cid) then
     local lifedraw = math.ceil(getCreatureMaxHealth(cid) * (config.percent)/100)
     local pos = getPlayerPosition(cid)
                  doCreatureAddHealth(cid, lifedraw, 1)
                doSendMagicEffect(pos, config.effect)
    end
    end
    end, 1000*i)
    end
    else
    doPlayerSendCancel(cid, "COOLDOWN: "..(config.cooldown - (os.time() - getPlayerStorageValue(cid, config.storage))).." seconds.")
    end
    else
    doPlayerSendCancel(cid, 36)
    end
    return false
    end

     

  9. @iury alves potter 

    Spoiler
    
    local NPCBattle = {
    ["Brock"] = {artig = "He is", cidbat = "Pewter"},
    ["Misty"] = {artig = "She is", cidbat = "Cerulean"}, 
    ["Blaine"] = {artig = "He is", cidbat = "Cinnabar"},
    ["Sabrina"] = {artig = "She is", cidbat = "Saffron"},         --alterado v1.9 \/ peguem tudo!
    ["Kira"] = {artig = "She is", cidbat = "Viridian"},
    ["Koga"] = {artig = "He is", cidbat = "Fushcia"},
    ["Erika"] = {artig = "She is", cidbat = "Celadon"},
    ["Surge"] = {artig = "He is", cidbat = "Vermilion"},
    }
    
    function onLook(cid, thing, position, lookDistance)
                                                              
    local str = {}
                                                  
    if not isCreature(thing.uid) then
       local iname = getItemInfo(thing.itemid)
       if isPokeball(thing.itemid) and getItemAttribute(thing.uid, "poke") then 
          
          unLock(thing.uid)
          local lock = getItemAttribute(thing.uid, "lock")        
          local pokename = getItemAttribute(thing.uid, "poke")
          table.insert(str, "Isto(Este) e "..iname.article.." "..iname.name..".")   
          if getItemAttribute(thing.uid, "unique") then               
             setItemAttribute(thing.uid, "unique", nil)
          end
          table.insert(str, "\nContem um "..getArticle(pokename).." "..pokename..".\n")  
          local boost = getItemAttribute(thing.uid, "boost") or 0
          if boost > 0 then
             table.insert(str, "Ele(a) Esta bostado: +"..boost..".\n")
          end
                      local createby = getItemAttribute(thing.uid, "createby") or nil
                      local createin = getItemAttribute(thing.uid, "createin") or nil
                      local pokeid = getItemAttribute(thing.uid, "pokeid") or "nothing"
                if createin ~= nil then
             table.insert(str, "Criado em: "..createin..".\n")
          end
                    if createby ~= nil then
             table.insert(str, "Criado por: "..createby..".\n")
          end
                    if pokeid ~= "nothing" then
             table.insert(str, "ID do Pokemon: "..pokeid..".\n")
          end
          if getItemAttribute(thing.uid, "nick") then
             table.insert(str, "O Apelido e: "..getItemAttribute(thing.uid, "nick")..".\n")
          end
          if getItemAttribute(thing.uid, "gender") == SEX_MALE then
             table.insert(str, "Ele e Masculino.")
          elseif getItemAttribute(thing.uid, "gender") == SEX_FEMALE then
             table.insert(str, "Ela e Feminina.")
          else
             table.insert(str, "Ele(a) e Indefinido.")
          end
          doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, table.concat(str))
          return false
          
       elseif string.find(iname.name, "fainted") or string.find(iname.name, "defeated") then     
    
          table.insert(str, "Voce ve um "..string.lower(iname.name)..". ")     
          if isContainer(thing.uid) then
             table.insert(str, "(Vol: "..getContainerCap(thing.uid)..")")
          end
          table.insert(str, "\n")
          if getItemAttribute(thing.uid, "gender") == SEX_MALE then
             table.insert(str, "Ele e Masculino.")
          elseif getItemAttribute(thing.uid, "gender") == SEX_FEMALE then
             table.insert(str, "Ela e Feminina.")
          else
             table.insert(str, "Ele(a) e Indefinido.")
          end
          doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, table.concat(str))
          return false
    
       elseif isContainer(thing.uid) then     --containers
    
          if iname.name == "dead human" and getItemAttribute(thing.uid, "pName") then
             table.insert(str, "Isto e um Corpo Humano (Vol:"..getContainerCap(thing.uid).."). ")
             table.insert(str, "Voce esta vendo o ".. getItemAttribute(thing.uid, "pName")..". ".. getItemAttribute(thing.uid, "article").." e Foi morto por ")
             table.insert(str, getItemAttribute(thing.uid, "attacker")..".")
          else   
             table.insert(str, "Este e "..iname.article.." "..iname.name..". (Vol:"..getContainerCap(thing.uid)..").")
          end
          if getPlayerGroupId(cid) >= 4 and getPlayerGroupId(cid) <= 6 then
             table.insert(str, "\nItemID: ["..thing.itemid.."]")     
             local pos = getThingPos(thing.uid)
             table.insert(str, "\nCoordenadas: [X: "..pos.x.."][Y: "..pos.y.."][Z: "..pos.z.."]")  
          end
          doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, table.concat(str))
          return false
          
       elseif getItemAttribute(thing.uid, "unique") then    
          local p = getThingPos(thing.uid)
       
          table.insert(str, "Este e ")
          if thing.type > 1 then
             table.insert(str, thing.type.." "..iname.plural..".")
          else
             table.insert(str, iname.article.." "..iname.name..".")
          end          
             setItemAttribute(thing.uid, "unique", nil)
          
          if getPlayerGroupId(cid) >= 4 and getPlayerGroupId(cid) <= 6 then
             table.insert(str, "\nItemID: ["..thing.itemid.."]")
             table.insert(str, "\nCoordenadas: ["..p.x.."]["..p.y.."]["..p.z.."]")
          end
       
          sendMsgToPlayer(cid, MESSAGE_INFO_DESCR, table.concat(str))
          return false
       else
          return true
       end
    end
    
    local npcname = getCreatureName(thing.uid)
    if ehNPC(thing.uid) and NPCBattle[npcname] then    --npcs duel
       table.insert(str, "Este(a) e "..npcname..". "..NPCBattle[npcname].artig.." Lider de Ginasio de "..NPCBattle[npcname].cidbat..".")
       doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, table.concat(str))
       return false
    end
    if getPlayerStorageValue(thing.uid, 697548) ~= -1 then    
       table.insert(str, getPlayerStorageValue(thing.uid, 697548))                                   
       local pos = getThingPos(thing.uid)
       if youAre[getPlayerGroupId(cid)] then
          table.insert(str, "\nCoordenadas: [X: "..pos.x.."][Y: "..pos.y.."][Z: "..pos.z.."]")
       end
       doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, table.concat(str))  
       return false
    end
    
    if not isPlayer(thing.uid) and not isMonster(thing.uid) then    --outros npcs
       table.insert(str, "Este e "..getCreatureName(thing.uid)..".")
       doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, table.concat(str))
       return false
    end
    
    if isPlayer(thing.uid) then     --player
       doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, getPlayerDesc(cid, thing.uid, false) .. "\n" .. "Reset: [" .. getResets(cid) .. "]" )  
    return false
    end
    
    if getCreatureName(thing.uid) == "Evolution" then return false end
    
    if not isSummon(thing.uid) then   --monstros
       
       table.insert(str, "Isto e um Pokemon Selvagem : "..string.lower(getCreatureName(thing.uid))..".\n")
       table.insert(str, "Vida: "..getCreatureHealth(thing.uid).." / "..getCreatureMaxHealth(thing.uid)..".\n")
       if getPokemonGender(thing.uid) == SEX_MALE then
          table.insert(str, "Ele e Masculino.")
       elseif getPokemonGender(thing.uid) == SEX_FEMALE then
          table.insert(str, "Ela e Feminina.")
       else
          table.insert(str, "Ele(a) e Indefinido.")
       end
       doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, table.concat(str))
       return false
    
    elseif isSummon(thing.uid) and not isPlayer(thing.uid) then  --summons
    
       local boostlevel = getItemAttribute(getPlayerSlotItem(getCreatureMaster(thing.uid), 8).uid, "boost") or 0
       local createby = getItemAttribute(getPlayerSlotItem(getCreatureMaster(thing.uid), 8).uid, "createby") or "nothing"
       local pokeid = getItemAttribute(getPlayerSlotItem(getCreatureMaster(thing.uid), 8).uid, "pokeid") or "nothing"
       local createin = getItemAttribute(getPlayerSlotItem(getCreatureMaster(thing.uid), 8).uid, "createin") or "nothing"
       if getCreatureMaster(thing.uid) == cid then
          local myball = getPlayerSlotItem(cid, 8).uid
          table.insert(str, "Voce ve o seu "..string.lower(getCreatureName(thing.uid))..".")
          if boostlevel > 0 then
             table.insert(str, "\nEsta Bostado: +"..boostlevel..".")
          end
          table.insert(str, "\nVida e Vida Maxima: "..getCreatureHealth(thing.uid).."/"..getCreatureMaxHealth(thing.uid)..".")
          table.insert(str, "\n"..getPokemonHappinessDescription(thing.uid))
          doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, table.concat(str))
       else
         table.insert(str, "Voce ve um "..string.lower(getCreatureName(thing.uid))..".\nEle Pertence a "..getCreatureName(getCreatureMaster(thing.uid))..".")                  
          if createby ~= "nothing" then
          table.insert(str, "\nCriado por: " .. createby)
           end
          if pokeid ~= "nothing" then
          table.insert(str, "\nID do Pokemon: " .. pokeid)
           end
              if createin ~= "nothing" then
          table.insert(str, "\nCriado em: " .. createin)
           end
           
          doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, table.concat(str))
       end
       return false
    end
    return true
    end

     

     

     

    Download do arquivo Look.lua

     

    Se Ajudei Rep+ :) 

     

×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo