Change set on press key - Printable Version +- BBot - The best bot of the world (https://forums.bmega.net) +-- Forum: Scripts & Macros (https://forums.bmega.net/forum-4.html) +--- Forum: Requests (https://forums.bmega.net/forum-17.html) +--- Thread: Change set on press key (/thread-20963.html) |
Change set on press key - seypher - 11-22-2018 Hello, good afternoon! I would like help with a script that I tried to develop but it is bugging. Let's go! The function of the script was to change the whole set when I pressed a hotkey. BUT it's bugging, sometimes it changes the set, sometimes it does not change anything, and sometimes it changes only some parts. While it was to change the complete set by pressing only one key. Code: 100 {BLOCKER SET} Tibia.KeyDown(121)==1 Self.Equip.Helmet(11689) Self.Equip.Armor(13994) Self.Equip.Legs(8863) Self.Equip.LeftHand(14768) Self.Equip.Ammo(25758) Could anybody help me? RE: Change set on press key - Catar - 11-23-2018 Because macro you made is trying to change all items at the same time which is impossible. You would have to add some delays and cooldowns, but it's interesting idea, I.'ll do it later, when I'm home. Check in few days For now give me full list of items for each set RE: Change set on press key - seypher - 11-23-2018 Haste Set 1. Tiara of Power (SLOT: Helmet) - ID: 23474/23475(equiped) 2. Prismatic Armor (SLOT: Armor) - ID: 16110 3. Grasshopper Legs (SLOT: Legs) - ID: 14087 4. Magical Torch (SLOT: Ammo) - ID: 9042 ----OR----- Death Set 1. Elite Draken Helmet (SLOT: Helmet) - ID: 11689 2. Depth Lorica (SLOT: Armor) - ID: 3. Yalahari Leg Piece (SLOT: Legs) - ID: 8863 4. Moon Mirror (SLOT: Ammo) - ID: 25730 *OBS: Can be any of these 2 because i'll create a hotkey for each one RE: Change set on press key - Catar - 11-23-2018 I will make one macro for both sets with single hotkey, already have an idea in my head RE: Change set on press key - Catar - 11-23-2018 Okay, done it I've set it on Dash/Minus - key on numerical feel free to change it. Short YT explanation Here are variables Code: StartingSet=1 And here is macro [macro]80 {Change Set} Tibia.KeyDown(:K_SUBTRACT)==1 [EquipChange] Cooldown.Blocked(CDkey)==0 !SetType==1 [VarSetChange] SetType:=2 HUD.Print(3, 1, 93, 0, 253, 2000, Equip Death Set) Cooldown.Create(CDkey, 2000) GoLabel(EquipChange) {VarSetChange} !SetType==2 [StartingSet] SetType:=1 HUD.Print(3, 1, 18, 196, 232, 2000, Equip Haste Set) Cooldown.Create(CDkey, 2000) GoLabel(EquipChange) {StartingSet} SetType:=!StartingSet exit() {EquipChange} !SetType==1 [OtherSet] {Head_1} Self.Inventory.Helmet()<>!HS_HelmetON [Armor_1] Self.Equip(Helmet, !HS_HelmetBP) exit() {Armor_1} Self.Inventory.Armor()<>!HS_Armor [Legs_1] Self.Equip(Armor, !HS_Armor) exit() {Legs_1} Self.Inventory.Legs()<>!HS_Legs [Ammo_1] Self.Equip(Legs, !HS_Legs) exit() {Ammo_1} Self.Inventory.Ammunition()<>!HS_Ammo Self.Equip(Ammo, !HS_Ammo) exit() {OtherSet} !SetType==2 {Head_2} Self.Inventory.Helmet()<>!DS_Helmet [Armor_2] Self.Equip(Helmet, !DS_Helmet) exit() {Armor_2} Self.Inventory.Armor()<>!DS_Armor [Legs_2] Self.Equip(Armor, !DS_Armor) exit() {Legs_2} Self.Inventory.Legs()<>!DS_Legs [Ammo_2] Self.Equip(Legs, !DS_Legs) exit() {Ammo_2} Self.Inventory.Ammunition()<>!DS_Ammo Self.Equip(Ammo, !DS_Ammo) exit() [/macro] code for better visibility [spoiler] Code: Tibia.KeyDown(:K_SUBTRACT)==1 [EquipChange] RE: Change set on press key - seypher - 11-24-2018 Here it's not changing the set, just appears the messages "equip death set" and "equip haste set", but not equipping the items in inventory. And could you help me if I want to add more sets? changing it at + and - key? I apologize for the inconvenience, I would like to add a set of physical damage and maybe others for UE's. RE: Change set on press key - Catar - 11-24-2018 (11-24-2018, 06:11 AM)seypher Wrote: Here it's not changing the set, just appears the messages "equip death set" and "equip haste set", but not equipping the items in inventory.If you copied macro and all variables and set their ID correctly and have items in your opened backpack it should work like I showed on video. (11-24-2018, 06:11 AM)seypher Wrote: And could you help me if I want to add more sets? changing it at + and - key? It should be easy RE: Change set on press key - seypher - 11-24-2018 The problem is when I equipped the death set and press "-", the haste set doesn't equip CHANGE: ITS WORKING!! SORRY FOR THE INCONVENIENCE But could you help me to add the + key do change? And add more 2 sets there? like 1, 2, 3, 4 (and change between + and - keys) RE: Change set on press key - Catar - 11-24-2018 ill do it on my off days (after tuesday) RE: Change set on press key - seypher - 11-24-2018 Ok, really thanks! REP+ RE: Change set on press key - Catar - 11-27-2018 Okay i did it, BUT U HAVE TO SET ALL YOUR ID's AGAIN This time it works bit, diferently, It still works on Only 1 Key press ( numerical - ), But this time it will first Display set you would switch to, and fater 1 second it will equip it. Also, you can change text will display after u press key to change set. Look video Code: VARIABLES [macro]80 {Change EQ} Tibia.KeyDown(:K_SUBTRACT)==1 [EquipChange] Cooldown.Create(DelayEQchange, 1000) Cooldown.Blocked(CDkey)==0 !SetType==1 [VarSetChange2] SetType:=2 HUD.Print(3, 1, 93, 0, 253, 500, Set 2) Cooldown.Create(CDkey, 500) GoLabel(EquipChange) {VarSetChange2} !SetType==2 [VarSetChange3] SetType:=3 HUD.Print(3, 1, 18, 196, 232, 500, Set 3 ) Cooldown.Create(CDkey, 500) GoLabel(EquipChange) {VarSetChange3} !SetType==3 [VarSetChange4] SetType:=4 HUD.Print(3, 1, 98, 6, 32, 2000, Set 4) Cooldown.Create(CDkey, 500) GoLabel(EquipChange) {VarSetChange4} !SetType==4 [StartingSet] SetType:=1 HUD.Print(3, 1, 108, 96, 132, 500, Set 1) Cooldown.Create(CDkey, 500) GoLabel(EquipChange) {StartingSet} SetType:=!StartingSet exit() {EquipChange} Cooldown.Blocked(DelayEQchange)==0 !SetType<>1 [OtherSet1] !SetType<>2 [OtherSet2] !SetType<>3 [OtherSet3] !SetType<>4 [OtherSet4] exit() {OtherSet1} !SetType==1 {Head_1} Self.Inventory.Helmet()<>!S1_HelmetON [Armor_1] Self.Equip(Helmet, !S1_HelmetBP) exit() {Armor_1} Self.Inventory.Armor()<>!S1_Armor [Legs_1] Self.Equip(Armor, !S1_Armor) exit() {Legs_1} Self.Inventory.Legs()<>!S1_Legs [Ammo_1] Self.Equip(Legs, !S1_Legs) exit() {Ammo_1} Self.Inventory.Ammunition()<>!S1_Ammo [Boots_1] Self.Equip(Ammo, !S1_Ammo) exit() {Boots_1} Self.Inventory.Boots()<>!S1_Boots Self.Equip(Boots, !S1_Boots) exit() {OtherSet2} !SetType==2 {Head_2} Self.Inventory.Helmet()<>!S2_Helmet [Armor_2] Self.Equip(Helmet, !S2_Helmet) exit() {Armor_2} Self.Inventory.Armor()<>!S2_Armor [Legs_2] Self.Equip(Armor, !S2_Armor) exit() {Legs_2} Self.Inventory.Legs()<>!S2_Legs [Ammo_2] Self.Equip(Legs, !S2_Legs) exit() {Ammo_2} Self.Inventory.Ammunition()<>!S2_Ammo [Boots_2] Self.Equip(Ammo, !S2_Ammo) exit() {Boots_2} Self.Inventory.Boots()<>!S2_Boots Self.Equip(Boots, !S2_Boots) exit() {OtherSet3} !SetType==3 {Head_3} Self.Inventory.Helmet()<>!S3_Helmet [Armor_3] Self.Equip(Helmet, !S3_Helmet) exit() {Armor_3} Self.Inventory.Armor()<>!S3_Armor [Legs_3] Self.Equip(Armor, !S3_Armor) exit() {Legs_3} Self.Inventory.Legs()<>!S3_Legs [Ammo_3] Self.Equip(Legs, !S3_Legs) exit() {Ammo_3} Self.Inventory.Ammunition()<>!S3_Ammo [Boots_3] Self.Equip(Ammo, !S3_Ammo) exit() {Boots_3} Self.Inventory.Boots()<>!S3_Boots Self.Equip(Boots, !S3_Boots) exit() {OtherSet4} !SetType==4 {Head_4} Self.Inventory.Helmet()<>!S4_Helmet [Armor_4] Self.Equip(Helmet, !S4_Helmet) exit() {Armor_4} Self.Inventory.Armor()<>!S4_Armor [Legs_4] Self.Equip(Armor, !S4_Armor) exit() {Legs_4} Self.Inventory.Legs()<>!S4_Legs [Ammo_4] Self.Equip(Legs, !S4_Legs) exit() {Ammo_4} Self.Inventory.Ammunition()<>!S4_Ammo [Boots_4] Self.Equip(Ammo, !S4_Ammo) exit() {Boots_4} Self.Inventory.Boots()<>!S4_Boots Self.Equip(Boots, !S4_Boots) exit() [/macro] [spoiler] Code: Tibia.KeyDown(:K_SUBTRACT)==1 [EquipChange] RE: Change set on press key - MegaNo0body - 11-27-2018 [macro]100 {EQ Changer - Key Listener} Tibia.KeyDown(:K_SUBTRACT)==:True VarAdd(SetType, 1) Comment(When the variable exist, we are at a valid SetType index) HasVar(S!SetType!_Helmet)==:True [SetIDs] Comment(When the variable does not exist, reset to SetType 0) SetType:=0 {SetIDs} ID_Head:=VarGet(S!SetType!_Helmet) ID_Armor:=VarGet(S!SetType!_Armor) ID_Legs:=VarGet(S!SetType!_Legs) ID_Boots:=VarGet(S!SetType!_Boots) [/macro] [macro]600 {EQ Changer - Wear Set} Self.Inventory.Helmet()<>!ID_Helmet [Armor] Self.Equip(Helmet, !ID_Helmet) exit() {Armor} Self.Inventory.Armor()<>!ID_Armor [Legs] Self.Equip(Armor, !ID_Armor) exit() {Legs} Self.Inventory.Legs()<>!ID_Legs [Ammo] Self.Equip(Legs, !ID_Legs) exit() {Ammo} Self.Inventory.Ammunition()<>!ID_Ammo [Boots] Self.Equip(Ammo, !ID_Ammo) exit() {Boots} Self.Inventory.Boots()<>!ID_Boots Self.Equip(Boots, !ID_Boots) exit()[/macro] RE: Change set on press key - Catar - 11-27-2018 My macro will work for now, but I'm trying to do it with Bmega's idea, to make my macro shorter/ easier Edit: Created something based on bmega idea, but for now wont work with items that ID change after equip RE: Change set on press key - Catar - 11-27-2018 WE MADE IT, Check this thread https://forums.bmega.net/showthread.php?tid=28496 |