ac19189 wrote:Does anyone have a clue how to make a script that when you type x,y,z or just x,y cords like /nav 123, 123 the command will take yor ship there but lets say I want a planet at 1,3....
so if you type /nav 123, 123 it will say in text theres nothing here
but if you type /nav 1,3 it says theres a planet here.....
so in simple terms I want to make a nav system so if i type
/nav 1,3 in text it says your in orbit of a planet and from that point you can land on the planet witch would be a new room
but if you type something there is nothing at like
/nav 123,156
or
/nav 157,356 or anything that the script has no planet or ship at making the disply say theres nothing here....
ac19189 wrote::?![]()
![]()
Ehhh....
Yah errm right... got it....
lol
Im kinda see what you are saying just dont understand why it cant be done just telling the script when you type 1,2 because 1,2 is set to take you or open the path way to room test1 but when you type 1,3 because theres no room programed for that it auto takes you to test2 room pretty much making the script take you to a room no matter what but based on what you type it sends you to a dif room it be easy just to make it 1,3 test2 1,4 test2 script etc and just keep going but then theres a limit and it takes lots of time but if you make the script take you to only the rooms that are programed for a singel command like 1,2 is set to test1 room but if thats the only room thats been set on the code and you type in something other then 1,2 it takes to test2 room because it wasnt the right thing it could also be used as a prassword system anything typed other then the right code will make you get sent to the wrong room.....
You are both usen word that are to big for my little mindor it might be i need sleep not sure
![]()
007bond wrote:Hey, ebayfan: have you ever heard of punctuation? perhaps paragraphs? capatilisation? or are you only 2 years old and haven't been to school yet?
007bond wrote: I simply don't read properly written texts on the web at all. If you want help, take the time to write properly.
Hey, ebayfan: have you ever heard of punctuation? perhaps paragraphs? capatilisation? or are you only 2 years old and haven't been to school yet? I simply don't read properly written texts on the web at all. If you want help, take the time to write properly.

command <engage> {
if not flag <spaceship_power> then msg <The power is off and the ship is not operational.>
else {
if not flag <space> then msg <You cannot engage a destination while you are docked. You must be out in space first.>
else {
if (%mcordinates% = 0) and (#destination# = nothing) and (#destinationQ# = nothing) then msg <The computer screen reminds you that you haven't entered any coordinates or destination yet.>
else do <gotodestinationproc>
}
}
}
' --------------------------------------
define procedure <gotodestinationproc>
foreground <&HAF8E00>
set string <Computer_Text; activate_>
do <Computer_Text_Proc>
msg <|bDESTINATION SEQUENCE|xb|xn>
pause <200>
msg <_>
foreground <white>
msg <Your spacecraft takes off into space towards your destination.>
flag on <destination_engaged>
set string <currentplanet; noplanet>
flag off <orbit>
timeron <spacetraveltimer>
end define
' ----------------------------------------
define procedure <destinationQproc>
if (%xx% <= 32) then {
if (%yy% <= 32) then {
if (%zz% <=32) then set string <destinationQ; ALPHA>
if (%zz% > 32) and (%zz% <= 65) then set string <destinationQ; KAPPA>
if (%zz% > 65) then set string <destinationQ; TAU>
}
if (%yy% > 32) and (%yy% <= 65) then {
if (%zz% <=32) then set string <destinationQ; DELTA>
if (%zz% > 32) and (%zz% <= 65) then set string <destinationQ; NU>
if (%zz% > 65) then set string <destinationQ; CHI>
}
if (%yy% > 65) then {
if (%zz% <=32) then set string <destinationQ; ETA>
if (%zz% > 32) and (%zz% <= 65) then set string <destinationQ; PI>
if (%zz% > 65) then set string <destinationQ; ATLAS>
}
}
if (%xx% > 32) and (%xx% <= 65) then {
if (%yy% <= 32) then {
if (%zz% <=32) then set string <destinationQ; BETA>
if (%zz% > 32) and (%zz% <= 65) then set string <destinationQ; LAMBDA>
if (%zz% > 65) then set string <destinationQ; UPSILON>
}
if (%yy% > 32) and (%yy% <= 65) then {
if (%zz% <=32) then set string <destinationQ; EPSILON>
if (%zz% > 32) and (%zz% <= 65) then set string <destinationQ; XI>
if (%zz% > 65) then set string <destinationQ; PSI>
}
if (%yy% > 65) then {
if (%zz% <=32) then set string <destinationQ; THETA>
if (%zz% > 32) and (%zz% <= 65) then set string <destinationQ; RHO>
if (%zz% > 65) then set string <destinationQ; MUSE>
}
}
if (%xx% > 65) then {
if (%yy% <= 32) then {
if (%zz% <=32) then set string <destinationQ; GAMMA>
if (%zz% > 32) and (%zz% <= 65) then set string <destinationQ; MU>
if (%zz% > 65) then set string <destinationQ; PHI>
}
if (%yy% > 32) and (%yy% <= 65) then {
if (%zz% <=32) then set string <destinationQ; ZETA>
if (%zz% > 32) and (%zz% <= 65) then set string <destinationQ; OMICRON>
if (%zz% > 65) then set string <destinationQ; OMEGA>
}
if (%yy% > 65) then {
if (%zz% <=32) then set string <destinationQ; IOTA>
if (%zz% > 32) and (%zz% <= 65) then set string <destinationQ; SIGMA>
if (%zz% > 65) then set string <destinationQ; XIATA>
}
}
end define
' -------------------------------
define procedure <checkcoordinatesproc>
msg <Based on your current data, you will be entering the #destinationQ# quadrant.>
set string <destinationP; noplanet>
if (%xx% = %Ex%) and (%yy% = %Ey%) and (%zz% = %Ez%) then {
set string <destinationP; Earth>
msg <The coordinates correspond with Earth's exact location, so |xn>
}
if (%xx% = %Mx%) and (%yy% = %My%) and (%zz% = %Mz%) then {
set string <destinationP; Mars>
msg <The coordinates correspond with Mars' exact location, so |xn>
}
msg <I have set your destination accordingly.>
end define
' -----------------------------
define timer <spacetraveltimer>
interval <1>
action {
if (%xx% > %currentx%) then inc <currentx>
if (%xx% < %currentx%) then dec <currentx>
if (%yy% > %currenty%) then inc <currenty>
if (%yy% < %currenty%) then dec <currenty>
if (%zz% > %currentz%) then inc <currentz>
if (%zz% < %currentz%) then dec <currentz>
do <currentQproc>
if not (#ncurrentQ# = #currentQ#) then msg <You are now entering the #ncurrentQ# quadrant.>
set string <currentQ; #ncurrentQ#>
if (%xx% = %currentx%) and (%yy% = %currenty%) and (%zz% = %currentz%) then do <reachdestinationproc>
}
disabled
end define
define procedure <gettraveltime>
' [x-z]1 is where you are now.
' [x-z]2 is where you want to go.
' [x-z]3 is the final destination length per coordinate (rounded down to the nearest whole number)
set numeric <x1; %currentx%>
set numeric <y1; %currenty%>
set numeric <z1; %currentz%>
if flag <distzero> then flag off <distzero>
' get single distances
if (%x1% <> %x2%) then {
if (%x1% < %x2%) then set numeric <x3; %x2% - %x1%>
else set numeric <x3; %x1% - %x2%>
}
else set numeric <x3; 0>
if (%y1% <> %y2%) then {
if (%y1% < %y2%) then set numeric <y3; %y2% - %y1%>
else set numeric <y3; %y1% - %y2%>
}
else set numeric <y3; 0>
if (%z1% <> %z2%) then {
if (%z1% < %z2%) then set numeric <z3; %z2% - %z1%>
else set numeric <z3; %z1% - %z2%>
}
else set numeric <z3; 0>
' get total distance
if (%x3% = 0) or (%y3% = 0) or (%z3% = 0) then {
if (%x3% > 0) and (%y3% > 0) and (%z3% = 0) then {
set numeric <x3; %x3% * %x3%>
set numeric <y3; %y3% * %y3%>
set numeric <distance; %x3% + %y3%>
}
if (%x3% = 0) and (%y3% > 0) and (%z3% > 0) then {
set numeric <y3; %y3% * %y3%>
set numeric <z3; %z3% * %z3%>
set numeric <distance; %y3% + %z3%>
}
if (%x3% > 0) and (%y3% = 0) and (%z3% > 0) then {
set numeric <x3; %x3% * %x3%>
set numeric <z3; %z3% * %z3%>
set numeric <distance; %x3% + %z3%>
}
if (%x3% > 0) and (%y3% = 0) and (%z3% = 0) then set numeric <distance = %x3%>
if (%x3% = 0) and (%y3% > 0) and (%z3% = 0) then set numeric <distance = %y3%>
if (%x3% = 0) and (%y3% = 0) and (%z3% > 0) then set numeric <distance = %z3%>
if (%x3% = 0) and (%y3% = 0) and (%z3% = 0) then flag on <distzero>
}
else {
set numeric <x3; %x3% * %x3%>
set numeric <y3; %y3% * %y3%>
set numeric <z3; %z3% * %z3%>
set numeric <distance; %x3% + %y3%>
set numeric <distance; %distance% + %z3%>
}
'---------------------------- this will get your distance
if not flag <distzero> then {
for <distancedone; 1; 500; 1> {
set numeric <distancechecker; %distancedone% * %distancedone%>
if (%distancechecker% >= %distance%) then {
dec <distancedone>
set numeric <duration; %distancedone%>
set numeric <distancedone; 501>
}
}
}
else set numeric <duration; 0>
flag off <distzero>
end define
define function <diff>
set numeric <pa1; $parameter(1)$>
set numeric <pa2; $parameter(2)$>
if (%pa1% < %pa2%) then set numeric <ret; %pa2% - %pa1%> else set numeric <ret; %pa1% - %pa2%>
return <%ret%>
end define
define procedure <gettraveltime>
' [x-z]1 is where you are now.
' [x-z]2 is where you want to go.
' [x-z]3 is the final destination length per coordinate (rounded down to the nearest whole number)
set numeric <x1; %currentx%>
set numeric <y1; %currenty%>
set numeric <z1; %currentz%>
if flag <distzero> then flag off <distzero>
' get single distances
set numeric <x3; $diff( %x1%; %x2% )$>
set numeric <y3; $diff( %y1%; %y2% )$>
set numeric <z3; $diff( %z1%; %z2% )$>
' get total distance
set numeric <x3; %x3% * %x3%>
set numeric <y3; %y3% * %y3%>
set numeric <z3; %z3% * %z3%>
set numeric <distance; %x3% + %y3%>
set numeric <distance; %distance% + %z3%>
'---------------------------- this will get your distance
if not flag <distzero> then {
for <distancedone; 1; 500; 1> {
set numeric <distancechecker; %distancedone% * %distancedone%>
if (%distancechecker% >= %distance%) then {
dec <distancedone>
set numeric <duration; %distancedone%>
set numeric <distancedone; 501>
}
}
}
else set numeric <duration; 0>
flag off <distzero>
end define