[Pedido] Script Tibia Auto


Eduardo Rodrigues

Recommended Posts

Galera, eu gostaria que adiciona-se nesse script uma seguinte função. Quando o char logar, ele espera 10 segundos, antes de começar a funcionar, conseguiram entender?

Por Exemplo, meu char loga, dai ele tem que abrir as bps do Mining, só que ele não consegue porque o script já está funcionando, então eu queria colocar que ele espera-se alguns segundos antes de iniciar.

 

class ModuleMining:
      def getName(self):
          return "Auto Mining By Faramir"


      def getVersion(self):
          return "1.1"


      def getFunDef(self,nr):
          if (nr==0): return (0,1000,self.fun1);
          return ();
         
      def getConfigParam(self,nr):
          return ();


      def fun1(self,params):        
        selfCh=tareader.readSelfCharacter();
        pickId = 3456 # id da pick
        useOnItemIDs = [5638, 5639, 5640, 5641, 5642, 5643, 5644, 5645, 5646, 5647, 5648, 5649, 5650, 5651] # ids das paredes
        dropItemIDs = [1792, 1780, 3147, 3207, 1782, 3041, 3039, 3038, 3037, 3036, 1781] # items para jogar fora
        
        # dropar items
        for dropItemID in dropItemIDs:
          dropItem=tautil().lookupItem(dropItemID);
          if dropItem['contNr'] != -1:
            tasender.moveObjectFromContainerToFloor(dropItemID, 0x40 + dropItem['contNr'], dropItem['pos'], selfCh['x'], selfCh['y'], selfCh['z'], dropItem['quantity'] or 1)
        
        # usar pick na parede
        for offsetX in range(-1,2):
          for offsetY in range(-1,2):
            items = tareader.mapGetPointItemsCount(offsetX, offsetY, 0)
            topPos = tareader.mapGetPointTopPos(offsetX, offsetY, 0)
            itemId = tareader.mapGetPointItemId(offsetX, offsetY, 0, topPos)
            if itemId in useOnItemIDs:         
              tasender.useWithObjectOnFloor(pickId, itemId, selfCh['x']+offsetX, selfCh['y']+offsetY, selfCh['z'], 2)                  
              return()


tibiaauto.registerPlugin(ModuleMining)

 

 

Link to comment
Share on other sites

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...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...