Make send() remember the last command used

Share your scripts and packages with other Mudlet users.
Post Reply
User avatar
Vadi
Posts: 5042
Joined: Sat Mar 14, 2009 3:13 pm

Make send() remember the last command used

Post by Vadi »

Currently, Mudlet stores the last command used by the user in the command line in the command variable. It doesn't do it for the send() function though, but should you want it to - save the following code into a new script in Mudlet:

Code: Select all

do
	local oldSend = send
	function send(what, display)
		send_command = what
		oldSend(what, display)
	end
end
send_command variable will now store the text last used by send().

Post Reply