Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[
- Note: This script is to be used in conjunction with a UOSteam script which reads error messages created by this OpenEUO script. The methods for using UO.Click are commented out, but I left them there in case you would like to fiddle with using them, but I don't recommend it. They interrupt a lot of normal playing actions.
- ]]--
- --Set maxFollowers to your own maximum, this prevents Vortex Strike from using itself when you already have capped followers.
- local maxFollowers = 10
- local atk = ''
- --This function just exists for finding the gumps to activate augment abilities.
- -- You pass it the width, height, and which attack you're using. You then line up a UO.GetPix
- -- to verify that you're reading the correct gump, assuming you have more than 1 augment skill gump.
- BuffsScanConts = function(ContSX,ContSY,atk)
- local X,Y,SX,SY,_
- for i=0,999 do
- _,X,Y,SX,SY,_,_,_,_ = UO.GetCont(i)
- if X == nil then
- break
- end
- if SX == ContSX and SY == ContSY then
- if X ~= 0 then
- --print("Gump found moving to top")
- local pix = 0
- if atk == 'vs' then
- --This UO.GetPix must target a unique pixel on the gump you wish to target.
- pix = UO.GetPix(X+30,Y+85)
- --print(pix)
- --This if statement then checks to make sure that that pixel has the exact coloring that you checked for.
- if pix == 524362 or pix == 1581353 then
- UO.ContTop(i)
- if UO.ContPosX ~= 0 and UO.ContPosY ~= 0 then
- --UO.ContPosX = 0
- --UO.ContPosY = 0
- end
- end
- --This UO.GetPix must target a unique pixel on the gump you wish to target.
- pix = UO.GetPix(X+30,Y+147)
- --This if statement then checks to make sure that that pixel has the exact coloring that you checked for.
- if pix == 10272206 or pix == 2687174 then
- UO.ContTop(i)
- end
- end
- if atk == 'sp' then
- --This UO.GetPix must target a unique pixel on the gump you wish to target.
- pix = UO.GetPix(X+30,Y+85)
- --This if statement then checks to make sure that that pixel has the exact coloring that you checked for.
- if pix == 10278639 or pix == 3211486 then
- UO.ContTop(i)
- if UO.ContPosX ~= 0 and UO.ContPosY ~= 0 then
- --UO.ContPosX = 0
- --UO.ContPosY = 0
- end
- end
- end
- end
- break
- end
- end
- if X == nil then
- return nil
- end
- return X,Y
- end
- --This function governs the actions taken if you are trying to trigger ShieldSpikes.
- function ShieldSpikes()
- --Sets to 'sp' so that BuffScanConts knows which gump to look for.
- atk = 'sp'
- local conX, conY = nil
- conX, conY = BuffsScanConts(70,122,atk)
- if conX ~= nil and conY ~= nil then
- local shieldSpike = UO.GetPix(conX+30,conY+85)
- --print(shieldSpike) --Uncomment this to print out the result of of your UO.GetPix
- if shieldSpike == 10278639 then
- if string.match(UO.CharStatus,'G') then --Triggers only if in War Mode
- UO.Macro(49,3) --This invokes the virtue of Valor, yielding a unique error message in game.
- end
- --UO.Click(conX+30,conY+85,true,true,true,false) --Uncomment this if you want to use UO.Click. I do not recommend.
- wait(500)
- elseif shieldSpike ~= 3211486 and shieldSpike ~= 10278639 then
- --print('Re-equip your shield!')
- end
- end
- end
- --This function governs the actions taken if you are trying to trigger Vortex Strike
- function VortexStrike()
- --Sets to 'vs' so that the BuffScansConts knows which gump to look for.
- atk = 'vs'
- followers = UO.Followers
- if followers < maxFollowers then
- local conX, conY = nil
- conX, conY = BuffsScanConts(70,169,atk) --Look for a Vortex Strike gump that has an additional ability on it.
- if conX == nil then
- conX, conY = BuffsScanConts(70,122,atk) --Look for a Vortex Strike gump that only has Vortex Strike.
- end
- if conX ~= nil and conY ~= nil then
- local vortexStrike = UO.GetPix(conX+30,conY+85)
- --print(vortexStrike)
- if vortexStrike == 1581353 then
- if string.match(UO.CharStatus,'G') then --If in War Mode.
- UO.Macro(49,6) --Invokes a virtue that doesn't exist, yielding a unique error message in game.
- end
- --UO.Click(conX+30,conY+85,true,true,true,false) --Uncomment to use UO.Click. I do not recommend.
- wait(500)
- elseif vortexStrike ~= 524362 and vortexStrike ~= 1581353 then
- vortexStrike = UO.GetPix(conX+30,conY+147)
- --print(vortexStrike)
- if vortexStrike == 10272206 then --2687174 active color
- if string.match(UO.CharStatus,'G') then --If in War Mode.
- UO.Macro(49,6) --Invokes a virtue that doesn't exist, yielding a unique error message in game.
- end
- --UO.Click(conX+30,conY+147,true,true,true,false) --Uncomment to use UO.Click. I do not recommend.
- wait(500)
- end
- end
- end
- end
- end
Add Comment
Please, Sign In to add comment