Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Hard help
#1
Hello Could someone fix the macro it work?

Quote:x:=Self.X()
z:=Self.Z()
y:=Self.Y()
x+1
VarAdd(x, 1)
Map.HasID(4246, !x!, !y!, !z!)
Map.Use(4246, !x!, !y!, !z!, 1) [ELSE]
x+1
y+1
VarAdd(y, 1)
Map.HasID(4246, !x!, !y!, !z!)
Map.Use(4246, !x!, !y!, !z!, 1) [ELSE]
y+1
VarSub(x, 1)
Map.HasID(4246, !x!, !y!, !z!)
Map.Use(4246, !x!, !y!, !z!, 1) [ELSE]
y-1
VarSub(y, 2)
Map.HasID(4246, !x!, !y!, !z!)
Map.Use(4246, !x!, !y!, !z!, 1) [ELSE]
y-1
x-1
VarSub(x, 1)
Map.HasID(4246, !x!, !y!, !z!)
Map.Use(4246, !x!, !y!, !z!, 1) [ELSE]
y-1
x+1
VarAdd(x, 2)
Map.HasID(4246, !x!, !y!, !z!)
Map.Use(4246, !x!, !y!, !z!, 1) [ELSE]
x-1
VarAdd(y, 1)
VarSub(x, 2)
Map.HasID(4246, !x!, !y!, !z!)
Map.Use(4246, !x!, !y!, !z!, 1) [ELSE]
x-1
y-1
VarSub(y, 1)
Map.HasID(4246, !x!, !y!, !z!)
Map.Use(4246, !x!, !y!, !z!, 1)
Exit()
If it helped give the REP+

If someone is offended SORRY
Reply
#2
U can only have one [else] then u need use {else} then u can put inside of that [else2] clsoe it with{else2} and go on go on

Ill show u example of use..
Here is my macro that puts Magma amulet on, when it drops one from monster. And when its used, it puts other amulet back on. Until it finds another magma

[macro]1000 {magma amulet}
camu:=Self.Inventory.Amulet()
!camu!<>817 [else]
Misc.ItemCountEx(817)>=1 [else2]
!camu!==21170 [else3]
Self.UnEquip.Amulet(0)
Exit()
{else3}
Self.Equip.Amulet(817)
Exit()
{else2}
!camu!<>21170 [else4]
Self.Equip.Amulet(21170)
Exit()
{else4}
Exit()
{else}
Exit()
[/macro]

As u can see each one has to be open[] and closed {}


There is another example.
My macro that puts on 2 handed slayer when fighting hellhounds, and changes to 1hand + shield when fighting anything else (dont ask why I use one like that, not ur business)

[macro]200 {weapon change hel}
#Weapons
1hand=16175
2hand=20069
shield=16116
lreka:=Self.Inventory.LeftHand()
preka:=Self.Inventory.RightHand()
hellh:=Creatures.ByRangeName(2, Hellhound)
!hellh!==1 [v1]
!lreka!<>!2hand! [v2]
Tibia.SendKey(120)
exit()
{v2}
exit()
{v1}
!preka!<>!shield! [v4]
!lreka!<>!1hand! [v5]
Tibia.SendKey(117)
exit()
{v5}
Tibia.SendKey(118)
exit()
{v4}
!lreka!<>!1hand!
Tibia.SendKey(117)
exit()
[/macro]


Ok, lets go to another issue.

After every Map.HasID(4246, !x!, !y!, !z!) you need to define what value you looking for

for example Map.HasID(4246, !x!, !y!, !z!)==1 if 4246 matches the ID found on the location
After that u have to put condition is True or False, that is [bracket] for True value, and {bracket}for false value


Bot will then do things under [bracket] when 4246 is what on the floor, and {bracket}when not.


Work on it, figure it out.
I go take a bath
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)