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!

Force Update of WorldManager

newb23

Community Developer
Joined
Nov 26, 2014
Messages
397
Hello again!

Is there any way to force an update to WorldManager?

I am running into an issue where immediately following a teleport, even with wait times and actions taken on the new map, the ZoneId will not register as the teleported to ID.

Here is the code I am using to teleport:

[HIDE]
Code:
            if (RetBot.RetBotLoop == 1 && CanTakeControl)
            {
                Poi.Clear("Retbot, taking control!");
                var initialLocation = Core.Me.Location;
                var initialmap = WorldManager.ZoneId;
                var zoneid = CurrentMap(WorldManager.ZoneId);


                Logging.Write("[Retbot] Initial map: " + initialmap);
                [B]while [/B](WorldManager.ZoneId != 156)
                {                    
                    Logging.Write("[Retbot] Going to the Summoning Bell now!");
                    if (Core.Player.IsMounted)
                    {
                        Actionmanager.Dismount();
                        Thread.Sleep(3000);
                    }
                    WorldManager.TeleportById(24);
                    Thread.Sleep(15000);
                    while (NowLoading.IsVisible)
                    {
                        Logging.Write("[Retbot] Loading Screen detected. Waiting!");
                        await Coroutine.Sleep(3000);
                    }
                    Logging.Write("[Retbot] Current Map: " + WorldManager.ZoneId);
                }


                var location = new Vector3(36.32549f, 28.99997f, -762.0803f);
                await MoveTo(location);
                await RetainerRetask.Retask();
                await Coroutine.Sleep(2000);
[SIZE=4]etc etc etc...

[/SIZE]
[/HIDE]

And here is the log contents of what happens when it does NOT update:

[HIDE]
Code:
[22:58:02.481 N] Logging in...
[22:58:02.830 N] T: 5247329053252810635 H: 2704735309
[22:58:03.252 D] Microsoft Windows NT 6.2.9200.0
[22:58:04.941 D] Current Locale Eng
[22:58:04.942 N] Currently a level 50 Bard
[22:58:04.945 D] Reloading AssemblyLoader<ff14bot.AClasses.BotBase> - Initializing
[22:58:09.532 D] [BotManager] Botbases have been reloaded.
[22:58:09.532 D] Chocobot v1.0.0.0
[22:58:09.532 D] ChocoboTrainer v1.0.261.0
[22:58:09.532 D] Gardening bot v1.0.261.0
[22:58:09.532 D] Lisbeth v0.0.0.0
[22:58:09.532 D] Combat Assist v1.0.261.0
[22:58:09.533 D] Fate Bot v1.0.261.0
[22:58:09.533 D] PvP v1.0.261.0
[22:58:09.533 D] Fishing v1.0.261.0
[22:58:09.533 D] Grinding v1.0.261.0
[22:58:09.534 D] Gathering v1.0.261.0
[22:58:09.534 D] Order Bot v1.0.261.0
[22:58:09.559 D] Reloading AssemblyLoader<ff14bot.Interfaces.IBotPlugin> - Initializing
[22:58:27.532 N] [Zekken] Loaded spell shape data.
[22:58:27.550 D] Added new hook [PreCombatLogic] beff429d-6edc-44e7-985b-08ec338e7354
[22:58:27.550 N] [Zekken] Avoidance hooked.
[22:58:27.551 N] [RetBot] Enabled
[22:58:27.554 N] Building Actioncache
[22:58:28.112 N] Action Name:Sprint Action Id:3
[22:58:28.112 N] Action Name:Heavy Shot Action Id:97
[22:58:28.112 N] Action Name:Straight Shot Action Id:98
[22:58:28.112 N] Action Name:Hawk's Eye Action Id:99
[22:58:28.112 N] Action Name:Venomous Bite Action Id:100
[22:58:28.112 N] Action Name:Raging Strikes Action Id:101
[22:58:28.112 N] Action Name:Flaming Arrow Action Id:102
[22:58:28.112 N] Action Name:Misery's End Action Id:103
[22:58:28.112 N] Action Name:Quelling Strikes Action Id:104
[22:58:28.112 N] Action Name:Swiftsong Action Id:105
[22:58:28.112 N] Action Name:Quick Nock Action Id:106
[22:58:28.112 N] Action Name:Barrage Action Id:107
[22:58:28.112 N] Action Name:Shadowbind Action Id:108
[22:58:28.112 N] Action Name:Blunt Arrow Action Id:109
[22:58:28.112 N] Action Name:Bloodletter Action Id:110
[22:58:28.112 N] Action Name:Wide Volley Action Id:111
[22:58:28.112 N] Action Name:Repelling Shot Action Id:112
[22:58:28.112 N] Action Name:Windbite Action Id:113
[22:58:28.112 N] Action Name:Mage's Ballad Action Id:114
[22:58:28.112 N] Action Name:Foe Requiem Action Id:115
[22:58:28.112 N] Action Name:Army's Paeon Action Id:116
[22:58:28.112 N] Action Name:Rain of Death Action Id:117
[22:58:28.112 N] Action Name:Battle Voice Action Id:118
[22:58:28.112 N] Action Name:Internal Release Action Id:59
[22:58:28.112 N] Action Name:Invigorate Action Id:80
[22:58:28.112 N] Action Name:Blood for Blood Action Id:85
[22:58:28.112 N] Action Name:Haymaker Action Id:58
[22:58:28.112 N] Action Name:Second Wind Action Id:57
[22:58:28.112 N] Action Name:Manasong Action Id:1568
[22:58:28.112 N] Action Name:Farshot Action Id:1569
[22:58:28.112 N] Action Name:Blast Shot Action Id:1570
[22:58:28.112 N] Action Name:Enliven Action Id:1580
[22:58:28.112 N] Action Name:Mana Draw Action Id:1583
[22:58:28.112 N] Action Name:Purify Action Id:1584
[22:58:28.112 N] Action Name:Detect Action Id:1586
[22:58:28.112 N] Action Name:Recouperate Action Id:1590
[22:58:28.112 N] Done building Actioncache
[22:58:28.132 D] Reloading AssemblyLoader<ff14bot.Interfaces.ICombatRoutine> - Initializing
[22:58:39.201 D] [RoutineManager] Routines have been reloaded. Current class-specific list:
[22:58:39.201 D] Kupo [ArcherBard] v1.0.261.0
[22:58:39.201 D] Kupper [ArcherBard] v1.0.181.0
[22:58:39.201 D] Magitek v0.0.0.0
[22:58:39.201 D] Ultima v1.0.0.0
[22:58:45.171 N] Connection to 192.99.148.87:31214 established.
[22:58:45.182 N] Clearing all hooks.
[22:58:45.183 D] Added new hook [PreCombatLogic] ccea699f-2289-4948-91e3-66b81a0b7d4e
[22:58:45.183 N] [Zekken] Avoidance hooked.
[22:58:45.183 D] Added new hook [TreeStart] a1b43286-a3ae-4356-97f1-12c92e56147b
[22:58:45.193 D] Added new hook [Pull] 9bff1b4b-9e1e-4c27-9c85-33d102debaa4
[22:58:45.194 D] Added new hook [RoutineCombat] 99d00430-e8a3-4c07-bd4a-b1e3adbae5a6
[22:58:45.195 D] Added new hook [HotspotPoi] 675f757f-b3c8-409b-bf65-4abc4054c61e
[22:58:45.195 D] Added new hook [SetDeathPoi] 267e8fa5-b48c-4f5b-8beb-6ea4a15f8981
[22:58:45.195 D] Added new hook [SetCombatPoi] 3682f732-b6ca-473d-8988-bda0591755fb
[22:58:45.195 D] Added new hook [SetHotspotPoi] e55bdffb-9b4c-4109-ba2d-767ae6b494bd
[22:58:45.195 D] Added new hook [SelectPoiType] 76aa7d36-fa21-41ae-bc30-f6b54bbae4c7
[22:58:45.196 D] Added new hook [SetFatePoi] dce7d087-48a0-4490-a8b4-3f6434bdb381
[22:58:45.196 D] Added new hook [SetRestPoi] 6f2f5ea1-9815-40cb-92ce-80ae1b7c46ae
[22:58:45.197 D] Replaced hook [SelectPoiType] e0a728ed-5648-40ec-898b-fc744757c516
[22:58:45.197 D] Added new hook [FatePoi] bf962e31-3f5b-4d2b-8798-dc6a022486d6
[22:58:45.197 D] Added new hook [PoiAction] ae6c3e61-9267-4171-b3f4-7f9b479812de
[22:58:45.198 D] Added new hook [RestPoi] 3a110026-2308-40e3-bb53-999e4f9d49bf
[22:58:45.198 D] Added new hook [PoiAction2] dea7cb5b-c289-4ec8-b479-9ba294a0de16
[22:58:45.199 D] Added new hook [TreeStart] dac570a0-c871-450b-9d2a-c675f374d599
[22:58:45.253 N] [Agil] Loaded settings.
[22:58:45.270 N] [Agil] Loaded data for 51 menders.
[22:58:45.291 N] [Agil] Loaded stat weights for 30 classes.
[22:58:45.296 D] Inserted new hook [TreeStart @0] 9495e22d-6e60-4081-b3d0-64ed22dc550f
[22:58:45.296 N] [Agil] Hooked.
[22:58:45.339 N] [Ultima] Loading: Bard
[SIZE=3][B][22:58:45.364 V] [Poi.Clear] Reason: Retbot, taking control![/B]
[B][22:58:45.365 N] [Retbot] Initial map: 156[/B]
[B][22:58:45.373 D] Requesting path on 156 from <39.99722, 20.50957, -674.4741> to <36.32549, 28.99997, -762.0803>[/B]
[B][22:58:45.913 D] Generated path to <36.32549, 28.99997, -762.0803> in 00:00:00.5405691 ms[/B]
[B][22:58:49.706 N] Stopping the bot. Reason:Pushed the stop button.[/B][/SIZE]
[22:58:49.706 D] CurrentBot.Stop()
[22:58:49.709 N] Connection closed! 192.99.148.87:31214
[22:58:49.710 D] TreeHooks.Instance.ClearAll()
[22:58:49.710 N] Clearing all hooks.
[22:58:49.710 D] Added new hook [PreCombatLogic] 98a56672-1358-43e8-983d-0a0e11d4f7cb
[22:58:49.710 N] [Zekken] Avoidance hooked.
[22:58:49.710 D] Added new hook [TreeStart] a1b43286-a3ae-4356-97f1-12c92e56147b
[22:58:49.710 D] Navigator.Clear()
[22:58:49.710 V] [Poi.Clear] Reason: Bot stopped
[22:58:49.710 D] OnStop event
[22:58:49.710 D] OnStop Event Invoking
[22:58:49.721 N] Bot Thread Ended. Was this requested?
[22:59:03.074 N] [RetBot] Disabled
[22:59:03.074 D] Removed hook [TreeStart] a1b43286-a3ae-4356-97f1-12c92e56147b
[22:59:03.080 N] Plugin  RetBot has been disabled.
[22:59:03.623 N] [RetBot] Enabled
[22:59:03.628 N] Plugin  RetBot has been enabled.
[22:59:06.439 N] Connection to 192.99.148.87:31214 established.
[22:59:06.439 N] Clearing all hooks.
[22:59:06.439 D] Added new hook [PreCombatLogic] a57cba7c-b764-4fa2-8237-03d3eedd0632
[22:59:06.439 N] [Zekken] Avoidance hooked.
[22:59:06.439 D] Added new hook [TreeStart] 7a1c3a17-6f86-418b-ad76-365787a6e7f9
[22:59:06.439 D] Added new hook [Pull] df3cd968-40ee-4c4a-8c80-e7bd87decea9
[22:59:06.439 D] Added new hook [RoutineCombat] e137814c-f6eb-4719-87f3-f391997d8684
[22:59:06.439 D] Added new hook [HotspotPoi] c4ce977d-cb0c-4097-9897-66b6fbd05dee
[22:59:06.439 D] Added new hook [SetDeathPoi] fcadcea3-21a6-4bc1-bbb1-06631ab813e1
[22:59:06.439 D] Added new hook [SetCombatPoi] b2ce27c6-2cd7-4d83-ac45-e1f9e4d693ba
[22:59:06.439 D] Added new hook [SetHotspotPoi] 37c13e03-e65f-4791-9420-7398fa9a2c6a
[22:59:06.439 D] Added new hook [SelectPoiType] 996ac587-c2da-4c64-8d5d-432dab9b3bdf
[22:59:06.439 D] Added new hook [SetFatePoi] 4b54e53c-cd8b-4a0b-8ef1-13e7c001a7ec
[22:59:06.439 D] Added new hook [SetRestPoi] 0a522ae3-bfc4-456b-b658-1770eee4b661
[22:59:06.439 D] Replaced hook [SelectPoiType] 357399f7-bb9a-48bc-97ee-bc39b339afe4
[22:59:06.439 D] Added new hook [FatePoi] 00bd1eb6-a931-4998-b762-7c0598888c6e
[22:59:06.439 D] Added new hook [PoiAction] 27028244-16a2-47e1-8e82-b94a6a810150
[22:59:06.439 D] Added new hook [RestPoi] 7701691e-184a-4105-9ba5-4a495d4cc660
[22:59:06.439 D] Added new hook [PoiAction2] 8b7e3272-4160-44ea-8ffb-495edb3837be
[22:59:06.439 D] Added new hook [TreeStart] 0e9b171c-7a8a-4385-ac1f-0dfa63930506
[22:59:06.440 N] [Agil] Loaded settings.
[22:59:06.453 N] [Agil] Loaded data for 51 menders.
[22:59:06.460 N] [Agil] Loaded stat weights for 30 classes.
[22:59:06.460 D] Inserted new hook [TreeStart @0] ef04753e-15bb-46b7-860b-ed6e6720b2c5
[22:59:06.460 N] [Agil] Hooked.
[SIZE=3][B][22:59:06.464 V] [Poi.Clear] Reason: Retbot, taking control![/B]
[B][22:59:06.464 N] [Retbot] Initial map: 155[/B]
[B][22:59:06.464 N] [Retbot] Going to the Summoning Bell now![/B]
[B][22:59:06.469 D] Teleporting to revenant's toll[/B]
[B][22:59:21.471 N] [Retbot] Current Map: 155[/B]
[B][22:59:21.471 N] [Retbot] Going to the Summoning Bell now![/B]
[B][22:59:21.487 D] Teleporting to revenant's toll[/B]
[B][22:59:36.504 N] [Retbot] Current Map: 155[/B]
[B][22:59:36.504 N] [Retbot] Going to the Summoning Bell now![/B]
[B][22:59:36.504 D] Teleporting to revenant's toll[/B][/SIZE]
[22:59:40.996 N] Stopping the bot. Reason:Pushed the stop button.
[22:59:40.996 D] CurrentBot.Stop()
[22:59:40.996 N] Connection closed! 192.99.148.87:31214
[22:59:40.996 D] TreeHooks.Instance.ClearAll()
[22:59:40.996 N] Clearing all hooks.
[22:59:40.996 D] Added new hook [PreCombatLogic] 9d31a73f-de46-4b5a-a01f-99cac49ac841
[22:59:40.996 N] [Zekken] Avoidance hooked.
[22:59:40.996 D] Added new hook [TreeStart] 7a1c3a17-6f86-418b-ad76-365787a6e7f9
[22:59:40.996 D] Navigator.Clear()
[22:59:40.996 V] [Poi.Clear] Reason: Bot stopped
[22:59:40.996 D] OnStop event
[22:59:40.996 D] OnStop Event Invoking
[/HIDE]

The first bold section is where I started the bot in Revenant's Toll. The second is when I started it in Dragonhead. Also note, I did let the teleport finish in the second bold section. It is repeating the teleport at the aetheryte in Revenant's Toll.

And finally, the bolded while statement is where I am running into issues. If I change it to an if, it will work, every time, but ONLY if the teleport actually completes. If the teleport gets interrupted for whatever reason, it will not complete and the plugin tries to continue generating a path etc etc.

I tried adding a stopwatch event to try and restart if a certain time elapsed from the start of the move until the summoning bell, but, even if I could have gotten it to work, if someone's loading screen times are abysmal, it could cause issues as well.

Any thoughts?
 
Last edited:
For most of everything there is no "Update" values are cached for one frame and then automatically cleared for the next. If its not working then you are doing something bad.

First remove thread.sleep that should never ever ever be used in your code. use Coroutine.sleep

Second, use:
Code:
await CommonTasks.StopAndDismount();


Third stop with all the while loops.
Do this instead...

Code:
teleport:
Worldmanager.teleport
if (await Coroutine.Wait(5000,()=>Core.Player.Iscasting))
{
await Coroutine.Wait(5000,()=>!Core.Player.Iscasting)

await Coroutine.Wait(5000,()=>CommonBehaviors.IsLoading)
await Coroutine.Wait(Timeout.Infinite,()=>!CommonBehaviors.IsLoading)
}
else
{

goto teleport
}

For any more help then that i need to see the entire code not just some snippet of the chunk cause your proably are doing something bad like running the entire thing in awhile loop. Really look at the 2 botbases that are coroutine based and opensource.
 
Hmmm... I might be doing something bad then...

I have attached the working copy of my code then to see if I implemented your function above properly.

Is it good practice to use goto function calls rather than operate under while and if statements then?

And also, is the format for the line you used, to do this (await Coroutine.Wait) for this long ((5000,) while this (() => !Core.Player.IsCasting)); is true?

Because, if it is better to use gotos over while/if, then, I'll likely need to re-do my entire code for RetainerRetask.cs. :p You can see where I tried to implement that stopwatch (in a while statement, ha) to try and fix the teleport issue, and a hang at the reassign window that I've gotten reports of.

By the by, I know it's bad to send keystrokes to the client. but, if the bot hangs at a selection window, how could you have it back out in order to re-start? More or less hit escape or press close in the window until no more are open.
 

Attachments

Back
Top