Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
OT - Help with Tasking Window
#1
I'm playing an OT server. The conversation for selecting a task bring up a window to select which creature I want. I need a macro for the bot to select the creature "Cockroaches" and the "Do Task" button. I am not able to just NPCSay it.
Reply
#2
I think it's possible, but it won't be easy, it would require either using manual macro with
Misc.ClickEx(X, Y) which is basically left click mouse (here is example of use)

Or Sending arrow Keys and Enter with Tibia.SendKey(VirtualKeyCode)

You would have lent me some account on this OTS logged out already near NPC, so I could do macro for you quick way,
or slower way, by using the remote desktop app on your computer.
Reply
#3
Thumbs Up 
(03-16-2017, 08:25 AM)Catar Wrote: You would have lent me some account on this OTS logged out already near NPC, so I could do macro for you quick way

Just sent you a PM my bro. Thanks very much
Reply
#4
OK FINISHED

REMEMBER TIBIA CAN NOT BE MINMIZED WITH THIS KIND OF MACRO
Tibia.WindowHeight/Width() canot take sizes of window that is minimized to windows bar, so it would maximize it first, which my interupt with your other activities
also Misc.ClickEx(X, Y) need window to NOT be minmized (however it CAN be covered by other windows)


Paste this in macros

[macro]0 {TASKS} Number_on_LIST:=1 {DO NOT TOUCH} loop:=1 tW:=Tibia.WindowWidth() tH:=Tibia.WindowHeight() VarDiv(tW, 2) VarAdd(tW, 213) VarDiv(tH, 2) VarAdd(tH, 122) {TALK} NPC.Say(hi) Macro.Wait(150) NPC.Say(task) {down} !Number_on_LIST!>!loop! [loop] Macro.Wait(150) Tibia.SendKey(40) VarAdd(loop, 1) Macro.Wait(150) Label(down) {loop} Macro.Wait(150) Misc.ClickEx(!tW!, !tH!) exit()[/macro]

And instead of NPC.Say add macro waypoint
like this: Remeber about Fixed point and Delay
[Image: fDdbZWj.png]



Also u can EDIT this variable in macro ( where 0 works also as 1)
Number_on_LIST:=1

To chose WHICH MOSNTER on a list to pick
For example, 8 for Dragons
Reply
#5
(03-16-2017, 08:49 AM)Catar Wrote: OK FINISHED

Thanks so much dude, this works perfectly!!!
Thank god for people like you on this thread Tongue
+ REP
Reply
#6
I gotta say, I LOVE this kind of challenges.

EXPLANATION HOW ITS DONE

Since SendKey enter wouldn't start task, i had to use Mouse Click,
But to do so, I had do know position of Do Task button.

So I had to find fixed position of that button, on ANY TIBIA WINDOW SIZE,
Had to collect some data of button position in different size of windows
distance from center of screen to button
Code:
W ~41   AVG = 213
851-638 = 213
748-540 = 208
1465-1248 = 217
515-301 = 214

H  ~19   AVG =122
829-719 = 110
829-704 = 125
645-518 = 127
444-320 = 124

Knowing that I could make commands sequence to calculate position of button on any window size

Code:
tW:=Tibia.WindowWidth()
tH:=Tibia.WindowHeight()
VarDiv(tW, 2)
VarAdd(tW, 213)
VarDiv(tH, 2)
VarAdd(tH, 122)

rest was easy Wink
Reply
#7
(03-16-2017, 10:00 AM)Catar Wrote: = 110
829-704 = 125
645-518 = 127
444-320 = 124[/code]

Knowing that I could make commands sequence to calculate position of button on any window size

Hi mate, the macro is no longer working.

i've followed it to the tee with waypoints and delays. But whenever it begins to run the macro on cavebot it walks down 4 blocks to NPCsay then walks back up.
Reply
#8
send me that script you made on PW.


btw tried that again, and it still works for me, without issue (even with over 240ms latency to the server)

What tibia window size u have? make SS


(its 1 am atm where i live, going to sleep now)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)