Party Bot (questions/answers)

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Message
Author
User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Party Bot (questions/answers)

#21 Post by rock5 » Fri Dec 14, 2012 6:59 am

Sounds good. Although the more you have one character control everything the slower it will get. It will be continuously doing romscripts after all. Maybe I'll have another crack at trying to find the chat messages in memory. Not much hope of it though.
  • 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

dx876234
Posts: 188
Joined: Sat Jul 24, 2010 6:13 am

Re: Party Bot (questions/answers)

#22 Post by dx876234 » Fri Dec 14, 2012 10:37 am

Nice one Lisa, Ill give it a try :)

-dx

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

Re: Party Bot (questions/answers)

#23 Post by lisa » Fri Dec 14, 2012 6:11 pm

I am thinking that the "" isn't the best way to go for the code, since half the time you do actually want to have "" in your code.

It can basically check for any characters, any ideas on characters to use that arn't normally used in code.

Code: Select all

code?print("I like to party")?
code!print("I like to party")!
code^print("I like to party")^
code@print("I like to party")@
code$print("I like to party")$
code$_msg = "I am a bot" RoMScript("SendChatMessage('".._msg.."', GUILD)")$
Keep in mind that any extra of the specific character would mess up it's usage.

Personally I am leaning towards ^ or $
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: Party Bot (questions/answers)

#24 Post by rock5 » Sat Dec 15, 2012 4:02 am

I would think you could do a pattern search that includes the outer indicators. It should even be possible to do something like

Code: Select all

code(print("I am a bot"))
Let me test it

Code: Select all

Command> str = "code(print('I am a bot'))" comm = string.match(str,"code%((.*)%)") print(comm)
print('I am a bot')
So you should be able to use anything that you think is most user intuitive. That is unless you want to be able to do multiple commands on one line.
  • 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: Party Bot (questions/answers)

#25 Post by lisa » Sat Dec 15, 2012 4:31 am

rock5 wrote:"code(print('I am a bot'))"
weird I would expect it to recognize the first ) but it is only doing it for the last ), that makes no sence to me.
from that I would expect it to print
print('I am a bot'
but it doesn't, it prints as you say.

It also means that people can use "" in their code.

Code: Select all

Command> str = 'code"print("I am a bot")"' comm = string.match(str,"code\"(.*)\"") print(comm)
print("I am a bot")
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: Party Bot (questions/answers)

#26 Post by rock5 » Sat Dec 15, 2012 5:39 am

Tha6t's because '*' matches the bigbest possible match.
  • a single character class followed by '*', which matches 0 or more repetitions of characters in the class. These repetition items will always match the longest possible sequence;
http://www.lua.org/manual/5.1/manual.html#5.4.1
  • 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

Jandrana
Posts: 187
Joined: Thu Jul 05, 2012 5:53 am

Re: Party Bot (questions/answers)

#27 Post by Jandrana » Mon Dec 17, 2012 8:39 am

I played around with party bot during the last days and finally got it working. I was trying to run HoS and it worked out pretty well, but now I'm looking for a way to switch between two "skill sets": one for killing trash (aoe based) and one for killing bosses (skill rotation to get max dps on a single target).

I did not test the new dynamic function calls from lisa, but this could be used to call a function doing the switch between the two skill sets.

Now a question regarding skill rotation: I know that there is "priority based" and a "order based" skill selection. But for a boss fight, you usually start with skills increasing you damage like: elemental catalysis, ... and then start your rotation: plasma arrow, flame, flame, flame, plasma arrow ....

How would you do something like this?

Disable all skills except the ones needed for the dps skill rotation and doing the "buffing skills" via "RomScript('CastSpellByName()')"?
But this usually will only alternate between "plasma arrow" and "flame". If possibly it should cast flame until the buff given by plasma arrow wears off.

Any suggestions?

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Party Bot (questions/answers)

#28 Post by rock5 » Mon Dec 17, 2012 10:41 am

An easy way to switch profile settings, especially if there are a few of them, might be to actually have 2 profiles, 1 for the trash and one for the bosses. Before tackling the boss you would do

Code: Select all

loadProfile("bossprofile")
and when you finish with the boss

Code: Select all

loadProfile("regularprofile")
Jandrana wrote:If possibly it should cast flame until the buff given by plasma arrow wears off.
You can add the charged state as a no requirement in your profile. Just add the following to your plasma arrow skill
nobuffname="Charged" nobufftarget="player"
  • 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: Party Bot (questions/answers)

#29 Post by lisa » Mon Dec 17, 2012 6:17 pm

rock5 wrote:An easy way to switch profile settings, especially if there are a few of them, might be to actually have 2 profiles,
That is 1 way to do it, I just did up a function to handle the buffing and changing autouse on the chars.

Code: Select all

function bossbuff(_arg)
	if _arg then
		if player.Class1 == CLASS_SCOUT then
			SlashCommand("/script CastSpellByName(\""..GetIdName(490464).."\");"); -- target area
			yrest(1100)
			SlashCommand("/script CastSpellByName(\""..GetIdName(490460).."\");"); -- concentration
			yrest(1100)
			SlashCommand("/script CastSpellByName(\""..GetIdName(490494).."\");"); -- arrow of essence
			yrest(1100)
			SlashCommand("/script CastSpellByName(\""..GetIdName(490434).."\");"); -- Blood Arrow
		elseif player.Class1 == CLASS_PRIEST then
			changeProfileSkill("PRIEST_HEALING_SALVE" , "AutoUse", true)
			changeProfileSkill("PRIEST_WAVE_ARMOR" , "AutoUse", true)
		elseif player.Class1 == CLASS_ROGUE then
			SlashCommand("/script CastSpellByName(\""..GetIdName(490506).."\");"); -- Assasins rage
			yrest(1100)
			SlashCommand("/script CastSpellByName(\""..GetIdName(490507).."\");"); -- premeditation
			yrest(1100)
			SlashCommand("/script CastSpellByName(\""..GetIdName(491528).."\");"); -- energy thief
			yrest(1100)
			SlashCommand("/script CastSpellByName(\""..GetIdName(490333).."\");"); -- ferverant attack
			yrest(1100)
			SlashCommand("/script CastSpellByName(\""..GetIdName(490350).."\");"); -- informer
			yrest(1100)
			SlashCommand("/script CastSpellByName(\""..GetIdName(490355).."\");"); -- evasion
		elseif player.Class1 == CLASS_MAGE then
			changeProfileOption("COMBAT_DISTANCE" , 200)
			changeProfileSkill("MAGE_PURGATORY_FIRE" , "AutoUse", false)
			changeProfileSkill("MAGE_FLAME" , "AutoUse", true)			
			changeProfileSkill("MAGE_FIREBALL" , "AutoUse", true)
		end
		if player.Class1 == CLASS_WARDEN or player.Class2 == CLASS_WARDEN then
			SlashCommand("/script CastSpellByName(\""..GetIdName(493402).."\");"); -- elven amulet
			yrest(1100)
			SlashCommand("/script CastSpellByName(\""..GetIdName(493406).."\");"); -- savage power
		end
		SlashCommand("/script CastSpellByName(\""..GetIdName(495174).."\");"); -- fire training
		sendPartyChat("done buffing")
	else
		changeProfileSkill("PRIEST_HEALING_SALVE" , "AutoUse", false)
		changeProfileSkill("PRIEST_WAVE_ARMOR" , "AutoUse", false)
		changeProfileOption("COMBAT_DISTANCE" , 50) 
		changeProfileSkill("MAGE_PURGATORY_FIRE" , "AutoUse", true)
		changeProfileSkill("MAGE_FLAME" , "AutoUse", false)
		changeProfileSkill("MAGE_FIREBALL" , "AutoUse", false)
	end
end
bossbuff(true) before attacking boss
bossbuff() after killing boss

Obviously that isn't perfect, wrote it up as I was doing some DoD runs on the fly, it did work well though.

Actually I guess you could do this

Code: Select all

loadProfile(player.Name.."boss")
profile names like this for boss
charizardboss
sizzlerboss
sarahboss
then after boss switch it back

Code: Select all

loadProfile(player.Name)
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

Jandrana
Posts: 187
Joined: Thu Jul 05, 2012 5:53 am

Re: Party Bot (questions/answers)

#30 Post by Jandrana » Thu Dec 20, 2012 4:45 am

I did not know the options mentioned above (nobuffname="Charged" nobufftarget="player").

Thanks, rock and lisa for your suggestions. Will try it during the next days.

xrozhija
Posts: 51
Joined: Sat Apr 25, 2009 2:08 am

Re: Party Bot (questions/answers)

#31 Post by xrozhija » Sat Dec 22, 2012 6:48 am

Got an issue with my healer not wanting to heal, unless i manually target the partymember after each battle, as target is cleared on leavecombat.
Ran the following commands

Code: Select all

Command> PartyTable() table.print(partymemberpawn)
table: 02B3E2D0
1:      table: 02B2FD68
        free_debug1:    0
        MaxMP:  27594
        MaxHP:  58459
        PotionLastOnceUseTime:  0
        Mana:   27594
        ActualSpeed:    0
        Lootable:       false
        Race:   0
        ExpInsertPos:   0
        ExpTable:       table: 02B2FDB8
        MaxEnergy:      0
        Attackable:     false
        Sleeping_time:  0
        Class3: -1
        Rage:   0
        Type:   1
        MaxMP2: 1
        Id:     1001
        Harvesting:     false
        Level3: 1
        Casting:        false
        PetPtr: 0
        Stance: 0
        MP:     27594
        LastExp:        0
        Last_ignore_target_time:        0
        ExpUpdateInterval:      10
        Fighting:       false
        Concentration:  0
        InventoryDoUpdate:      false
        ExpPerMin:      0
        MaxMana:        27594
        Moving: false
        Speed:  55
        Class1: 5
        BotStartTime_nr:        0
        TargetIcon:     true
        InParty:        true
        Swimming:       false
        MaxConcentration:       0
        SkillQueue:     table: 02B2FE08
        Name:   CENSOR
        LastSkillType:  0
        LastSkillStartTime:     0
        Buffs:  table: 02B2FE30
        HP:     58459
        Z:      -16932.802734375
        Mounted:        false
        free_flag3:     false
        Guild:  <UNKNOWN>
        PotionLastManaEmptyTime:        0
        free_flag2:     false
        free_flag1:     false
        Success_waypoints:      0
        PotionHpUsed:   0
        Death_counter:  0
        PotionManaOnceUsed:     0
        Alive:  true
        mobs:   table: 02B2FDE0
        Unstick_counter:        0
        PotionLastUseTime:      0
        ranged_pull:    false
        GUID:   2287
        LastTargetPtr:  0
        Returning:      false
        ExpTableMaxSize:        10
        PhiriusManaUsed:        0
        Last_ignore_target_ptr: 0
        Current_waypoint_type:  3
        TimeTillLevel:  0
        free_counter1:  0
        Fights: 0
        Sleeping:       false
        level_detect_levelup:   0
        LastExpUpdateTime:      1356176311
        PotionLastManaOnceEmptyTime:    0
        DirectionY:     0
        Direction:      1.6231558964156
        free_counter3:  0
        PhiriusLastManaEmptyTime:       0
        BotStartTime:   1356176311
        PhiriusLastHpEmptyTime: 0
        InventoryLastUpdate:    1356176311
        Nature: 0
        PotionManaUsed: 0
        Level2: 56
        PhiriusHpUsed:  0
        MP2:    1
        PhiriusLastUseTime:     0
        IgnoreTarget:   0
        TargetPtr:      0
        lastHitTime:    0
        Level:  75
        LastDistImprove:        1356176311
        Cast_to_target: 0
        PotionLastHpEmptyTime:  0
        PotionHpOnceUsed:       0
        MaxRage:        0
        free_counter2:  0
        Energy: 0
        Y:      790.11090087891
        X:      -8074.9892578125
        Class2: 6
        Address:        1410851072
        PotionLastHpOnceEmptyTime:      0
        Battling:       false
        LastSkillCastTime:      0
        Aggressive:     false
Using

Code: Select all

print(getPartyLeaderName())
It does find the correct name of the partyleader

and

Code: Select all

print(checkparty())
it prints false

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

Re: Party Bot (questions/answers)

#32 Post by lisa » Sat Dec 22, 2012 7:20 am

Glad you did the tests I posted =)

Ok so we can now say that the bot isn't working out that there is another character in party, so it is probably an address issue.

So next question.
What game version and what bot version are you using?
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

xrozhija
Posts: 51
Joined: Sat Apr 25, 2009 2:08 am

Re: Party Bot (questions/answers)

#33 Post by xrozhija » Sat Dec 22, 2012 9:04 am

gameversion 5.0.6.2607.en (currently newest live patch)
RoM Bot Version 3.29, Revision 744

CanceR
Posts: 33
Joined: Sun Jul 22, 2012 9:28 am

Re: Party Bot (questions/answers)

#34 Post by CanceR » Sat Dec 22, 2012 9:31 am

same here, i have a similar issue: bot is not healing, due to loosing target of party leader. if party leader is targeted manually - bot starts to buff and heal for a short time, till looses target of party leader. strange is that from time to time - this bug is cleared (may be after PC restart), but later appears again.
i m using latest game client and latest Rev744 of scripts

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

Re: Party Bot (questions/answers)

#35 Post by lisa » Sat Dec 22, 2012 5:14 pm

I'll test it out later today and see what I can see, seems like an address issue though or it might be the issue of using int instead of uint for the address memory reads.
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
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: Party Bot (questions/answers)

#36 Post by lisa » Sat Dec 22, 2012 9:41 pm

ok it turned out more complicated than just an incorrect address.

Can you give this a try for me, in functions.lua around line 1360 you will see

Code: Select all

	local listAddress = memoryReadRepeat("intptr", getProc(), addresses.partyMemberList_address, {addresses.partyMemberList_offset1,addresses.partyMemberList_offset2} )
	local memberAddress = listAddress + (_number - 1) * 0x60
replace it with

Code: Select all

	local listAddress = memoryReadRepeat("uint", getProc(), 0xA02D10 ) + 0x134
	local memberAddress = listAddress  + (_number - 1) * 0x60
then test it again with the prints on first post of this topic.
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

xrozhija
Posts: 51
Joined: Sat Apr 25, 2009 2:08 am

Re: Party Bot (questions/answers)

#37 Post by xrozhija » Sun Dec 23, 2012 5:21 am

With the edited lines in functions.lua i get the following

Code: Select all

Command> print(checkparty())
Party member 1 has the name of CENSOR
true
and

Code: Select all

PartyTable() table.print(partymemberpawn)
finds 2 party members data

so it seems it works with the change.

Will set them out on a waypoint and test it a bit further, and hope it will start healing when needed.

EDIT: Have been running a waypoint for 30 mins now, and it works perfectly with the change in functions.lua line 1359+1360

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

Re: Party Bot (questions/answers)

#38 Post by lisa » Sun Dec 23, 2012 6:43 am

That code will work until game has another patch, I will see where rock is with anything he is working on before commiting anything.

I want to move all of the party functions into party.lua so that if anything needs updating/fixing I can do it without affecting anything else in the bot.
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: Party Bot (questions/answers)

#39 Post by rock5 » Sun Dec 23, 2012 8:48 am

Looks like, even though the address found for partyMemberList is correct, 1 of the offsets have changed. So it looks like. So it looks like this new method is not good enough either. I'll see if I can find a better way.

BTW the offset that changed is partyMemberList_offset1. It should be 0x288 now.
  • 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
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Party Bot (questions/answers)

#40 Post by rock5 » Sun Dec 23, 2012 9:04 am

Awe, rom4u is updating so I wont have a slightly older client to test with. Does anyone know of a server that uses clients that are always slightly behind?
  • 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

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 3 guests