Brian 10 Posted May 11, 2016 Share Posted May 11, 2016 How do I create a player object from just a player name? Link to comment https://wrobot.eu/forums/topic/3000-how-to-create-a-player-object-from-player-name/ Share on other sites More sharing options...
saleh 13 Posted May 11, 2016 Share Posted May 11, 2016 Can you please explain what you need to do ? Link to comment https://wrobot.eu/forums/topic/3000-how-to-create-a-player-object-from-player-name/#findComment-13881 Share on other sites More sharing options...
Brian 10 Posted May 11, 2016 Author Share Posted May 11, 2016 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 Link to comment https://wrobot.eu/forums/topic/3000-how-to-create-a-player-object-from-player-name/#findComment-13882 Share on other sites More sharing options...
saleh 13 Posted May 12, 2016 Share Posted May 12, 2016 is That for party Link to comment https://wrobot.eu/forums/topic/3000-how-to-create-a-player-object-from-player-name/#findComment-13883 Share on other sites More sharing options...
Brian 10 Posted May 12, 2016 Author Share Posted May 12, 2016 4 minutes ago, saleh said: is That for party No. I have a string with a player name. I need to target that player, not in the party. Link to comment https://wrobot.eu/forums/topic/3000-how-to-create-a-player-object-from-player-name/#findComment-13884 Share on other sites More sharing options...
saleh 13 Posted May 12, 2016 Share Posted May 12, 2016 http://us.battle.net/wow/en/forum/topic/3967587000 Link to comment https://wrobot.eu/forums/topic/3000-how-to-create-a-player-object-from-player-name/#findComment-13885 Share on other sites More sharing options...
Brian 10 Posted May 12, 2016 Author Share Posted May 12, 2016 6 minutes ago, saleh said: http://us.battle.net/wow/en/forum/topic/3967587000 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. Link to comment https://wrobot.eu/forums/topic/3000-how-to-create-a-player-object-from-player-name/#findComment-13886 Share on other sites More sharing options...
saleh 13 Posted May 12, 2016 Share Posted May 12, 2016 i play with 20 toon in same time and using 4 healers all the Fight class are working good http://wrobot.eu/forums/topic/2662-targeting-tanks-target-and-casting-spells-on-it/ http://wrobot.eu/forums/topic/316-fight-class-conditions/#comment-2137 http://wrobot.eu/forums/topic/1689-useful-scripts/#comment-8447 Link to comment https://wrobot.eu/forums/topic/3000-how-to-create-a-player-object-from-player-name/#findComment-13887 Share on other sites More sharing options...
Brian 10 Posted May 12, 2016 Author Share Posted May 12, 2016 14 minutes ago, saleh said: i play with 20 toon in same time and using 4 healers all the Fight class are working good http://wrobot.eu/forums/topic/2662-targeting-tanks-target-and-casting-spells-on-it/ http://wrobot.eu/forums/topic/316-fight-class-conditions/#comment-2137 http://wrobot.eu/forums/topic/1689-useful-scripts/#comment-8447 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 Link to comment https://wrobot.eu/forums/topic/3000-how-to-create-a-player-object-from-player-name/#findComment-13889 Share on other sites More sharing options...
saleh 13 Posted May 12, 2016 Share Posted May 12, 2016 i am playing for funn with group 20 Toon in same time (20 Account) Link to comment https://wrobot.eu/forums/topic/3000-how-to-create-a-player-object-from-player-name/#findComment-13890 Share on other sites More sharing options...
Brian 10 Posted May 12, 2016 Author Share Posted May 12, 2016 2 minutes ago, saleh said: i am playing for funn with group 20 Toon in same time (20 Account) Is this on retail or what server version? Link to comment https://wrobot.eu/forums/topic/3000-how-to-create-a-player-object-from-player-name/#findComment-13891 Share on other sites More sharing options...
saleh 13 Posted May 12, 2016 Share Posted May 12, 2016 ahh Magtheridon EU Link to comment https://wrobot.eu/forums/topic/3000-how-to-create-a-player-object-from-player-name/#findComment-13892 Share on other sites More sharing options...
saleh 13 Posted May 12, 2016 Share Posted May 12, 2016 what is healer type? Link to comment https://wrobot.eu/forums/topic/3000-how-to-create-a-player-object-from-player-name/#findComment-13893 Share on other sites More sharing options...
iMod 99 Posted May 12, 2016 Share Posted May 12, 2016 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. Brian 1 Link to comment https://wrobot.eu/forums/topic/3000-how-to-create-a-player-object-from-player-name/#findComment-13897 Share on other sites More sharing options...
Brian 10 Posted May 12, 2016 Author Share Posted May 12, 2016 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? saleh 1 Link to comment https://wrobot.eu/forums/topic/3000-how-to-create-a-player-object-from-player-name/#findComment-13905 Share on other sites More sharing options...
iMod 99 Posted May 12, 2016 Share Posted May 12, 2016 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. Link to comment https://wrobot.eu/forums/topic/3000-how-to-create-a-player-object-from-player-name/#findComment-13908 Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now