Old Reworked DSS Database Code (Scraps)

Submitted by Reaver on Sat, 2009-12-05 05:53

A long, long time ago. In a galaxy far away...

I reworked Dahan's Skill System Database code to support strings of data in a more clean and convenient way. It was to be said that my admin had decided with me, that we would prefer to not have a skill system on our MUSH at that time. With the wave of my hand, I destroyed the system. However, after a little scrounging, I was able to find the back up of the database I had. Everyone is free to peruse it, it is little information that I have. This technology is long gone and decayed to the sands of time.

@create DSS Database
@link DSS Database = #0
@set DSS Database = WIZARD
@set DSS Database = NO_COMMAND
&B DSS Database=hw
&COST_LANG DSS Database=25
&DB_GLOBAL DSS Database=#132
&DB_HELP DSS Database=#157
&DEFAULT_MELEE DSS Database=|20|Melee_Weapons|Dodge_Melee|0|5|20
@DESCRIBE DSS Database=This object is the heart of the skills system. It contains data about attributes, skills, feats, and health levels. Also included are global functions and private u-functions. It also protects certain attributes it uses to store data on players. This object does not include help files or any commands.%r%rThe following attribute prefixes are used:%r%tDB_%tUsed for important database numbers.%r%tFN_%tUsed for internal u-functions.%r%tFUN_%tUsed for global functions.%r%tLIST_%tUsed for various lists.%r%tSF_%tUsed to store pre-approved skill focuses.%r%rOther important attributes:%r%tSTARTUP, DESCRIBE.
@set DSS Database/DESCRIBE=no_command visual prefixmatch public nearby
&ENGAGED DSS Database=
&FN_ABORT DSS Database=[remit(%L,[ansi(hw,<[ansi(hy,COMBAT)]>)]%b%b%b[name(%#)] calls off their attack.)][attrib_set(me/Engaged`%0)]
&FN_ABTCHK DSS Database=[t([setr(P,squish(iter(lattr(me/engaged`**,|),if(match(extract(get(me/%i0),1,1,|),%#),last(%i0,`)),|)))])]
&FN_ADD DSS Database=add(%0,%1)
&FN_ADD_FIRST DSS Database=add(first(%0),first(%1))
&FN_ADJ_SKILL DSS Database=[ifelse([t(setr(0,grab(v(List_Skills),[first(%1,:)][ifelse(gte(words(%1,:),2),:*,%b*)],|)))],[setq(1,fold(FN_Adj_Skill2,[squish(after(%q0,&))],[%0] 1 0))][round(add(mul(%2,extract(%q1,2,1)),extract(%q1,3,1)),0)],#-1 Invalid skill name.)]
&FN_ADJ_SKILL2 DSS Database=[extract(%0,1,1)] [sub(extract(%0,2,1),before(%1,_))] [add(extract(%0,3,1),mul(before(%1,_),ulocal(FN_GetBaseLevel2,extract(%0,1,1),after(%1,_))))]
&FN_ATTR_COST DSS Database=[mul(10,sub(ulocal(FN_Cost,%2),ulocal(FN_Cost,ulocal(FN_GetBaseAttr,%0,%1))))]
&FN_ATTR_MODS DSS Database=[setq(0,repeat(0%b,[words(v(List_Attrs))]))][squish(iter([get(%0/Species)],ifelse(neq(0,words(setr(1,grab(v(List_Attr_Mods),[##] *,|)))),setq(0,vadd(%q0,rest(%q1))),)))][%q0]
&FN_CANEQP DSS Database=[if(t(setr(0,grab(default(%1/list`inventory,),%0*,|))),or(t(default(#29/[extract(%q0,2,1)]_WEAPON,)),t(default(#29/[extract(%q0,2,1)]_ARMOR,))),0)][not(or(t(default(%#/equipment`armor,)),t(default(%#/equipment`weapon,))))]
&FN_CANUNEQP DSS Database=[localize([if(t(setr(0,default(%1/equipment`weapon,))),t(match(first(%q0),%0*)),0)][if(t(setr(0,default(%1/equipment`armor,))),t(match(first(%q0),%0*)),0)])]
&FN_CBTCHK DSS Database=[not(hasflag(%L,OOC))][or(t(match(lvplayers(%L),setr(P,pmatch(%1)))),hasflag(locate(%0,%1,T),COMBAT_OK))][not(t(default(Engaged`%qP,)))][not(t(match(default(Engaged`%qP,),%0,|)))][not(t(match(default(%0/Flags,),Incapacitated)))][not(t(match(default(%1/Flags,),Incapacitated)))][u(FN_ISWEAPON,%0)]
&FN_CBTCHK_MELEE DSS Database=[not(hasflag(%L,OOC))][or(t(match(lvplayers(%L),setr(P,pmatch(%1)))),hasflag(locate(%0,%1,T),COMBAT_OK))][not(t(default(Engaged`%qP,)))][not(t(match(default(Engaged`%qP,),%0,|)))][not(t(match(default(%0/Flags,),Incapacitated)))][not(t(match(default(%1/Flags,),Incapacitated)))]
&FN_CBTENGAGE DSS Database=[attrib_set(me/Engaged`%1,%0|[secs()]|[if(t(match(%2,Melee_Ranged)),weapon|%2,%2)])]
&FN_CLINE DSS Database=[ansi(g,[repeat(-,sub(37,ceil(fdiv(strlen(%0),2))))]<)] [ansi(rh,%0)] [ansi(g,>[repeat(-,sub(37,div(strlen(%0),2)))])]
&FN_COLOR_NUM DSS Database=[ansi(switch(%0,>100,c,>66,g,>33,y,r),%0)]
&FN_COST DSS Database=[switch(%0,>90,add(145,mul(sub(%0,90),4)),>75,add(100,mul(sub(%0,75),3)),>50,add(50,mul(sub(%0,50),2)),>35,add(30,mul(sub(%0,35),2)),%0)]
&FN_DAMAGE DSS Database=[setq(W,[if(gte(if(t(%0),%0,0),if(t(%1),%1,0)),wounds,stuns)])][switch(lmath(max,%0 %1)],<5,lightly %qW,<10,moderately %qW,<15,seriously %qW,<20,critically %qW,vivisects)]
&FN_DEFENSE DSS Database=[t(default(me/engaged`%#,))]
&FN_DIE DSS Database=[mul(sign(%0),if(eq(%0,0),0,die(1,abs(%0))))]
&FN_DMG_ROLL DSS Database=[fdiv(add(1,floor(switch(rand(200),100,%0,>100,[add(%0,mul(sub(100,%0),fdiv(mod(#$,100),100)))],[div(mul(%0,mod(#$,100)),100)]))),100)]
&FN_ENGAGE DSS Database=[setq(0,%#,A,first(default(me/engaged`%#,),|))][setq(1,[add(75,[u(FN_SP,%qA)])],S,[div(ulocal(%vd/FN_GetAttr,%qA,Strength),2)])][setq(2,[switch(extract(get(me/engaged`%q0),3,1,|),weapon,if(t(match([extract(get(me/engaged`%q0),4,1,|)],Melee_Ranged)),strcat(extract(setr(B,default(%qA/equipment`weapon,)),1,1,|),default(me/default_melee,)),%qB),)])][setq(3,ulocal(%vd/FN_ToHit_Roll,ulocal(%vd/FN_GetSkill,%qA,[defextr(%q2,3,1,|,Brawling)]),switch(%1,MSG_ATTACK_WAIT,5,ulocal(%vd/FN_GetSkill,%q0,[defextr(%q2,4,1,|,Dodge_Melee)])),add([defextr(%q2,5,1,|,0)],%q1)))][setq(4,ifelse(gte(%q3,0),ulocal(%vd/FN_Dmg_Roll,%q3),0))][setq(5,ceil(mul(%q4,[defextr(%q2,7,1,|,%qS)])))][setq(6,mul(%q4,[defextr(%q2,6,1,|,0)]))][setq(7,defextr(default(%#/EQUIPMENT`ARMOR,),2,1,|,get(%vd/Threshold)),8,defextr(default(%#/EQUIPMENT`ARMOR,),3,1,|,get(%vd/Rating)))][setq(5,round(add(mul(sub(%q5,%q7),sub(1,%q8)),mul(%q8,sub(%q6,%q7))),0))][setq(6,round(mul(sub(%q6,%q7),sub(1,%q8)),0))][u(me/%1)][attrib_set(me/Engaged`%q0)][null([u(FN_Stun,%#,%q5)][u(FN_Wound,%#,%q6)])]
&FN_EQUIP DSS Database=[if(t(default(#29/[extract(%q0,2,1)]_WEAPON,)),[attrib_set(%#/equipment`weapon,[edit([edit(extract(%q0,1,2),%b,|)],_,%b)]|[default(#29/[extract(%q0,2,1)]_WEAPON,)])][remit(%L,[u(MSG_EQUIP_WEAPON,edit(extract(%q0,1,1),_,%b))])],[attrib_set(%#/equipment`armor,[edit([edit(extract(%q0,1,2),%b,|)],_,%b)]|[default(#29/extract(%q0,2,1)_ARMOR,)])][remit(%L,[u(MSG_EQUIP_ARMOR,edit(extract(%q0,1,1),_,%b))])])][attrib_set(%#/list`inventory,u(#8/fun`submass,default(%#/list`inventory,),extract(%q0,1,2),1))]
&FN_FOOTER DSS Database=%b[ansi(%vc,`-[repeat(=,72)]-')]
&FN_GETATTR DSS Database=[extract(extract(get(%0/DSS_Attrs),1,1,|),match(v(List_Attrs),%1),1)]
&FN_GETBASEATTR DSS Database=[extract(extract(get(%0/DSS_Attrs),3,1,|),match(v(List_Attrs),%1),1)]
&FN_GETBASELEVEL DSS Database=[ifelse(match(v(List_Attrs),%1),ulocal(FN_GetBaseAttr,%0,%1),ulocal(FN_GetBaseSkill,%0,%1))]
&FN_GETBASELEVEL2 DSS Database=[ifelse(match(v(List_Attrs),%1),ulocal(FN_GetAttr,%0,%1),ulocal(FN_GetBaseSkill,%0,%1))]
&FN_GETLEVEL DSS Database=[if(match(v(List_Attrs),%1),ulocal(FN_GetAttr,%0,%1),ulocal(FN_GetSkill,%0,%1))]
&FN_GETPOWER DSS Database=[localize([setq(0,grab(default(%0/DSS_POWERS,),%1 *,|))][switch([t(%q0)][t(match(v(List_Skills),[first(%1,:)][ifelse(gte(words(%1,:),2),:*,%b*)],|))],1*,extract(%q0,2,1),01,ulocal(FN_Adj_Skill,%0,%1,0),#-1 Invalid skill)])]
&FN_GETSKILL DSS Database=[if(t(setr(0,grab(lattr(%0/Skills`*,|),SKILLS`%1*,|))),u(FN_Adj_Skill,%0,%1,[u(%0/%q0)]),u(FN_Adj_Skill,%0,%1,0))]
&FN_HASSKILLS DSS Database=[and(not(hasflag(%0,UNREGISTERED)),hasattrval(%0,DSS_ATTRS))]
&FN_HEADER DSS Database=[center([ansi(rh,. o O)] [ansi(wh,%0)] [ansi(rh,O o .)],78)]%r[ansi(%vc,%b.-[repeat(=,72)]-.)]
&FN_ILINE DSS Database=%b[ansi(%vc,>---<)] [ansi(mh,%0)] [ansi(%vc,>[repeat(-,sub(67,strlen(%0)))]<)]
&FN_ISADMIN DSS Database=[orflags(%0,Wr)]
&FN_ISAMMO DSS Database=[t(match(lparent(%0),#119))]
&FN_ISARMOR DSS Database=[t(match(lparent(%0),#118))]
&FN_ISFS DSS Database=0
&FN_ISGUN DSS Database=[t(match(lparent(%0),#42))]
&FN_ISMELEE DSS Database=[t(match(lparent(%0),#19))]
&FN_ISWEAPON DSS Database=t(default(#29/[extract(default(%0/equipment`weapon,),2,1,|)]_WEAPON,0))
&FN_PARSE_ATTR DSS Database=[grab(v(List_Attrs),[%0]*)]
&FN_PARSE_SKILL DSS Database=[first(first(setr(9,grab(v(List_Skills),[edit(%0,%b,_)]*,|))),:)]
&FN_PMATCH DSS Database=[switch(pmatch(%0),#-1,locate(%#,%0,PTahilmna),#$)]
&FN_PWRADD DSS Database=[if(lte(1,[setr(X,default(%#/DSS_XP,0))]),[attrib_set(%#/powers`[first(%0,_)]_[last(%1,`)],1|%0|[last(%1,`)]|%2)][attrib_set(%#/DSS_XP,[sub(%qX,1)])][u(MSG_ADDPOWER,%0,%1,1)],Insufficient XP.)]
&FN_PWRCHK DSS Database=[t(match(default(%#/Species,Human),Starborn))][u(FN_SphereOK,%0)][u(FN_SubtypeOK,%1)][lte(strlen(%2),44)]
&FN_REPLACE DSS Database=[squish([extract(%0,1,dec(%1))] [%2] [extract(%0,inc(%1),sub(words(%0),%1))])]
&FN_SEEALSO DSS Database=%r[u(FN_Line)]%r[center(See also: [iter(%0,[ansi(y,edit(##,_,%b))],,\,%b)].,78)]
&FN_SETATTR DSS Database=[set(%0,DSS_Attrs:[vadd(setr(0,extract(get(%0/DSS_Attrs),2,1,|)),setr(1,[u(FN_Replace,extract(get(%0/DSS_Attrs),3,1,|),match(v(List_Attrs),%1),%2)]))]|[%q0]|[%q1])][ulocal(FN_Update_Skills,%0)]
&FN_SETLEVEL DSS Database=[ifelse(match(v(List_Attrs),%1),ulocal(FN_SetAttr,%0,%1),ulocal(FN_SetSkill,%0,%1))]
&FN_SETSKILL DSS Database=[localize([attrib_set(%0/Skills`%1,add(setr(S,default(%0/Skills`%1,0)),sub(%2,%qS)))])]
&FN_SHEET DSS Database=[setq(0,secure(%0))][switch([isdbref(%q0)][u(FN_HasSkills,%q0)],11,[ulocal(FN_Sheet_Top,%q0)][ulocal(FN_Sheet_Attr,%q0)][ulocal(FN_Sheet_Skill,%q0)][ulocal(FN_Sheet_Powers,%q0)][ulocal(FN_Sheet_Feat,%q0)][ulocal(FN_Sheet_Lang,%q0)][ulocal(FN_Sheet_Gear,%q0)][ulocal(FN_Sheet_Health,%q0)][ulocal(FN_Footer)],0*,[u(MSG_NotPlayer)],10,[u(MSG_NoTraits)],[u(MSG_Crit)])]
&FN_SHEET2 DSS Database=[setq(0,secure(%0))][setq(1,extract(Attr Skill Feat Lang Gear Health,match(Attributes Skills Feats Languages Gear Health,[%1]*),1))][switch([isdbref(%q0)][u(FN_HasSkills,%q0)],11,[ulocal(FN_Sheet_Top,%q0)][ulocal(FN_Sheet_[%q1],%q0)][ulocal(FN_Footer)],0*,[u(MSG_NotPlayer)],10,[u(MSG_NoTraits)],[u(MSG_Crit)])]
&FN_SHEET_ATTR DSS Database=[u(FN_ILine,Attributes)]%r[ansi(%vc,|)]%b[repeat([ljust(ansi(%vb,Attribute),15)][ljust(ansi(%vb,Adj Base),10)],3)][ansi(%vc,|%r|%b[repeat([ansi(%vc,repeat(~,24))]%b,3)])][iter(extract(v(List_Attrs),1,6),[ifelse(mod(sub(#@,1),3),,[ansi(%vc,|%r|%b)])][ljust(ansi(%va,%i0:),15)][rjust(extract(extract(get(%0/DSS_Attrs),1,1,|),#@,1),3)]%b[rjust([extract(extract(get(%0/DSS_Attrs),3,1,|),#@,1)],4)]%b%b,,)][ansi(%vc,|)]%r
&FN_SHEET_FEAT DSS Database=[ifelse(words(get(%0/DSS_Feats)),[u(FN_ILine,Feats)]%r[ansi(%vc,|)]%b[iter(u(FN_Sort3Col,get(%0/DSS_Feats)),[ifelse(or(eq(#@,1),mod(sub(#@,1),3)),,[ansi(%vc,|%r|%b)])][ljust(edit(##,_,%b),25)],,)][ansi(%vc,|)]%r,)]
&FN_SHEET_GEAR DSS Database=[u(FN_ILine,Gear)]%r[ansi(%vc,|)]%b[ljust([ansi(%va,Armor:)] [ifelse(isdbref(get(%0/DSS_Armor)),name(get(%0/DSS_Armor)),None)],37)][ljust([ansi(%va,Weapon:)] [ifelse(isdbref(get(%0/DSS_Weapon)),name(get(%0/DSS_Weapon)),None)],38)][ansi(%vc,|)]%r
&FN_SHEET_HEALTH DSS Database=[u(FN_ILine,Health)]%r[ansi(%vc,|)][ljust(%b[ansi(%va,Status:)] [ulocal(FN_Status,%0)] [ansi(c,\()][sub(100,div(mul(100,[u(FN_WP,%0)]),u(FN_GetAttr,%0,Body)))]\% Healthy[ansi(c,\))],38)][ljust(%b[ansi(%va,Stun Points:)]%b[u(FN_SP,%0)],38)][ansi(%vc,|%r)][if(t(default(%0/DSS_WP,0)),[ansi(%vc,|%b)][ljust([ansi(%va,Wounds:)]%b[itemize([edit([u(FN_SHEET_WP,[iter(get(%0/DSS_WP),switch(first(%i0),<2,S,<5,L,<15,M,<25,C,>26,D,Error),|)])],_,%b)],:)],74,%b)][ansi(%vc,%b|)]%r,)]
&FN_SHEET_LANG DSS Database=[u(FN_ILine,Languages)]%r[ansi(%vc,|)]%b[iter(u(FN_Sort3Col,get(%0/DSS_Languages)),[ifelse(or(eq(#@,1),mod(sub(#@,1),3)),,[ansi(%vc,|%r|%b)])][ljust([ifelse(match(##,get(%0/DSS_Lingo)),[ansi(yh,*)][ansi(wh,edit(##,_,%b))][ansi(yh,*)],edit(##,_,%b))],25)],,)][ansi(%vc,|)]%r
&FN_SHEET_POWERS DSS Database=[if(hasattr(%0,Powers),[u(FN_ILine,Powers)]%r[ansi(%vc,|)]%b[ansi(%vb,%b%bLevel[space(3)][ljust(Power,28)]%b%bLevel[space(3)][ljust(Power,27)])][ansi(%vc,|%r|%b[repeat(~,36)]%b%b[repeat(~,36)]%b|)][edit([step(#lambda/%%r\[align\(2 35 1 35 2 \,ansi\(%%vc\,|\)\,%%0\,\,%%1\,ansi\(%%vc\,|\)\,%%b\)\],[iter(lattr(%0/powers`**,|),[rjust([u(FN_Color_Num,[first(u(%0/%i0),|)])],5)][space(4)][capstr_all([edit([last(u(%0/%i0),|)],_,%b)])],|,+)],2,+)],+,)]%r,)]
&FN_SHEET_SKILL DSS Database=[if(hasattr(%0,skills),[u(FN_ILine,Skills)]%r[ansi(%vc,|)]%b[ansi(%vb,[rjust(Adj,4)]%bBase%b[ljust(Skill,28)][rjust(Adj,4)]%bBase%b[ljust(Skill,27)])][ansi(%vc,|%r| [repeat(~,36)]%b%b[repeat(~,36)]%b|)][edit([step(#lambda/%%r\[align\(2 35 1 35 2 \,ansi\(%%vc\,|\)\,%%0\,\,%%1\,ansi\(%%vc\,|\)\,%%b\)\],[iter(lattr(%0/skills`*,|),[rjust([u(FN_Color_Num,[u(FN_Adj_Skill,%0,[last(%i0,`)],[get(%0/%i0)])])],3)][rjust([u(FN_Color_Num,[get(%0/%i0)])],4,%b)]%b%b[capstr_all([edit([last(%i0,`)],_,%b)])],|,+)],2,+)],+,)]%r,)]
&FN_SHEET_TOP DSS Database=[u(FN_Header,[name(%0)]'s Sheet)]%r[ansi(%vc,|)]%b[ljust([ansi(%va,Species:)] [default(%0/Species,Not Set)],25)][ljust([ansi(%va,Gender:)] [default(%0/Sex,Anomalous)],25)][ljust([ansi(%va,Age:)] [default(%0/age,Not Set)],25)][ansi(%vc,|%r|)]%b[ljust([ansi(%va,Experience Points:)] [get(%0/DSS_XP)],25)][ljust([ansi(%va,Health:)] [u(FN_Status,%0)],50)][ansi(%vc,|)]%r
&FN_SHEET_WP DSS Database=[squish([localize([iter(S L M C D,setq(#@,words(lpos(%0,%i0))))][edit([squish([switchall(1,t(%q1),%q1_Scratch[plural(%q1,e)]%b,t(%q2),%q2_Light_Wound[plural(%q2)]%b,t(%q3),%q3_Moderate_Wound[plural(%q3)]%b,t(%q4),%q4_Critical_Wound[plural(%q4)]%b,t(%q5),%q5_Deadly_Wound[plural(%q5)]%b,)])],%b,:)])])]
&FN_SKILL_COST DSS Database=[sub(ulocal(FN_Cost,%2),ulocal(FN_Cost,default(%0/Skills`%1,0)))]
&FN_SORT2COL DSS Database=[setq(0,sort(%0,a,%1))][setq(1,ceil(fdiv(words(%q0,%1),2)))][iter(lnum(mul(2,%q1)),[setq(2,extract(%q0,add(1,mul(mod(##,2),%q1),mod(div(##,2),%q1)),1,%1))][ifelse(%q2,%q2,_)],,%1)]
&FN_SORT3COL DSS Database=[setq(0,sort(%0,a))][setq(1,ceil(fdiv(words(%q0),3)))][iter(lnum(mul(3,%q1)),[setq(2,extract(%q0,add(1,mul(mod(##,3),%q1),mod(div(##,3),%q1)),1))][ifelse(%q2,%q2,_)])]
&FN_SORT_WP DSS Database=[comp(extract(%0,2,1),extract(%1,2,1))]
&FN_SP DSS Database=[ceil(max(0,fdiv(sub(val(get(%0/DSS_SP)),secs()),60)))]
&FN_SPHEREOK DSS Database=t(setr(M,match(setr(L,setdiff(lattr(#133/*,|),CMD|CYBERNETICS_SPHERE|%1,|,|)),[if(t(%0),%0,0)]*,|)))
&FN_STATUS DSS Database=[ifelse(isdbref(%0),ifelse(match(get(%0/DSS_Feats),Dead),Dead,ifelse(match(get(%0/DSS_Feats),Unconscious),Unconscious,ifelse(gt(ulocal(FN_WP,%0),0),Injured,ifelse(gt(ulocal(FN_SP,%0),0),Dazed,Healthy)))),#-1 I can't see that here.)]
&FN_STUN DSS Database=[attrib_set(%0/DSS_SP,[add(max(secs(),val(default(%0/DSS_SP,0))),mul(60,%1))])][ulocal(me/FN_Update_Health,%0)]
&FN_SUBTYPEOK DSS Database=[t(setr(Z,match(setr(R,lattr(#133/[extract(%qL,%qM,1,|)]`*,|)),[extract(%qL,%qM,1,|)]`[if(t(%0),%0,0)]*,|)))]
&FN_TOHIT_ROLL DSS Database=[sub(%0,add(ulocal(FN_Die,%2),max(0,sub(%1,ulocal(FN_Die,ceil(mul(100,fdiv(100,abs(%2)))))))))]
&FN_UNEQUIP DSS Database=[remit(%L,[ansi(hw,<[ansi(hy,COMBAT)]>)]%b%b%b[name(%#)]%b[switch(%0,Armor,removes [poss(%#)] [first(get(%#/equipment`%0),|)],Weapon,lowers [poss(%#)] [first(get(%#/equipment`%0),|)],[u(%vd/MSG_Crit)])].)][attrib_set(%#/list`inventory,[u(#8/fun`addmass,[default(%#/list`inventory,)],edit([edit(extract(get(%#/equipment`%0),1,2,|),%b,_)],|,%b),1)])][attrib_set(%#/Equipment`%0)]
&FN_UPDATE DSS Database=[set(%0,DSS_Attrs:[vadd(setr(0,ulocal(FN_Attr_Mods,%0)),setr(1,extract(get(%0/DSS_Attrs),3,1,|)))]|[%q0]|[%q1])][u(FN_Update_Skills,%0)][u(FN_Update_Health,%0)]
&FN_UPDATE_HEALTH DSS Database=[setq(0,u(FN_SP,%0))][setq(1,u(FN_WP,%0))][setq(2,ulocal(FN_GetAttr,%0,Strength))][set(%0,DSS_Feats:[setunion(get(%0/DSS_Feats),[switch([gt(%q1,%q2)][gt(add(%q0,%q1),%q2)],1*,Dead,01,Unconscious,)])]
&FN_UPDATE_SKILLS DSS Database=[set(%0,DSS_Skills:[iter(get(%0/DSS_Skills),[extract(##,1,1)] [ulocal(FN_Adj_Skill,%0,extract(##,1,1),extract(##,3,1))] [extract(##,3,1)],|,|)])]
&FN_VADD DSS Database=vadd(%0,%1)
&FN_WOUND DSS Database=[attrib_set(%0/DSS_WP,[if(words(get(%q0/DSS_WP)),[default(%0/DSS_WP,)]|,)]%1 [secs()] [sub(secs(),3600)] Automatic)][ulocal(me/FN_Update_Health,%0)]
&FN_WP DSS Database=[ifelse(words(get(%0/DSS_WP),|),fold(FN_Add_First,get(%0/DSS_WP),0,|),0)]
&FUN_GETBASESKILL DSS Database=[ifelse(u(FN_IsAdmin,%@),[ulocal(FN_GetBaseLevel,ulocal(FN_Pmatch,secure(%0)),edit(squish(secure(%1)),%b,_))],#-1 Permission denied.)]
&FUN_GETSKILL DSS Database=[if(u(FN_IsAdmin,%@),[ulocal(FN_GetLevel,ulocal(FN_Pmatch,%0),[edit(squish(first(%1,:)),%b,_)][if(words(after(%1,:)),:[edit(squish(after(%1,:)),%b,_)],)])],#-1 Permission denied.)]
&FUN_HASFEAT DSS Database=[ifelse(u(FN_IsAdmin,%@),t(match(get(ulocal(FN_PMatch,secure(%0))/DSS_Feats),edit(squish(secure(%1)),%b,_))),#-1 Permission denied.)]
&FUN_HASSKILLS DSS Database=[ulocal(FN_HasSkills,ulocal(FN_Pmatch,secure(%0)))]
&FUN_HASWEAPON DSS Database=[isdbref(get(ulocal(FN_Pmatch,secure(%0))/DSS_WEAPON))]
&FUN_HSTATUS DSS Database=[ulocal(FN_Status,ulocal(FN_Pmatch,secure(%0)))]
&FUN_ISARMOR DSS Database=[ulocal(FN_IsArmor,secure(%0))]
&FUN_ISWEAPON DSS Database=[ulocal(FN_IsWeapon,secure(%0))]
&FUN_WEAPON DSS Database=[default(ulocal(FN_Pmatch,secure(%0))/DSS_Weapon,#-1)]
&LIST_ATTR_MODS DSS Database=
&LIST_ATTRS DSS Database=Strength Agility Coordination Wit Cognition Body
&LIST_FEATS DSS Database=
&LIST_LANGUAGES DSS Database=English German hydra Lelajivian Russian
&LIST_SKILLS DSS Database=Brawling 0 1 & 0.25_Strength 0.15_Coordination|Computers 0 1 & 0.25_Cognition 0.15_Wit|Disguise 0 1 & 0.25_Wit 0.15_Coordination|Dodge_Melee 0 1 & 0.25_Agility 0.20_Wit|Dodge_Ranged 0 1 & 0.25_Agility 0.20_Wit|Engineering 0 0 & 0.25_Coordination 0.15_Cognition 0.05_Wit|Firearms 0 1 & 0.25_Coordination 0.15_Wit|Interfacing 0 1 & 0.20_Body|Magic_Lore 0 0 & 0.25_Wit 0.15_Cognition|Perception 0 1 & 0.30_Wit|Repair 0 1 & 0.25_Coordination 0.15_Cognition|Research 0 0 & 0.25_Cognition 0.15_Wit 0.05_Coordination|Salvage 0 1 & 0.25_Wit 0.15_Coordination 0.05_Cognition|Stealth 0 1 & 0.25_Coordination 0.15_Wit|Unarmed_Combat 0 1 & 0.25_Strength 0.15_Agility 0.05_Coordination
&MSG_ABORT DSS Database=[ansi(yh,-)] %0 has aborted their attack on %1.
&MSG_ADDPOWER DSS Database=[ansi(hg,-)] You gain a power in the [ansi(y,[edit(%0,_,%b)])] of subtype [ansi(y,[edit(%1,_,%b,%0`,)])] at a value of %2.
&MSG_ATKD_RNG DSS Database=[space(11)]Defense Options:%b[ansi(hw,+WAIT)] - [ansi(hw,+DODGE)][if(t(match(default(%0/EQUIPMENT`WEAPON,),Dodge_Ranged,|)), - [ansi(hw,+QUICKSHOT)])]%rYou have [ansi(hw,10 minutes)] to react, or the attack will be [ansi(hw,+abort)]ed automatically.
&MSG_ATK_MELEE DSS Database=[ansi(hw,<[ansi(hy,COMBAT)]>)]%b%b%b[name(%0)] swings [poss(%0)] [capstr_all(edit(first(%2,|),_,%b))] at [name(%1)]!
&MSG_ATK_RNG DSS Database=[ansi(hw,<[ansi(hy,COMBAT)]>)]%b%b%b[name(%0)] fires [poss(%0)] [capstr_all(edit(first(%2,|),_,%b))] at [name(%1)]!
&MSG_ATTACK DSS Database=[remit(%L,[ansi(hw,<[ansi(hy,COMBAT)]>)]%b%b%b[name(%q0)]%b[if(gt(%q4,0),tries to dodge\, but [name(%qA)]'s attack hits and [u(FN_DAMAGE,%q6,%q5)] [obj(%q0)].,successfully dodges [name(%qA)]'s attack.)])]
&MSG_ATTACK_WAIT DSS Database=[remit(%L,[ansi(hw,<[ansi(hy,COMBAT)]>)]%b%b%b[name(%qA)][if(gt(%q4,0),'s attack hits and [u(FN_DAMAGE,%q6,%q5)] [name(%q0)].,%bshoots at [name(%q0)]\, but misses.)])]
&MSG_COMBAT DSS Database=[remit(%l,[ansi(y,%0)] [ifelse(gt(%q3,0),ansi(gh,successfully),ansi(rh,unsuccessfully))] attacks %N [ifelse(isdbref(%q2),using a [ansi(y,name(%q2))],unarmed)]. \([ansi(c,%q3)]\)[ifelse(gt(%q4,0),%rThe attack should deal [switch([gt(%qq5,0)][gt(%q6,0)],11,[ansi(ch,%q5)] stun points and [ansi(mh,%q6)] wound points,10,[ansi(ch,%q5)] stun points,01,[ansi(mh,%q6)] wound points,no damage)].)]
&MSG_CRIT DSS Database=[ansi(rh,-)] Critical error. Report this bug at once!
&MSG_ENGAGED DSS Database=[ansi(rh,-)] You are already engaged in a fight.
&MSG_ENGAGED2 DSS Database=[ansi(rh,-)] They are already engaged in a fight.
&MSG_EQUIP_ARMOR DSS Database=[ansi(hw,<[ansi(hy,COMBAT)]>)]%b%b%b[name(%#)] dons [obj(%#)] %0.
&MSG_EQUIP_WEAPON DSS Database=[ansi(hw,<[ansi(hy,COMBAT)]>)]%b%b%b[name(%#)] wields [poss(%#)] %0.
&MSG_EXP DSS Database=[ansi(rh,-)] You do not have the [ansi(y,%0)] experience points required for that.
&MSG_FAIL_RAISE DSS Database=[ansi(rh,-)] You cannot +lower [ansi(y,%0)] with +raise.
&MSG_INCAP DSS Database=[ansi(rh,-)] You are in no condition to do that.
&MSG_NOGUN DSS Database=[ansi(rh,-)] You can't shoot someone with that.
&MSG_NOTADMIN DSS Database=[ansi(rh,-)] You must be an admin to use this command.
&MSG_NOTATTR DSS Database=[ansi(rh,-)] That is not a valid attribute name.
&MSG_NOTENGAGED DSS Database=[ansi(rh,-)] You are not being attacked by anyone.
&MSG_NOTFEAT DSS Database=[ansi(rh,-)] That is not a valid feat.
&MSG_NOTLANG DSS Database=[ansi(rh,-)] That is not a valid language.
&MSG_NOTNAME DSS Database=[ansi(rh,-)] That is not a valid attribute or skill name.
&MSG_NOTPLAYER DSS Database=[ansi(rh,-)] No player with that name could be located.
&MSG_NOTRAITS DSS Database=[ansi(rh,-)] That player is not configured for the skills system yet.
&MSG_NOTSKILL DSS Database=[ansi(rh,-)] That is not a valid skill name.
&MSG_OOC DSS Database=[ansi(hr,-)] You must be 'In Character' to do that.
&MSG_PREREQS DSS Database=[ansi(rh,-)] You do not meet the prereqs to increase this trait.
&MSG_RAISE DSS Database=[ansi(gh,-)] You +raise [ansi(y,edit(%0,_,%b))] to [ansi(y,%1)] at cost of [ansi(y,%2)] experience points.
&MSG_TARGET DSS Database=[ansi(hw,<[ansi(hy,COMBAT)]>)]%b%b%bThat is not a valid target.
&MSG_TINCAP DSS Database=[ansi(rh,-)] They are already incapacitated. If you intend to kill them, please notify an Admin or Judge.
&RATING DSS Database=0
@STARTUP DSS Database=@drain %!;@notify %!;@dolist BG_Approved DSS_Armor DSS_Attrs DSS_Feats DSS_Languages DSS_Lingo DSS_Skills DSS_SP DSS_Weapon DSS_WP DSS_XP Species Status={@attribute/access/retroactive [##]=no_command no_inherit no_clone mortal_dark wizard};@dolist [lattr(%!/FUN_*)]={@function [rest(##,_)]=%!,##}
@set DSS Database/STARTUP=no_command prefixmatch
&THRESHOLD DSS Database=0
@VA DSS Database=y
@VB DSS Database=c
@VC DSS Database=b
@VD DSS Database=#156

Also, Naboo was under an attack.