# repeat alias

Share your scripts and packages with other Mudlet users.
Jor'Mox
Posts: 1142
Joined: Wed Apr 03, 2013 2:19 am

Re: # repeat alias

Post by Jor'Mox »

I think you have it right, the matches table is overwritten when a new alias is called, so you need to save the relevant values before you call expandAlias.

User avatar
ulysses
Posts: 43
Joined: Fri Jan 05, 2018 7:43 pm

Re: # repeat alias

Post by ulysses »

I fixed this my making matches local like this:

Code: Select all

local myMatches = matches
for i = 1, tonumber(myMatches[2]) do
	expandAlias(myMatches[3])
end
Perhaps this could be put in the package above at the start of this thread?

Thanks!
U
Wod :mrgreen:
CthulhuMUD
www.cthulhumud.com
A hugely entertaining MUD based on the horror writings of HP Lovecraft.

hsima
Posts: 1
Joined: Thu Sep 03, 2020 8:23 pm

Re: # repeat alias

Post by hsima »

Patched and tested, seems to work as desired.
Attachments
repeat.xml
(634 Bytes) Downloaded 452 times

Post Reply