Skip to content
View in the app

A better way to browse. Learn more.

WRobot

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

how to make fightclass move behind target?

Featured Replies

Yes, i think you can do it by lua or moveto(i prefered on other bots to use lua if character was close enough to the target to strafe and set rotation). There must be also an movementevent that you can block which is set on the fightclass.

 

Here's an example to get the target's back vector:

    public Vector3 BackofVector3(Vector3 from, float radius)
    {
        if (from != null && from != Vector3.Empty)
        {
			//abit ugly
            float rotation = -robotManager.Helpful.Math.DegreeToRadian(robotManager.Helpful.Math.RadianToDegree(ObjectManager.Me.TargetObject.Rotation)+90);
            return new Vector3((System.Math.Sin(rotation)*radius) + from.X, (System.Math.Cos(rotation)*radius) + from.Y, from.Z);
        }
        return new Vector3(0, 0, 0);
    }

and to see the point where it is just add this in initialize method:

        Radar3D.OnDrawEvent += () =>
        {
            if (ObjectManager.Me.TargetObject != null)
            Radar3D.DrawCircle(BackofVector3(ObjectManager.Me.TargetObject.Position, 2f), 0.3f, Color.Blue);
        };

if you decide to use it, i recommend to also set your own rotation by atan2 to your target(it looks more smooth) and disable it on npcs because it looks awful when the bot is running around on its target indefinitely.

.

1 hour ago, camelot10 said:

i dont want convert figthclass into C#, is there any possibility to run this code while in fight with xml?

type the code in where you add spells and set it to "not spell, is c# code" in the spell settings

  • 4 months later...

None of the above is working for me, ayone got an aswer to this?

I've been trying to make a rogue fightclass and moving behind an enemy is just the thing i want it to do.

[F] 02:30:48 - [FightClass] Launch C# code: public Vector3 BackofVector3(Vector3 from, float radius)
    {
        if (from != null && from != Vector3.Empty)
        {
            //abit ugly
            float rotation = -robotManager.Helpful.Math.DegreeToRadian(robotManager.Helpful.Math.RadianToDegree(ObjectManager.Me.TargetObject.Rotation)+90);
            return new Vector3((System.Math.Sin(rotation)*radius) + from.X, (System.Math.Cos(rotation)*radius) + from.Y, from.Z);
        }
        return new Vector3(0, 0, 0);
    }
[E] 02:30:48 - Compilator Error :
c:\Users\Dean\AppData\Local\Temp\szwfbcwc.0.cs(20,5) : error CS1513: } expected
c:\Users\Dean\AppData\Local\Temp\szwfbcwc.0.cs(30,6) : error CS1597: Semicolon after method or accessor block is not valid
c:\Users\Dean\AppData\Local\Temp\szwfbcwc.0.cs(32,1) : error CS1022: Type or namespace definition, or end-of-file expected

 

On 27/08/2017 at 2:36 AM, Trustjah said:

None of the above is working for me, ayone got an aswer to this?

I've been trying to make a rogue fightclass and moving behind an enemy is just the thing i want it to do.


[F] 02:30:48 - [FightClass] Launch C# code: public Vector3 BackofVector3(Vector3 from, float radius)
    {
        if (from != null && from != Vector3.Empty)
        {
            //abit ugly
            float rotation = -robotManager.Helpful.Math.DegreeToRadian(robotManager.Helpful.Math.RadianToDegree(ObjectManager.Me.TargetObject.Rotation)+90);
            return new Vector3((System.Math.Sin(rotation)*radius) + from.X, (System.Math.Cos(rotation)*radius) + from.Y, from.Z);
        }
        return new Vector3(0, 0, 0);
    }
[E] 02:30:48 - Compilator Error :
c:\Users\Dean\AppData\Local\Temp\szwfbcwc.0.cs(20,5) : error CS1513: } expected
c:\Users\Dean\AppData\Local\Temp\szwfbcwc.0.cs(30,6) : error CS1597: Semicolon after method or accessor block is not valid
c:\Users\Dean\AppData\Local\Temp\szwfbcwc.0.cs(32,1) : error CS1022: Type or namespace definition, or end-of-file expected

 

How(where) do you use this code?

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.