Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
Aiesha
Beginner


Joined: 09 Jan 2002
Posts: 29
Location: USA

PostPosted: Sat Mar 15, 2003 2:39 am   

Script Editing
 
Hey Kjata, Lightbulb .. since you guys were the ones who helped me come up with this script i am again asking your help ...

a few things in the mud have changed since you helped me and i have taken into account for those changes but i have a different problem now ..

this is referring to that script you helped me build for the Starwars mud .. the autopilot script ...

To get started i made a Database called DB ... in it i put 3 fields Name Coords Pad ... now i need to add another field because the autopilot script cant fly me to 3 or 4 of the planets because the system isnt the same name as the planet ... i have added another field in my database and have put in all of the system names ... i now need to add something into the script that will make use of this therefor allowing me to fly to all the planets in the game on autopilot ...


Aliases
#AL AP {#IF %trigger( autoPilot) {#T- autoPilot} {#T+ autoPilot}}

#AL ADDINFO {#VAR newPlanet "";#ADDKEY newPlanet Name %1;#ADDKEY newPlanet Coords {%2 %3 %4};#ADDKEY newPlanet Pad %5;#NEW All @newPlanet}

#AL LAUNCH {#VAR loop 0;#IF (%1 <> -1) {#VAR loop 1};#VAR curPlanet %2;#VAR returnPlanet %1;~launch}


Triggers
#TRIGGER {The ship leaves the platform far behind as it flies into space} {calc %db(@curPlanet, "Name") %db(@curPlanet, "Coords")}

#TRIGGER {Hyperspace Calculations have been completed.} {hype}

#TRIGGER {The ship lurches slightly as it comes out of hyperspace.} {course %db(@curPlanet, "Name")}

#TRIGGER {You begin orbiting} {land %db(@curPlanet, "Name") %db(@curPlanet, "Pad")}

#TRIGGER {Landing sequence complete.} {whatever movement you need to get out of ship and refuel it then get back in;#IF (@loop) {#VAR temp @curPlanet;#VAR curPlanet @returnPlanet;#VAR returnPlanet @temp;#UNVAR temp;#GAG;~launch}}


Other Parts
#CLASS 0

#CLASS autoPilot

#ST Autopilot %if( %trigger( autoPilot), %ansi(bold, green)ON, %ansi(bold, high, red)OFF)%ansi(black)


System: Nim Drovis
Planet: Drovian
Coords: 4100 -1498 6045
Pad: *BLAH*

calc 'Nim Drovis' 4100 -1498 6045

course drovian

land *BLAH*


i hope this is enough information to help me make this script work all the way and be allowed to be put in the finished script section

I don't want the whole world, Just your half.
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Sat Mar 15, 2003 6:13 am   
 
Assumptions:
1) Planet name will be a single word
2) Name of new field is "System"
3) System name can be more than one word
4) System name will be the last entry when using the ADDINFO alias (may be blank if system and planet share name)

#AL ADDINFO {#VAR newPlanet "";#ADDKEY newPlanet Name %1;#ADDKEY newPlanet Coords {%2 %3 %4};#ADDKEY newPlanet Pad %5;#IF (%numparam() > 5) {#ADDK newPlanet System {%-6}} {#ADDK newPlanet System {%1}};#NEW All @newPlanet}
#TRIGGER {The ship leaves the platform far behind as it flies into space} {calc %db(@curPlanet, "System") %db(@curPlanet, "Coords")} autoPilot

LightBulb
Advanced Member
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
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 vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net