The following is a small collection of useful code for ASpace wizards culled from the ASpace Support Forum. ---------------------- Here is a set of instructions for creating a new shipobj with the stock AttySpace database. Enter the ckworks room. The Space Clock here has code on it for doing most of the work required to create a new ship object. Type: @space/make Galaxy II for Yarb in #100 named USS Enterprise >USS Enterprise(#7693) made and installed with SDB 7 Go back to the 'Wizard Sim Area' @dig Bridge=USS erprise;ent,Out;O;exit;leave Enter the new room then... @chzone here=#7693 Now we need consoles. @create Bridge Console 3 @create Bridge Console 2 @create Bridge Console 1 drop 3 drop 2 drop 1 @dolist remove(lcon(here),%!)=&NAME ##=s(name(##)) @dolist remove(lcon(here),%!)=@set ##=wizard @dolist remove(lcon(here),%!)=@set ##=monitor @dolist remove(lcon(here),%!)=&SHIP ##=s(zone(here)) @dolist remove(lcon(here),%!)=&SDB ##=s(get(zone(here)/sdb)) @dolist remove(lcon(here),%!)=@parent ##=#231 @dolist remove(lcon(here),%!)=&MODES ##=command communications engineering helm inactive monitor navigation off operations science security tactical transporter weapons damage fighter Next lets finish up the configuration of the space object and fire it up. Parent the space object to the class of your choice, lets make a Galaxy II now: @parent zone(here)=#4414 Now to read the object into space: th sdb(read,zone(here)) This should return a '1'. Next give the object some fuel to run on: th sdb(put,get(zone(here)/sdb),7680000000,fuel,anti) th sdb(put,get(zone(here)/sdb),15360000000,fuel,deut) Now man one of your new consoles, MODE FIGHT, ACT SYS, MAIN 100, AUX 100, etc etc. You should have a working ship. ---------------------------------------- Here's a command I've made for creating new ships. This is working off 'our' db. This command is on #10 our wizard zone. The syntax is: @space/makeship named in for example: @space/makeship #98 named HMS Pointy Things in #38 This will create the new ship object, configure it as a space object, dock it in the object you specify, create a bridge for the new ship, zone it, create a single bridge console, etc etc. Instant new ship! &SPACE_MAKESHIP #10=$@space/makeship * named * in *:th setq(0,sdb(e))[setq(1,create(%1))][setq(5,xget(%2,SDB))][set(%q1,SDB:%q0)][set(%q1,SAFE)][set(%q1,SPACE:%2)][set(%q1,Space-Object)][parent(%q1,%0)][lock(%q1/ZONE,iswiz/1)][sdb(read ,%q1)][setq(5,xget(%2,SDB))][set(%q1,LOCATION:%q5)][setq(2,dig(Bridge))][set(%q2,FLOATING)][parent(%q2,#11)][set(%q2,DARK)][zone(%q2,%q1)][set(%q1,ROOMS:%q2)][setq(9,create(Bridge Console 1))][tel(%q9,%q2)][set(%q9,Wizard)][set(%q9,SAFE)][set(%q9,!NO_COMMAND)][set(%q9,MONITOR)][lock(%q9,%q9)][lock(%q9/USE,%q9)][lock(%q9/ENTER,%q9)][link(%q9,%q2)][parent(%q9,xget(#13 ,PARENT_OFF))][set(%q9,SDB:%q0)][set(%q9,SHIP:%q1)][name(%q9,Bridge Console 1)][set(%q9,MODES:command communications engineering helm inactive monitor navigation off operations science security tactical transporter weapons damage fighter)][set(%q9,NAME:Bridge Console 1)][pemit(%#,ansi(b,\[)[ansi(hy,name(%!))][ansi(b,\]--\[)][ansi(c,Created [name(%q1)]\(%q1\) with a class of [name(%0)]\(%0\) in [name(%2)] using sdb %q0 with a sdb read status of \([sdb(read,%q1)]\) and new bridge at %q2)][ansi(b,\])])][setq(3,mul(320000000,sdb(get,%q0,move,rate),sdb(get,%q0,tech,ly)))][sdb(put,%q0,%q3,fuel,anti)][sdb(put,%q0,mul(%q3,2),fuel,deut)][sdb(p,%q0,mul(sdb(g,%q0,batt, gw),3600),fuel,res)][sdb(p,%q0,%q5,loc)][sdb(p,%q0,1,sta,doc)][sdb(p,%q0,0,sta,lan)][sdb(p,%q0,sdb(g,%q5,coo,x),coo,x)][sdb(p,%q0,sdb(g,%q5,coo,y),coo,y)][sdb(p,%q0,sdb(g,%q5,coo,z ),coo,z)][tel(%q1,%2)][sdb(w,%q1)] I've updated this command to place the new ship in a base/planet. I know this creates a chicken and the egg scenario if you don't already have a base or planet in place. I'll be creating a planet and base creation command as well and posting them soon. If you're getting an undocking error, it's probably because of one of two things: 1. &STATUS shows the ship as in space while &SPACE says the ship is docked/landed. 2. &STATUS shows the ship as docked/landed while &SPACE says the ship is in space. Examine shipzone/SPACE. If the value is an integer, rather than a dbref#, you'll need to modify &STATUS so that the ship is undocked/launched. &STATUS (shipzone)=1 0 0 0 0 0 0 0 0 0 And, probably, reload it into the sdb. If the value is a dbref#, make sure that dbref# is a space_object. I'm guessing you can't see the other ship, and the SR shows "#-1 BAD LOCATION" in a couple places. If this is the case, your &SPACE and the actual location of the space_object probably don't match up. If &SPACE is #43, try @teling the space_object to #43. Of course, the simplest thing to do, to guarantee the problem will be fixed, if you don't mind having the ship in the middle of space, is: @tel =#100 &SPACE =1 &STATUS =1 0 0 0 0 0 0 0 0 0 th sdb(read, ) To fix the undocking error you can also do th sdb(p,sdb#,0,sta,dock) this is somewhat better then having to reread the OBJ because then the current vars you have in space will not be lost since your last sync so you can do that and then @space/save and you will be set -------------------------------- Example wizard zone command to reclass ships @space/reclass as &SPACE_RECLASS #10=$@Space/reclass * as *:th iter(setdiff(lattr(%0),SDB CONSOLES SPACE COORDS ROOMS),set(%0,##:))[parent(%0,%1)][sdb(read,%0)][setq(0,xget(%0,SDB))][setq(3,mul(320000000,sdb(get,%q0,move,rate),sdb(get,%q0,tech,ly)))][sdb(put,%q0,%q3,fuel,anti)][sdb(put,%q0,m ul(%q3,2),fuel,deut)][sdb(p,%q0,mul(sdb(g,%q0,batt,gw),3600),fuel,res)][pemit(%#,ansi(b,\[)[ansi(hy,name(%!))][ansi(b,\]--\[)][ansi(c,[name(%0)]\(%0\) reclassed as [name(%1)]\(%1\) [sdb(write,%0)])][ansi(b,\])])] ------------------------------- Example wizard zone command to refuel a ship @space/refuel &C_SPACE_REFUEL #10=$@space/refuel *:th ifelse(orflags(setq(0,spacenum(%0))%q0,+),[setq(2,mul(320000000,sdb(get,setq(1,xget(%q0,SDB))%q1,move,rate),sdb(get,%q1,tech,ly)))][sdb(put,%q1,%q2,fuel,anti)][sdb(put,%q1,mul(%q2, 2),fuel,deut)][sdb(p,%q1,mul(sdb(g,%q1,batt,gw),3600),fuel,res)][sdb(w,%q0)][u(FN_MSG,%#,name(%q0) refueled)],[u(FN_MSG,%#,That is not a space object)]) This also has a dependency on u(FN_MSG,,) &FN_MSG #10=pemit(%0,ansi(b,\[)[ansi(hy,name(%!))][ansi(b,\]--\[)][ansi(c,%1)][ansi(b,\])]) ---------------------------- Command for setting coordinates Set this command on the #10 object: &SET.COORDINATES #10=$@coord/set *=*|*|*:th sdb(put,%0,pc2su(%1),coords,x)[sdb(put,%0,pc2su(%2),coords,y)][sdb(put,%0,pc2su(%3),coords,z)];[pemit(%#,[ansi(hb,\[)][ansi(hy,CoordSYS)][ansi(hb,\]--\[)]SDB [ansi(hw,%0)] coordinates have been set to [ansi(hw,%1)] [ansi(hw,%2)] [ansi(hw,%3)][ansi(hb,\])])] Then the command to use to set an objects coordinates is @coord/set =||