Mojo hotkey scripts

Conversations about the Gaheris server.

Mojo hotkey scripts

Postby teebs » Fri Oct 19, 2018 5:12 pm

Hi all,

These are a work in progress but I figured I would post my current scripts I'm using for 8man team (Pal, Dru, Brd, SM x5). I tried to comment where I could. Would love to hear others ideas about how to improve. Currently looking for ways to make it more adapatable to some of these epic encounters, which mostly revolves around being able to position characters quickly.

Let's share some ideas!

Common.txt:
Code: Select all

//Makes hotkeys only work with DAOC in foreground
Defaults
{
   Foreground ( DAOC )
}

//Use Alt r for reply
Hotkey ( Alt R passthrough )
{
   Foreground(daoc)
   TurnHotkeysOff ()
}

Hotkey (Numpad1) // Stick Active DAoC Window
{
      Sendto (local_background)
   Slash ("/target local_foreground")
   wait (100)
   Slash ("/stick") // stick
}

Hotkey (Numpad2) // Assist Active DAoC Window
{
      Sendto (local_background)
   Slash ("/assist local_foreground")
}


Hotkey (Numpad3) // Face target
{
      Sendto (local_background)
   Slash ("/face")
}

Hotkey (Numpad4) // UnStick Active DAoC Window
{
      Sendto (local_background)
   Key ( Space )
}


//Reset camera on all screens
Hotkey ( Ctrl C )
{
   Key ( C )
}

//All attack
Hotkey ( Ctrl oem3 )
{
   Key ( oem3 )
}

//Bind stone
Hotkey ( Alt 9 )
{
   Key ( Alt 9 )
}

// Right click in all windows
Hotkey ( Ctrl RButton )
{
   ClickMouse ( RButton )
}

// Left click in all windows
Hotkey ( Ctrl LButton )
{
   ClickMouse ( LButton )
}

//Everyone forward (for zoning
Hotkey (Ctrl W press)
{
   key (w press )
}

Hotkey (Ctrl W release)
{
   key (w release )
}

//Swim down
Hotkey ( Ctrl Alt Shift Z  press )
{
   key ( Z press )
}

Hotkey ( Ctrl Alt Shift Z  release )
{
   key ( Z release )
}

//Swim up
Hotkey ( Ctrl Alt Shift Space  press )
{
   key ( Space press )
}

Hotkey ( Ctrl Alt Shift Space  release )
{
   key ( Space release )
}

//Toggle hotkeys by pressing enter
Hotkey ( Enter passthrough )
{
   ToggleHotkeys()
}



//Spring
//Port Team
Hotkey ( Ctrl V )
{
   Key (V)
}

//Sell all windows
Hotkey ( Ctrl Shift S )
{
   Key (Shift S)
}

//Port Team
Hotkey ( Ctrl P )
{
   PortTeam ()
}


//Echo a command
Hotkey ( Ctrl O )
{
   Echo ()
}

//Everyone Sit
Hotkey (Ctrl X)
{
   slash ("/sit")
}

//Everyone Stand
Hotkey (Ctrl S)
{
   slash ("/stand")
}


//Send 0-9 to local windows
Hotkey (1)
{
   Foreground(daoc)
   Key (1)
}
Hotkey (2)
{
   Foreground(daoc)
   Key (2)
}
Hotkey (3)
{
   Foreground(daoc)
   Key (3)
}
Hotkey (4)
{
   Foreground(daoc)
   Key (4)
}
Hotkey (5)
{
   Foreground(daoc)
   Key (5)
}
Hotkey (6)
{
   Foreground(daoc)
   Key (6)
}
Hotkey (7)
{
   Foreground(daoc)
   Key (7)
}
Hotkey (8)
{
   Foreground(daoc)
   Key (8)
}
Hotkey (9)
{
   Foreground(daoc)
   Key (9)
}



8manKeep.txt

Code: Select all

#include common.txt

Hotkey ( F12 )
{
   RenameWin (Okarin Tank)
   RenameWin (Winry Buffer)
   RenameWin (Kurisu Bard)
   RenameWin (Padanfaine PbaeSM1)
   RenameWin (Kagarishiina PbaeSM2)
   RenameWin (Suzuha PbaeSM3)
   RenameWin (Maikosae PbaeSM4)
   RenameWin (Ritsu PbaeSM5)
}



//Buff Team
Hotkey ( Ctrl F9 )
{
   Package
   {
      Sendto ( Buffer ) //Spec Buffer
      Slash ( "/target Buffer" )
      Wait ( 200 )
      Key ( Ctrl 2 ) // base dex
      Wait ( 2500 )
      Key ( Ctrl 5 ) // quick-dex
      Wait ( 2500 )    
      Key ( Ctrl 1 ) // base con
      Wait ( 2500 )
      Key ( Ctrl 4 ) // str-coin
      Wait ( 2500 )    
      Slash ( "/target Tank" )
      Wait ( 200 )
      Key ( Ctrl 4 ) // str-con
      Wait ( 2500 )
      Key ( Ctrl 5 ) // quick-dex
      Wait ( 2500 )
     Key ( Ctrl 6 ) //haste
     Wait (2500)
      Slash ( "/target PbaeSM1" )
      Wait ( 200 )
      Key ( Ctrl 4 ) // str-con
      Wait ( 2500 )
      Key ( Ctrl 5 ) // quick-dex
      Wait ( 2500 )
      Key ( Ctrl 7 ) // int
     Slash ( "/target PbaeSM2" )
      Wait ( 2500 )
      Key ( Ctrl 5 ) // quick-dex
      Wait ( 2500 )
     Key ( Ctrl 4 ) // str-con
      Wait ( 2500 )
      Key ( Ctrl 7 ) // int
     Slash ( "/target PbaeSM3" )
      Key ( Ctrl 4 ) // str-con
      Wait ( 2500 )
      Key ( Ctrl 5 ) // quick-dex      
      Wait ( 2500 )
      Key ( Ctrl 7 ) // int
      Wait ( 2500 )
     Slash ( "/target PbaeSM4" )
      Key ( Ctrl 4 ) // str-con
      Wait ( 2500 )
      Key ( Ctrl 5 ) // quick-dex      
      Wait ( 2500 )
      Key ( Ctrl 7 ) // int
      Wait ( 2500 )
     Slash ( "/target PbaeSM5" )
      Key ( Ctrl 4 ) // str-con
      Wait ( 2500 )
      Key ( Ctrl 5 ) // quick-dex      
      Wait ( 2500 )
      Key ( Ctrl 7 ) // int
      Wait ( 2500 )
      Slash ( "/target Bard" )
     wait (200)
      Key ( Ctrl 4 ) // str-con
      Wait ( 2500 )
      Key ( Ctrl 5 ) // quick-dex
      Wait ( 2500 )    
      Key ( Ctrl 0 ) // Resists
   }
   Package
   {
      Sendto ( Bard ) // Bard
      Slash ( "/target Bard" )
      Wait ( 200 )
      Key ( Ctrl 1 ) // con
      Wait ( 2500 )
      Key ( Ctrl 2 ) // dex
      Wait ( 2500 )
     Key (  Ctrl 3 ) //spec af
     Wait (2500)
     Key (Ctrl 4) // base af
     Wait (2500)
     Slash ( "/target Buffer" )
     Wait (200)
     Key (  Ctrl 3 ) //spec af
     Wait (2500)
     Key(Ctrl 4) // base af
     Wait(2500)
      Slash ( "/target Tank" )
      Wait ( 200 )
      Key ( Ctrl 1 ) // con
      Wait ( 2500 )
      Key ( Ctrl 2 ) // dex
      Wait ( 2500 )
     Key (  Ctrl 3 ) //spec af
     Wait (2500)
     Key (Ctrl 4) // base af
     Wait (2500)
      Slash ( "/target PbaeSM1" )
      Wait ( 200 )
      Key ( Ctrl 1 ) // con
      Wait ( 2500 )
      Key ( Ctrl 2 ) // dex
      Wait ( 2500 )
     Key (  Ctrl 3 ) //spec af
     Wait (2500)
     Slash ( "/target PbaeSM2" )
      Wait ( 200 )
      Key ( Ctrl 1 ) // con
      Wait ( 2500 )
      Key ( Ctrl 2 ) // dex
      Wait ( 2500 )
     Key (  Ctrl 3 ) //spec af
     Wait (2500)
     Slash ( "/target PbaeSM3" )
      Wait ( 200 )
      Key ( Ctrl 1 ) // con
      Wait ( 2500 )
      Key ( Ctrl 2 ) // dex
      Wait ( 2500 )   
     Key (  Ctrl 3 ) //spec af
     Wait (2500)
     Slash ( "/target PbaeSM4" )
      Wait ( 200 )
      Key ( Ctrl 1 ) // con
      Wait ( 2500 )
      Key ( Ctrl 2 ) // dex
      Wait ( 2500 )
     Key (  Ctrl 3 ) //spec af
     Wait (2500)
     Slash ( "/target PbaeSM5" )
      Wait ( 200 )
      Key ( Ctrl 1 ) // con
      Wait ( 2500 )
      Key ( Ctrl 2 ) // dex
      Wait ( 2500 )
     Key (  Ctrl 3 ) //spec af
     Wait (2500)
      Key ( Ctrl 8 ) // breath
      Wait ( 2500 )   
      Key ( Ctrl 0 ) // healproc
      Wait ( 2500 )   
      Key ( Ctrl 9 ) // mez damp
     Wait ( 4500 )
     //Cast all songs
     Key (Alt 1)
     Wait ( 4500 )
     Key (Alt 2)
     Wait ( 4500 )
     Key (Alt 3)
     Wait ( 4500 )
     Key (Alt 4)
   }
   
   Package
   {
      Sendto ( Tank )
      Key ( Ctrl 8 ) // shield
      Slash ( "/target PbaeSM1" )
      Wait ( 200 )
      Key ( Ctrl 1 ) // guard
      Slash ( "/target Buffer" )
      Wait ( 200 )
      Key ( Ctrl 2 ) // protect
      Wait ( 200 )
      Key ( Alt 3 ) // AF chant
      Wait ( 200 )
      Key ( Alt 4 ) // ablative chant
      Wait ( 200 )
      Key ( Alt 5 ) // dmg chant
      Wait ( 200 )
      Key ( Alt 6 ) // heal chant
      Wait ( 200 )
      Key ( Alt 7 ) // endo chant

   }
   
   Package
   {
      Sendto ( PbaeSM1 PbaeSM2 PbaeSM3 PbaeSM4 PbaeSM5)
      Key ( Ctrl 7 ) // Pets
     Wait ( 6000 )
      Key ( Ctrl 8 ) // shield
     Wait ( 2500 )
      Key ( Ctrl 0 ) // bladeturn
     Wait ( 2500 )
      Key ( Ctrl 6 ) // Abs
     Wait ( 2500 )
      Key ( Ctrl 9 ) // group af   
     Wait ( 2500 )
      Key ( Alt 5 ) // brittle guard
   }
}
//Timers buffs
Hotkey ( Ctrl F10 )
{
   Package
   {
      Sendto ( Tank )
      Key ( Ctrl 8 ) // shield
   }

   Package
   {
      Sendto (PbaeSM1 PbaeSM2 PbaeSM3 PbaeSM4 PbaeSM5)
      Key ( Ctrl 0 ) // bladeturn
     Wait ( 2500 )
      Key ( Alt 5 ) // brittle guard
     Wait ( 2500 )
      Key ( Ctrl 9 ) // group af
      Wait ( 2500 )   
      Key ( Ctrl 8 ) // healproc
     Wait ( 2500 )
      Key ( Ctrl 6 ) // Abs
   }
   Package
   {
      Sendto (Buffer Bard)
      Key (Ctrl 0) // resists + heal proc
      Wait(2500)
      Key (Ctrl 9) // mez damp
      Wait ( 2500 )   
      Key ( Ctrl 8 ) // breath

   }
}

//Summon pets valkyrie
Hotkey ( Ctrl F7 )
{
   Package
   {
      Sendto ( PbaeSM1 PbaeSM2 PbaeSM3 PbaeSM4 PbaeSM5 )
      Key ( Ctrl 7 ) // Pets
   }
}

//Summon warrior
Hotkey ( Ctrl F8 )
{
   Package
   {
      Sendto ( PbaeSM1 PbaeSM2 PbaeSM3 PbaeSM4 PbaeSM5 )
      Key ( Alt 8 ) // Pets
   }
}

//Kill pets
Hotkey ( Alt F8 )
{
   Package
   {
      Sendto ( PbaeSM1 PbaeSM2 PbaeSM3 PbaeSM4 PbaeSM5 )
      Key ( Alt 6 ) // Pets
   }
}
   
//Invite Team to group
Hotkey (Numpad0)
{
   package
   {
      sendto ( Tank )
      slash ( "/invite Buffer" )
      slash ( "/invite Bard" )
      slash ( "/invite PbaeSM4" )
      slash ( "/invite PbaeSM1" )
      slash ( "/invite PbaeSM2" )
     slash("/invite PbaeSM3")
     slash ( "/invite PbaeSM5")
   }
   package
   {
      wait(300)
      ClickMouse (625 430)     
   }
}

//Invite Team to bg and set bg up
Hotkey (NumpadMinus)
{
   package
   {
      sendto ( Tank )
      slash ( "/bg invite Buffer" )
      slash ( "/bg invite Bard" )
      slash ( "/bg invite PbaeSM1" )
      slash ( "/bg invite PbaeSM2" )
     slash("/bg invite PbaeSM3") 
      slash ( "/bg invite PbaeSM4" )
     slash ( "/bg invite PbaeSM5")
   Wait (100)
   slash ( "/bg treasurer Okarin" )
   wait (100)
   slash ( "/bg loot treasurer" )
   Wait(100)
   slash ( "/bg lootlevel 10" )
   }
   
   package
   {
      wait(300)
      ClickMouse (625 430)     
   }
}

//Trigger Caster Staff Power buff
Hotkey (Numpad7)
{
   sendto (PbaeSM1 PbaeSM2 PbaeSM3 PbaeSM4 PbaeSM5 )
   key (Alt 2)
}

//Caster Robe Power buff
Hotkey ( Numpad8)
{
   sendto (PbaeSM1 PbaeSM2 PbaeSM3 PbaeSM4 PbaeSM5)
   key (Alt 3)
}

//ML9 pets
Hotkey (Alt F3)
{
   sendto (PbaeSM1 PbaeSM2 PbaeSM3 PbaeSM4 PbaeSM5 )
   key (Alt 1)
}

//Dagda Buff
Hotkey ( Alt F1)
{
   sendto (PbaeSM1)
   key (Alt 7)
}

//Paladin HoA
Hotkey ( Alt F2)
{
   sendto (Tank)
   key (Alt 0)
}

//Druid Dagda Buff
Hotkey ( Ctrl F1)
{
   sendto (Buffer)
   key (Alt 7)
}

//Druid HOA
Hotkey ( Ctrl F2)
{
   sendto (Buffer)
   key (Alt 8)
}

//Spread everyone out
Hotkey (Ctrl a press)
{
   Package{
      Sendto(PbaeSM1 Bard)
      key (a press )
   }
   Package
   {
      Sendto(PbaeSM2 Buffer)
      key (d press)
   }
   Package
   {
      Sendto(PbaeSM3 PbaeSM5)
      Key (s press)
   }
}

Hotkey (Ctrl a release)
{
   Package{
      Sendto(PbaeSM1 Bard)
      key (a release)
   }
   Package
   {
      Sendto(PbaeSM2 Buffer)
      key (d release)
   }
   Package
   {
      Sendto(PbaeSM3 PbaeSM5)
      Key (s release)
   }
}

Hotkey (Ctrl W release)
{
   key (w release )
}

//Pet Attack
hotkey ( F3 )
{
    sendto (PbaeSM1 PbaeSM2 PbaeSM3 PbaeSM4 PbaeSM5)
    key ( Ctrl 2 )
}


//Pet Passive
hotkey ( F4 )
{
    sendto (PbaeSM1 PbaeSM2 PbaeSM3 PbaeSM4 PbaeSM5)
    key ( Ctrl 3 )
}

//Pet Here
hotkey ( F5 )
{
    sendto (PbaeSM1 PbaeSM2 PbaeSM3 PbaeSM4 PbaeSM5)
    key ( Ctrl 4 )
}

//Pet Follow
hotkey ( F6 )
{
    sendto (PbaeSM1 PbaeSM2 PbaeSM3 PbaeSM4 PbaeSM5)
    key ( Ctrl 5 )
}

Hotkey (Lshift F) // Only casters Stick Active DAoC Window
{
      Sendto (PbaeSM1 PbaeSM2 PbaeSM3 PbaeSM4 PbaeSM5)
   Slash ("/target local_foreground")
   wait (100)
   Slash ("/stick") // stick
}

Hotkey (Lshift G) // Only Stick buffer / bard
{
      Sendto (Buffer Bard)
   Slash ("/target local_foreground")
   wait (100)
   Slash ("/stick") // stick
}

Member of <Grace>

Okarin / Winry / Kurisu / Padanfaine
User avatar
teebs
 
Posts: 72
Joined: Thu Oct 09, 2014 2:01 pm

Re: Mojo hotkey scripts

Postby Rob » Fri Oct 19, 2018 6:57 pm

It's wonderful to see so many of Mojo's features getting used. I especially like seeing movement hotkeys getting used properly without errors (pairs of press/release). Especially the spread-everyone-out hotkey.

You did a great job and you really understand how Mojo's script language works. I enjoyed seeing your script a lot.

Before I make a few suggestions, I'd like to ask you: Was it worth the effort of converting from HKN?

In common.txt -- I know you know this, it's obviously just something you forgot to remove -- in Hotkey ( Alt R passthrough ), you don't need Sendto(foreground_daoc) because you already set that with Default.

Ignore this if things are working okay as they are, but you might get better results if you change the body of Hotkey(Enter passthrough) to { TurnHotkeysOn() }. Also -- this is a really tiny suggestion, but you did everything so well there's hardly anything for me to say -- you might want to move Hotkey(Enter passthrough) so it follows immediately after Hotkey (Alt R passthrough) in the script, because they function as a pair and the script would be easier for somebody else to read.

In commmon.txt -- I know you know this -- the comment "//Send 0-9 to local windows" doesn't match the hotkeys. They actually send only to the foreground DAOC.

In 8manKeep.txt, you don't need Hotkey ( F12 ) because there's a different way to accomplish the same thing which you might like better. Of course you can use the hotkey if you like. But what you might prefer to do instead is launch those toons as a team and set a window name for each team member. Mojo willl rename the windows automatically when you launch the team. You do that by opening the team properties, then right clicking each toon to set its properties, and at the bottom of the team member properties windows, enter the desired window name.

Nice to see that big buffs hotkey with all the packages. You're giving the program a good workout! I wish you had been around to test when I was adding that stuff to the program.

I see from Hotkey(Numpad7) that you know this but I'll say it for other people. In Hotkey (Ctrl F8) and Hotkey (Alt F8) you don't need the Package because the body of the hotkey itself is a package. In other words, if a hotkey only contains one package, you don't have to bother writing Package { }. Just pretend that the entire body of the hotkey is a package -- which it always is.

With invite team, Hotkey (Numpad0), you may find (especially if you write more invites) that you need short waits between the slash commands.

I see all these Wait(100)'s and think, "Man, you've got great ping times to Broadsword's server!" There are people who need 200 or longer.
You may have known me as Ribble or robbie1687
Rob
Site Admin
 
Posts: 1688
Joined: Sun May 16, 2010 6:05 am
Location: New York City

Re: Mojo hotkey scripts

Postby teebs » Fri Oct 19, 2018 7:47 pm

Hey Rob,

Thanks for the feedback. Making it easier to read is definitely improvements worth making. A lot of this was copy pasted throughout the script which is why there are some nuances here and there. Typically because I did it mid combat and didn't clean it up lol.

I tried using Mojo's window name functionality with the teams but ultimately ran into issues with that not actually naming the windows sometimes. I didn't spend too much time on it as I already had stuff written from Hotkeynet to do this anyway. It also helps to have when a single window might crash and a toon gets launched on it's own, just provides flexibility for change.

There was also some frustration with the user settings resetting (ie the game launched full screen next time around) when a window would crash. As you mentioned in a post somewhere on mojo forums, it seemed to correlate with daoc exiting on its own. Whenever I click the 'X' for the mojo exit in the top right of window, things are great.

I honestly haven't played around much with the Wait times...for the group Macro I end up clicking it a couple times. I'll try working with those a bit more to make it smoother.

All in all this was definitely worth the effort of converting from HKN. The biggest plus has been the ability to dynamically use the active window (for following / assisting), along with the press/release for movement. It's not possible to adapt much more quickly to changes in fights which has been fantastic. Also all in all everything does feel much more responsive than HKN. I've had to get out of the habit of spamming hotkeys like I used to.
Member of <Grace>

Okarin / Winry / Kurisu / Padanfaine
User avatar
teebs
 
Posts: 72
Joined: Thu Oct 09, 2014 2:01 pm

Re: Mojo hotkey scripts

Postby Rob » Sat Oct 20, 2018 1:41 am

teebs wrote:I've had to get out of the habit of spamming hotkeys like I used to.

This is the best piece of feedback I could hope to get. :)

teebs wrote:I tried using Mojo's window name functionality with the teams but ultimately ran into issues with that not actually naming the windows sometimes.

Oh, sorry, I didn't know. If somebody had reported this problem last year when I wrote the new features, I would have fixed it, but I don't know when or if I'll work on Mojo again.

teebs wrote:It also helps to have when a single window might crash and a toon gets launched on it's own, just provides flexibility for change.

Yeah, good point. Alternatively, you can relaunch the team in that circumstance and only the missing toon(s) will actually restart.

teebs wrote:There was also some frustration with the user settings resetting (ie the game launched full screen next time around) when a window would crash. As you mentioned in a post somewhere on mojo forums, it seemed to correlate with daoc exiting on its own. Whenever I click the 'X' for the mojo exit in the top right of window, things are great.

Yeah, that's why I put the red X there. This definitely a bug in DAOC. It's an idiotic bug because it's due to absurdly amateurish programming and it could be fixed very easily and it's been in DAOC since the very beginning. You can call that same red X code in several other ways from Mojo menus. For example, "terminate program" (I think that's what it's called) on Toon Properties. Every place in Mojo that offers an option to close a DAOC window uses that same method. I foolishly named the option differently in different places but it's all the same code.

teebs wrote:The biggest plus has been the ability to dynamically use the active window (for following / assisting), along with the press/release for movement.

That's good to know, thanks. A user suggested that method for dynamically changing the driver. It didn't occur to me. It was a really great suggestion.
You may have known me as Ribble or robbie1687
Rob
Site Admin
 
Posts: 1688
Joined: Sun May 16, 2010 6:05 am
Location: New York City

Re: Mojo hotkey scripts

Postby elbee » Sun Oct 21, 2018 10:19 am

are you playing all 8 toons on one pc ??

it looks as though all your commands are sending through a local pc only?? would be be able to elaborate on these codes for a second pc by adding a similiar line with send to (remote) etc...

the reason i am asking is because i run 4 toons on 2 pcs for my 8 toons and I would like to try to adopt some of those codes as they would seem to be extremely helpful to running my team.

any guidance would be greatly appreciated

for example:

Hotkey (Numpad2) // Assist Active DAoC Window
{
Sendto (local_background)
Sendto (remote)
Slash ("/assist local_foreground")
}
elbee
 
Posts: 8
Joined: Fri Oct 05, 2018 12:57 pm

Re: Mojo hotkey scripts

Postby teebs » Sun Oct 21, 2018 5:37 pm

elbee wrote:are you playing all 8 toons on one pc ??

it looks as though all your commands are sending through a local pc only?? would be be able to elaborate on these codes for a second pc by adding a similiar line with send to (remote) etc...

the reason i am asking is because i run 4 toons on 2 pcs for my 8 toons and I would like to try to adopt some of those codes as they would seem to be extremely helpful to running my team.


Hi Elbee, my understanding is you would just put a space between each window you want it sent to:

Hotkey (Numpad2) // Assist Active DAoC Window
{
Sendto (local_background remote_pc)

Slash ("/assist local_foreground")
}


As an example from the 8man when I send to each of my SM windows is looks like this:

//Trigger Caster Staff Power buff
Hotkey (Numpad7)
{
sendto (PbaeSM1 PbaeSM2 PbaeSM3 PbaeSM4 PbaeSM5 )
key (Alt 2)
}


I have never used multiple PCs multiboxing so I'm not exactly sure how you reference the other PC. It looks like in the documentation he used an IP address:

Sendto ( local_background 192.168.1.3 Eenie Meenie "DAOC 3" )

So that command would send to those 5 targets (each one separated by a space).

@Rob is there a way to alias the remote PCs so that you don't have to use an IP? Or perhaps Mojo knows the name of the Window even on remote PCs based on your launch settings. It's something you might have to play around with a bit elbee
Member of <Grace>

Okarin / Winry / Kurisu / Padanfaine
User avatar
teebs
 
Posts: 72
Joined: Thu Oct 09, 2014 2:01 pm

Re: Mojo hotkey scripts

Postby Rob » Sun Oct 21, 2018 7:45 pm

Elbee wrote:Hotkey (Numpad2) // Assist Active DAoC Window
{
Sendto (local_background)
Sendto (remote)
Slash ("/assist local_foreground")
}

Teebs answered this question correctly. Elbee, if you try to load that, you'll see that it generates an error message. When I write these error messages, I try to make them explain to you what you need to do to fix the problem. It says:

Error message (Rob) wrote:Sorry, your hotkey file could not be loaded. You specified "sendto" more than once in the main part of the hotkey (outside packages).

In other words, you can write only one SendTo in the main part of the hotkey. If you need more SendTo's you must put them in separate packages, but in this case, like Teebs said, you don't need more.

teebs wrote:@Rob is there a way to alias the remote PCs so that you don't have to use an IP?

Yes, you can use the name of the computer (the same name you assign when you set up your network). You can see the names on Mojo's first tab (PCs with Mojo) or Windows's "My Computer > Network".

The whole list of things you can write in "SendTo" is here:

SendTo

I'll quote the list here as a convenience:

    toon’s name
    window name
    account name
    computer name
    IP address

teebs wrote:Or perhaps Mojo knows the name of the Window even on remote PCs based on your launch settings.

Yep, you can write a toon name, window name, or account name without worrying about which PC that DAOC is on. Mojo knows the names of every DAOC that it launches regardless of which PC it's on.
You may have known me as Ribble or robbie1687
Rob
Site Admin
 
Posts: 1688
Joined: Sun May 16, 2010 6:05 am
Location: New York City

Re: Mojo hotkey scripts

Postby teebs » Sun Oct 21, 2018 8:21 pm

Awesome thanks Rob. Mojo is very self aware in these scripts! I talked to a streamer using isboxer yesterday...I think Mojo is more feature rich for DAOC at this point, so great job on besting the competition!

As a side note, I noticed something with the user.dat issues. If any window exits without the Mojo exit (ie if it crashes / LDs on its own), and if a window is launched without shutting down ALL the windows first (with mojo X), it will launch in full screen. If I close all windows after a crash, then re launch a toon / team, it launches with the good settings from user.dat. Rob do you know where DAOC fetches it's "default" settings from if for some reason it doesn't think it can read user.dat for some reason?

It's strange because the user.dat file has the correct settings, but for some reason DAOC is not trying to use that file if I try to relaunch a single LDed window from Mojo. To add to this, if i /quit on all chars, then close with Mojo X from char select on all windows, the next launch will be in full screen mode, so I have to overwrite user.dat with a backup version.
Member of <Grace>

Okarin / Winry / Kurisu / Padanfaine
User avatar
teebs
 
Posts: 72
Joined: Thu Oct 09, 2014 2:01 pm

Re: Mojo hotkey scripts

Postby Rob » Mon Oct 22, 2018 12:41 am

Teebs wrote:Mojo is very self aware in these scripts! I talked to a streamer using isboxer yesterday...I think Mojo is more feature rich for DAOC at this point, so great job on besting the competition!

Thanks for the kind words. I think Lax is a great programmer, that's a very nice compliment.

Teebs wrote: Rob do you know where DAOC fetches it's "default" settings from if for some reason it doesn't think it can read user.dat for some reason?

In the case of missing character settings (INI files) DAOC copies them from a default####.ini file in DAOC's installation folder, but I don't think there's any similar default file for user.dat. At least that's how I remember it. Years have passed since I last looked at this stuff so I may have forgotten, but I think probably DAOC stores user.dat's default settings directly in its code, i.e., inside its executable file, game.dll. But I'm not sure and it may have changed.

Teebs wrote:It's strange because the user.dat file has the correct settings, but for some reason DAOC is not trying to use that file if I try to relaunch a single LDed window from Mojo.

If you want to try to figure out exactly what's happening, a good place to begin might be by watching game.dll's handles to user.dat. You can do this with Process Explorer which you can download from Sysinternals. Look for an open handle that shouldn't be open or a handle reference count that is higher than it should be. You can also check to make sure that the LD'd process really terminated. Just because the LD'd process no longer appears on the screen, doesn't mean it terminated.

I would also look to see whether game.dll creates a second kernel object to manage contention between the multiple clients that are all trying to write user.dat simultaneously. The issue would be that that the object doesn't get deleted until all DAOCs terminate.
You may have known me as Ribble or robbie1687
Rob
Site Admin
 
Posts: 1688
Joined: Sun May 16, 2010 6:05 am
Location: New York City

Re: Mojo hotkey scripts

Postby Rob » Wed Oct 24, 2018 3:27 am

It just occurred to me that Mojo could fix this bug in DAOC by hooking DAOC's calls to CreateFile(), WriteFile(), and CloseHandle(). Mojo would save user.dat with a transactional method and test the file's contents before committing it to prevent corruption or loss. It would probably be very little work. It boggles my mind that game.dll doesn't work this way. This is not rocket science.
You may have known me as Ribble or robbie1687
Rob
Site Admin
 
Posts: 1688
Joined: Sun May 16, 2010 6:05 am
Location: New York City

Re: Mojo hotkey scripts

Postby teebs » Wed Oct 24, 2018 12:39 pm

Sounds like the more functionality that can be brought outside of the game.dll, the better :P
Member of <Grace>

Okarin / Winry / Kurisu / Padanfaine
User avatar
teebs
 
Posts: 72
Joined: Thu Oct 09, 2014 2:01 pm

Re: Mojo hotkey scripts

Postby wedge71 » Mon Oct 29, 2018 5:24 pm

This is what I'm using so far.
To do list: water diving, spread out, buffing with buffer
This is nice for fighting.

Hotkey ( F12 )
{
RenameWin (Shorest Tank)
RenameWin (Rotalsros Buffer)
RenameWin (Marchaona Bard)
RenameWin (Bluerbrena Pbae1)
RenameWin (Atsostla Pbae2)
RenameWin (Tsostros Nuke1)
RenameWin (Tsosolat Nuke2)
RenameWin (Laatsos Nuke3)
}
//Buff Team for 20 min buffs mostly
Hotkey ( Ctrl F7 )
{
Package
{
Sendto ( Pbae1 Pbae2 Nuke1 Nuke2 Nuke3 )
Key ( 5 ) // shield /buff
Wait ( 2500 )
Key ( 6 ) // bladeturn /buff 2
Wait ( 2500 )
Key ( 7 ) // Abs/ buff 3
Wait ( 2500 )
Key ( 8 ) // af /buff 4
Wait ( 2500 )
Key ( Ctrl 9 ) // brittle guard
}
}


Hotkey ( F1 ) // Stick Active DAoC Window
{
Sendto (local_background)
Slash ("/target local_foreground")
wait ( 150 )
Slash ( "/stick" ) // stick
}

Hotkey ( F2 ) // Assist main face target
{
Slash ( "/assist local_foreground" )
Wait ( 150 )
Slash ( "/face" )
Wait ( 150 )
}
Hotkey ( F4 ) // ML9 and send pet
{
Package
{
Sendto ( Pbae1 Pbae2 Nuke1 )
Key ( Ctrl 5 ) // ML9
Wait ( 200 )
Key ( Ctrl 6 ) // pet attack
}
}
Hotkey ( Ctrl F6 ) // aoe
{
Package
{
Sendto ( Pbae1 Pbae2 Nuke3 )
Key ( Alt 5 ) // aoe

}
}
//Echo a command
Hotkey ( Ctrl O )
{
Echo ()
}
I also have 4 hotkeys
1 nuke/group heal/taunt style on tank
2 sprint
3 quick buff (buffs most important buff on each character)
4 power regen: warlord shout and power heal from items
wedge71
 
Posts: 1
Joined: Mon Oct 29, 2018 5:21 pm

Re: Mojo hotkey scripts

Postby teebs » Mon Oct 29, 2018 5:52 pm

Thanks for sharing Shorest, I like the idea of combining ML9 + Pet attack into a single Macro.
Member of <Grace>

Okarin / Winry / Kurisu / Padanfaine
User avatar
teebs
 
Posts: 72
Joined: Thu Oct 09, 2014 2:01 pm

Re: Mojo hotkey scripts

Postby Rob » Tue Oct 30, 2018 8:22 am

Thanks Wedge71. I like reading people's Mojo scripts a lot better than I used to like reading people's HotkeyNet scripts. The old HotkeyNet scripts were complicated and hard to understand, and I could see that people had a lot of trouble writing them. Every time I saw one of these convoluted, incomprehensible scripts, I was reminded that I had done a bad job when I designed and wrote HKN. It was my fault that the scripts were like that.

But Mojo scripts are simple and clear. They are like light vs. darkness. :)
You may have known me as Ribble or robbie1687
Rob
Site Admin
 
Posts: 1688
Joined: Sun May 16, 2010 6:05 am
Location: New York City


Return to Gaheris

Who is online

Users browsing this forum: No registered users and 9 guests

cron