| 1 |
class ImprovedIMDialogue(object): |
|---|
| 2 |
""" mappings for the values sent in an ImprovedInstantMessage packet """ |
|---|
| 3 |
|
|---|
| 4 |
FromAgent = 0 # an instant message from another agent |
|---|
| 5 |
MessageBox = 1 # a dialogue box |
|---|
| 6 |
GroupInvitation = 3 # group invite. binary bucket contains null terminated string of member status and join cost. 0 for officer M for member. n bytes for cost |
|---|
| 7 |
InventoryOffered = 4 # inventory offer from another agent. binary bucket is a list of inventory uuid and type |
|---|
| 8 |
InventoryAccepted = 5 # inventory offer accepted |
|---|
| 9 |
InventoryDeclined = 6 # inventory offer declined |
|---|
| 10 |
GroupVote = 7 # group vote. name is person who initiated the vote id is vote id |
|---|
| 11 |
#GroupMessageDeprecated = 8 |
|---|
| 12 |
TaskInventoryOffered = 9 # inventory offer from an object |
|---|
| 13 |
TaskInventoryAccepted = 10 # inventory offer from object accepted |
|---|
| 14 |
TaskInventoryDeclined = 11 # inventory offer from object declined |
|---|
| 15 |
NewUserDefault = 12 |
|---|
| 16 |
SessionInvite = 13 # start a friends conference |
|---|
| 17 |
SessionP2PInvite = 14 # start a conference without removing offline users |
|---|
| 18 |
SessionGroupStart = 15 # start a friends conference |
|---|
| 19 |
SessionConferenceStart = 16 # start a conference w/o calling cards etc |
|---|
| 20 |
SessionSend = 17 # message to a session |
|---|
| 21 |
SessionLeave = 18 # leave a chat session |
|---|
| 22 |
MessageFromTask = 19 # message from an object |
|---|
| 23 |
BusyAutoResponse = 20 # response to an instant message by an agent who is set to busy |
|---|
| 24 |
ConsoleAndChatHistory = 21 # show the message and chat history |
|---|
| 25 |
TeleportLure = 22 # send a teleport request |
|---|
| 26 |
TeleportAccepted = 23 # agent has accepted a teleport request |
|---|
| 27 |
TeleportDeclined = 24 # agent has declined a teleport request |
|---|
| 28 |
GodTeleportLure = 25 # send a god like teleport request |
|---|
| 29 |
Unused = 26 |
|---|
| 30 |
GotoURL = 28 # tells the user to go to a url. Text message in the message field url with a trailing \0 in the binary bucket |
|---|
| 31 |
FromTaskAsAlert = 31 # alert sent from an object (not to be sent through email) |
|---|
| 32 |
GroupNotice = 32 # im from user sending a group notice |
|---|
| 33 |
GroupNoticeInventoryAccepted = 33 |
|---|
| 34 |
GroupNoticeInventoryDeclined = 34 |
|---|
| 35 |
GroupInvitationAccept = 35 |
|---|
| 36 |
GroupInvitationDecline = 36 |
|---|
| 37 |
GroupNoticeRequested = 37 |
|---|
| 38 |
FriendshipOffered = 38 # sender has offered friendship |
|---|
| 39 |
FriendshipAccepted = 39 # sender has accepted friendship offer |
|---|
| 40 |
FriendshipDeclined = 40 # sender has declined friendship offer |
|---|
| 41 |
TypingStart = 41 # sender has started typing |
|---|
| 42 |
TypingStop = 42 # sender has stopped typing |
|---|
| 43 |
|
|---|
| 44 |
class InventoryType(object): |
|---|
| 45 |
""" mappings for inventory asset type """ |
|---|
| 46 |
|
|---|
| 47 |
Texture = 0 |
|---|
| 48 |
Sound = 1 |
|---|
| 49 |
Callingcard = 2 |
|---|
| 50 |
Landmark = 3 |
|---|
| 51 |
# Script = 4 |
|---|
| 52 |
# Clothing = 5 |
|---|
| 53 |
Object = 6 |
|---|
| 54 |
Notecard = 7 |
|---|
| 55 |
Category = 8 |
|---|
| 56 |
Root_Category = 9 |
|---|
| 57 |
LSL = 10 |
|---|
| 58 |
# LSL_Bytecode = 11 |
|---|
| 59 |
# Texture_Tga = 12 |
|---|
| 60 |
# Bodypart = 13 |
|---|
| 61 |
# Trash = 14 |
|---|
| 62 |
Snapshot = 15 |
|---|
| 63 |
# Lost_and_found = 16 |
|---|
| 64 |
Attachment = 17 |
|---|
| 65 |
Wearable = 18 |
|---|
| 66 |
Animation = 19 |
|---|
| 67 |
Gesture = 20 |
|---|
| 68 |
Count = 21 |
|---|
| 69 |
NONE = -1 |
|---|
| 70 |
|
|---|
| 71 |
class PCode(object): |
|---|
| 72 |
""" classifying the PCode of objects """ |
|---|
| 73 |
|
|---|
| 74 |
Primitive = 9 # 0x09 |
|---|
| 75 |
Avatar = 47 # 0x2F |
|---|
| 76 |
Grass = 95 # 0x5F |
|---|
| 77 |
NewTree = 111 # 0x6F |
|---|
| 78 |
ParticleSystem = 143 # 0x8F |
|---|
| 79 |
Tree = 255 # 0xFF |
|---|
| 80 |
|
|---|
| 81 |
class CompressedUpdateFlags(object): |
|---|
| 82 |
""" map of ObjectData.Flags """ |
|---|
| 83 |
|
|---|
| 84 |
ScratchPad = 0x01 |
|---|
| 85 |
Tree = 0x02 |
|---|
| 86 |
contains_Text = 0x04 |
|---|
| 87 |
contains_Particles = 0x08 |
|---|
| 88 |
contains_Sound = 0x10 |
|---|
| 89 |
contains_Parent = 0x20 |
|---|
| 90 |
TextureAnim = 0x40 |
|---|
| 91 |
contains_AngularVelocity = 0x80 |
|---|
| 92 |
contains_NameValues = 0x100 |
|---|
| 93 |
MediaURL = 0x200 |
|---|
| 94 |
|
|---|
| 95 |
class ExtraParam(object): |
|---|
| 96 |
""" extended Object attributes buried in some packets """ |
|---|
| 97 |
|
|---|
| 98 |
Flexible = 0x10 |
|---|
| 99 |
Light = 0x20 |
|---|
| 100 |
Sculpt = 0x30 |
|---|
| 101 |
|
|---|
| 102 |
class ParcelFlags(object): |
|---|
| 103 |
""" Parcel Flag constants """ |
|---|
| 104 |
|
|---|
| 105 |
AllowFly = 1 << 0 # Can start flying |
|---|
| 106 |
AllowOtherScripts = 1 << 1 # Scripts by others can run. |
|---|
| 107 |
ForSale = 1 << 2 # Can buy this land |
|---|
| 108 |
ForSaleObjects = 1 << 7 # Can buy all objects on this land |
|---|
| 109 |
AllowLandmarks = 1 << 3 |
|---|
| 110 |
AllowTerraform = 1 << 4 |
|---|
| 111 |
AllowDamage = 1 << 5 |
|---|
| 112 |
CreateObjects = 1 << 6 |
|---|
| 113 |
UseAccessGroup = 1 << 8 |
|---|
| 114 |
UseAccessList = 1 << 9 |
|---|
| 115 |
UseBanList = 1 << 10 |
|---|
| 116 |
UsePassList = 1 << 11 |
|---|
| 117 |
ShowDirectory = 1 << 12 |
|---|
| 118 |
AllowDeedToGroup = 1 << 13 |
|---|
| 119 |
ContributeWithDeed = 1 << 14 |
|---|
| 120 |
SoundLocal = 1 << 15 # Hear sounds in this parcel only |
|---|
| 121 |
SellParcelObjects = 1 << 16 # Objects on land are included as part of the land when the land is sold |
|---|
| 122 |
AllowPublish = 1 << 17 # Allow publishing of parcel information on the web |
|---|
| 123 |
MaturePublish = 1 << 18 # The information on this parcel is mature |
|---|
| 124 |
URLWebPage = 1 << 19 # The "media URL" is an HTML page |
|---|
| 125 |
URLRawHTML = 1 << 20 # The "media URL" is a raw HTML string like <H1>Foo</H1> |
|---|
| 126 |
ResrictPushObject = 1 << 21 # Restrict push object to either on agent or on scripts owned by parcel owner |
|---|
| 127 |
DenyAnonomous = 1 << 22 # Deny all non identified/transacted accounts |
|---|
| 128 |
# DenyIdentified = 1 << 23 # Deny identified accounts |
|---|
| 129 |
# DenyTransacted = 1 << 24 # Deny identified accounts |
|---|
| 130 |
AllowGroupScripts = 1 << 25 # Allow scripts owned by group |
|---|
| 131 |
CreateGroupObjects = 1 << 26 # Allow object creation by group members or objects |
|---|
| 132 |
AllowAllObjectEntry = 1 << 27 # Allow all objects to enter a parcel |
|---|
| 133 |
AllowGroupObjectEntry = 1 << 28 # Only allow group (and owner) objects to enter the parcel |
|---|
| 134 |
AllowVoiceChat = 1 << 29 # Allow residents to use voice chat on this parcel |
|---|
| 135 |
UseEstateVoiceChannel = 1 << 30 |
|---|
| 136 |
DenyAgeUnverified = 1 << 31 # Prevent residents who aren't age-verified |
|---|
| 137 |
|
|---|
| 138 |
|
|---|
| 139 |
class MoneyTransactionType: |
|---|
| 140 |
""" Money transaction type constants """ |
|---|
| 141 |
|
|---|
| 142 |
Null = 0 |
|---|
| 143 |
|
|---|
| 144 |
# Codes 1000-1999 reserved for one-time charges |
|---|
| 145 |
ObjectClaim = 1000 |
|---|
| 146 |
LandClaim = 1001 |
|---|
| 147 |
GroupCreate = 1002 |
|---|
| 148 |
ObjectPublicClaim = 1003 |
|---|
| 149 |
GroupJoin = 1004 # May be moved to group transactions eventually |
|---|
| 150 |
TeleportCharge = 1100 # FF not sure why this jumps to 1100... |
|---|
| 151 |
UploadCharge = 1101 |
|---|
| 152 |
LandAuction = 1102 |
|---|
| 153 |
ClassifiedCharge = 1103 |
|---|
| 154 |
|
|---|
| 155 |
# Codes 2000-2999 reserved for recurrent charges |
|---|
| 156 |
ObjectTax = 2000 |
|---|
| 157 |
LandTax = 2001 |
|---|
| 158 |
LightTax = 2002 |
|---|
| 159 |
ParcelDirFee = 2003 |
|---|
| 160 |
GroupTax = 2004 # Taxes incurred as part of group membership |
|---|
| 161 |
ClassifiedRenew = 2005 |
|---|
| 162 |
|
|---|
| 163 |
# Codes 3000-3999 reserved for inventory transactions |
|---|
| 164 |
GiveInventory = 3000 |
|---|
| 165 |
|
|---|
| 166 |
# Codes 5000-5999 reserved for transfers between users |
|---|
| 167 |
ObjectSale = 5000 |
|---|
| 168 |
Gift = 5001 |
|---|
| 169 |
LandSale = 5002 |
|---|
| 170 |
ReferBonus = 5003 |
|---|
| 171 |
InventorySale = 5004 |
|---|
| 172 |
RefundPurchase = 5005 |
|---|
| 173 |
LandPassSale = 5006 |
|---|
| 174 |
DwellBonus = 5007 |
|---|
| 175 |
PayObject = 5008 |
|---|
| 176 |
ObjectPays = 5009 |
|---|
| 177 |
|
|---|
| 178 |
# Codes 6000-6999 reserved for group transactions |
|---|
| 179 |
# GroupJoin = 6000 # reserved for future use |
|---|
| 180 |
GroupLandDeed = 6001 |
|---|
| 181 |
GroupObjectDeed = 6002 |
|---|
| 182 |
GroupLiability = 6003 |
|---|
| 183 |
GroupDividend = 6004 |
|---|
| 184 |
MembershipDues = 6005 |
|---|
| 185 |
|
|---|
| 186 |
# Codes 8000-8999 reserved for one-type credits |
|---|
| 187 |
ObjectRelease = 8000 |
|---|
| 188 |
LandRelease = 8001 |
|---|
| 189 |
ObjectDelete = 8002 |
|---|
| 190 |
ObjectPublicDecay = 8003 |
|---|
| 191 |
ObjectPublicDelete = 8004 |
|---|
| 192 |
|
|---|
| 193 |
# Code 9000-9099 reserved for usertool transactions |
|---|
| 194 |
LindenAdjustment = 9000 |
|---|
| 195 |
LindenGrant = 9001 |
|---|
| 196 |
LindenPenalty = 9002 |
|---|
| 197 |
EventFee = 9003 |
|---|
| 198 |
EventPrize = 9004 |
|---|
| 199 |
|
|---|
| 200 |
# Codes 10000-10999 reserved for stipend credits |
|---|
| 201 |
StipendBasic = 10000 |
|---|
| 202 |
StipendDeveloper = 10001 |
|---|
| 203 |
StipendAlways = 10002 |
|---|
| 204 |
StipendDaily = 10003 |
|---|
| 205 |
StipendRating = 10004 |
|---|
| 206 |
StipendDelta = 10005 |
|---|
| 207 |
|
|---|
| 208 |
class TransactionFlags: |
|---|
| 209 |
Null = 0 |
|---|
| 210 |
SourceGroup = 1 |
|---|
| 211 |
DestGroup = 2 |
|---|
| 212 |
OwnerGroup = 4 |
|---|
| 213 |
SimultaneousContribution = 8 |
|---|
| 214 |
SimultaneousContributionRemoval = 16 |
|---|
| 215 |
|
|---|
| 216 |
|
|---|
| 217 |
|
|---|
| 218 |
class TextureIndex(object): |
|---|
| 219 |
TEX_HEAD_BODYPAINT = 0 |
|---|
| 220 |
TEX_UPPER_SHIRT = 1 |
|---|
| 221 |
TEX_LOWER_PANTS = 2 |
|---|
| 222 |
TEX_EYES_IRIS = 3 |
|---|
| 223 |
TEX_HAIR = 4 |
|---|
| 224 |
TEX_UPPER_BODYPAINT = 5 |
|---|
| 225 |
TEX_LOWER_BODYPAINT = 6 |
|---|
| 226 |
TEX_LOWER_SHOES = 7 |
|---|
| 227 |
TEX_HEAD_BAKED = 8 # Pre-composited |
|---|
| 228 |
TEX_UPPER_BAKED = 9 # Pre-composited |
|---|
| 229 |
TEX_LOWER_BAKED = 10 # Pre-composited |
|---|
| 230 |
TEX_EYES_BAKED = 11 # Pre-composited |
|---|
| 231 |
TEX_LOWER_SOCKS = 12 |
|---|
| 232 |
TEX_UPPER_JACKET = 13 |
|---|
| 233 |
TEX_LOWER_JACKET = 14 |
|---|
| 234 |
TEX_UPPER_GLOVES = 15 |
|---|
| 235 |
TEX_UPPER_UNDERSHIRT = 16 |
|---|
| 236 |
TEX_LOWER_UNDERPANTS = 17 |
|---|
| 237 |
TEX_SKIRT = 18 |
|---|
| 238 |
TEX_SKIRT_BAKED = 19 # Pre-composited |
|---|
| 239 |
TEX_HAIR_BAKED = 20 # Pre-composited |
|---|
| 240 |
TEX_COUNT = 21 |
|---|
| 241 |
|
|---|
| 242 |
class BakedIndex(object): |
|---|
| 243 |
BAKED_HEAD = 0 |
|---|
| 244 |
BAKED_UPPER = 1 |
|---|
| 245 |
BAKED_LOWER = 2 |
|---|
| 246 |
BAKED_EYES = 3 |
|---|
| 247 |
BAKED_SKIRT = 4 |
|---|
| 248 |
BAKED_HAIR = 5 |
|---|
| 249 |
BAKED_COUNT = 6 |
|---|
| 250 |
|
|---|
| 251 |
def BakedToTextureIndex(self, bakedIndex): |
|---|
| 252 |
if bakedIndex is self.BAKED_HEAD: |
|---|
| 253 |
return TextureIndex.TEX_HEAD_BAKED |
|---|
| 254 |
elif bakedIndex is self.BAKED_UPPER: |
|---|
| 255 |
return TextureIndex.TEX_UPPER_BAKED |
|---|
| 256 |
elif bakedIndex is self.BAKED_LOWER: |
|---|
| 257 |
return TextureIndex.TEX_LOWER_BAKED |
|---|
| 258 |
elif bakedIndex is self.BAKED_EYES: |
|---|
| 259 |
return TextureIndex.TEX_EYES_BAKED |
|---|
| 260 |
elif bakedIndex is self.BAKED_SKIRT: |
|---|
| 261 |
return TextureIndex.TEX_SKIRT_BAKED |
|---|
| 262 |
elif bakedIndex is self.BAKED_HAIR: |
|---|
| 263 |
return TextureIndex.TEX_HAIR_BAKED |
|---|
| 264 |
else: |
|---|
| 265 |
return -1 |
|---|
| 266 |
|
|---|
| 267 |
|
|---|
| 268 |
class WearablesIndex(object): |
|---|
| 269 |
WT_SHAPE = 0 |
|---|
| 270 |
WT_SKIN = 1 |
|---|
| 271 |
WT_HAIR = 2 |
|---|
| 272 |
WT_EYES = 3 |
|---|
| 273 |
WT_SHIRT = 4 |
|---|
| 274 |
WT_PANTS = 5 |
|---|
| 275 |
WT_SHOES = 6 |
|---|
| 276 |
WT_SOCKS = 7 |
|---|
| 277 |
WT_JACKET = 8 |
|---|
| 278 |
WT_GLOVES = 9 |
|---|
| 279 |
WT_UNDERSHIRT = 10 |
|---|
| 280 |
WT_UNDERPANTS = 11 |
|---|
| 281 |
WT_SKIRT = 12 |
|---|
| 282 |
|
|---|
| 283 |
class WearableMap(object): |
|---|
| 284 |
def __init__(self): |
|---|
| 285 |
self.map = {} |
|---|
| 286 |
|
|---|
| 287 |
self.map[BakedIndex.BAKED_HEAD] = [WearablesIndex.WT_SHAPE, WearablesIndex.WT_SKIN, WearablesIndex.WT_HAIR] |
|---|
| 288 |
self.map[BakedIndex.BAKED_UPPER] = [WearablesIndex.WT_SHAPE, WearablesIndex.WT_SKIN, WearablesIndex.WT_SHIRT, WearablesIndex.WT_JACKET, WearablesIndex.WT_GLOVES, WearablesIndex.WT_UNDERSHIRT] |
|---|
| 289 |
self.map[BakedIndex.BAKED_LOWER] = [WearablesIndex.WT_SHAPE, WearablesIndex.WT_SKIN, WearablesIndex.WT_PANTS, WearablesIndex.WT_SHOES, WearablesIndex.WT_SOCKS, WearablesIndex.WT_JACKET, WearablesIndex.WT_UNDERPANTS] |
|---|
| 290 |
self.map[BakedIndex.BAKED_EYES] = [WearablesIndex.WT_EYES] |
|---|
| 291 |
self.map[BakedIndex.BAKED_SKIRT] = [WearablesIndex.WT_SKIRT] |
|---|
| 292 |
self.map[BakedIndex.BAKED_HAIR] = [WearablesIndex.WT_HAIR] |
|---|
| 293 |
|
|---|
| 294 |
|
|---|
| 295 |
""" |
|---|
| 296 |
Contributors can be viewed at: |
|---|
| 297 |
http://svn.secondlife.com/svn/linden/projects/2008/pyogp/CONTRIBUTORS.txt |
|---|
| 298 |
|
|---|
| 299 |
$LicenseInfo:firstyear=2008&license=apachev2$ |
|---|
| 300 |
|
|---|
| 301 |
Copyright 2009, Linden Research, Inc. |
|---|
| 302 |
|
|---|
| 303 |
Licensed under the Apache License, Version 2.0 (the "License"). |
|---|
| 304 |
You may obtain a copy of the License at: |
|---|
| 305 |
http://www.apache.org/licenses/LICENSE-2.0 |
|---|
| 306 |
or in |
|---|
| 307 |
http://svn.secondlife.com/svn/linden/projects/2008/pyogp/LICENSE.txt |
|---|
| 308 |
|
|---|
| 309 |
$/LicenseInfo$ |
|---|
| 310 |
""" |
|---|
| 311 |
|
|---|
| 312 |
|
|---|