Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Macro to shoot MagicWall behind yourself
#1
Question 
I'm trying to make a macro to throw magicwall behind the character when i press pagedown. How do I make a check to know where the character is facing? I try to do Self.TurnE()==1 so that if it's looking to the east it will go to the next point but it also turns to east, it returns the 0 or the 1 but it also turn the character to the east. Is there a way to check the direction the character is facing? This is the macro i was making.

EDIT: I've also tried setting a variable for example dirE:=Self.TurnE() so if the variable is 1 it knows its turned to the east but when it sets the var to 1 or 0 it also turn at the same time.

Code:
2 {MwBehind} Tibia.KeyDown(:K_NEXT)==1 Self.TurnE()==1 [else] x1:=Self.X() y1:=Self.Y() VarSub(x1, 1) mapid:=Map.ItemOnTop.ID(!x1, !y1, :Z) Map.UseOn(3180, !mapid, !x1, !y1, :Z, 1) Exit()  {else} Self.TurnW()==1 x2:=Self.X() y2:=Self.Y() VarAdd(x2, 1) mapid:=Map.ItemOnTop.ID(!x2, !y2, :Z) Map.UseOn(3180, !mapid, !x2, !y2, :Z, 1) Exit()


Code:
Tibia.KeyDown(:K_NEXT)==1
Self.TurnE()==1 [else]
x1:=Self.X()
y1:=Self.Y()
VarSub(x1, 1)
mapid:=Map.ItemOnTop.ID(!x1, !y1, :Z)
Map.UseOn(3180, !mapid, !x1, !y1, :Z, 1)
Exit()

{else}
Self.TurnW()==1
x2:=Self.X()
y2:=Self.Y()
VarAdd(x2, 1)
mapid:=Map.ItemOnTop.ID(!x2, !y2, :Z)
Map.UseOn(3180, !mapid, !x2, !y2, :Z, 1)
Exit()
Reply
#2
Hello,

Does this help?

Code:
Self.Direction() The player direction → :North | :East | :South | :West | :NorthEast | :SouthEast | :SouthWest | :NorthWest

You can find those functions at http://wiki.bmega.net/doku.php?id=macros...ayer_state
Reply
#3
(07-02-2020, 04:00 PM)MegaNo0body Wrote: Hello,

Does this help?

Code:
Self.Direction() The player direction → :North | :East | :South | :West | :NorthEast | :SouthEast | :SouthWest | :NorthWest

You can find those functions at http://wiki.bmega.net/doku.php?id=macros...ayer_state

Ohh thanks bro i guess I missed that function when I looked at the list! haha, any ways with that I finished the macro. Thanks!

Code:
2 {MwBehind} Tibia.KeyDown(:K_NEXT)==1 Self.Direction()==:East [1] x1:=Self.X() y1:=Self.Y() VarSub(x1, 1) mapid:=Map.ItemOnTop.ID(!x1, !y1, :Z) Map.UseOn(3180, !mapid, !x1, !y1, :Z, 1) Exit()  {1} Self.Direction()==:West [2] x2:=Self.X() y2:=Self.Y() VarAdd(x2, 1) mapid:=Map.ItemOnTop.ID(!x2, !y2, :Z) Map.UseOn(3180, !mapid, !x2, !y2, :Z, 1) Exit()  {2} Self.Direction()==:South [3] x3:=Self.X() y3:=Self.Y() VarSub(y3, 1) mapid:=Map.ItemOnTop.ID(!x3, !y3, :Z) Map.UseOn(3180, !mapid, !x3, !y3, :Z, 1) Exit()  {3} Self.Direction()==:North x4:=Self.X() y4:=Self.Y() VarAdd(y4, 1) mapid:=Map.ItemOnTop.ID(!x4, !y4, :Z) Map.UseOn(3180, !mapid, !x4, !y4, :Z, 1) Exit()
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)