Documentation - vagos/gauzarbeit GitHub Wiki

Globals

table Gauzarbeit.Event

This is a table that holds all the different types of Events.

The types of Events are:

  • Enter
  • Greet
  • Ask
  • Do
  • Move
  • Inspect
  • Kill

void Gauzarbeit.Spawn(number x, number y, string t_name) void Gauzarbeit.Spawn(room r, string t_name)

Spawns a Thing with name t_name in the room either specified by the coordinates x and y or passed in.


Thing

Methods

string Thing:getName()

Returns the name of the Thing.

void Thing:broadcastMessage(string msg)

Sends a string to everyone in the room the Thing is in.

void Thing:gainXP(number xp)

Add the specified ammount of xp to the Thing.

void Thing:setMaxHealth(number hp)

Set the maximum health. This method also sets the Thing's current health to the specified ammount.

number Thing:getLevel()

Returns the Thing's level.

number Thing:getHP()

Returns the Thing's current health.

void Thing:doSay(Thing target, string msg)

The Thing will say something to the target.

void Thing:loseItem(Thing item)

Removes the specified item from the Thing's inventory

void Thing:dropItem(Thing item)

Drops the specified item to the floor, adding it to the room the Thing is in.

Thing Thing:getThing(string name)

Returns the Thing with the name specified that is in the current room. Returns nil otherwise.

Thing Thing:getThing(string name)

Returns the Thing with the name specified that is in the Thing's current room. Returns nil otherwise.

Thing Thing:getPlayer(string name)

Returns the Player with the name specified that is in the Thing's current room. Returns nil otherwise.

void Thing:equipItem(Thing item)

The item is added to the Thing's equipment.

void Thing:gainItem(string t_name) void Thing:gainItem(Thing item)

Add the specified item or create a Thing with the specified name to the original Thing's inventory.