
Welcome to the Achaea Forums! Please be sure to read the Forum Rules.
Quick Coding Questions
Comments
-
So usually I just ask Seragorn these questions, but he's gone for the weekend, so...
In mudlet, how do I make it overwrite original text and put what I want? I've seen people use this to rewrite their hunting attacks and such which is only visible on their end, but I'd like to use it for some other function.What doesn't kill you gives you exp.0 -
Most use either a combination of selectString/selectCaptureGroup and replace or a combination of deleteLine and [c|d|h]echo.
Which one to use depends on if you want to change only a part (first variant) or the whole message (second).My Bashing script: http://achaeabashingScript.github.io/Bashing/
GMCP documentation: https://github.com/keneanung/GMCPAdditions
svof github site: https://github.com/svof/svof and documentation at https://svof.github.io/svof0 -
Keneanung said:Most use either a combination of selectString/selectCaptureGroup and replace or a combination of deleteLine and [c|d|h]echo.
Which one to use depends on if you want to change only a part (first variant) or the whole message (second).
Luckily Seragorn logged in again and saved the day! :hurrah: Thank you anyways, though! I appreciate it.What doesn't kill you gives you exp.0 -
What would cause a table value to equal <cycle>? That's all it says. It's not a string, as far as I know, because it doesn't have parentheses around it. Gonna try to type this out on my phone, so if syntax is off slightly, I apologize
Table = {["Austere"] = {},["Jadys"] = <cycle>}
0 -
-
So the problem is somewhere I am doing something similar to Table.Jadys = Table? It's mostly likely a "make sure my table is set" error using Table.Jadys = Table.Jadys or {} and I missed the Jadys part. Easy fix, if so. Thanks!
0 -
Simple question here:
I've got an alias of:
^pc (\w+)$
which does:
send("puppet command " ..matches[2])
But will only work with one word commands like pc restore. How do I set that to capture anything else I put in, such as pc touch tree, or pc apply restoration to head or pc sing i'm a little teapot?
tia.0 -
Change the pattern to ^pc (.+)$
\w+ only matches a string of alphanumeric characters, so will stop matching as soon as it reaches a space. .+ matches everything.5 -
So I am going to start coding a name database tonight. I have been looking into the database functions in mudlet, and thus far feel very confused about how to go about this. I was just wondering if there is any true benefit to using a database over a table using table.save and table.load. I feel that creating the triggers to highlight names on load is going to turn out a lot easier for me personally if I use tables, and a table is capable of storing all the relevant data, so I guess my real question is how will this effect processing times.
Also, how safe is it to create temp triggers for every person in a database for coloring purposes? I was planning on naming them after the person I want to highlight, so it makes it easier to adjust people's faction on the fly. Any tricks to reduce script lag? I have a lot of grand ideas about this, just want to make sure I am not missing anything relevant.0 -
Database is useful if you wanted to create an external program to access that data. Especially if you use mudlet to connect to a mysql instance or something similar. You could for instance have mudlet check certain information, add it to the database and have a webserver connecting to the same database that would be updated at the same time. There's also potentially performance improvements that can be had from using an sql database over simple tables.
Additionally, it's much easier to search databases for instance, for all members of a class or city than it is to search tables for that information.
0 -
I use the YATCO chat capture still. I want to put a nice border about it just so it looks a little cleaner in my GUI. What would people advice on how to go about this?0
-
-
A table in Lua can actually be one of two things: a dictionary or an ordered list. A dictionary is a set of key value pairs, a list is just a list. If you're familiar with JavaScript, think object versus array.
How you go about checking depends on which type you have. If it's an ordered list, then:
if table.contains(yourtable, "name") then x else y end
If it's a dictionary where the names are keys, then:
if yourtable["name"] then x else y end
2 -
Amranu said:Additionally, it's much easier to search databases for instance, for all members of a class or city than it is to search tables for that information.
The earth is so good to me;
So giving and so kind.0 -
I've seen a few people who have date/time trackers on their GUIs and I was wondering on how they have done them? I assumed it would have been triggered on changes to (gmcp.IRE.Time.List) however despite this my (gmcp.IRE.Time) is still showing it to be late afternoon on the 21st of Glacien despite it being midnight on the 23rd.0
-
I did it the old school way and just triggered every ambient message (as well as TIME, DATE) and had it auto-update on the new day message.0
-
@Tahquil IRE.Time.List get only sent on request (either via gmcp or DATE/TIME commands). All other changes get sent via IRE.Time.Update. See https://github.com/keneanung/GMCPAdditions/blob/master/README.md#iretime
My Bashing script: http://achaeabashingScript.github.io/Bashing/
GMCP documentation: https://github.com/keneanung/GMCPAdditions
svof github site: https://github.com/svof/svof and documentation at https://svof.github.io/svof0 -
actually @Keneanung I've found that IRE.Time.List only gets updated on login. Never updated for me on checking DATE, TIME or any other actions than logging out and back inAurora says, "Tharvis, why are you always breaking things?!"
Artemis says, "You are so high maintenance, Tharvis, gosh."
Tecton says, "It's still your fault, Tharvis."0 -
Can confirm that using DATE/TIME commands does not update IRE.Time.List
@Keneanung : I've been using your documentation as a bible. But this is uh, a pit fall as I wish I could have an updating time/date to help out whne you are stuvk indoors for a while0 -
Maybe I remember wrong then and it was a (almsot) completely filled update. I'll have a look at that again. But the actual answer to Tahquil's question is still that she has to use the "Update"My Bashing script: http://achaeabashingScript.github.io/Bashing/
GMCP documentation: https://github.com/keneanung/GMCPAdditions
svof github site: https://github.com/svof/svof and documentation at https://svof.github.io/svof0 -
vlua gmcp.IRE.Time.Update{daynight = "15"}vlua gmcp.IRE.Time{Update = {daynight = "15"},List = {time = "The shadows have lengthened. It is late afternoon in Achaea.",moonphase = "Waning Gibbous",day = "21",month = "Glacian",daynight = "81",year = "694",hour = "39",mon = "11"}}
Still no dice.0 -
update goes up a number every few seconds, and at stages where "moonphase" etc rolls over, the variable daynight vanishes from Update and update becomes
Upate : {
time = "...."
moonphase = "...."
something else
}
anyway. Daynight seems to go up to 360, could be wrongAurora says, "Tharvis, why are you always breaking things?!"
Artemis says, "You are so high maintenance, Tharvis, gosh."
Tecton says, "It's still your fault, Tharvis."0 -
Tahquil said:I've seen a few people who have date/time trackers on their GUIs and I was wondering on how they have done them?
0 -
Tharvis said:update goes up a number every few seconds, and at stages where "moonphase" etc rolls over, the variable daynight vanishes from Update and update becomes
Upate : {
time = "...."
moonphase = "...."
something else
}
anyway. Daynight seems to go up to 360, could be wrongMy Bashing script: http://achaeabashingScript.github.io/Bashing/
GMCP documentation: https://github.com/keneanung/GMCPAdditions
svof github site: https://github.com/svof/svof and documentation at https://svof.github.io/svof0 -
Speaking of GMCP-
1. @Keneanung That github page is amazing, thanks.
2. Is there any reason why it was decided to create arbitrary module pairings for request/responses instead of clients sending the module they want a response for? For example, right now clients have to send Char.Skills.Get to receive an update to Char.Skills.List - wouldn't it make more sense to just have clients send Char.Skills.List?
3. Why is GMCP like five characters away from valid JSON?Char.Skills.Get { "group": "elemancy", "name": "firelash" }
instead of something like{"Char.Skills.Get": { "group": "elemancy", "name": "firelash" }}
?
0 -
#2 would need to be answered by somebody who works for IRE, and I don't know if/how often they look at this particular thread.
#3 sounds like it would need to go to whoever was in charge of designing the GMCP protocal. That's not anybody involved with Achaea/IRE specifically, as far as I know.
0 -
Yeah I know this probably isn't the best place for those questions, I was just hoping someone who checked the thread had some insight.0
-
From what I remember (it's been a long time), the not-quite-JSON (though some JSON parsers will accept it) was pretty much just an arbitrary decision by IRE and Zugg (mostly Zugg, I think?). I don't remember there being any particular reason for it.
0 -
One question would be: how does the HTML5 client know what time it is?
0 -
I'm on a Mac and Mudlet always starts up too small for anything.
Is there a way to set the main window size to a certain size so I don't have to resize each time I log into Achaea?0
Sign In to Comment.
Categories
- 6K All Categories
- 3K Everything Achaea
- 1.5K North of Thera
- 21 Archives of the Terraformer
- 241 The Matsuhama Arena
- 873 The Golden Dais of Creation
- 283 The Scarlattan Theatre
- 144 The Blank Canvas
- 1.9K Getting Help
- 391 General Questions
- 247 Quick Class Questions
- 1.3K Tech Support
- 298 Client Help
- 456 Curing Systems and Scripts
- 829 Off-Topic
- 250 The Wander Inn
- 579 The Universal Membrane
- 281 Class Discussions
- 281 Individual Class Sections
- 20 Alchemist
- 8 Apostate
- 29 Blademaster
- 9 Depthswalker
- 12 Druid
- 4 Infernal
- 20 Jester
- 19 Magi
- 30 Monk
- 9 Occultist
- 7 Paladin
- 7 Priest
- 28 Runewarden
- 18 Sentinel
- 24 Serpent
- 19 Shaman
- 9 Sylvan