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 create a player object from player name

Featured Replies

  • Author
21 minutes ago, saleh said:

Can you please explain what you need to do ?

The end goal is to get the player address so I can interact with it, I was planning to get the player object then get the address from that

  • Author
6 minutes ago, saleh said:

The player needing to be targeted is constantly changing and isn't known initially, so I can't make a macro for it.  Can you cast a spell on a specific player with LUA? That would work as well.  I am trying to make a healing fightclass that supports raids, since raids are not supported by the bot, atleast in WOTLK, I can get the correct players name that needs to be healed via LUA, but I just need to cast a spell on him.

  • Author
14 minutes ago, saleh said:

Do you play retail? Because I messed around with 

Party.GetPartyHomeAndInstance();

and it didn't work for me.  I got the playername of who I need to heal, just need to know how to target him or get the WoWPlayer object with just a playername

Get player object by name:

WoWPlayer player = ObjectManager.GetObjectWoWPlayer().Where(p => p.IsValid && p.Name == "PlayerName").FirstOrDefault();

 

Target player:

Interact.InteractGameObject(player.GetBaseAddress, true);

Cast spell at the specified target:

string targetName = "blubb";
int spellID = 999;
Lua.LuaDoString($"CastSpellByID({spellID}, \"{targetName}\")");

 

Hope it helps.

  • Author
9 hours ago, iMod said:

Get player object by name:


WoWPlayer player = ObjectManager.GetObjectWoWPlayer().Where(p => p.IsValid && p.Name == "PlayerName").FirstOrDefault();

 

Target player:


Interact.InteractGameObject(player.GetBaseAddress, true);

Cast spell at the specified target:


string targetName = "blubb";
int spellID = 999;
Lua.LuaDoString($"CastSpellByID({spellID}, \"{targetName}\")");

 

Hope it helps.

Thanks it does.  Does 

p.IsValid

check if online?  Also, CastSpellByID is protected, you are able to call protected LUA functions through wrobot?

1 hour ago, Brian said:

Thanks it does.  Does 


p.IsValid

check if online?  Also, CastSpellByID is protected, you are able to call protected LUA functions through wrobot?

It checks if the object you got is valid to interact with.

Yes you can call protected lua functions.

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.