Ir para conteúdo

leofox97

Campones
  • Total de itens

    67
  • Registro em

  • Última visita

Posts postados por leofox97

  1. Bom dia, to tentando muda a a foto do player pra vertical mas não to conseguindo to quebrando minha cabeça deis de ontem se possível alguém pode da uma mão ?

     

    obs: qualquer ajuda e bem vinda obg..

     

    Script:

     

     

    PokeballButton < UIButton
      size: 12 12
      image-source: pokeball_empty
      phantom: true
      focusable: false
      margin: 2
      margin-top: 3

    HealthBar < ProgressBar
      id: health
      background-color: #FF1111
      anchors.top: parent.top
      anchors.left: parent.left
      anchors.right: parent.right
      margin: 1

    ExperienceBar < ProgressBar
      id: levelPercent
      background-color: #1144EE
      anchors.top: prev.bottom
      anchors.left: parent.left
      anchors.right: parent.right
      margin: 1
      margin-top: 2
      height: 7

    CharacterWidget < UIWidget
      width: 170
      padding: 5
      border: 0 #ffffffff
      background-color: alpha

      $focus:
        border: 1 #0077ff
        background-color: #72CAFD22

      UICreature
        id: outfit
        size: 68 68
        padding: 3
        margin-top: 2
        anchors.top: parent.top
        anchors.horizontalCenter: parent.horizontalCenter
        background-color: alpha
        border: 0 #ffffffff

      Label
        id: name
        color: #ffffff
        anchors.top: outfit.bottom
        anchors.left: parent.left
        margin-left: 3
        font: verdana-11px-monochrome
        text-auto-resize: true
        background-color: alpha

      Label
        id: level
        color: #ffffff
        anchors.top: name.bottom
        anchors.left: parent.left
        margin-left: 3
        font: verdana-11px-monochrome
        text-auto-resize: true
        background-color: alpha

      HealthBar
        anchors.top: level.bottom
        anchors.left: parent.left
        margin: 2
        margin-left: 3

      ExperienceBar
        anchors.top: health.bottom
        anchors.left: parent.left
        margin: 2
        margin-left: 3

      PokeballButton
        id: pokeball_1
        anchors.top: levelPercent.bottom
        anchors.left: parent.left
        margin-left: 5

      PokeballButton
        id: pokeball_2
        anchors.top: levelPercent.bottom
        anchors.left: prev.right

      PokeballButton
        id: pokeball_3
        anchors.top: levelPercent.bottom
        anchors.left: prev.right

      PokeballButton
        id: pokeball_4
        anchors.top: levelPercent.bottom
        anchors.left: prev.right

      PokeballButton
        id: pokeball_5
        anchors.top: levelPercent.bottom
        anchors.left: prev.right

      PokeballButton
        id: pokeball_6
        anchors.top: levelPercent.bottom
        anchors.left: prev.right

      Label
        id: caught
        color: #ffffff
        anchors.top: levelPercent.bottom
        anchors.right: levelPercent.right
        margin: 2
        margin-left: 5
        font: verdana-11px-monochrome
        text-auto-resize: true
        background-color: alpha

    MainWindow
      id: charactersWindow
      !text: tr('Character List')
      // size: 370 400
      size: 544 280
      visible: false
      @onEnter: CharacterList.doLogin()
      @onEscape: CharacterList.hide(true)
      @onSetup: |
        g_keyboard.bindKeyPress('Left', function() self:getChildById('characters'):focusPreviousChild(KeyboardFocusReason) end, self)
        g_keyboard.bindKeyPress('Right', function() self:getChildById('characters'):focusNextChild(KeyboardFocusReason) end, self)

      HorizontalList
        id: characters
        anchors.top: parent.top
        anchors.left: parent.left
        anchors.right: parent.right
        anchors.bottom: accountStatusCaption.top
        margin-bottom: 18
        padding: 1
        focusable: false
        horizontal-scrollbar: characterListScrollBar
        auto-focus: first

      HorizontalScrollBar
        id: characterListScrollBar
        anchors.left: parent.left
        anchors.bottom: accountStatusCaption.top
        anchors.right: parent.right
        margin-bottom: 5
        step: 170
        pixels-scroll: true

      Label
        id: accountStatusCaption
        !text: tr('Account Status') .. ':'
        anchors.left: parent.left
        anchors.right: parent.right
        anchors.bottom: next.top
        margin-bottom: 1

      Label
        id: accountStatusLabel
        !text: tr('Free Account')
        anchors.left: parent.left
        anchors.right: parent.right
        anchors.bottom: separator.top
        margin-bottom: 5
        text-auto-resize: true

        $on:
          color: #FF0000

      HorizontalSeparator
        id: separator
        anchors.left: parent.left
        anchors.right: parent.right
        anchors.bottom: next.top
        margin-bottom: 10

      Button
        id: buttonOk
        !text: tr('Ok')
        width: 64
        anchors.right: next.left
        anchors.bottom: parent.bottom
        margin-right: 10
        @onClick: CharacterList.doLogin()

      Button
        id: buttonCancel
        !text: tr('Cancel')
        width: 64
        anchors.right: parent.right
        anchors.bottom: parent.bottom
        @onClick: CharacterList.hide(true)
     

     

    6G4lHmh.png

  2. Ola boa noite, primeiramente já falo que sou meio leigo em .lua entao qualquer erro bobo já peço desculpas,

     

    estou tendo problema com uma quest simples que estou criando,ela se resume basicamente em pega a quest com um npc, pega os itens matando os monstros e entrega ao outro npc.

     

    o problema esta na segunda parte da quest, mas exactamente quando vou entregar ao npc, o npc remove os itens,mas nao da o itens de recompensa ao player, no entanto testando com o god é diferente ele recebe o itens normalmente.

     

    vou colocar o script, quem puder da uma olhada vai ajuda muito..

     

    Desculpa nao consegui usar spoiler....

     

     


    ITEM = 12170 -- Item a ser Removido

    QUANT = 20 -- Quantidade de item a ser removido


    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

    function santaNPC(cid, message, keywords, parameters, node)

    if(not npcHandler:isFocused(cid)) then

    return false

    end

    if (parameters.present == true) then

    if getPlayerStorageValue(cid,STORAGE) == 1 and getPlayerItemCount(cid,12170) >= 20 then

    doPlayerRemoveItem(cid,ITEM,QUANT)

    doPlayerAddItem(cid,18373,1)

    doPlayerAddExp(cid,30000)

    setPlayerStorageValue(cid, STORAGE, 2)

    npcHandler:say('Obrigado', cid)

    elseif getPlayerStorageValue(cid,STORAGE) >= 2 then

    npcHandler:say('Voce ja completou essa missao.', cid)


    elseif getPlayerStorageValue(cid,STORAGE) < 1 then

    npcHandler:say('Voce nao falou com Josh.', cid)

    elseif getPlayerItemCount(cid,12170) <= 19 then

    npcHandler:say('Voce nao tem os 20 water pendants que precisso.', cid)

    end

    end

    npcHandler:resetNpc()

    return true

    end

    npcHandler:setMessage(MESSAGE_GREET, "Olá |PLAYERNAME|. Meu irmao lhe mandou? diga mission para proseguir..")

    local noNode = KeywordNode:new({'no'}, santaNPC, {present = false})

    local yesNode = KeywordNode:new({'yes'}, santaNPC, {present = true})

    local node = keywordHandler:addKeyword({'mission'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Josh mandou voce para me entregar os water pendants? {yes}'})

    node:addChildKeywordNode(yesNode)

    node:addChildKeywordNode(noNode)

    npcHandler:addModule(FocusModule:new())
     

                                                 

    Ja resolvi..

  3. alguem ajuda ... se eu coloco no navegador pra fica zoom 80% ele fica certo

     

    mas caso eu deixe o zoom padrao 100% ele fica distorcido 

     

     

    agradeço deis de ja...

     

    Sem título.png

    zom80.png

    5852fbc25807b_Semttulo.thumb.png.7107e36eca051ae88ff59ddb6c00865e.png

    zom80.thumb.png.e1f47877c42afd7689c8f0e384883542.png

  4. Nao sei se estou na area correta , quaquer coisa mover obrigado.

     

    bom dia , estou com uma duvida estou trabalhando atualmente com um servidor derivado de pokemon, o meu problema e que quando o pokemon usa algum ataque exemplo Confusion , ele remove a uma certa quantidade de vida do outro pokemon e so ,eu estava querendo que o jogo mostrase a quantidade de dano que o ataque infligiu , tem como fazer a parecer o dano?

  5.  

    Tópico Movido

    Este tópico foi movido de "OTServSpritingSuporte Spriting"

    para "OTServClientsSuporte Clientes".

     

     

    Tenta esse

    
    ​local backMSG = {"Come back, doka!", "Thanks for helping, doka!", "That's enough, come back!", "You were great, doka!", "Excellent work, doka!", "Well done, doka!"}
    local goMSG   = {"Go, doka!", "Let's do it, doka!", "I choose you, doka!", "I need your help, doka!", "Let's fight, doka!", "It's battle time, doka!"}
     
    function onUse(cid, item, frompos, item2, topos)
    if #getCreatureSummons(cid) >= 1 and getPlayerStorageValue(getCreatureSummons(cid)[1], 33) >= 1 then
    return true
    end
    --------
       msgunicaback =  backMSG[math.random(#backMSG)]
       msgunicago = goMSG[math.random(#goMSG)]
       btype = getPokeballType(item.itemid)
       usando = pokeballs[btype].use
       online = pokeballs[btype].on
       morto  = pokeballs[btype].off
       if isIconeSystem(cid) then
          effect = getItemAttribute(item.uid, "effect")
        else
          effect =  getItemAttribute(item.uid, "effect")
       end
    --------
     
    if item.itemid == usando then
    if #getCreatureSummons(cid) >= 1 then
    local z = getCreatureSummons(cid)[1]
    local pokename = getCreatureName(z)
    local mbk = msgunicaback:gsub("doka", pokename)
    if getItemAttribute(item.uid, "poke"):find(getCreatureName(z)) then
    doTransformItem(item.uid, item.itemid-1)
    doCreatureSay(cid, mbk, TALKTYPE_SAY)
    local summom = getCreatureSummons(cid)
    local maxh = pokes[getCreatureName(summom[1])].vida
    local pct2 = ((getCreatureHealth(summom[1])) / (getCreatureMaxHealth(summom[1])))
    local vids = ((getCreatureHealth(summom[1])) - 2)
    doCreatureAddHealth(summom[1], -vids)
    setCreatureMaxHealth(summom[1], maxh)
    doCreatureAddHealth(summom[1], ((maxh) * (pct2)))
    if math.random(1,100) <= 35 then
      setPokemonFeed(cid, getPokemonFeed(cid)-15) -- Food system
    end
    doItemSetAttribute(item.uid, "poke", getItemAttribute(item.uid, "poke"):sub(1, findLetter(getItemAttribute(item.uid, "poke"), ".")) .. " HP = ["..getCreatureHealth(z).."/"..getCreatureMaxHealth(z).."]")
    setPlayerStorageValue(cid, 61204, 0)
    setPlayerStorageValue(cid, 2, 0)
    doSendMagicEffect(getCreaturePosition(z), effect)
    doRemoveCreature(z)
    if useOTClient then
       doPlayerSendCancel(cid, '12//,hide') --alterado v1.7
    end
    if useKpdoDlls then
       doUpdateMoves(cid)
    end
    if getPlayerStorageValue(cid, 991) >= 1 then  --- Ginasios
       doSendAnimatedText(getThingPos(cid), "POKEOUT", 181)
       setPlayerStorageValue(cid, 991, getPlayerStorageValue(cid, 991) -1)
    end
    return true
    end
    end
    elseif item.itemid == morto then
           return doPlayerSendCancel(cid, "This pokemon is fainted.")
     
    elseif item.itemid == online then
    if isZumbie(cid) or isHuman(cid) then
    return doPlayerSendCancel(cid, "Sorry, is not possible.")
    end
    if item.uid ~= getPlayerSlotItem(cid, CONST_SLOT_FEET).uid then
     doPlayerSendCancel(cid, "You must put your pokeball in the correct place!")
     return TRUE
    end
     
    
    if not canSummon(cid) then
    return doPlayerSendDefaultCancel(cid, RETURNVALUE_NOTENOUGHROOM)
    end
     
    if getPlayerStorageValue(cid, 63215) >= 1 then
    return doPlayerSendCancel(cid, "You can't use pokeball while surfing.")
    end
     
    if getPlayerStorageValue(cid, 62314) >= 1 then
    return doPlayerSendCancel(cid, "You can't use pokeball while flying.")
    end
     
    if #getCreatureSummons(cid) >= 1 then
    return doPlayerSendCancel(cid, "You have already summoned a pokemon.")
    end
     
    for i,x in pairs(pokes) do
    if i == getItemAttribute(item.uid, "poke"):sub(9, findLetter(getItemAttribute(item.uid, "poke"), "'")-1) then
     
    if getPlayerLevel(cid) < x.level+getPokemonBoostt(item.uid) then
    doPlayerSendCancel(cid, "You need level "..x.level+getPokemonBoostt(item.uid).." or higher to use this pokemon.")
    return true
    end
    local removed = doCreateItem(1285, 1, getThingPos(cid))
    doSummonMonster(cid, i)
    local pk = getCreatureSummons(cid)[1]
    doTeleportThing(pk, getClosestFreeTile(pk, getThingPos(cid)), false)
    doRemoveItem(removed, 1)
    doCreatureSetLookDir(pk, 2)
    local maxh = pokes[getCreatureName(pk)].vida
    local levellife = ((getPlayerLevel(cid)) *2+ getPokemonBoost(getPlayerSlotItem(cid,8).uid))
    local health = tonumber(getItemAttribute(item.uid, "poke"):match("%[(.-)/"))
    doConvinceCreature(cid, pk)
    doCreatureAddHealth(pk, health-maxh)
    local pct = ((getCreatureHealth(pk)) / (getCreatureMaxHealth(pk)))
    local vidis = (getCreatureHealth(pk))
    setCreatureMaxHealth(pk, ((maxh) + (levellife)))
    doCreatureAddHealth(pk, 2)
    doCreatureAddHealth(pk, -vidis)
    doCreatureAddHealth(pk, ((getCreatureMaxHealth(pk)) * (pct)) - 2)
    doTransformItem(item.uid, item.itemid+1)
    local pokename = getCreatureName(getCreatureSummons(cid)[1])
    local mgo = msgunicago:gsub("doka", pokename)
    doCreatureSay(cid, mgo, TALKTYPE_SAY)
    if useOTClient then
       doPlayerSendCancel(cid, '12//,show') --alterado v1.7
    end
    if useKpdoDlls then
       doUpdateMoves(cid)
    end
    if math.random(1,100) <= 35 then
      setPokemonFeed(cid, getPokemonFeed(cid)-5) -- Food system
    end
    doSendFeedEffect(cid)
    if getItemAttribute(item.uid, "nome") ~= "Ditto" then
    for i = 1, 12 do
    if not getMoveNamee(cid, i) then
    addEvent(doGoBackSetCooldown, 200, cid)
    end
    end
    else
    for a = 1, 12 do
      setPokemonCooldown(cid, a, "Don't have this move.")
    end
    end
    ----- Burn, venom e ice system ------
    getBurn(cid)
    getVenom(cid)
    getIce(cid)
    ----- Burn, venom e ice system ------
    doItemSetAttribute(item.uid, "poke", getItemAttribute(item.uid, "poke"):sub(1, findLetter(getItemAttribute(item.uid, "poke"), ".")))
    doItemSetAttribute(item.uid, "pokes", ""..pokename.."")
    doSendMagicEffect(getCreaturePosition(pk), effect)
    setPlayerStorageValue(cid, 61204, 1)
    registerCreatureEvent(pk, "DiePoke")
    registerCreatureEvent(pk, "Exp")
    --ShinyBallSystem\/
    isShinyBallOrBoosted(cid, item)
     
    if getPlayerStorageValue(cid, 991) >= 1 then  --- Ginasios
       doSendAnimatedText(getThingPos(cid), "POKEIN", TEXTCOLOR_LIGHTBLUE)
    end
     
    break
    end
    end
    end
    return TRUE
    end
    
    

    Aberos

    muito obrigado ja conseguir resvolver praticamente ficou igual no seu, vlw voce me ajudo muito.​

  6.  

     

     

    local backMSG = {"Come back, doka!", "Thanks for helping, doka!", "That's enough, come back!", "You were great, doka!", "Excellent work, doka!", "Well done, doka!"}
    local goMSG   = {"Go, doka!", "Let's do it, doka!", "I choose you, doka!", "I need your help, doka!", "Let's fight, doka!", "It's battle time, doka!"}
     
    function onUse(cid, item, frompos, item2, topos)
    if #getCreatureSummons(cid) >= 1 and getPlayerStorageValue(getCreatureSummons(cid)[1], 33) >= 1 then
    return true
    end
    --------
       msgunicaback =  backMSG[math.random(#backMSG)]
       msgunicago = goMSG[math.random(#goMSG)]
       btype = getPokeballType(item.itemid)
       usando = pokeballs[btype].use
       online = pokeballs[btype].on
       morto  = pokeballs[btype].off
       if isIconeSystem(cid) then
          effect = getItemAttribute(item.uid, "effect")
        else
          effect =  getItemAttribute(item.uid, "effect")
       end
    --------
     
    if item.itemid == usando then
    if #getCreatureSummons(cid) >= 1 then
    local z = getCreatureSummons(cid)[1]
    local pokename = getCreatureName(z)
    local mbk = msgunicaback:gsub("doka", pokename)
    if getItemAttribute(item.uid, "poke"):find(getCreatureName(z)) then
    doTransformItem(item.uid, item.itemid-1)
    doCreatureSay(cid, mbk, TALKTYPE_SAY)
    doPlayerSendCancel(cid, '12//,hide')
    local summom = getCreatureSummons(cid)
    local maxh = pokes[getCreatureName(summom[1])].vida
    local pct2 = ((getCreatureHealth(summom[1])) / (getCreatureMaxHealth(summom[1])))
    local vids = ((getCreatureHealth(summom[1])) - 2)
    doCreatureAddHealth(summom[1], -vids)
    setCreatureMaxHealth(summom[1], maxh)
    doCreatureAddHealth(summom[1], ((maxh) * (pct2)))
    if math.random(1,100) <= 35 then
      setPokemonFeed(cid, getPokemonFeed(cid)-15) -- Food system
    end
    doItemSetAttribute(item.uid, "poke", getItemAttribute(item.uid, "poke"):sub(1, findLetter(getItemAttribute(item.uid, "poke"), ".")) .. " HP = ["..getCreatureHealth(z).."/"..getCreatureMaxHealth(z).."]")
    setPlayerStorageValue(cid, 61204, 0)
    setPlayerStorageValue(cid, 2, 0)
    doSendMagicEffect(getCreaturePosition(z), effect)
    doRemoveCreature(z)
    if getPlayerStorageValue(cid, 991) >= 1 then  --- Ginasios
       doSendAnimatedText(getThingPos(cid), "POKEOUT", 181)
       setPlayerStorageValue(cid, 991, getPlayerStorageValue(cid, 991) -1)
    end
    return true
    end
    end
    elseif item.itemid == morto then
           return doPlayerSendCancel(cid, "This pokemon is fainted.")
     
    elseif item.itemid == online then
    if isZumbie(cid) or isHuman(cid) then
    return doPlayerSendCancel(cid, "Sorry, is not possible.")
    end
    if item.uid ~= getPlayerSlotItem(cid, CONST_SLOT_FEET).uid then
     doPlayerSendCancel(cid, "You must put your pokeball in the correct place!")
     return TRUE
    end
     
     
    if not canSummon(cid) then
    return doPlayerSendDefaultCancel(cid, RETURNVALUE_NOTENOUGHROOM)
    end
     
    if getPlayerStorageValue(cid, 63215) >= 1 then
    return doPlayerSendCancel(cid, "You can't use pokeball while surfing.")
    end
     
    if getPlayerStorageValue(cid, 62314) >= 1 then
    return doPlayerSendCancel(cid, "You can't use pokeball while flying.")
    end
     
    if #getCreatureSummons(cid) >= 1 then
    return doPlayerSendCancel(cid, "You have already summoned a pokemon.")
    end
     
    for i,x in pairs(pokes) do
    if i == getItemAttribute(item.uid, "poke"):sub(9, findLetter(getItemAttribute(item.uid, "poke"), "'")-1) then
     
    if getPlayerLevel(cid) < x.level+getPokemonBoostt(item.uid) then
    doPlayerSendCancel(cid, "You need level "..x.level+getPokemonBoostt(item.uid).." or higher to use this pokemon.")
    return true
    end
    local removed = doCreateItem(1285, 1, getThingPos(cid))
    doSummonMonster(cid, i)
    local pk = getCreatureSummons(cid)[1]
    doTeleportThing(pk, getClosestFreeTile(pk, getThingPos(cid)), false)
    doRemoveItem(removed, 1)
    doCreatureSetLookDir(pk, 2)
    local maxh = pokes[getCreatureName(pk)].vida
    local levellife = ((getPlayerLevel(cid)) *2+ getPokemonBoost(getPlayerSlotItem(cid,8).uid))
    local health = tonumber(getItemAttribute(item.uid, "poke"):match("%[(.-)/"))
    doConvinceCreature(cid, pk)
    doCreatureAddHealth(pk, health-maxh)
    local pct = ((getCreatureHealth(pk)) / (getCreatureMaxHealth(pk)))
    local vidis = (getCreatureHealth(pk))
    setCreatureMaxHealth(pk, ((maxh) + (levellife)))
    doCreatureAddHealth(pk, 2)
    doCreatureAddHealth(pk, -vidis)
    doCreatureAddHealth(pk, ((getCreatureMaxHealth(pk)) * (pct)) - 2)
    doTransformItem(item.uid, item.itemid+1)
    local pokename = getCreatureName(getCreatureSummons(cid)[1])
    local mgo = msgunicago:gsub("doka", pokename)
    doCreatureSay(cid, mgo, TALKTYPE_SAY)
    if useOTClient then
       doPlayerSendCancel(cid, '12//,show') --alterado v1.7
    end
    if math.random(1,100) <= 35 then
      setPokemonFeed(cid, getPokemonFeed(cid)-5) -- Food system
    end
    doSendFeedEffect(cid)
    if getItemAttribute(item.uid, "nome") ~= "Ditto" then
    for i = 1, 12 do
    if not getMoveNamee(cid, i) then
    addEvent(doGoBackSetCooldown, 200, cid)
    end
    end
    else
    for a = 1, 12 do
      setPokemonCooldown(cid, a, "Don't have this move.")
    end
    end
    ----- Burn, venom e ice system ------
    getBurn(cid)
    getVenom(cid)
    getIce(cid)
    ----- Burn, venom e ice system ------
    doItemSetAttribute(item.uid, "poke", getItemAttribute(item.uid, "poke"):sub(1, findLetter(getItemAttribute(item.uid, "poke"), ".")))
    doItemSetAttribute(item.uid, "pokes", ""..pokename.."")
    doSendMagicEffect(getCreaturePosition(pk), effect)
    setPlayerStorageValue(cid, 61204, 1)
    registerCreatureEvent(pk, "DiePoke")
    registerCreatureEvent(pk, "Exp")
    --ShinyBallSystem\/
    isShinyBallOrBoosted(cid, item)
     
    if getPlayerStorageValue(cid, 991) >= 1 then  --- Ginasios
       doSendAnimatedText(getThingPos(cid), "POKEIN", TEXTCOLOR_LIGHTBLUE)
    end
     
    break
    end
    end
    end
      if useKpdoDlls then
         doUpdateMoves(cid)
       end
      doPlayerSendCancel(cid, '12//,hide')
    return TRUE
    end
    ​

     

    tentei isso antes de voce mencionar , mas quando solto o pokemon nao abre mas a cd bar ate pensei que tava fazendo algo errado por isso vim pedir ajuda aqui no forum.

     

    obs nao da nenhum erro no console

  7.  

    se tiver usando a cdbar do pda

     

    vai em action/script/goback.lua

     

    antes do ultimo return true

    adicione:

    if useKpdoDlls then
    doUpdateMoves(cid)
    end

    StyloMaldoso ja tem isso na minha goback acho que ta faltando um

    doPlayerSendCancel(cid, '12//,hide') ​ mas nao sei como devo colocalo

     

     

    da uma olha no meu gobak

     

     

     

    local backMSG = {"Come back, doka!", "Thanks for helping, doka!", "That's enough, come back!", "You were great, doka!", "Excellent work, doka!", "Well done, doka!"}

    local goMSG = {"Go, doka!", "Let's do it, doka!", "I choose you, doka!", "I need your help, doka!", "Let's fight, doka!", "It's battle time, doka!"}

    function onUse(cid, item, frompos, item2, topos)

    if #getCreatureSummons(cid) >= 1 and getPlayerStorageValue(getCreatureSummons(cid)[1], 33) >= 1 then

    return true

    end

    --------

    msgunicaback = backMSG[math.random(#backMSG)]

    msgunicago = goMSG[math.random(#goMSG)]

    btype = getPokeballType(item.itemid)

    usando = pokeballs[btype].use

    online = pokeballs[btype].on

    morto = pokeballs[btype].off

    if isIconeSystem(cid) then

    effect = getItemAttribute(item.uid, "effect")

    else

    effect = getItemAttribute(item.uid, "effect")

    end

    --------

    if item.itemid == usando then

    if #getCreatureSummons(cid) >= 1 then

    local z = getCreatureSummons(cid)[1]

    local pokename = getCreatureName(z)

    local mbk = msgunicaback:gsub("doka", pokename)

    if getItemAttribute(item.uid, "poke"):find(getCreatureName(z)) then

    doTransformItem(item.uid, item.itemid-1)

    doCreatureSay(cid, mbk, TALKTYPE_SAY)

    doPlayerSendCancel(cid, '12//,hide')

    local summom = getCreatureSummons(cid)

    local maxh = pokes[getCreatureName(summom[1])].vida

    local pct2 = ((getCreatureHealth(summom[1])) / (getCreatureMaxHealth(summom[1])))

    local vids = ((getCreatureHealth(summom[1])) - 2)

    doCreatureAddHealth(summom[1], -vids)

    setCreatureMaxHealth(summom[1], maxh)

    doCreatureAddHealth(summom[1], ((maxh) * (pct2)))

    if math.random(1,100) <= 35 then

    setPokemonFeed(cid, getPokemonFeed(cid)-15) -- Food system

    end

    doItemSetAttribute(item.uid, "poke", getItemAttribute(item.uid, "poke"):sub(1, findLetter(getItemAttribute(item.uid, "poke"), ".")) .. " HP = ["..getCreatureHealth(z).."/"..getCreatureMaxHealth(z).."]")

    setPlayerStorageValue(cid, 61204, 0)

    setPlayerStorageValue(cid, 2, 0)

    doSendMagicEffect(getCreaturePosition(z), effect)

    doRemoveCreature(z)

    if getPlayerStorageValue(cid, 991) >= 1 then --- Ginasios

    doSendAnimatedText(getThingPos(cid), "POKEOUT", 181)

    setPlayerStorageValue(cid, 991, getPlayerStorageValue(cid, 991) -1)

    end

    return true

    end

    end

    elseif item.itemid == morto then

    return doPlayerSendCancel(cid, "This pokemon is fainted.")

    elseif item.itemid == online then

    if isZumbie(cid) or isHuman(cid) then

    return doPlayerSendCancel(cid, "Sorry, is not possible.")

    end

    if item.uid ~= getPlayerSlotItem(cid, CONST_SLOT_FEET).uid then

    doPlayerSendCancel(cid, "You must put your pokeball in the correct place!")

    return TRUE

    end

    if not canSummon(cid) then

    return doPlayerSendDefaultCancel(cid, RETURNVALUE_NOTENOUGHROOM)

    end

    if getPlayerStorageValue(cid, 63215) >= 1 then

    return doPlayerSendCancel(cid, "You can't use pokeball while surfing.")

    end

    if getPlayerStorageValue(cid, 62314) >= 1 then

    return doPlayerSendCancel(cid, "You can't use pokeball while flying.")

    end

    if #getCreatureSummons(cid) >= 1 then

    return doPlayerSendCancel(cid, "You have already summoned a pokemon.")

    end

    for i,x in pairs(pokes) do

    if i == getItemAttribute(item.uid, "poke"):sub(9, findLetter(getItemAttribute(item.uid, "poke"), "'")-1) then

    if getPlayerLevel(cid) < x.level+getPokemonBoostt(item.uid) then

    doPlayerSendCancel(cid, "You need level "..x.level+getPokemonBoostt(item.uid).." or higher to use this pokemon.")

    return true

    end

    local removed = doCreateItem(1285, 1, getThingPos(cid))

    doSummonMonster(cid, i)

    local pk = getCreatureSummons(cid)[1]

    doTeleportThing(pk, getClosestFreeTile(pk, getThingPos(cid)), false)

    doRemoveItem(removed, 1)

    doCreatureSetLookDir(pk, 2)

    local maxh = pokes[getCreatureName(pk)].vida

    local levellife = ((getPlayerLevel(cid)) *2+ getPokemonBoost(getPlayerSlotItem(cid,8).uid))

    local health = tonumber(getItemAttribute(item.uid, "poke"):match("%[(.-)/"))

    doConvinceCreature(cid, pk)

    doCreatureAddHealth(pk, health-maxh)

    local pct = ((getCreatureHealth(pk)) / (getCreatureMaxHealth(pk)))

    local vidis = (getCreatureHealth(pk))

    setCreatureMaxHealth(pk, ((maxh) + (levellife)))

    doCreatureAddHealth(pk, 2)

    doCreatureAddHealth(pk, -vidis)

    doCreatureAddHealth(pk, ((getCreatureMaxHealth(pk)) * (pct)) - 2)

    doTransformItem(item.uid, item.itemid+1)

    local pokename = getCreatureName(getCreatureSummons(cid)[1])

    local mgo = msgunicago:gsub("doka", pokename)

    doCreatureSay(cid, mgo, TALKTYPE_SAY)

    if useOTClient then

    doPlayerSendCancel(cid, '12//,show') --alterado v1.7

    end

    if useKpdoDlls then

    doUpdateMoves(cid)

    end

    if math.random(1,100) <= 35 then

    setPokemonFeed(cid, getPokemonFeed(cid)-5) -- Food system

    end

    doSendFeedEffect(cid)

    if getItemAttribute(item.uid, "nome") ~= "Ditto" then

    for i = 1, 12 do

    if not getMoveNamee(cid, i) then

    addEvent(doGoBackSetCooldown, 200, cid)

    end

    end

    else

    for a = 1, 12 do

    setPokemonCooldown(cid, a, "Don't have this move.")

    end

    end

    ----- Burn, venom e ice system ------

    getBurn(cid)

    getVenom(cid)

    getIce(cid)

    ----- Burn, venom e ice system ------

    doItemSetAttribute(item.uid, "poke", getItemAttribute(item.uid, "poke"):sub(1, findLetter(getItemAttribute(item.uid, "poke"), ".")))

    doItemSetAttribute(item.uid, "pokes", ""..pokename.."")

    doSendMagicEffect(getCreaturePosition(pk), effect)

    setPlayerStorageValue(cid, 61204, 1)

    registerCreatureEvent(pk, "DiePoke")

    registerCreatureEvent(pk, "Exp")

    --ShinyBallSystem\/

    isShinyBallOrBoosted(cid, item)

    if getPlayerStorageValue(cid, 991) >= 1 then --- Ginasios

    doSendAnimatedText(getThingPos(cid), "POKEIN", TEXTCOLOR_LIGHTBLUE)

    end

    break

    end

    end

    end

    return TRUE

    end

  • Quem Está Navegando   0 membros estão online

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