Welcome to the Achaea Forums! Please be sure to read the Forum Rules.

Mudlet - How to - Seafaring Window

ZulahZulah Member Posts: 765 @ - Epic Achaean
edited November 2013 in Tech Support
Nothing amazing here just a basic seafaring window howto since that's what people keep msg'ing me about. Keep in mind I just started using mudlet this week so if you are a mudlet champion I implore you to chime in on anything that could be done easier or somehow better!

First you need a window for your sea window to show up in:

Open Scripts in mudlet and "Add item"
Name the script something fitting like: Zulah told me this seamap would work, damn him!
Or just: Sea Map Window

Lets create a function we need to call on to activate.
We do that by adding this code:
[spoiler]
function setSeaMap()

seamapper = Geyser.MiniConsole:new({

name="seamapper",

x=10, y=10,

width= 250, height = 320

})

seamapper:setColor("black")

end

[/spoiler]

All done should look something like this:
[spoiler]
image
[/spoiler]

Now you need to send something to that window!
Lets create a trigger now. Open Triggers in mudlet, Add Item
then we enter the code to send "seamapper" some sea to map!
[spoiler]
selectCurrentLine()
copy()
appendBuffer("seamapper")
deleteLine()
[/spoiler]
Now click: multiline / AND trigger
set the line delta to: 25
thats basic daytime sight from the decks. (Take nightsight into account for nighttime or we need to make this smaller if you don't have nightsight)
Next on the top right click on: Fire length
Set that to: 25

See the image below for reference.
[spoiler]
image
[/spoiler]

Now keep in mind this is going to be on the top left of our screen. If you want to move it you need to change the: X and Y from the first step.
You can make a simple alias called something like: Move Sea Map

Insert these 2 lines of code:
setSeaMap()
moveWindow("seamapper", 200, 100)

The line: setSeaMap() activates our function and makes the map appear. It's better to put it in a function so you can active it before or after you active other GUI elements for layering purposes. You can put it in your login script too if you have one. I have a GUI initialization script depending how I want mudlet to look today.

In the second line we are moving the window around. After you place your window you wont need this line but you'll still have to activate the function setSeaMap() each time you log in unless you take off the function tags.

The first number is the X (or left right on the screen)
The second number is the Y (Up and down)
adjust these to put the window where you want it!

Now you've only made a trigger to set this window up everytime it sees the "Quarterdeck of"
You're going to need to trigger other things for Moving, Ship bow, and especially the crows nest

Here are some images showing various triggers for The crows nest / Ship bow / and "The ship moves to the"
[spoiler]
image
[/spoiler]
EDIT - Opps Typo in last screenshot. Should be "33" not "3" in line delta


Lastly a note. If you trigger climbing and coming down the mast these are the default window sizes:
Deck = resizeWindow("seamapper", 250, 320)
Mast = resizeWindow("seamapper", 345, 413)

This is all using default mudlet text size. If you change your text size you'll have to change these numbers.

Disclaimer: These aren't the exact triggers I use because I have a lot of things utilizing some of this. There are better ways to do this I'm sure and I've already started changing how I capture and read a lot of this info. This is just an easy way to get you started making a simple seafaring capture window. Feel free to ask me if you have problems or questions! Good luck and good sailing!


Post edited by Zulah on
ArianisJozlynRinzaiYaeSilasAitoxShadizarJonathinJosoulShirszaeRennyn

Comments

  • JonathinJonathin Grand Rapids, MIMember Posts: 3,323 @@ - Legendary Achaean
    Regarding the move function, I wanted to be able to use percentages to move it around along with being able to use solid values so I changed the alias to this:

    Pattern: ^seamap ([0-9%]+) ([0-9%]+)$
    Script:

    setSeaMap()

    seamapper:move(matches[2], matches[3])


    My site will remain up, but will not be maintained. The repository will continue to have scripts added to it if I decide to play another game. Maybe I'll see you around in Starmourn!
    Tutorials and scripts  The Repository

  • ZulahZulah Member Posts: 765 @ - Epic Achaean
    Jonathin said:
    Regarding the move function, I wanted to be able to use percentages to move it around along with being able to use solid values so I changed the alias to this:

    Pattern: ^seamap ([0-9%]+) ([0-9%]+)$
    Script:

    setSeaMap()

    seamapper:move(matches[2], matches[3])

    I concur! I also use % to move most my windows with the:
    WindowWidth=0;

    WindowHeight=0;

    WindowWidth, WindowHeight = getMainWindowSize();


    Then call on things like: resizeWindow("seamapper", WindowWidth/3, WindowHeight/2)


    But for the sake of learning I tried to strip this down to the most basic tutorial.


    JonathinTrilliana
  • LithorinLithorin Member Posts: 29
    hey got a question for you if you have a moment when i use your triggers for capturing the map (which are damn usefull by the way) every time i start sailing it splits the map up into a bunch of lines showing a single map line below that a single blank line below that a single map line and so on. i have nightsight up is there a way you know of to fix this?
Sign In to Comment.