@terje
Until you find out what ID the might ring is equipped use this... If it doesn't work i'm done.
@terje
Until you find out what ID the might ring is equipped use this... If it doesn't work i'm done.
Last edited by Riku; 03-18-2015 at 03:30 PM.
yes its the same ID 3048 ur last post ^ works it puts energy ring once its under 60% EZ
The only thing is to make it pull up a Might ring if its above 90%, or something, and switches once below 60% again, etc etc
and pulls the might ring back on only once, ofc
sry if im unclear, i got big time problems explaining myself hehe and sry for being a noob -.- xd
EDIT;
THIS one i havent get the chance to try yet, as it comes with a error when i trys to run it, prolly maybe a miss spell i cant see :O? or ?PHP Code:
-- 3088 equipped E-ring
-- 3051 unequipped E-ring
init start
local Keys = {
Key1 = "F5",
Key1minHP = 1, -- In percentages.
Key1maxHP = 60,
Key1equip = "energy ring", -- Item name
Key2 = "F4",
Key2minHP = 61,
Key2maxHP = 99,
Key2equip = "might ring"
}
init end
auto(400)
if (Keys.Key1equip:lower() == "energy ring") then
Keys.Key1equip = 3088
end
if ($hppc >= Keys.Key1minHP) and ($hppc <= Keys.Key1maxHP) and ($finger.id ~= itemid(Keys.Key1equip)) then
keyevent(Keys.Key1)
elseif ($hppc > Keys.Key1maxHP) and ($finger.id == itemid(Keys.Key1equip)) then
keyevent(Keys.Key1)
end
if ($hppc >= Keys.Key2minHP) and ($hppc <= Keys.Key2maxHP) and ($finger.id ~= itemid(Keys.Key2equip)) then
keyevent(Keys.Key2)
elseif ($hppc > Keys.Key2maxHP) and ($finger.id == itemid(Keys.Key2equip)) then
keyevent(Keys.Key2)
end
Error message :
PHP Code:
error in Hotkey script energyring scruipt:
["if (Keys.Key1equip:lower() == "e..."]:energyring scruipt:17 attempt to index field 'Key1equip' (a number value)
Last edited by terje; 03-18-2015 at 03:31 PM.
@terje
Ok.. this should work...
init start
local Keys = {
Key1 = "F1",
Key1minHP = 1, -- In percentages.
Key1maxHP = 60,
Key1equip = 3088, -- ITEM ID: 3088 equipped E-ring
Key2 = "F2",
Key2minHP = 61,
Key2maxHP = 99,
Key2equip = 3048 -- ITEM ID: 3048 Might ring (Same unequipped as equipped)
}
init end
auto(400)
if ($hppc >= Keys.Key1minHP) and ($hppc <= Keys.Key1maxHP) and ($finger.id ~= Keys.Key1equip) then
keyevent(Keys.Key1)
elseif ($hppc > Keys.Key1maxHP) and ($finger.id == Keys.Key1equip) then
keyevent(Keys.Key1)
end
if ($hppc >= Keys.Key2minHP) and ($hppc <= Keys.Key2maxHP) and ($finger.id ~= Keys.Key2equip) then
keyevent(Keys.Key2)
elseif ($hppc > Keys.Key2maxHP) and ($finger.id == Keys.Key2equip) then
keyevent(Keys.Key2)
end
WORKS! ++++++++++++++REP!
Hah u should see my .text documents i've been copy pasting to try make this work roflmao
nice work man! +++ rep @Riku
@Riku Yeah I believe you're right, worn ring ID's are different than normal ring ID's.