reqbuffname on skill to have 2 buffs?

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Post Reply
Message
Author
noobbotter
Posts: 527
Joined: Fri Aug 31, 2012 1:15 pm

reqbuffname on skill to have 2 buffs?

#1 Post by noobbotter » Mon Jul 27, 2015 2:30 pm

Can a skill have 2 required buffs, as in "don't use the skill unless both buffs are present"?

If so, would you implement that like:

Code: Select all

reqbuffname="500704,620313"

User avatar
BlubBlab
Posts: 948
Joined: Fri Nov 30, 2012 11:33 pm
Location: My little Pony cafe

Re: reqbuffname on skill to have 2 buffs?

#2 Post by BlubBlab » Mon Jul 27, 2015 3:24 pm

I'm not sure but I will take a look because next todo to add something similar to the skills for my framework but I suspect it works because I saw something similar elsewhere
Jack-of-all-trades, but master-of-only of a few :D

My Reps:
https://github.com/BlubBlab/Micromacro-with-OpenCV (My version of MM2 with OpenCV and for MS Visual Studio)
https://github.com/BlubBlab/rom-bot (rombot with no stop WP and advanced human emulation mode and some other extensions)
https://github.com/BlubBlab/Micromacro-2-Bot-Framework ( A work in progress )
My Tools : viewtopic.php?f=10&t=6226

User avatar
BlubBlab
Posts: 948
Joined: Fri Nov 30, 2012 11:33 pm
Location: My little Pony cafe

Re: reqbuffname on skill to have 2 buffs?

#3 Post by BlubBlab » Mon Jul 27, 2015 3:57 pm

No it can't is the answer
For that it needs somewhere something like this:

Code: Select all

			if( randomfollow ) then 
				local t = {}
				local i = 1;
				
				for token in string.gmatch(randomfollow, "[^,]+") do
				
					t[i] = token;
					i= i + 1;
				end
			
				tmp.RandomFollow = t;
			end
			if( randombefore ) then 
				local t = {}
				local i = 1;
				
				for token in string.gmatch(randombefore, "[^,]+") do
				
					t[i] = token;
					i= i + 1;
				end
			
				tmp.RandomBefore = t;
			end
			
EDIT: This was only an example in which way it can be implemented in database.lua
Last edited by BlubBlab on Tue Jul 28, 2015 12:26 am, edited 1 time in total.
Jack-of-all-trades, but master-of-only of a few :D

My Reps:
https://github.com/BlubBlab/Micromacro-with-OpenCV (My version of MM2 with OpenCV and for MS Visual Studio)
https://github.com/BlubBlab/rom-bot (rombot with no stop WP and advanced human emulation mode and some other extensions)
https://github.com/BlubBlab/Micromacro-2-Bot-Framework ( A work in progress )
My Tools : viewtopic.php?f=10&t=6226

User avatar
BlubBlab
Posts: 948
Joined: Fri Nov 30, 2012 11:33 pm
Location: My little Pony cafe

Re: reqbuffname on skill to have 2 buffs?

#4 Post by BlubBlab » Tue Jul 28, 2015 12:25 am

okay the other side is:

Code: Select all

-- Check required buffs/debuffs
	for key,reqbuff in pairs(self.ReqBuffName) do
		local count = 0
		if(self.ReqBuffCount[key])then
			count = ReqBuffCount[key]
		end
		if( reqbuff ~= "" and reqbuff ~= "nil") then
			local bool;
			if( self.ReqBuffTarget == "player" ) then
				bool = player:hasBuff(reqbuff, count)
			elseif target and ( self.ReqBuffTarget == "target" ) then
				bool = target:hasBuff(reqbuff, count)
			end

			if bool == false then
				debug_skilluse("REQBUFF");
				return false
			end
		end
	end

	-- Check non-required buffs/debuffs
	for key,nobuff in pairs(self.NoBuffName) do
		local count = 0
		if(self.NoBuffCount[key])then
			count = NoBuffCount[key]
		end
		if( nobuff ~= "" and nobuff ~= "nil") then
			local bool;
			if( self.NoBuffTarget == "player" ) then
				bool = player:hasBuff(nobuff, count)
			elseif target and ( self.NoBuffTarget == "target" ) then
				bool = target:hasBuff(nobuff, count)
			end

			if bool == true then
				debug_skilluse("NOBUFF");
				return false
			end
		end
	end
and natrually you must change the init values in skill.lua
Jack-of-all-trades, but master-of-only of a few :D

My Reps:
https://github.com/BlubBlab/Micromacro-with-OpenCV (My version of MM2 with OpenCV and for MS Visual Studio)
https://github.com/BlubBlab/rom-bot (rombot with no stop WP and advanced human emulation mode and some other extensions)
https://github.com/BlubBlab/Micromacro-2-Bot-Framework ( A work in progress )
My Tools : viewtopic.php?f=10&t=6226

Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 2 guests