What's new
  • Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • Visit Resources
  • Visit Downloads
  • Visit Portal
RebornBuddy Forums

Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

Specify SubIndex for WorldManager.Teleport?

annerose

New Member
Joined
Sep 30, 2016
Messages
4
I encountered a challenge with using WorldManager.Teleport and WorldManager.TeleportById methods. I am in possession of an Apartment and an Estate in the same housing district, and using that district's aetheryteID takes me to the one at the top of my teleport list. Using WorldManager.AvailableLocations I found the following:
Code:
Name: Estate Hall (Private) AetheryteId: 60 Cost:17 Zone:340 SubIndex:128
Name: Estate Hall (Free Company) AetheryteId: 58 Cost:80 Zone:341 SubIndex:0
Name: Estate Hall (Private) AetheryteId: 60 Cost:17 Zone:340 SubIndex:1
Is there a way for me to specify the SubIndex? I can't find it on rbdocumentation.

Posting as requested from release thread.
 
Code:
            //Copy to a local variable so it only has to do the memory read once
            var locations = AvailableLocations;
            var tele = locations.FirstOrDefault(r=>r.SubIndex == 123);
            var index = locations.IndexOf(tele);
            WorldManager.Teleport((uint)index);
 
Nice, thanks! Is it possible to do this with CommonBehaviors.CreateTeleportBehavior? I'd like to modify TeleportTo so that XMLs could do <TeleportTo AetheryteID="" SubIndex=""/>
 
Nice, thanks! Is it possible to do this with CommonBehaviors.CreateTeleportBehavior? I'd like to modify TeleportTo so that XMLs could do <TeleportTo AetheryteID="" SubIndex=""/>


Code:
        public static Composite CreateTeleportBehavior(ValueRetriever<uint> aetheryteId, ValueRetriever<uint> zoneId)
        {
            return new Decorator(ret => WorldManager.CanTeleport(),
                new Sequence(
                    new Action(ret => Navigator.Stop()),
                    new Sleep(240),
                    new Action(ret => WorldManager.TeleportById(aetheryteId(ret))),
                    new Wait(TimeSpan.FromMilliseconds(5000), r => Core.Player.IsCasting, new ActionAlwaysSucceed()),
                    new WaitContinue(TimeSpan.FromMilliseconds(15000), ret => (WorldManager.ZoneId == zoneId(ret) && !IsLoading), new Action(ret => RunStatus.Success))
                )
            );
        }

You can make your own.
 
Back
Top