Rooms: on_tick, random_act Mobiles: on_tick, random_act, if_inroom, fight_act Objects: on_tick, random_act, if_inroom, fight_act
Random events are evaluated every 6 seconds for rooms, mobiles, and objects. This is not true if it is the "on_tick" type. The actual evaluation is offset for each of these so that room, mobile, and object random events do not occur at the same time. When the random event is evaluated a 1d1000 dice is rolled and if it rolls under the value of the threshold then the random event fires. Only one random event per entity may fire on any given pass. Random trigger types are "random_act", "on_tick", "fight_act", and "if_inroom". The "on_tick" trigger is always given precedence since it may be used as a timing mechanism. The "on_tick" trigger will only be avaluated when the tick occurs. All others are evaluated in the order of their appearance in the list of triggers. The "fight_act" trigger can only fire when the mobile, or object owner is engaged in combat. When engaged in combat the "random_act" and "if_inroom" triggers cannot fire. If the dice roll fails then the next random event of the same type will need to roll under its threshold plus the failed threshold. Thus as failures occur the likelihood of a later random event being fired increases. This is a big hack ass job and you are far better off to create one random script that handles the individual probabilities itself via if statements.
Type: fight_act @n - the opponent of the script owner.
@t - The script owner (if a mobile) or the owner of the object.
@o - whatever is in the held equipment position.
@x - pointer to whatever is in the wielded position or "nothing".
Type: on_tick, random_act, if_inroom
- No extra variables are set. |