targeting/killing mob that is infight with NPC (for a quest)

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Post Reply
Message
Author
stessiberti
Posts: 15
Joined: Tue Jul 05, 2011 1:12 am

targeting/killing mob that is infight with NPC (for a quest)

#1 Post by stessiberti »

Hi all!
First off all i must say i m really impressed about the progress rom bot made the last moths as i made a break with runes for some month.
Great Work ALL !

well and then back to my topic :

i got a quest where i have to run to a certain area , where a npc is fighting a mob , i need to target this mob and kill it to complete the quest

what i want to do :
1) accept quest from npc ( done and no problem )
2) run to place where the action is ( done )
3) here is my problem - i m standing infront on the npc and the mob that is he fighting and need to target and kill this mob
but rombot just ignores tha mob
what i tried so far is :
* set ANTI_KS on false
* waypoint is defined as normal ( no TRAVEL and no RUN )
* i got MAX_TARGET_DIST on 200
* i tried player:findTarget("mobname");


but all i tried , as i said , my charakter just ignores the mob and goes on to next waypoint

hope someone can help me with that

THX in advance
User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: targeting/killing mob that is infight with NPC (for a qu

#2 Post by lisa »

try this, change mobname to what ever the mob is called, or it's ID.

Code: Select all

player:clearTarget();
player:target(player:findNearestNameOrId("mobname"))
if player:haveTarget() then player:fight(); end
Remember no matter you do in life to always have a little fun while you are at it ;)

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual
User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: targeting/killing mob that is infight with NPC (for a qu

#3 Post by rock5 »

What Lisa said but ANTI_KS should have worked so there must be some other reason why it didn't attack. Try using debug to find out why? Just start the bot with

Code: Select all

rom/bot debug
  • Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
  • I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
  • How to: copy and paste in micromacro
    ________________________
    Quote:
    • “They say hard work never hurt anybody, but I figure, why take the chance.”
          • Ronald Reagan
User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: targeting/killing mob that is infight with NPC (for a qu

#4 Post by lisa »

Yeah I just assumed it has to do with party bot settings, if those settings are messed up then the anti_ks doesn't work properly
Remember no matter you do in life to always have a little fun while you are at it ;)

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual
stessiberti
Posts: 15
Joined: Tue Jul 05, 2011 1:12 am

Re: targeting/killing mob that is infight with NPC (for a qu

#5 Post by stessiberti »

THX lisa / Rock for fast reply !


here my test script :


<?xml version="1.0" encoding="utf-8"?><waypoints>
<onLoad>changeProfileOption("ANTI_KS", "false");
changeProfileOption("MAX_TARGET_DIST", 200);
</onLoad>


<!-- # 1 --><waypoint x="1166" z="-31" y="140"> </waypoint>
<!-- # 2 --><waypoint x="1283" z="111" y="141">
player:clearTarget();
player:target(player:findNearestNameOrId(105341))
if player:haveTarget() then player:fight();
end </waypoint>
</waypoints>




*i used lisas idea for get the target
*i checked the party settings and all disabled them
*i did rocks debug thing , but still char is going from waypoint 1 to 2 in loop without hitting anything


maybe some got time to see over ther script


ps : i got no clue how to post scripts in boxes like you guys do , so sorry for bad layout
User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: targeting/killing mob that is infight with NPC (for a qu

#6 Post by rock5 »

The reason to use debug is to see the extra info it prints in the micromacro window. Did it print any extra messages that might explain why it's not targeting?

To display boxed code, select the code after pasting it, and click the "Code" button at the top of the edit box.
  • Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
  • I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
  • How to: copy and paste in micromacro
    ________________________
    Quote:
    • “They say hard work never hurt anybody, but I figure, why take the chance.”
          • Ronald Reagan
stessiberti
Posts: 15
Joined: Tue Jul 05, 2011 1:12 am

Re: targeting/killing mob that is infight with NPC (for a qu

#7 Post by stessiberti »

ok

what i did now

startet waypointpath with debug command ( didn t know that debugmod exists )

i used

Code: Select all

rom\bot debug path:test22

and yeah i got additional messages

Code: Select all

(debug) playerAddr:0x28BA5F00
(debug) player classes 6/2
(debug) palyer pet:0x0
(debug) Player target:0x0
(debug) player in battle: false
(debug) mousePawn:0x0
(debug)mousePawn id:0
(debug) camAddress:0xFCD800
(debug) camx...........
(debug) camxu........
Loading Profile xxxxxxxx.xml
commandMacro set to 1.
resultMacro set to 2.
actionKey set to 10.
The macro hotkey is 0.

Macro Test: ok 
Ranged skill found ........
(debug) CPU Frequency.........
We changed the option "anti_ks" from true to false
We changed the poption "max_target_dist.............

Loaded waypoint path test22.xml now.

Moving to waypoint #1,(1166,-31)
Moving to waypoint #2,(1283,111)
Clearing target.
clearing target.
Clearing target.
Moving to waypoint #1,(1166,-31)
Moving to waypoint #2,(1283,111)



and so on 

for me i found no hidden clue why bot doesnt even think about hit this mob


so thx again so far

btw i would try any suggestions or other ways, if there is some to get this mob down
User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: targeting/killing mob that is infight with NPC (for a qu

#8 Post by rock5 »

It toom me awhile but I figured it out. ANTI_KS = false allows you to attack your friends enemies but the bot never attacks mobs that are attacking strangers. Try adding the npcs name to your friend list in your profile then ANTI_KS = false will work.
  • Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
  • I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
  • How to: copy and paste in micromacro
    ________________________
    Quote:
    • “They say hard work never hurt anybody, but I figure, why take the chance.”
          • Ronald Reagan
stessiberti
Posts: 15
Joined: Tue Jul 05, 2011 1:12 am

Re: targeting/killing mob that is infight with NPC (for a qu

#9 Post by stessiberti »

seriously , i m close to begin to cry !

was thinking about this problem now for 3 days !!!!

and now it works !!!!!!!!!!
it was the friendlist , man i would never have had that idea


THX so much ROCK5
and lisa ofc !
not just for spending time in my solutions , for all the work you do here, always a pleasure to read this forum and see the progress
stessiberti
Posts: 15
Joined: Tue Jul 05, 2011 1:12 am

Re: targeting/killing mob that is infight with NPC (for a qu

#10 Post by stessiberti »

so i got one last question about this issue


is there a command like

Code: Select all

changeProfileOption("MAX_TARGET_DIST", 200);
as

Code: Select all

changeProfileFriend ("mobname");
doesnt seem to work

thx :-)
User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: targeting/killing mob that is infight with NPC (for a qu

#11 Post by lisa »

short answer is

Code: Select all

table.insert(settings.profile.friends, "name");
change name to the name of the mob

Another is to use a userfunction I made a little while back.

changeOptionFriendMob(arg1, arg2, arg3)
arg1 = "mob" or "friend"
arg2 = name of what ever your adding or removing from list
arg3 = "Add" or "Remove"

Code: Select all

changeOptionFriendMob("mob", "Wolf", "Add") 
changeOptionFriendMob("friend", "Hokeypokey", "Remove")
Add file to rom/userfunctions/
Attachments
userfunction_profilechange.lua
for changing "mobs" and "friends"
(1.42 KiB) Downloaded 76 times
Remember no matter you do in life to always have a little fun while you are at it ;)

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual
stessiberti
Posts: 15
Joined: Tue Jul 05, 2011 1:12 am

Re: targeting/killing mob that is infight with NPC (for a qu

#12 Post by stessiberti »

Thx lisa your tool works perfect !

btw if some other has same problem at some point , i had my best results when i had my waypoint mode on TRAVEL !
Post Reply