Jump to content

Force sell item without force2town


Strijder

Recommended Posts

Hi there all,

I just started creating my own leveling profiles and got stuck with the following problem. When I bot on a new made character it starts in a new area with no mail box so he will not have many bag slots. So I don't want the bot to sell everytime when his bag are full, cause that will cause him to kill 3 mobs and than walk back to the vendor. For efficiency reasons i want my bot to only sell to the vendor when i ask him to. 

So i added this code to the 'Quest order editor" -> RunCode -> wManager.Wow.Bot.Tasks.GoToTask.ToPosition(new Vector3(10434.88f, 792.1945f, 1322.699f));
So it will walk to the vendor i want him to, I also added the vendor to the "vendor/repair/mailboxed editor".
Anyone knows ho to get further from here? I'm not that great in lua, only did the minecraft lua course and that not really that complex as this stuff :P.

Some suggestions:
1. I should probably use wManager.Wow.Tasks.GoToTask.ToPositionAndInteractWIthNpc() but i don't know what to fill in here and how to choose options with the npc.
2. I could try this:
             First pulse -> Run code 

wManager.Wow.Bot.States.ToTown.ForceToTown = true;

            Than pulse -> Run code
 

wManager.Wow.Bot.States.ToTown.ForceToTown = 

But this doensn't seem like a great solution + still need to test it.

 

 

3. This seems like exactly what im looking for, but i have no idea what to fill in.

   if (wManager.Wow.Bot.Tasks.GoToTask.ToPositionAndIntecractWith(Npc npc, bool skipIfCannotMakePath = false, BooleanDelegate conditionExit = null, bool acceptNpcDead = false))
            {
                wManager.Wow.Helpers.Vendor.SellItems(List<String> itemSell, List<string> itemNoSell, List<Enums.WoWItemQuality> itemQuality);
            }
Link to comment
Share on other sites

wManager.Wow.Bot.Tasks.GoToTask.ToPositionAndIntecractWithNpc(new Vector3(1111.1f, 2222.2f, 3333.3f), 12345);

1111 = x Vector of  NPC, 2222 = y Vector of NPC, 3333 = z Vector of NPC, 12345 = ID of NPC.

and then:

wManager.Wow.Bot.States.ToTown.ForceToTown = true;

and after you are done with your Custom Townrun:

wManager.Wow.Bot.States.ToTown.ForceToTown = true;

 

Link to comment
Share on other sites

Thanks a lot for your quick reply!

For some reason I'm getting a big error, probably I'm making a stupid mistake haha:
Screenschot - of setup
Screenshot - of error

 

also you reference twice to 

wManager.Wow.Bot.States.ToTown.ForceToTown = true;

should one of them be false? or do i just need to run it twice?

 

Thanks again ?

Link to comment
Share on other sites

1 hour ago, Talamin said:

I forgot the Npc in the first statement. This happens when i try to help between normal work times  ?

Haha yeah it happens ?

 

56 minutes ago, Matenia said:

Do not explicitly set ForceToTown back to false. It's not a blocking call and after the vendor run was successful, the ToTown state sets it back itself.

Thanks for adding that!

 

 

Going to try again when I'm back home, will keep you guys posted!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...