[Home] [Downloads] [Search] [Help/forum]

Gammon Software Solutions forum

See www.mushclient.com/spam for dealing with forum spam. Please read the MUSHclient FAQ!

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  General
. . -> [Subject]  Scripting function for last typed command
Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?

Scripting function for last typed command

[Reply to this subject]  Reply to this subject   [New subject]  Start a new subject   [Refresh] Refresh page


Posted by ProgrammingVerbs   (3 posts)  [Biography] bio
Date Sun 23 Mar 2003 09:47 PM (UTC)  quote  ]
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.
[Go to top] top

Posted by Nick Gammon   Australia  (15,394 posts)  [Biography] bio
Date Sun 23 Mar 2003 10:56 PM (UTC)  quote  ]

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
[Go to top] 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.


1,022 views.

[Reply to this subject]  Reply to this subject   [New subject]  Start a new subject   [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

[Home]

Written by Nick Gammon - 5K

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( http://www.gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Internet Contents Rating Association (ICRA) - 2K]    [Web site powered by FutureQuest.Net]