-
Notifications
You must be signed in to change notification settings - Fork 0
/
CORE 10 - Global Parents.txt
136 lines (84 loc) · 9.97 KB
/
CORE 10 - Global Parents.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
@@ Core
@cmdquota me=99999
@skip isdbref(tag(setr(1,gm)))={@assert/inline isdbref(globalroom())=@pemit %#=ERROR: No master room set!;@assert/inline isdbref(setr(0,create(Wizard Doing It,u(#acc/FN.RANDOM_PASSWORD),p)))=@pemit %#=ERROR: Could not create code object %q1: %q0;@set %q0=INDESTRUCTIBLE GUILDMASTER NO_MODIFY FREE;@power/coun %q0=free_quota tel_anything tel_anywhere;@tag/add %q1=%q0;@tel %q0=[tag(stor)];@limit/dmod %q0=-1}
@dolist/inline/delimit | globobj~Object|globthing~Thing|globexit~Exit|globplayer~Player|globroom~Room=@skip isdbref(tag(setr(1,before(%d0,~))))={@assert/inline isdbref(tag(stor))=@pemit %#=ERROR: No storage object installed!;@assert/inline isdbref(setr(0,create(Global Parent [after(%d0,~)],,t)))=@pemit %#=ERROR: Could not create code object: %q0;@set %q0=VISUAL INDESTRUCTIBLE NO_MODIFY NO_COMMAND;@tag/add %q1=%q0;@tel %q0=[tag(stor)];@chown/preserve %q0=[tag(gm)];@power/coun %q0=FORMATTING;@if !strmatch(%d0,globobj~*)=@parent %q0=[tag(globobj)]}
@skip isdbref(tag(setr(1,stat_parent)))={@assert/inline isdbref(tag(stor))=@pemit %#=ERROR: No storage object set!;@assert/inline isdbref(setr(0,create(Stat Parent,,t)))=@pemit %#=ERROR: Could not create code object %q1: %q0;@set %q0=INDESTRUCTIBLE SAFE NO_COMMAND NO_MODIFY VISUAL;@tag/add %q1=%q0;@tel %q0=[tag(stor)]}
@skip isdbref(tag(setr(1,reg_parent)))={@assert/inline isdbref(tag(stor))=@pemit %#=ERROR: No storage object set!;@assert/inline isdbref(setr(0,create(Region Parent,,t)))=@pemit %#=ERROR: Could not create code object %q1: %q0;@set %q0=INDESTRUCTIBLE SAFE NO_COMMAND NO_MODIFY VISUAL;@tag/add %q1=%q0;@tel %q0=[tag(stor)]}
@skip isdbref(tag(setr(1,obj_parent)))={@assert/inline isdbref(tag(stor))=@pemit %#=ERROR: No storage object set!;@assert/inline isdbref(setr(0,create(Gameobject Parent,,t)))=@pemit %#=ERROR: Could not create code object %q1: %q0;@set %q0=INDESTRUCTIBLE SAFE NO_COMMAND NO_MODIFY VISUAL;@tag/add %q1=%q0;@tel %q0=[tag(stor)]}
@skip isdbref(tag(setr(1,item_parent)))={@assert/inline isdbref(tag(stor))=@pemit %#=ERROR: No storage object set!;@assert/inline isdbref(setr(0,create(Item Parent,,t)))=@pemit %#=ERROR: Could not create code object %q1: %q0;@set %q0=INDESTRUCTIBLE SAFE NO_COMMAND NO_MODIFY VISUAL;@tag/add %q1=%q0;@tel %q0=[tag(stor)];@parent %q0=[tag(obj_parent)]}
@skip isdbref(tag(setr(1,equip_parent)))={@assert/inline isdbref(tag(stor))=@pemit %#=ERROR: No storage object set!;@assert/inline isdbref(setr(0,create(Equipment Parent,,t)))=@pemit %#=ERROR: Could not create code object %q1: %q0;@set %q0=INDESTRUCTIBLE SAFE NO_COMMAND NO_MODIFY VISUAL;@tag/add %q1=%q0;@tel %q0=[tag(stor)];@parent %q0=[tag(item_parent)]}
@skip isdbref(tag(setr(1,structure_parent)))={@assert/inline isdbref(tag(stor))=@pemit %#=ERROR: No storage object set!;@assert/inline isdbref(setr(0,create(Structure Parent,,t)))=@pemit %#=ERROR: Could not create code object %q1: %q0;@set %q0=INDESTRUCTIBLE SAFE NO_COMMAND NO_MODIFY VISUAL;@tag/add %q1=%q0;@tel %q0=[tag(stor)];@parent %q0=[tag(obj_parent)]}
@skip isdbref(tag(setr(1,vehicle_parent)))={@assert/inline isdbref(tag(stor))=@pemit %#=ERROR: No storage object set!;@assert/inline isdbref(setr(0,create(Vehicle Parent,,t)))=@pemit %#=ERROR: Could not create code object %q1: %q0;@set %q0=INDESTRUCTIBLE SAFE NO_COMMAND NO_MODIFY VISUAL;@tag/add %q1=%q0;@tel %q0=[tag(stor)];@parent %q0=[tag(structure_parent)]}
@skip isdbref(tag(setr(1,char_parent)))={@assert/inline isdbref(tag(stor))=@pemit %#=ERROR: No storage object set!;@assert/inline isdbref(setr(0,create(Character Parent,,t)))=@pemit %#=ERROR: Could not create code object %q1: %q0;@set %q0=INDESTRUCTIBLE SAFE NO_COMMAND NO_MODIFY VISUAL;@tag/add %q1=%q0;@tel %q0=[tag(stor)];@parent %q0=[tag(obj_parent)]}
@skip isdbref(tag(setr(1,npc_parent)))={@assert/inline isdbref(tag(stor))=@pemit %#=ERROR: No storage object set!;@assert/inline isdbref(setr(0,create(NPC Parent,,t)))=@pemit %#=ERROR: Could not create code object %q1: %q0;@set %q0=INDESTRUCTIBLE SAFE NO_COMMAND NO_MODIFY VISUAL;@tag/add %q1=%q0;@tel %q0=[tag(stor)];@parent %q0=[tag(char_parent)]}
@skip isdbref(tag(setr(1,pc_parent)))={@assert/inline isdbref(tag(stor))=@pemit %#=ERROR: No storage object set!;@assert/inline isdbref(setr(0,create(PC Parent,,t)))=@pemit %#=ERROR: Could not create code object %q1: %q0;@set %q0=INDESTRUCTIBLE SAFE NO_COMMAND VISUAL;@tag/add %q1=%q0;@tel %q0=#stor;@parent %q0=[tag(char_parent)]}
@dolist/inline stat reg obj item equip structure vehicle char npc pc={@chown/preserve [tag(%d0_parent)]=#gm}
@@ Game Objects
@amove #obj_parent=handle_relocate
@@ General Objects
&ZONE.ENTER #globobj=@dolist/inline %1={@if hasattr(%!/ZONE.ENTER.%d0)={@attach %!/ZONE.ENTER.%d0=%0,%1}}
@@ %0 - target, %1 - totem list
&ZONE.LEAVE #globobj=@dolist/inline %1={@if hasattr(%!/ZONE.LEAVE.%d0)={@attach %!/ZONE.LEAVE.%d0}}
@@ %0 - target, %1 - totem list
&MANY_TRIGGER #globobj=@if words(setr(!,lattrp_full(%!/%0_*),attrs))=@dolist/inline/nobreak %q<attrs>={@attach %!/%d0}
@aenter #globobj
@aleave #globobj
&LK.TRUE #globobj=t(%1)
&LK.GTEBITTYPE #globobj=if(gtebittype(%#,%1),%1)
&LK.ISAPPROVED #globobj=isapproved(%#)
@@ Players
&TIMEZONE #globplayer=UTC
@@ Rooms
@aenter #globroom=@attach %!/GAME.AENTER
@aleave #globroom
&LK.TELEPORT #globroom=privatize(1,if(isdbref(setr(!,upzone(%!),up)),u(%q<up>/FN.ACCESS,%#),0))
@lock/TportLock #globroom=LK.TELEPORT/1
&FN.LOCATION #globroom=iter(revwords(upzones(%!)),cname(%i0)[if(gtebittype(%#,2),%B\([num(%i0)]\))],%b,%b=>%b)
&FN.INFOBOX #globroom=[wrap([ansi(hw,Location:)]%b[u(FN.LOCATION,%!)],sub(width(%#),2),left,setr(!,ansi(confoverride(%#,BORDER),|),bord),%q<bord>,,)]
@nameformat #globroom=[header(cname(%!)[if(gtebittype(%#,2),%B\(%!\))],%#,,1)][if(strlen(setr(!,u(FN.INFOBOX),infobox)),%R%q<infobox>)]
&formatdesc #globroom=[if(strlen(%0),[separator(Description,%#,,1)]%R[wrap(%0,sub(width(%#),2),left,setr(!,ansi(confoverride(%#,BORDER),|),bord),%q<bord>,,)])]
&descformat #globroom=u(FORMATDESC,%0,%1,%2,%3,%4,%5)
&FIL.TOTEM #globroom=hastotem(%0,%1)
&FN.GETNAME #globroom=cname(%0)[if(controls(%#,%0),%B([num(%0)]))]
&FN.FORMATOBJ_COLUMN #globroom=if(gtebittype(%#,2),printf($1.&:%3:s $-5s $-|"25s $-|"42s $1.&:%3:s,%R,ansi(%2,Dbref),ansi(%2,Name),ansi(%2,Short-Desc),%R),printf($1.&:%3:s $-|"25s $-|"48s $1.&:%3:s,%R,ansi(%2,Name),ansi(%2,Short-Desc),%R))
&FN.FORMATOBJ_ROW #globroom=if(gtebittype(%#,2),printf($1.&:%3:s $-5s $-|"25s $-|"42s $1.&:%3:s,%R,num(%0),cname(%0),default(%0/short-desc,???),%R),printf($1.&:%3:s $-|"25s $-|"48s $1.&:%3:s,%R,cname(%0),default(%0/short-desc,???),%R))
&FN.FORMATOBJ_COLUMN_PCS #globroom=if(gtebittype(%#,2),printf($1.&:%3:s $-5s $-|"21s $-|"37s $-4s $-3s $1.&:%3:s,%R,ansi(%2,Dbref),ansi(%2,Name),ansi(%2,Short-Desc),ansi(%2,Idle),ansi(%2,RP),%R),printf($1.&:%3:s $-|"21s $-|"43s $-4s $-3s $1.&:%3:s,%R,ansi(%2,Name),ansi(%2,Short-Desc),ansi(%2,Idle),ansi(%2,RP),%R))
&FN.FORMATOBJ_ROW_PCS #globroom=if(gtebittype(%#,2),printf($1.&:%3:s $-5s $-|"21s $-|"37s $4s $-3s $1.&:%3:s,%R,num(%0),cname(%0),default(%0/short-desc,???),hideidle(%0),default(%0/RPSTATUS,OOC),%R),printf($1.&:%3:s $-|"21s $-|"43s $4s $-3s $1.&:%3:s,%R,cname(%0),default(%0/short-desc,???),hideidle(%0),default(%0/RPSTATUS,OOC),%R))
&FN.FORMATSECTION #globroom=[separator(%0,%#,,1)]%R[if(hasattrp(%!/FN.FORMATOBJ_COLUMN_%0),u(FN.FORMATOBJ_COLUMN_%0,%0,%1,%2,%3),u(FN.FORMATOBJ_COLUMN,%0,%1,%2,%3))]%R[trim(iter(%1,if(hasattrp(%!/FN.FORMATOBJ_ROW_%0),u(FN.FORMATOBJ_ROW_%0,%i0,%1,%2,%3),u(FN.FORMATOBJ_ROW,%i0,%1,%2,%3)),%b,%r),b,%r)]
&FIL.HASAFTER #globroom=t(words(after(%0,~)))
&TOTEM_FILTERS #globroom=PCs~PC|NPCs~NPC|Items~ITEM|Structures~STRUCTURE|Regions~Region
&FN.FILTERCON #globroom=[trim(iter(v(TOTEM_FILTERS),setq(!,filter(%!/FIL.TOTEM,%0,%b,%b,after(%i0,~)),before(%i0,~)),|,%B))][setq(!,setdiff(%0,iter(v(TOTEM_FILTERS),r(before(%i0,~)),|,%B)),Objects)]
@conformat #globroom=[if(words(%0),[null(u(FN.FILTERCON,%0))][setq(!,ansi(confoverride(%#,BORDER),|),bord)][setq(!,confoverride(%#,COLUMN),col)][trim(iter(filter(%!/FIL.HASAFTER,iter([v(TOTEM_FILTERS)]|Objects,[before(%i0,~)]~[r(before(%i0,~))],|,|),|,|),%R[u(FN.FORMATSECTION,before(%i0,~),after(%i0,~),%q<col>,%q<bord>)],|,),b,%R)])]
&FN.FORMATEXITS #globroom=separator(%0,%#,,1)%R[printf($1.&:%3:s $-5s $-12s $-55s $1.&:%3:s,%R,ansi(%2,Alias),ansi(%2,Name),ansi(%2,Destination),%R)]%R[trim(iter(%1,printf($1.&:%3:s $-5s $-12s $-55s $1.&:%3:s,%R,getalias(%i0),cname(%i0),cname(loc(%i0)),%R),%B,%R),b,%R)]
@exitformat #globroom=[if(cor(words(%0),words(%2)),[setq(!,confoverride(%#,COLUMN),col)][setq(!,ansi(confoverride(%#,BORDER),|),bord)][if(words(%0),u(FN.FORMATEXITS,Exits,%0,%q<col>,%q<bord>)%R)][if(words(%2),[u(FN.FORMATEXITS,Dark Exits,%2,%q<col>,%q<bord>)]%R)])][footer(,%#,,1)]
@@ Things
@enter #globthing=You enter the [cname(%!)].
@oenter #globthing=enters the [cname(%!)].
@aenter #globthing=@attach %!/GAME.AENTER;@attach %!/MANY_TRIGGER=AENTER
@aleave #globthing=@attach %!/MANY_TRIGGER=ALEAVE
@leave #globthing=You leave the [cname(%!)].
@oleave #globthing=leaves the [cname(%!)].
@oxleave #globthing=emerges from the [cname(%!)].
@@ Exits
@success #globexit=You take the [cname(%!)] exit to [cname(loc(%!))].
@osuccess #globexit=takes the [cname(%!)] exit to [cname(loc(%!))].
&LOCK_BASIC #globexit=[cor(gtebittype(%#,2),lmin(1 [iter(lattrp_full(%!,LOCK_BASIC_*),if(u(%!/%i0,%0,%1,%i0),1,0[ibreak()]))]))]
@lock/basic #globexit=LOCK_BASIC/1
@@ Game Objects Parent
&CAN_EQUIP #obj_parent=#-1 [cname(%!)] isn't equippable gear!
&CAN_REMOVE #obj_parent=u(CAN_EQUIP,%0,%1)
@@ Character Parent
@lock/basic #char_parent=LK.TRUE/0
@lock/enter #char_parent=LK.TRUE/0
@@ NPC Parent
@lock/receive #char_parent=LK.TRUE/0
@lock/givelock #char_parent=LK.TRUE/0
@@ PC Parent
@lock/givelock #char_parent=LK.TRUE/1
@@ Region Parent
@set #reg_parent=ZONEMASTER
&LK.BUILDERS #reg_parent=[cor(gtebittype(%#,4),cand(gtebittype(%#,1),t(match(v(BUILDERS),%:))))]
@lock/ZoneToLock #reg_parent=LK.BUILDERS/1
@lock/ZoneWizLock #reg_parent=LK.BUILDERS/1
@set #reg_parent=!ZONEMASTER
&FN.ACCESS #reg_parent=cor(elock(%!/TportLock,%0),privatize(1,if(isdbref(setr(!,upzone(%!),up)),u(%q<up>/FN.ACCESS,%0),0)))