Ah, yes. It is in (I think Dorn's? Got it from the Mudlet forum) the Blademaster Limbcounter Gui script pack. I just tried locking the Coding Pack folder to deactivate it, still getting the error. Do I have to delete it completely? Not sure how it's going to affect the limbcounter...
Yep, it was Dorn's that was giving me the trouble too. Go ahead and delete the display script. You can keep the math.round script with no problems. Delete the display one then restart Mudlet
@Vadimuses is it possible to have unactivated scripts not run at startup?
Yep, it was Dorn's that was giving me the trouble too. Go ahead and delete the display script. You can keep the math.round script with no problems. Delete the display one then restart Mudlet
@Vadimuses is it possible to have unactivated scripts not run at startup?
How do I align a container from the right side instead of the left.
setBorderRight(200)
ship_container = Geyser.Container:new({
name = "ship_container",
x= -0, y= -0, -- have it start at the top-right corner of mudlet??
width = 200, height="100%", -- with a width of 200, and a height of the full screen, hence 100%
})
I thought the above might work with negative numbers but it doesn't tried a few variations and had a look around on google but cant seem to find anything that I understand.
Okay disregard that seems if I put - 200 it starts it off in the right place, for some reason I thought -0 would do it, but that starts it on the very right border and continues going right instead of coming back left into screen.
Yeah. The x and y coordinates of a Geyser element (or any Mudlet GUI element, really) always set the top-left corner, so you need to take the element's size into account when placing something on the right or on the bottom.
It doesn't wrap around, no. This way you can have elements drive out if you want. Since you align elements by their top-left corner to Mudlets top-left corner, you also want to account for their size at times.
Does anyone know if it would be possible to have an alias that allowed me to use ; as a command separator (such as n;slap silas;s;touch shield;tell silas sothantos made me do it) but still use for says? The simplest answer I have been given was to adapt to using ;; as a command separator, but that would mess me up and require quite a bit of adjustment.
Does anyone know if it would be possible to have an alias that allowed me to use ; as a command separator (such as n;slap silas;s;touch shield;tell silas sothantos made me do it) but still use for says? The simplest answer I have been given was to adapt to using ;; as a command separator, but that would mess me up and require quite a bit of adjustment.
Having a bit of a problem that has been annoying me for some time, and I'm trying to figure out a way to fix it that is practical.
I use the daemonic tabbed chat script. I also have it setup so that every time I get a party tell, says, emote, whatever, it plays a little noise. Oh so handy.
The difficulty is when I get spammed, like I did during the raids tonight. Or, when I and/or an opponent sticks stupidity. Died twice to it. I don't mind the deaths too much, but I'd like to fix the problem.
Problem is, I'm on Linux. So, I have a few matters to contend with. #1: a trigger to simply play a sound file via the GUI option has never worked for me; no sound whatsoever. #2: Using the new playSoundFile() function in the Mudlet 2.0 API seems to have a lag of its own. It does a great job of limiting the number of sounds that can be played at once, but it does this by waiting for a few seconds to play any of them, it seems.
My present solution is thus:
function playSound( fileName )
--- Plays specified file name.
os.execute( "aplay " .. fileName .. " &" )
end
This plays sound absolutely fantastically, never lagged from initiation to execution. But, the little ampersand (&) there has a strength and weakness. It effectively creates a separate thread for every single sound that can be played. This has the plus of allowing other lines to process (mid-combat) while the two-second sound file plays. It has the drawback of allowing as many sounds to be played as my RAM and CPU can physically support. Hence the problem with spamming.
I've thought about writing a little shell script [to be executed by os.execute()] to do the following: (1) check for a lock file, (2) if no lock file is present, create a lock file and play the sound, (3) at the end of the sound's playing, delete the lock file. This would be ideal since it would prevent more than one sound file from being played at once, except it would destroy my hard drive after a while. Therefore, any solution needs to be done in RAM, and preferably with pure Lua until my playSound() function is called.
--------------
Some thoughts.
I could do something like this:
lockVariable = false
function playSound( fileName )
if lockVariable == false then
lockVariable = true
os.execute( "aplay " .. fileName .. " &" )
lockVariable = false
end
end
But, the ampersand is going to spin off a thread, meaning that the lockVariable will be set back to false while the sound is playing, thus allowing another sound to be played. In other words, I'm back to square one. I can't pull out the ampersand, because that will prevent new lines from being processed by SVO -- it effectively stops all processing until the sound is done playing.
In short: I need a way to programmatically spin off threads in Lua, and handle thread locking. Then, I can remove the ampersand from my aplay shell command, while still allowing SVO to continue processing.
How does io.popen() compare to using that ampersand in os.execute? Identically?
In terms of the actual execution of the process, I think it's essentially the same, at least in Unix/Linux; not sure about Windows. The & just indicates that the command should be executed as a background process. A potentially important difference between the two (though probably immaterial in this context) is that io.popen returns a file handle from which you can read the output and return value of the process, which you can't, as far as I know, with os.execute.
Ugh, been away for a bit and lost all the maps I made. I can't remember how to turn the mapper on and all that and I can't remember where to find that info, any help?
Comments
Now to reload all the names I lost because I accidentally saved the empty list. >.<
Svof
Mudlet Discord join up
targetlabel = Geyser.Label:new({
name = "targetlabel",
x = 0, y = "90%",
width = "98%", height = "10%",
fgColor = "red",
}, ent_container_bot) -- this is where we tell it what container to go into
targetlabel:setColor(255,255,255)
targetlabel:setStyleSheet([[
background-color: black;
border-width: 5px;
border-style: solid;
border-color: red;
border-radius: 10px;
font-size: 40px;
]])
Any help is appreciated
Svof
Mudlet Discord join up
→My Mudlet Scripts
setBorderRight(200)
ship_container = Geyser.Container:new({
name = "ship_container",
x= -0, y= -0, -- have it start at the top-right corner of mudlet??
width = 200, height="100%", -- with a width of 200, and a height of the full screen, hence 100%
})
I thought the above might work with negative numbers but it doesn't tried a few variations and had a look around on google but cant seem to find anything that I understand.
→My Mudlet Scripts
Svof
Mudlet Discord join up
Svof
Mudlet Discord join up
i'm a rebel
You could make an alias like
pattern: ^saywink (.+)$
script: send("say "..matches[2].." ")
I don't know of a way to set it up so that "say Hi " goes through properly without changing the separator, though.
Svof
Mudlet Discord join up
i'm a rebel
function playSound( fileName )
--- Plays specified file name.
os.execute( "aplay " .. fileName .. " &" )
end
This plays sound absolutely fantastically, never lagged from initiation to execution. But, the little ampersand (&) there has a strength and weakness. It effectively creates a separate thread for every single sound that can be played. This has the plus of allowing other lines to process (mid-combat) while the two-second sound file plays. It has the drawback of allowing as many sounds to be played as my RAM and CPU can physically support. Hence the problem with spamming.
I've thought about writing a little shell script [to be executed by os.execute()] to do the following: (1) check for a lock file, (2) if no lock file is present, create a lock file and play the sound, (3) at the end of the sound's playing, delete the lock file. This would be ideal since it would prevent more than one sound file from being played at once, except it would destroy my hard drive after a while. Therefore, any solution needs to be done in RAM, and preferably with pure Lua until my playSound() function is called.
--------------
Some thoughts.
I could do something like this:
lockVariable = false
function playSound( fileName )
if lockVariable == false then
lockVariable = true
os.execute( "aplay " .. fileName .. " &" )
lockVariable = false
end
end
But, the ampersand is going to spin off a thread, meaning that the lockVariable will be set back to false while the sound is playing, thus allowing another sound to be played. In other words, I'm back to square one. I can't pull out the ampersand, because that will prevent new lines from being processed by SVO -- it effectively stops all processing until the sound is done playing.
In short: I need a way to programmatically spin off threads in Lua, and handle thread locking. Then, I can remove the ampersand from my aplay shell command, while still allowing SVO to continue processing.
function playSound(sound)
os.execute("gst-launch playbin uri=file:///home/vadi/<sound> &")
end
If you'd like to limit the # of them played, I'd use a tempTimer to some minimum time that will disable playing of sounds.
Svof
Mudlet Discord join up
→My Mudlet Scripts
→My Mudlet Scripts
lockV_Sound = false
function reset_lockVSound()
lockV_Sound = false
end
function playSound( fileName )
--- Plays specified file name.
if lockV_sound == false then
lockV_sound = true
tempTimer(0.5, [[reset_lockVSound()]])
os.execute( "aplay " .. fileName .. " &" )
end
end
Ugh, been away for a bit and lost all the maps I made. I can't remember how to turn the mapper on and all that and I can't remember where to find that info, any help?
Svof
Mudlet Discord join up