Yet another package for mudlet users (alpha)
Forum rules
- Use common sense and be respectful towards each other at all times, even when disagreeing.
- Do not reveal sensitive game information. Guild secrets, player seconds are examples of things not allowed.
- Use common sense and be respectful towards each other at all times, even when disagreeing.
- Do not reveal sensitive game information. Guild secrets, player seconds are examples of things not allowed.
Yet another package for mudlet users (alpha)
It seems these days everyone and his mother writes mudlet scripts for genesis.
I've decided to start cleaning up my stuff. Some big things are still not ported/disarmed yet (mapper for example).
Consider that "alpha preview" - you may test it on alt on separate genesis profile but do *not* try to load it on your main "script" profile.
Thanks for Syrk for his package that I used as reference and inspiration, and ZZ for convincing me to do it
Warnings:
- I have not tested it on Windows (yet)
- No colors except for ovbserver (but they are so I see whether triggers match properly)
- Not very usable for now
- Do not give me your updates / bug reports yet - other comments are welcome though
- Obviously a lot of ingame information will have to be added by user (so, you will be responsible for mapping realms, adding herbs etc.) - I like my current guild
For now it's preconfigured for 3 mudlet window sizes, it detects them and reorders only on mudlet startup:
<=1366x768
<=1920x1080
> (I play on 1440p)
For me it looks like that: but depending on resolution it reorganizes windows (some tabs are merged etc).
Installation:
If you're brave (or stupid) enough to install it - you may want to consult readme to learn what new aliases are there etc. For impatient:
- Unpack everything to some sane directory
- Add "genesis-bootstraper" to mudlet with priority -1
- Run genesis-bootstrap alias
- Restart mudlet
Features/Modules available now:
- Genesis - core module with various utilities
- Ui - core ui module
- Observer - module that will contain 99% of triggers. Observes mud state and generates events (say player_attacked(enemy))
- Typist - input module (for now just remaps numpad keys)
- Chat - newb chat and generic chat management
- Doctor - gauges (health etc)
- magic-map - obvious
- Warehouseman - inventory management
Pros:
- Most of "hard" code will be in .lua files, easy to inspect
Cons:
- Code is rather bulky
- There will be lots of updates and code will be even bigger
I've decided to start cleaning up my stuff. Some big things are still not ported/disarmed yet (mapper for example).
Consider that "alpha preview" - you may test it on alt on separate genesis profile but do *not* try to load it on your main "script" profile.
Thanks for Syrk for his package that I used as reference and inspiration, and ZZ for convincing me to do it
Warnings:
- I have not tested it on Windows (yet)
- No colors except for ovbserver (but they are so I see whether triggers match properly)
- Not very usable for now
- Do not give me your updates / bug reports yet - other comments are welcome though
- Obviously a lot of ingame information will have to be added by user (so, you will be responsible for mapping realms, adding herbs etc.) - I like my current guild
For now it's preconfigured for 3 mudlet window sizes, it detects them and reorders only on mudlet startup:
<=1366x768
<=1920x1080
> (I play on 1440p)
For me it looks like that: but depending on resolution it reorganizes windows (some tabs are merged etc).
Installation:
If you're brave (or stupid) enough to install it - you may want to consult readme to learn what new aliases are there etc. For impatient:
- Unpack everything to some sane directory
- Add "genesis-bootstraper" to mudlet with priority -1
- Run genesis-bootstrap alias
- Restart mudlet
Features/Modules available now:
- Genesis - core module with various utilities
- Ui - core ui module
- Observer - module that will contain 99% of triggers. Observes mud state and generates events (say player_attacked(enemy))
- Typist - input module (for now just remaps numpad keys)
- Chat - newb chat and generic chat management
- Doctor - gauges (health etc)
- magic-map - obvious
- Warehouseman - inventory management
Pros:
- Most of "hard" code will be in .lua files, easy to inspect
Cons:
- Code is rather bulky
- There will be lots of updates and code will be even bigger
- Attachments
-
- genesis-scripts-2018-02-11_2d7775d.zip
- script package
- (25.63 KiB) Downloaded 352 times
Re: Yet another package for mudlet users (alpha)
Looking good! Will take this for a spin and hopefully will learn a thing or two from this!
Cheers mate
Cheers mate
Re: Yet another package for mudlet users (alpha)
Looks you're good with mudlet so got a question :
i use zmud and command i use there and the one i could not find in mudlet is : #WAIT (not #alarm).
Is there in mudet something like #wait that not just delay commands after but stops everything after it ?
i use zmud and command i use there and the one i could not find in mudlet is : #WAIT (not #alarm).
Is there in mudet something like #wait that not just delay commands after but stops everything after it ?
Re: Yet another package for mudlet users (alpha)
Hmm. I haven't seen anything in Mudlet that works quite like #WAIT (which I used in zmud years and years ago). However, I have found that I generally don't need it. I use tempTimer a lot. Something like this....morgzaash wrote:Looks you're good with mudlet so got a question :
i use zmud and command i use there and the one i could not find in mudlet is : #WAIT (not #alarm).
Is there in mudet something like #wait that not just delay commands after but stops everything after it ?
Code: Select all
sendAll("open pack","fill pack",false)
tempTimer(1, function() send("close all",false) end)
Additionally, the post below is by Vadi, the lead Mudlet developer, on the Mudlet forums.
Vadi wrote:Some clients offer a #wait function, which will "pause" the script for a certain amount of time before allowing it to continue.
Mudlet doesn't provide that; it uses timers instead. Timers are better because they are easier to work with (they can be named/enabled/disabled), are less prone to buggy implementations (zmuds, for example, isn't great) and are more flexible.
Timers work a bit differently - instead of freezing the script for a certain amount of time, they don't freeze anything, but run a command in a certain time in the future.
So for example, a pseudocode #wait script:with a timer, becomesCode: Select all
do something #wait 1000 do something2
Would be the basic one-to-one translation. But since timers don't freeze the script, you can create several different ones, you can disable and enable them back - which will be a very helpful thing in the future and less code for you to write.Code: Select all
do something set a timer for 1 second to "do something2"
The syntax for using a timer is like this:
So a nexus code of:tempTimer (time to wait in seconds, INSERT CODE HERE, and optionally a name)
Would be the following in Mudlet:Code: Select all
#send jerk fish #wait 1500 #send pull line
Since timers are created instantly, if you want two or more, or means the times for consecutive timers should be to the starting point, unlike relatives times you do with waits:Code: Select all
send ("jerk fish") tempTimer (1.5, [[send ("pull line")]])
Code: Select all
#send jerk fish #wait 1500 #send pull line #wait 500 send jump
Hope that helped! Post comments/questions below.Code: Select all
send ("jerk fish") tempTimer (1.5, [[send ("pull line")]]) tempTimer (2, [[send ("jump")]])
Re: Yet another package for mudlet users (alpha)
They did timers because (probably) otherwise they would need to do multithreaded lua which would be PIA.
As annoying as they are, timers are rarely used. They are for weak and lazy
You are expected to use event-based system (I do it that way) - so set your triggers properly.
You may want to look at my observer module (it's stub, but you'll get the idea).
Spoiler alert: mapper is coming - expect next update somewhere this week (I'm cleaning/simplyfing my mapper, also have to make demo map)
As annoying as they are, timers are rarely used. They are for weak and lazy
You are expected to use event-based system (I do it that way) - so set your triggers properly.
You may want to look at my observer module (it's stub, but you'll get the idea).
Spoiler alert: mapper is coming - expect next update somewhere this week (I'm cleaning/simplyfing my mapper, also have to make demo map)
Re: Yet another package for mudlet users (alpha)
There is a command-queue script that I've found, creases a "queue" alias.morgzaash wrote:Looks you're good with mudlet so got a question :
i use zmud and command i use there and the one i could not find in mudlet is : #WAIT (not #alarm).
Is there in mudet something like #wait that not just delay commands after but stops everything after it ?
so you can do
Code: Select all
q 1, say one, 1, say two, 2, say four
Re: Yet another package for mudlet users (alpha)
Thanks but i don't see possibility to tempTimer after unknow time.
I want to do something like :
As you see there's few point where i cannot set time and looks like mudlet needs all times from the moment of script start.
So, thanks for your help but I'll stay with zmud i guess
I want to do something like :
Code: Select all
WaitForShip /unknow time, i just wait until it comes, set in, and then run rest after i disembark
go_path /simple path
do_something
#wait 2000 /my do_something starts a command that allow me to move on after 1-2 seconds without visible info thats it's ready
do_more /like kill - unknown time
path_back
#wait 2000 /need to wait - without it item of mine will be destroyed
WaitForShip
So, thanks for your help but I'll stay with zmud i guess
Re: Yet another package for mudlet users (alpha)
You can chain them.
Also for ships you *don't* need timer
Also for ships you *don't* need timer
Re: Yet another package for mudlet users (alpha)
Okay, so I have an alias to wait for a ship. When I type my alias, the code actually doesmorgzaash wrote:Thanks but i don't see possibility to tempTimer after unknow time.
I want to do something like :As you see there's few point where i cannot set time and looks like mudlet needs all times from the moment of script start.Code: Select all
WaitForShip /unknow time, i just wait until it comes, set in, and then run rest after i disembark go_path /simple path do_something #wait 2000 /my do_something starts a command that allow me to move on after 1-2 seconds without visible info thats it's ready do_more /like kill - unknown time path_back #wait 2000 /need to wait - without it item of mine will be destroyed WaitForShip
So, thanks for your help but I'll stay with zmud i guess
Code: Select all
enableTrigger("Auto-Board")
Code: Select all
^(?:> )?(Ferundi|Hull|Sutec|Cetus|The (.*)) (say|says|mumbles|rumbles|roars|squeaks|whispers|bellows|yells|chirps|chatters|thunders|shout|shouts|ask|asks|
sings|incants|murmurs|ponders|hints|tells|replied|booms|blurts|shrieks|hisses|squeals|howls|snarls|coos|announces): Buy your tickets (now )?or stay ashore\!$
Code: Select all
if gmcp.room.info.id == "qmYuP1" then
sendAll("buy ticket","buy ticket","board ship",false)
else
sendAll("open money-sack","get coins from money-sack",false)
expandAlias("bt",false)
tempTimer(.25,function() send("board ship",false) expandAlias("pcp",false) enableTrigger("Auto-Disembark") end)
closeAll()
end
disableTrigger("Auto-Board")
Code: Select all
enableTrigger("Auto-Disembark")
Code: Select all
send("leave ship",false)
disableTrigger("Auto-Disembark")
If you are wanting to execute that entire block of code at once I am sure it could be done. Paths are easy. Repeated actions every 1-2 seconds are easy with tempTimers. Enabling the auto-board stuff can be done at the end of your path back. Mudlet can definitely do all of it.
Re: Yet another package for mudlet users (alpha)
You setup ship triggers on ship arriving, not npc talking otherwise someone can foul you.
Same for arrival.
Same for arrival.
http://tworzymyatmosfere.pl/przescieradla-jedwabne-z-gumka/