Code:
Name: 'Sorting - donation', VNum: [ 3071], RNum: [ 344]
Trigger Intended Assignment: Mobiles
Trigger Type: Global Random , Numeric Arg: 100, Arg list: None
Commands:
get all
while %self.inventory%
if %self.inventory.type% == GUN
put %self.inventory.name.charat(1)% xxweapon
elseif %self.inventory.type% == ARMOR
put %self.inventory.name.charat(1)% xxarmor
elseif %self.inventory.type% == WORN
put %self.inventory.name.charat(1)% xxarmor
elseif %self.inventory.type% == AMMO
put %self.inventory.name.charat(1)% xxammo
elseif %self.inventory.type% == WEAPON
put %self.inventory.name.charat(1)% xxweapon
elseif %self.inventory.type% == GRENADE
put %self.inventory.name.charat(1)% xxweapon
else
put %self.inventory.name.charat(1)% xxaccess
end
done
You will need to create the mob and the lockers for each type of item you have. Give the lockers the weird xxarmor keywords accordingly. If you remove the guns, grenades and ammo above it should go into stock TbaMUD flawlessly. Armor and Worn in to the armor locker, weapons into weapons and everything else goes into the accessory locker.
Here is how our donation room looks on CyberASSAULT for reference.
Code:
[ 3063] Ordinance Storage [Donation] [ NO_MOB PEACEFUL NO_TP ]
This small undecorated room is where the Old Armory use to keep its weapon
and equipment stores. Although much of the weapon and ammo racks have been
looted, perhaps a few items are still present and in working order. A thick
layer of soot covers everything. A flight of steps leads up towards the rest of
the base. Loud noises come drifting out of a small room to the east- it looks
as though some bad-tempered dude has set up shop there.
[3051] A locker for storing ammo stands here. Type look in locker to see what's inside!
[3063] A locker for storing weapons stands here. Type look in 2.locker to see what's inside!
[3064] A locker for storing armor stands here. Type look in 3.locker to see what's inside!
[3065] A locker for other accessories stands here. Type look in 4.locker to see what's inside!
Renholder is standing here, surrounded by a silver aura.
[3071] [TRIGS] A beautiful woman labors endlessly to keep the place clean.
[ Exits: East West Up ]
a stat on the locker for reference.
Code:
Name: 'accessory locker', Keywords: accessory locker xxaccessoryxx accessories
VNum: [ 3065], RNum: [ 1081], Idnum: [1300473], Type: CONTAINER, SpecProc: None
L-Desc: 'A locker for other accessories stands here. Type look in 4.locker to see what's inside!'
A-Desc: '<None>'
Extra descs: [accessory locker]
Can be worn on: NOBITS
Perm bits : NOBITS
Extra flags : NOBITS