My little helper

Additional botting resources. Addons may be either for the game itself or for the RoM bot.
Forum rules
Only post additional bot resources here. Please do not ask unrelated questions.
Message
Author
JackBlonder
Posts: 99
Joined: Sat Dec 18, 2010 6:55 am

My little helper

#1 Post by JackBlonder » Fri Jan 07, 2011 2:53 pm

This is my waypointfile to let a healer follow the party and heal if necessary.
Maybe some of you like it. I'm just a noob in Rombot and LUA.

Code: Select all

<?xml version="1.0" encoding="utf-8"?><waypoints>
	<onLoad>
		local partymember={}
		local partymemberName={}
		local partymemberObj={}
		local noofpartymembers
		local i	

		
--********************************************************
--get all partymembers
--********************************************************
	if RoMScript("UnitExists('party1')") then
		table.insert(partymemberName, RoMScript("UnitName('player')"))
		i = 1
		while not(i >= 7 ) do
			if RoMScript("UnitIsPlayer('party"..i.."');") then
				table.insert(partymemberName,i+1, RoMScript("UnitName('party"..i.."')"))
			end
			i = i + 1
		end
		
		noofpartymembers = #partymemberName
		
		for i,v in ipairs(partymemberName) do
			table.insert(partymemberObj,i,player:findNearestNameOrId(partymemberName[i]))
			table.insert(partymember,i,CPawn(partymemberObj[i].Address))
		end
	end
--********************************************************
--Look at partymember health and heal if necessary 	
--********************************************************
	while(true) do
		for i,v in ipairs(partymember) do
			partymember[i]:update()

			if (90 > partymember[i].HP/partymember[i].MaxHP*100 and partymember[i].HP/partymember[i].MaxHP*100 > 50) then
				player:target(partymember[i])
			--**********Put year casts here*********************
				yrest(300)
			elseif (50 > partymember[i].HP/partymember[i].MaxHP*100) then
				player:target(partymember[i])
			--**********and here*********************
				yrest(300)
			--**********and so on*********************
			end
		end
		
		yrest(100)
		RoMScript("FollowUnit('party1');");
	end
	</onLoad>
</waypoints>
Attachments
Assist_asHealer.xml
(1.76 KiB) Downloaded 455 times
Last edited by JackBlonder on Tue Jan 11, 2011 1:01 pm, edited 3 times in total.

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

Re: My little helper

#2 Post by rock5 » Fri Jan 07, 2011 6:36 pm

I changed your quote tags to code tags.

That's a nice bit of neat coding for someone who's "a noob in Rombot and LUA". I look forward to seeing your future contributions.
  • 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

top1
Posts: 50
Joined: Mon Jan 03, 2011 4:57 pm

Re: My little helper

#3 Post by top1 » Sat Jan 08, 2011 7:34 pm

sweet tomorow I'll have a closer look at this!

could help by my healing problem :)

schwarzepeter
Posts: 26
Joined: Thu Dec 16, 2010 2:02 am

Re: My little helper

#4 Post by schwarzepeter » Sun Jan 09, 2011 12:51 pm

**********Put year casts here*********************??

can u please make a example ho to wrihte the skill in it sorry i dont get it to work :s

wizzyslo
Posts: 119
Joined: Sun Nov 01, 2009 6:09 pm

Re: My little helper

#5 Post by wizzyslo » Sun Jan 09, 2011 1:01 pm

Code: Select all

player:cast("MAGE_PURGATORY_FIRE"); yrest(1000); 
Skill must be on your profile to.

User avatar
jduartedj
Posts: 599
Joined: Sat Dec 19, 2009 12:18 am
Location: Lisbon
Contact:

Re: My little helper

#6 Post by jduartedj » Mon Jan 10, 2011 8:48 am

Maybe you could make this a file and add it to the addons,scripts forum and wiki repository? Good coding gz!
Thanks for reading! :D

Some of you might find this useful: RoM-bot Wiki
User Functions Repository (and other useful files): Addon Repo
Latest SVN updates: SVN updates

JackBlonder
Posts: 99
Joined: Sat Dec 18, 2010 6:55 am

Re: My little helper

#7 Post by JackBlonder » Tue Jan 11, 2011 4:34 am

I added a link to the addon repo.
Here's the waypointfile with two priest casts
Attachments
Assist_asHealer.xml
(1.76 KiB) Downloaded 506 times

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

Re: My little helper

#8 Post by rock5 » Tue Jan 11, 2011 6:40 am

Could you please add it to the first post? That way it doesn't get lost in the discussion.
  • 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

swietlowka
Posts: 316
Joined: Wed Jun 16, 2010 8:16 am

Re: My little helper

#9 Post by swietlowka » Fri Jan 14, 2011 2:50 am

anyway for it to autoloot bodies and then follow leader?

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

Re: My little helper

#10 Post by lisa » Fri Jan 14, 2011 3:04 am

You could try adding in the usage of rock5's loot bodies and then tell it to follow again after.

http://www.solarstrike.net/phpBB3/viewt ... =27&t=2018
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

swietlowka
Posts: 316
Joined: Wed Jun 16, 2010 8:16 am

Re: My little helper

#11 Post by swietlowka » Fri Jan 14, 2011 3:34 am

of that im aware, maybe it wasnt really good spoken at first, i mean when theres a bot running the leader can just move while heal is looting... was thinking of some kind of a command to let the leader bot know that it have to wait xD

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

Re: My little helper

#12 Post by lisa » Fri Jan 14, 2011 4:00 am

Someone made a post about party botting and they used to use buffs as a way to communicate between diff characters. So when priest is ready it casts a buff on tank, tank recognizing it has the specific buff, removes it and continues on.
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

swietlowka
Posts: 316
Joined: Wed Jun 16, 2010 8:16 am

Re: My little helper

#13 Post by swietlowka » Fri Jan 14, 2011 4:09 am

oh i did not see it, but it seems reasonable... if we could make the bot somehow read from chat it would be much easier to handle though ;0

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

Re: My little helper

#14 Post by lisa » Fri Jan 14, 2011 4:36 am

Actual chat is monitored by a programme for the GM's to use. When you say specific words in any channel it is added to a log file which GM's have to read through to see if they were needed and anything else like "hey I'm a bot".

I wouldn't try to use any chat channels in regards to 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

swietlowka
Posts: 316
Joined: Wed Jun 16, 2010 8:16 am

Re: My little helper

#15 Post by swietlowka » Fri Jan 14, 2011 4:40 am

if the key words would be editable it wouldnt matter f/e
"hey w8 i need to grab stuff, plox" i doubt it would look any suspicous to htat program, but anyway, ill use the buffs for that matter easy and friendly solution

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

Re: My little helper

#16 Post by lisa » Fri Jan 14, 2011 4:55 am

If you made the function that calls for anything by other bot as a table and the full table means you get the response you want then it might work. If 1 character says "Hey wait" every few minutes for hours on end it would look suspicious.
It would be possible to make the bot use chat channels for commands, it would bog down the bot a little though. Already many addons for group invites which monitor defined channels for spefic characters and then responding to them.

I'm not saying it isn't doable just saying if you didn't do it properly then it would just paint a big target on your head saying "I am a bot, bann me". Doing it "properly" would take a while.
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

swietlowka
Posts: 316
Joined: Wed Jun 16, 2010 8:16 am

Re: My little helper

#17 Post by swietlowka » Fri Jan 14, 2011 5:42 am

lisa wrote:If you made the function that calls for anything by other bot as a table and the full table means you get the response you want then it might work. If 1 character says "Hey wait" every few minutes for hours on end it would look suspicious.
It would be possible to make the bot use chat channels for commands, it would bog down the bot a little though. Already many addons for group invites which monitor defined channels for spefic characters and then responding to them.

I'm not saying it isn't doable just saying if you didn't do it properly then it would just paint a big target on your head saying "I am a bot, bann me". Doing it "properly" would take a while.
so true...

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

Re: My little helper

#18 Post by rock5 » Fri Jan 14, 2011 7:26 am

Plus the bot isn't designed to monitor any events in the game like the CHAT_MSG events. You would need an ingame addon.
  • 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

JackBlonder
Posts: 99
Joined: Sat Dec 18, 2010 6:55 am

Re: My little helper

#19 Post by JackBlonder » Fri Jan 14, 2011 2:19 pm

Short solution without buff communication

Code: Select all

		lootBodies()
		yrest(100)
		
		partyleader:update()
		if ( distance(player.X, player.Z, partyleader.X, partyleader.Z) > 200) then
				player:moveTo(CWaypoint(partyleader.X, partyleader.Z), true)
		end
		RoMScript("FollowUnit('party1');");
The buff communication is a nice idea though.

User avatar
jduartedj
Posts: 599
Joined: Sat Dec 19, 2009 12:18 am
Location: Lisbon
Contact:

Re: My little helper

#20 Post by jduartedj » Sat Jan 15, 2011 9:46 pm

rock5 shouldn't this thread be moved to addons?
Thanks for reading! :D

Some of you might find this useful: RoM-bot Wiki
User Functions Repository (and other useful files): Addon Repo
Latest SVN updates: SVN updates

Post Reply

Who is online

Users browsing this forum: No registered users and 9 guests