Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.

Due to spam on this forum, all posts now need moderator approval.

 Entire forum ➜ MUSHclient ➜ General ➜ Scripting function for last typed command

Scripting function for last typed command

It is now over 60 days since the last post. This thread is closed.     Refresh page


Posted by ProgrammingVerbs   (3 posts)  Bio
Date Sun 23 Mar 2003 09:47 PM (UTC)
Message
I looked through the functions, and was unable to find a function that got the last command entered.

It is an attempt to automate opening doors.

dim DirectLastMoved
dim PortalType
Sub Portal_Auto_Open(TriggerName,TriggerLine,arrWildCards)
World.SetVariable "PortalType", arrWildCards(1)
World.SetVariable "DirectLastMoved", (here is the command last typed)
World.Send("unlock" & World.GetVariable("PortalType") & World.Send("DirectLastMoved")
World.Send("open" & World.GetVariable("PortalType") & World.Send("DirectLastMoved")
End Sub

Trigger: The * appears to be closed.
Send: %0

so as you see, if there is a function where I can retrieve that, info, it would make it possible to open the door (or whatever portal type it is (gate, grate, trapdoor, etc.))

thanks in advance.
Top

Posted by Nick Gammon   Australia  (23,173 posts)  Bio   Forum Administrator
Date Reply #1 on Sun 23 Mar 2003 10:56 PM (UTC)

Amended on Sun 23 Mar 2003 10:57 PM (UTC) by Nick Gammon

Message
See GetCommandList - on that page is an example of getting the last command:

world.getcommandlist (1) (0)


- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


12,381 views.

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.