Patch 4.0.10.2519

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Message
Author
_hirondelle
Posts: 72
Joined: Thu Mar 08, 2012 7:22 am

Re: Patch 4.0.10.2519

#21 Post by _hirondelle » Mon Apr 16, 2012 4:13 am

rock5 wrote:
_hirondelle wrote:But with speedhack, the first five minutes were ok but 30 sec later, I died 2 times.
So it worked for 5 minutes? It either works or it doesn't. If it worked then you died after 5 minutes then the problem is something else or an existing issue with speedhack, such as going too fast.
Nothing bad happens the first five minutes, after I died.
I was running to fast yep :)

jasn
Posts: 70
Joined: Sat Jun 25, 2011 8:25 am
Location: Sweden

Re: Patch 4.0.10.2519

#22 Post by jasn » Mon Apr 16, 2012 4:51 am

lisa wrote:Looks like pet.lua went backwards.

It used to be

Code: Select all

	-- Check if already have the buff
	local HavePetBuff = player:getBuff("503946,503581,503580")
	if buffname == GetIdName(HavePetBuff) then
		return
	end
Then I changed it to

Code: Select all

	-- Check if already have the buff
	if player:getBuff(buffname) then
		return
	end
But it seems it is now back to the old code, not sure when it happened.

line 103 of rom/classes/pet.lua

Just edit the file and see how it goes, I can't do any testing at the moment so I'm not going to commit it.
Thanks Lisa, works like a charm again, i had it running for 20 mins so it rebuffs and resummons just to check those parts. :)

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

Re: Patch 4.0.10.2519

#23 Post by rock5 » Mon Apr 16, 2012 5:30 am

The code is

Code: Select all

	-- Check if already have the buff
	local HavePetBuff = player:getBuff("503946,503581,503580")
	if buffname == GetIdName(HavePetBuff) then
		return
	end
I can only find it written one other way

Code: Select all

	-- Check if already have the buff
	local HavePetBuff = player:getBuff("503946,503581,503580")
	if buffid == HavePetBuff then
		return
	end
By the looks of it, neither of these will work. player.getBuff returns a table, not a string name or Id number. So it should be

Code: Select all

	if buffid == HavePetBuff.Id then
or with the way it is cuurently written

Code: Select all

	if buffname == HavePetBuff.Name then
  • 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: Patch 4.0.10.2519

#24 Post by rock5 » Mon Apr 16, 2012 5:41 am

On second thought you would also have to check if there is a match before comparing the name. So I think it should be

Code: Select all

	if HavePetBuff and buffname == HavePetBuff.Name then
  • 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: Patch 4.0.10.2519

#25 Post by lisa » Mon Apr 16, 2012 6:31 am

Wouldn't the code I posted work??
Since buffname is already decided in earlier code

Code: Select all

	if type(_nameorid) == "number" then
		buffname = GetIdName(_nameorid)
	else
		if string.find(string.lower(_nameorid), "spirit" ) or
			string.find(string.lower(_nameorid), "heart" ) then
			buffname = GetIdName(503946)
		elseif string.find(string.lower(_nameorid), "nature") then
			buffname = GetIdName(503581)
		elseif string.find(string.lower(_nameorid), "walker") then
			buffname = GetIdName(503580)
		else
			error("Unrecognized name for warden pet buff.")
		end
	end

Code: Select all

	-- Check if already have the buff
	if player:getBuff(buffname) then
		return
	end
So you only have to look for the buff you want, which the code I posted does.
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: Patch 4.0.10.2519

#26 Post by rock5 » Mon Apr 16, 2012 6:51 am

lisa wrote:Wouldn't the code I posted work??
Umm... Yes. :oops:

I thought you meant you had previously committed it but then it was reverted. Now I'm understanding you meant you had changed it but never committed it and lost the changes?

Anyway, that's the right way to do it.

I'm a bit confused by the "name" side of it. I understand the "spirit", "heart" etc are only code words? If so why do a string.find?

You could do an actual string comparison like this or something like it.

Code: Select all

elseif string.find(GetIdName(493347),_nameorid) then -- power of the oak
    buffname = GetIdName(503580)
  • 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: Patch 4.0.10.2519

#27 Post by lisa » Tue Apr 17, 2012 4:19 am

rock5 wrote:I thought you meant you had previously committed it but then it was reverted.
I thought I had commited it, not going to bother checking as it doesn't really matter lol
rock5 wrote:I'm a bit confused by the "name" side of it. I understand the "spirit", "heart" etc are only code words? If so why do a string.find?
The default bot uses the buff ID's and so that code is purely there incase anyone wants to add in their own usage of warden pet buffs, So they could do.

Code: Select all

wardenbuff("spirit")
or
wardenbuff("spirit buff me baby")
At some stage in their WP or what ever, it basically just added versatility into warden pet buff instead of purely working for default bot with ID's
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

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Semrush [Bot] and 7 guests