Main Connecting Starting



Building: Mobiles

How do I make them respond to tells?

See the tells doc.

How do I equip them?

See default clothing first. If this doesn't meet your needs use autocloned objects to give them the equipment. Then you can use additional properties like "auto.0.worn" or "auto.0.wield", which if set to 1 will mean "Make the owner of this autoobject wear/wield these clones."

If you want a mobile to have cash for any reason, you should never set the $cash property on them, as this will never be reset or get moved to live when we swap. Instead, set 'initcash' to be the amount of credits they shoul have, and it will be set to this amount on reset.

See help addauto for a helper command.

How do I make them NOT respond to tells?

flags mobile canttalk 1

How do I make my mob aggressive (ie attacks players on sight)

There's an 'aggr' variable between 0 and 100 on mobiles which controls how quick they are to attack players. (defaults to 0, of course). There is also !aggr which you can add on through a trap or plan to temporarily change their aggression level until they are reset. This over-rides the normal aggr while it exists.

How do I make my mobile help its friends in a fight?

If they are in the same location as the friends, make sure they have (explicitly) the same 'nation' property as the friends. If otherwise, you'll need to write a trap. Look at the hippies in enozon for an example.

How do I stop a mobile intervening in a fight?

Return 1 from its before_joinin trap. o2 will be the mobile it would attack.

How do I make my mobile be attackable even though it's in a peaceful location?

Set the 'nation' property to 'evil', or if you need more sensitive control, return 1 from its unjust trap.

how do I get my mobile to attack other mobiles?

Aggressive 'evil' mobiles will attack other mobiles who aren't evil, and aren't flagged Surrendered. Mobiles with the 'predator' nation will attack anything.

How do I make my mobile sit on a chair?

Set siton.start on the mobile to the id of the chair.

How do I make my mobile sit on an autocloned chair?

If the chair is say, auto.0 on the room, make auto.0.seatfor be the id of the mobile. On a zone reset the mobile will be sat on the chair.

How do I make them wander around

Set the Wander flag on them. The default delay is 8-12 seconds. To set a custom delay, set 'wander.time' on the mobile.

How do I make them wander, but in a limited area?

You have two options. Either use a before_wander trap on them (o1=mobile, o2=candidate destination, return 1 to not go there), or you can just set the WanderZone flag on the mob too. Then it will be limited to the zone its part of. If you want to limit it to a zone its not part of, use the 'wander.zone' property. If you have wander.zone and WanderZone set the behaviour is undefined.

How do I make them rant?

  flags mobile ranter 1
  chstr mobile rant.0 say my name is Bob!
  chstr mobile rant.1 emote likes Cheese! And Fish!
  chint mobile rant.count 2

(optional)
  chint mobile rant.speed seconds-between-rants

How do I make them bar players from moving?

There are 7 flags. RefuseMove (equivilant to BarAll), and BarNorth, BarEast, BarSouth, BarWest, BarUp and BarDown.

If these are set on a mobile they'll bar any player or mobile from going in that direction. The before_bar trap is triggered before the barring is done and if "return 1" is done in a before_bar trap that mobile will let the person past silently.

Mobiles can be configured to allow past a particular nation, by setting the "allowpast" property. For example, if a mobile had BarUp and allowpast "british", he would stop all non-british players and mobiles from going up.

Set the barwhy property on the mobile to make him 'say' that as the reason for blocking.