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]
[/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]
[/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 nestHere are some images showing various triggers for The crows nest / Ship bow / and "The ship moves to the"
[spoiler]
[/spoiler]
EDIT - Opps Typo in last screenshot. Should be "33" not "3" in line deltaLastly 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!
Comments
setSeaMap()
seamapper:move(matches[2], matches[3])
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.
zGUI 4.0 - A Free GUI for Mudlet 4.10+