Jump to content

Featured Replies

comment_491806

pra vc configurar é só vc colocar o porcentagem de heal, a magia que quer usar, e o id da potion. Oq eu fiz foi pegar a script do faramir e acrescentar mais algumas funções.

ta ae

class ComboHeal:
      def getName(self):
          return "Combo Heal by Gustavo Blaze"
 
      def getVersion(self):
          return "1.0"
 
      def getFunDef(self,nr):
          if (nr==0): return (0,200,self.fun1);
          return ();
         
      def getConfigParam(self,nr):
          if (nr==0): return ('Heal', 'Porcentagem da vida para invocar magia de cura');
          if (nr==1): return ('Spell', 'Palavras magicas da magia de cura');
          if (nr==2): return ('PotionId', 'Id da potion para usar');
          return ();
 
      def fun1(self,params):
        selfCh=tareader.readSelfCharacter()
		
        healP = 100
        if params['Heal']:
          healP = int(params['Heal'])
          
        if params['PotionId']:
          potion = int(params['PotionId'])
        
        if not params['Spell']:
          return ()
          
        healthPercent = selfCh['hpPercLeft']
        tibiaId = selfCh['tibiaId']
        if healthPercent < healP:
          tasender.say(params['Spell'])
          tasender.useItemOnCreature(potion, tibiaId)
          
        return ()

tibiaauto.registerPlugin(ComboHeal) 

 

só salvar como um arquivo .py e usar.

  • Author
comment_491810

pra vc configurar é só vc colocar o porcentagem de heal, a magia que quer usar, e o id da potion. Oq eu fiz foi pegar a script do faramir e acrescentar mais algumas funções.

ta ae

class ComboHeal:
      def getName(self):
          return "Combo Heal by Gustavo Blaze"
 
      def getVersion(self):
          return "1.0"
 
      def getFunDef(self,nr):
          if (nr==0): return (0,200,self.fun1);
          return ();
         
      def getConfigParam(self,nr):
          if (nr==0): return ('Heal', 'Porcentagem da vida para invocar magia de cura');
          if (nr==1): return ('Spell', 'Palavras magicas da magia de cura');
          if (nr==2): return ('PotionId', 'Id da potion para usar');
          return ();
 
      def fun1(self,params):
        selfCh=tareader.readSelfCharacter()
		
        healP = 100
        if params['Heal']:
          healP = int(params['Heal'])
          
        if params['PotionId']:
          potion = int(params['PotionId'])
        
        if not params['Spell']:
          return ()
          
        healthPercent = selfCh['hpPercLeft']
        tibiaId = selfCh['tibiaId']
        if healthPercent < healP:
          tasender.say(params['Spell'])
          tasender.useItemOnCreature(potion, tibiaId)
          
        return ()

tibiaauto.registerPlugin(ComboHeal) 

 

só salvar como um arquivo .py e usar.Gostei de ver porem nao sei oqe fazer com esse monte de numero ai EhuUHE

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...