View unanswered posts | View active topics It is currently Sun Apr 26, 2026 2:04 pm



Reply to topic  [ 5 posts ] 
 Q: SWATH UserDefinedCommands 
Author Message
Commander
User avatar

Joined: Mon Oct 29, 2001 3:00 am
Posts: 1096
Location: Tucson, AZ
Unread post Q: SWATH UserDefinedCommands
I've been studying ExampleCommand1 and some UserDefinedCommands that others have written. In the commands I've looked at, the runCommand() method starts things off by sending some text to the game. Then the onText() method handles the response, possibly sending more text and generating more responses. So far so good.

But there's one thing I don't understand. What signals to the framework that the command is done running and endCommand() should be called? Is it when the buffer is cleared?

_________________
Suddenly you're Busted!


Wed Aug 17, 2011 11:13 pm
Profile WWW
Commander
User avatar

Joined: Mon Oct 29, 2001 3:00 am
Posts: 1096
Location: Tucson, AZ
Unread post Re: Q: SWATH UserDefinedCommands
Stein got back to me on this. The answer is: UDCs are terminated when they get to a major prompt. So they should be designed to take you from one major prompt to another. (Apparently the CIM is not a major prompt, 'cause that's where my UDC was getting hung up.)

_________________
Suddenly you're Busted!


Thu Aug 18, 2011 5:51 pm
Profile WWW
Gameop
User avatar

Joined: Mon Aug 25, 2003 2:00 am
Posts: 233
Location: USA
Unread post Re: Q: SWATH UserDefinedCommands
Mongoose wrote:
Stein got back to me on this. The answer is: UDCs are terminated when they get to a major prompt. So they should be designed to take you from one major prompt to another. (Apparently the CIM is not a major prompt, 'cause that's where my UDC was getting hung up.)


So what are all of the "Major" prompts then?

_________________
twgs: telnet: reviving this in Sep 2019
web: http://www.roguegalaxy.com


Fri Aug 19, 2011 4:43 pm
Profile WWW
Ambassador
User avatar

Joined: Wed Nov 12, 2008 8:57 am
Posts: 3554
Location: Long Beach, CA
Unread post Re: Q: SWATH UserDefinedCommands
Command Prompt
Computer Prompt
Planet Prompt
Corp Prompt

For example

H

PS: I think Vid did a tutorial about this some time ago. Its in this forum somewhere

_________________
Helix
Do I really look like a guy with a plan? You know what I am? I'm a dog chasing cars.
Lest we forget
I had to ask myself WWSGD?


Fri Aug 19, 2011 4:57 pm
Profile WWW
Commander
User avatar

Joined: Mon Oct 29, 2001 3:00 am
Posts: 1096
Location: Tucson, AZ
Unread post Re: Q: SWATH UserDefinedCommands
I'm guessing the "major" prompts are the ones there are constants defined for in com.swath.Swath: citadel, command, computer, corp, planet, and stardock.

_________________
Suddenly you're Busted!


Fri Aug 19, 2011 7:02 pm
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 5 posts ] 

Who is online

Users browsing this forum: No registered users and 1255 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by wSTSoftware.