tempTimer is going off immediately
Posted: Fri Dec 14, 2018 6:01 pm
Hi,
I have what I hope is a simple question. I have an alias, where I want to send the "sc" command (to get the "score" screen), then wait for the score screen to appear (because there's a separate trigger to get the number of coins I have in hand), then run another command. Here's the alias code (called depc):
But even when the tempTimer is set to a ridiculous number of seconds (like the 20, above), there is no wait. The "sc" command gets sent, then "deposit x" (where x is the number of coins) is sent immediately after that, and then the "sc" command comes through.
So... here's what I know. It's not that the code doesn't work at all... it does. It's not that the code is running out of order... it isn't ("sc" is sent first, then deposit x"). It's that the tempTimer does not appear to be, well, doing a temp timer.
Using Mudlet 3.15.0.
Thanks!
I have what I hope is a simple question. I have an alias, where I want to send the "sc" command (to get the "score" screen), then wait for the score screen to appear (because there's a separate trigger to get the number of coins I have in hand), then run another command. Here's the alias code (called depc):
Code: Select all
local function DepositCoins()
local CoinsToDeposit = CoinsInHand - math.fmod(CoinsInHand,5000)
send("deposit " .. CoinsToDeposit)
end
send("sc")
tempTimer(20,DepositCoins())
So... here's what I know. It's not that the code doesn't work at all... it does. It's not that the code is running out of order... it isn't ("sc" is sent first, then deposit x"). It's that the tempTimer does not appear to be, well, doing a temp timer.
Using Mudlet 3.15.0.
Thanks!