Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Small Stone Macro
01-19-2017, 05:09 PM (This post was last modified: 01-19-2017 08:43 PM by Catar.)
Post: #1
Small Stone Macro
HAIL!!

would someone please link me with a macro that uses a sword then when the char loots a certain amount of small stone it equips that and once the small stones are finished it equips the sword back. I want to leave my RP training with goblins.
Give Reputation to this user
Find all posts by this user
Quote this message in a reply
01-19-2017, 07:23 PM (This post was last modified: 01-19-2017 08:45 PM by Catar.)
Post: #2
RE: SMALL STONE SCRIPT
Ok created macro, made it just a little more advanced,
but tested it and, it works as I intended.

Macro will PUT ON small stones when you have more than 20 of them, and will keep putting more in the hand if u loot them unitl you run out.
When you run out of stones, it will put back a weapon, and wait until u have 20 stones again.




What you need to do, is to change SwordID:=3319 to ID of your weapon besides stones

and StoneUse:=20 is the number of stones you want to collect before starting using them

copy and paste this
StoneSword (auto: 400ms)
400 {StoneSword} StoneID:=1781 SwordID:=3319 StoneUse:=20 StoneQT:=Misc.ItemCountEx(!StoneID!) StoneHandQT:=Self.Inventory.LeftHand.Count() leftH:=Self.Inventory.LeftHand() !StoneQT!>=!StoneUse! [ON] !leftH!<>!StoneID! [a1] Self.Equip.LeftHand(!StoneID!) exit() {a1} !StoneQT!>!StoneHandQT! [b1] Self.Equip.LeftHand(!StoneID!) exit() {b1} exit() {ON} !leftH!<>!StoneID! [a2] !leftH!==0 [b2] Self.Equip.LeftHand(!SwordID!) exit() {b2} !leftH!<>!SwordID! [c1] Self.Equip.LeftHand(!SwordID!) exit() {c1} exit() {a2} Label(a1) exit()

If you don't know where to copy it, watch video in my thread, link in signature


here is a code if someone wants to look at it ;d

I know it looks like a mess, but its bunch of loops and IFs conditions

Code:
StoneID:=1781
SwordID:=3319
StoneUse:=20
StoneQT:=Misc.ItemCountEx(!StoneID!)
StoneHandQT:=Self.Inventory.LeftHand.Count()
leftH:=Self.Inventory.LeftHand()
!StoneQT!>=!StoneUse! [ON]
!leftH!<>!StoneID! [a1]
Self.Equip.LeftHand(!StoneID!)
exit()
{a1}
!StoneQT!>!StoneHandQT! [b1]
Self.Equip.LeftHand(!StoneID!)
exit()
{b1}
exit()
{ON}
!leftH!<>!StoneID! [a2]
!leftH!==0 [b2]
Self.Equip.LeftHand(!SwordID!)
exit()
{b2}
!leftH!<>!SwordID! [c1]
Self.Equip.LeftHand(!SwordID!)
exit()
{c1}
exit()
{a2}
Label(a1)
exit()

Give Reputation to this user

Before you PM me, READ THIS [Image: KHCf9l2.png]

[Image: naLmyGH.png]

My Scripts, Macros and Tutorials
Find all posts by this user
Quote this message in a reply
01-19-2017, 10:07 PM (This post was last modified: 01-19-2017 10:12 PM by FelixZN.)
Post: #3
RE: Small Stone Macro
Thank you so much sensei.

Your reputation rating has successfully been added for this user.
Give Reputation to this user
Find all posts by this user
Quote this message in a reply
01-19-2017, 10:36 PM (This post was last modified: 01-19-2017 10:59 PM by Catar.)
Post: #4
RE: Small Stone Macro
I just realised it may be risky to use,

Bot may - for some reason - accidently put on hand stone directly from goblin, leaving your weapon in body, but i think it shouldn't since the only reason he would put stone ON weapon, is when he have over 20 of them


Test it first with something cheap that you don't care to lose, and see if that happens what I assume.
If yes, fix it by using Tibia.SendKey(VirtualKeyCode) instead of Self.Equip.LeftHand (below)

but you would have to setup Stones and weapon into tibia Hotkeys as EQUIP item    


example hotlkeys
118=F7 Stones
119=F8 weapon

You would have to change macro then to this:
StoneSword (auto: 400ms)
400 {StoneSword} Fstone:=118 Fsword:=119 StoneID:=1781 SwordID:=3319 StoneUse:=20 StoneQT:=Misc.ItemCountEx(!StoneID!) StoneHandQT:=Self.Inventory.LeftHand.Count() leftH:=Self.Inventory.LeftHand() !StoneQT!>=!StoneUse! [ON] !leftH!<>!StoneID! [a1] Tibia.SendKey(!Fstone!) exit() {a1} !StoneQT!>!StoneHandQT! [b1] Tibia.SendKey(!Fstone!) exit() {b1} exit() {ON} !leftH!<>!StoneID! [a2] !leftH!==0 [b2] Tibia.SendKey(!Fsword!) exit() {b2} !leftH!<>!SwordID! [c1] Tibia.SendKey(!Fsword!) exit() {c1} exit() {a2} Label(a1) exit()


Code:
Fstone:=118
Fsword:=119
StoneID:=1781
SwordID:=3319
StoneUse:=20
StoneQT:=Misc.ItemCountEx(!StoneID!)
StoneHandQT:=Self.Inventory.LeftHand.Count()
leftH:=Self.Inventory.LeftHand()
!StoneQT!>=!StoneUse! [ON]
!leftH!<>!StoneID! [a1]
Tibia.SendKey(!Fstone!)
exit()
{a1}
!StoneQT!>!StoneHandQT! [b1]
Tibia.SendKey(!Fstone!)
exit()
{b1}
exit()
{ON}
!leftH!<>!StoneID! [a2]
!leftH!==0 [b2]
Tibia.SendKey(!Fsword!)
exit()
{b2}
!leftH!<>!SwordID! [c1]
Tibia.SendKey(!Fsword!)
exit()
{c1}
exit()
{a2}
Label(a1)
exit()

Give Reputation to this user

Before you PM me, READ THIS [Image: KHCf9l2.png]

[Image: naLmyGH.png]

My Scripts, Macros and Tutorials
Find all posts by this user
Quote this message in a reply
01-19-2017, 11:31 PM
Post: #5
RE: Small Stone Macro
Catar one last request on this topic, is it possible to change stance, so when with small stone go defensive and when with sword got offensive
Give Reputation to this user
Find all posts by this user
Quote this message in a reply
01-19-2017, 11:41 PM
Post: #6
RE: Small Stone Macro
No, it's not possible, unfortunately
Give Reputation to this user

Before you PM me, READ THIS [Image: KHCf9l2.png]

[Image: naLmyGH.png]

My Scripts, Macros and Tutorials
Find all posts by this user
Quote this message in a reply
01-20-2017, 12:31 AM (This post was last modified: 01-20-2017 01:02 AM by FelixZN.)
Post: #7
RE: Small Stone Macro
just tried the macro and so far its excellent !!!!!!!!!!! just a note, it wont stack looted small stones to the ones already being used.

another request, sometimes the cavebot stops, whats the macro to keep it on

also just noticed that on the macro after the small stones are finished it wont equip sword
ok so bbot gave me wrong id for jagged sword, so should be fine now
Give Reputation to this user
Find all posts by this user
Quote this message in a reply
01-20-2017, 06:38 AM (This post was last modified: 01-20-2017 06:57 AM by Catar.)
Post: #8
RE: Small Stone Macro
(01-20-2017 12:31 AM)FelixZN Wrote:  just tried the macro and so far its excellent !!!!!!!!!!! just a note, it wont stack looted small stones to the ones already being used.

What do you mean?

Oh right, equipping with hotkey, wont do it..., that's why I told to test the first version first, if it won't drop weapon in goblin, it would be fine to use

one last version, it shuld be good and safe, just remember to setup your ID on SwordID


StoneSword (auto: 400ms)
400 {StoneSword} Fstone:=118 Fsword:=119 StoneID:=1781 SwordID:=3319 StoneUse:=20 StoneQT:=Misc.ItemCountEx(!StoneID!) StoneHandQT:=Self.Inventory.LeftHand.Count() leftH:=Self.Inventory.LeftHand() !StoneQT!>=!StoneUse! [ON] !leftH!<>!StoneID! [a1] Tibia.SendKey(!Fstone!) exit() {a1} !StoneQT!>!StoneHandQT! [b1] Self.Equip.LeftHand(!StoneID!) exit() {b1} exit() {ON} !leftH!<>!StoneID! [a2] !leftH!==0 [b2] Tibia.SendKey(!Fsword!) exit() {b2} !leftH!<>!SwordID! [c1] Tibia.SendKey(!Fsword!) exit() {c1} exit() {a2} Label(a1) exit()


Changed, If there ARE already stones in hand, it will equip any extra looted normally, with Self.Equip.LeftHand.
The only way it would lose weapon, was if it put stones directly ON weapon that is in hand,
since, it will use Self.Equip.LeftHand only when stones already in hand, that won't happen.
Give Reputation to this user

Before you PM me, READ THIS [Image: KHCf9l2.png]

[Image: naLmyGH.png]

My Scripts, Macros and Tutorials
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)