• Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • How to code bot to cast Flesh Offerring

    Discussion in 'Archives' started by peepeekrub, Sep 29, 2014.

    1. peepeekrub

      peepeekrub New Member

      Joined:
      Sep 29, 2014
      Messages:
      4
      Likes Received:
      0
      Trophy Points:
      0
      Hello
      How to code this please share its.
      thank u.
       
    2. peepeekrub

      peepeekrub New Member

      Joined:
      Sep 29, 2014
      Messages:
      4
      Likes Received:
      0
      Trophy Points:
      0
      Help me please Y_Y
       
    3. Urgent2009

      Urgent2009 Member

      Joined:
      Mar 10, 2014
      Messages:
      182
      Likes Received:
      9
      Trophy Points:
      18
      Hey there, this is my edited ExampleRoutine. I'm using flesh offering on raging spirits. I don't know if there is easier way to do it but this is how I did it and it works fine.

      Code:
      if (_summonRagingSpiritSlot != -1 && _summonRagingSpiritStopwatch.ElapsedMilliseconds > ExampleRoutineSettings.Instance.SummonRagingSpiritDelayMs)
                      {
                          var skill = LokiPoe.InGameState.SkillBarPanel.Slot(_summonRagingSpiritSlot);
                          var max = skill.GetStat(StatType.NumberOfRagingSpiritsAllowed);
      
                          
      
                          if (skill.NumberDeployed > 5 )
                          {
                              var skulls = skill.DeployedObjects;
                              Monster anySkull = LokiPoe.ObjectManager.GetObjectById<Monster>(skulls.FirstOrDefault().Id);
      
                              var fleshSkill = LokiPoe.Me.GetSkillByName("Flesh Offering");
      
                              if (!anySkull.HasFleshOffering)
                              {
                                  // flesh offering
                                  // Check for a target near us.
                                  var target = BestDeadTarget;
                                  if (target != null)
                                  {
                                      Log.InfoFormat("[Logic] Using {0} on {1}.", fleshSkill.Name, target.Name);
      
                                      var uaerr = LokiPoe.InGameState.SkillBarPanel.UseAt(fleshSkill.Slot, false, target.Position);
      
                                      if (uaerr == LokiPoe.InGameState.UseError.None)
                                      {
                                          await Coroutines.FinishCurrentAction(false);
      
                                          await Coroutine.Sleep(Utility.LatencySafeValue(100));
      
                                          return true;
                                      }
      
                                      Log.ErrorFormat("[Logic] UseAt returned {0} for {1}.", uaerr, skill.Name);
                                  }
                              }
      
                          }
      
       
    4. peepeekrub

      peepeekrub New Member

      Joined:
      Sep 29, 2014
      Messages:
      4
      Likes Received:
      0
      Trophy Points:
      0
      Thank you very much.^^
       
    5. seankim

      seankim Member

      Joined:
      Dec 20, 2013
      Messages:
      115
      Likes Received:
      1
      Trophy Points:
      18
      Genius!
       

    Share This Page