Jump to content

Recommended Posts

Posted

I'm trying to script a simple action for a game called Priston Tale. I've been able to use a script I found here in the game. (x,y coordinate display-under the mouse) My script works on the desktop. I'm a huge noob. Is there anything I'm forgetting or doing wrong? Thanks ahead of time for any help.

HotKeySet("{ESC}", "Terminate"); a way out of this
HotKeySet("+!d", "Wolf") ;Shift-Alt-d

While 1
    Sleep(100)
WEnd

Func Wolf()
    MouseMove(25, 25)
    MouseClick("left")
    MouseClick("left")
EndFunc  ;==>Wolf

Func Terminate()
    Exit 0
EndFunc  ;==>Terminate
Posted

I'm trying to script a simple action for a game called Priston Tale. I've been able to use a script I found here in the game. (x,y coordinate display-under the mouse) My script works on the desktop. I'm a huge noob. Is there anything I'm forgetting or doing wrong? Thanks ahead of time for any help.

HotKeySet("{ESC}", "Terminate"); a way out of this
HotKeySet("+!d", "Wolf");Shift-Alt-d

While 1
    Sleep(100)
WEnd

Func Wolf()
    MouseMove(25, 25)
    MouseClick("left")
    MouseClick("left")
EndFunc ;==>Wolf

Func Terminate()
    Exit 0
EndFunc ;==>Terminate

what is it that you wanted this code to do?

hmm... I wonder which key is the any key :O

Posted

what is it that you wanted this code to do?

It's basically just starting code. I'm just trying to learn the mechanics. However, the script is supposed to move the mouse up to a spot at 25,25 and double click. Basically the double click is supposed to automate a change on a skill I'm using. When I use it on my desktop it double clicks the top left icon. When I use it in game, it does absolutely nothing.
Posted

It's basically just starting code. I'm just trying to learn the mechanics. However, the script is supposed to move the mouse up to a spot at 25,25 and double click. Basically the double click is supposed to automate a change on a skill I'm using. When I use it on my desktop it double clicks the top left icon. When I use it in game, it does absolutely nothing.

maybe the game is blocking it somehow... you might try changing the macro to a function key just to see if that might work.

hmm... I wonder which key is the any key :O

Posted

Does Shift Alt D do anything in the game normally?

This may sound ridiculous but I've tried sticking F12 in there to no avail. :/ How do you use function keys?
Posted (edited)

As in you want to set the hotkey to be F12?

HotKeySet("{F12}", "Wolf");F12

Edit: Damn, you beat me muttley

Edited by JFee

Regards,Josh

Posted

That key may also be reserved... i tried it on my desktop to no avail, but F2 seemed to work fine

hmm... I wonder which key is the any key :O

Posted

Ok I tried f7. It didn't work. I tried the tilde key. That didn't work. Any other suggestions? Would using the _IfPressed function yield any different results?

Posted

Ok I tried f7. It didn't work. I tried the tilde key. That didn't work. Any other suggestions? Would using the _IfPressed function yield any different results?

It sounds like the game itself may be preventing your program from doing anything is it possible to minimize it ?

or is it a fullscreen application?

hmm... I wonder which key is the any key :O

Posted (edited)

It's full screen and unminimizable. muttley

what happens when you press alt tab? (in the game)

Edited by Aiakonai

hmm... I wonder which key is the any key :O

Posted (edited)

Two things...

Func Wolf()
    MouseClick("left", 25, 25, 2, 0)
EndFunc;==>Wolf

That code is just much simpler and does the same thing muttley

Also, have you tried this:

HotKeySet("{ESC}", "Terminate"); a way out of this
HotKeySet("{F7}", "Wolf");F7

While 1
    HotKeySet("{F7}", "Wolf");F7
WEnd

Func Wolf()
    MouseMove(25, 25)
    MouseClick("left")
    MouseClick("left")
EndFunc;==>Wolf

Func Terminate()
    Exit 0
EndFunc;==>Terminate

Edit: Not sure how this would affect performance... shouldn't be too bad

Edited by JFee

Regards,Josh

Posted

I wonder what would happen if you gave the script a small GUI with the on top style.... it'd be silly but I'm curious

Regards,Josh

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...