Bases: object
Bases: game.creature_talking.CreatureTalking, game.creature_movement.CreatureMovement, game.creature_attacks.CreatureAttacks
Decorator used by external actions
if self.targetMode == 2 and self.target == target: self.targetMode = 0 self.target = None return
Returns a dummy party for creatures (aga None).
Remove this creature from the map, stop the brain and so on
A collection of functions that almost every other component requires
Used in exec protocolfunctions to end the function, and give a return value.
Bases: exceptions.Exception
A special exception used by game.engine.Return()
Action decorator.
Parameters: |
|
---|
Autowalk the creature using the walk patterns. This binds the action slot.
Parameters: |
|
---|
Autowalk the creature using the walk patterns. This binds the action slot.
Parameters: |
|
---|
Broadcasts a message to every player
Calculate the route from fromPos to to.
Parameters: |
|
---|
Check if the lightlevel have changed and send updates to the players.
Used by execute protocol to run a piece of code
Explains the packet structure in hex
Parameters: | packet (subclass of core.packet.TibiaPacket.) – Packet to explain. |
---|
Just a allias for pickle.dumps with protocol 2
Returns the creature with this id.
Gives you the creatures in the area.
Parameters: |
|
---|---|
Return type: | set of game.creature.Creature compatible objects |
Return the House object on this position
Get the light level relevant to the time of the day.
Return type: | int. |
---|
Returns the player with name playerName, this function only works for already loaded players.
Returns the playerID based on the name.
Return type: | int or None. |
---|
Gives you the players in the area.
Parameters: |
|
---|---|
Return type: | set of game.player.Player compatible objects |
Gives you the spectators (service.gameserver.GameProtocol) in the area.
Parameters: |
|
---|---|
Return type: |
Return the Time inside the game.
Return type: | tuple (hours, minutes, seconds). |
---|
This handles the actual step by step walking of the autowalker functions. Rarely called directly.
Returns True if anyone can see the position, otherwise False.
Load player with name playerName, return result.
Load a player with id playerId. Return result.
Loop function decorator.
Parameters: | time (float (seconds).) – Run the function every time seconds. |
---|
Looper decorator
Send a magic effect type on this position.
Make a parcel, letter, if package is not already a parcel or letter. And send it.
Move item (or count number of items) from fromPosition to toPosition (may be Position in inventory of player, or a StackPosition).
Place items into the depotId of player with a name. This can be used even if the player is offline.
Parameters: |
|
---|---|
Return type: | bool. |
Returns: | True on success, False otherwise. |
Place a item to a position
Parameters: |
|
---|---|
Return type: | int. |
Returns: | Stack position of item. |
Gives the position in a direction
Parameters: |
|
---|---|
Return type: | list. |
Returns: | New position. |
Remove all movable items on fromPos tile, to toPos tile.
Save everything, players, houses, global storage etc.
Summons a monster with name on position, set master to master.
“teleport” a item from fromPos to toPos
Parameters: |
|
---|---|
Return type: | |
Returns: | New stack position |
Returns the name of a down based on the id.
Return type: | str or None. |
---|
Return the townID based on town name.
Return type: | int or None. |
---|
Returns the position of a town passed by id
Return type: | list |
---|
Transform item to a new Id.
Parameters: |
|
---|
Send the update to a tile to all who can see the position. Note that this function does NOT replace the known tile in :mod:`game.map`’s knownMap array.
Parameters: |
|
---|
Default, orange light.
Dark light.
White light.
Full light within a area.
No light.
Light with a touch.
Light over the entier world.
For skill callback
Skill ID for axes.
Skill ID for clubs.
Skill ID for distance weapons.
Skill ID for fishing.
Skill ID for fisting.
Skill ID for shielding.
Skill ID for swords.
Inventory slot for the ammonition.
Inventory slot for the armor.
Inventory slot for the backpack.
Inventory slot for feets.
Inventory slot for the head.
Inventory slot for the right hand.
Inventory slot for legs.
Inventory slot for the necklace.
Inventory slot for the left hand.
Inventory slot for the rings.
Bases: exceptions.Exception
Bases: game.errors.BaseError
Bases: game.errors.BaseError
Bases: game.errors.BaseError
Bases: game.errors.BaseError
Bases: game.errors.BaseError
Bases: game.errors.BaseError
Bases: game.errors.BaseError
Bases: game.errors.BaseError
Bases: game.errors.BaseError
Bases: game.errors.BaseError
Bases: game.errors.BaseError
Bases: object
Bases: game.map.Tile
Bases: object
Returns a list or tuple with bottom items.
Returns a copy of this tile. Used internally for unstacking.
Returns an iterator over all creatures on this tile.
(DON’T USE THIS)
returns the first item with id equal to itemId
Returns the stackposition of that thing on this tile.
Return the number of non-ontop items (game.item.Item) (minus the ground) on this tile.
Returns the number of creatures on this tile.
Return the tile flags
Returns the number of items (game.item.Item) (minus the ground) on this tile.
Returns an iterator over all items on this tile.
Returns the thing on this stack position.
Return the number of ontop items (game.item.Item) (minus the ground) on this tile.
Returns True if the tile holds any creatures (game.creature.Creature).
Place a Creature (subclass of game.creature.Creature) on the tile.
Place an Item (game.item.Item) on the tile. This automatically deals with ontop etc.
Place an idea at the end of the item stack. This function should NOT usually be used with ontop items.
Remove a Creature (subclass of (game.creature.Creature) on the tile.
Remove the item (game.item.Item) from the tile.
Remove items with id equal itemId on this tile.
Set a flag on the tile
Set the item (can be either a creature or a item) to this stack position. stackpos is one less due to ground.
Returns the top (first) creature (subclass of game.creature.Creature) on the tile.
Returns an iterator over top items (including the ground).
Unset a flag on the tile
<uint8>floor_level floorLevel < 60
<loop>
<uint16>itemId <uint8>attributeCount / other
- itemId >= 100:
- every attributeCount (
- See attribute format
)
- itemId == 50:
- <int32> Tile flags
- itemId == 51:
- <uint32> houseId
- itemId == 0:
- skip attributeCount fields
- {
- ; -> go to next tile | -> skip the remaining y tiles (if itemId = 0, and attrNr, skip attrNr x tiles) ! -> skip the remaining x and y tiles , -> more items
}
<uint16>center X <uint16>center Y <uint8>center Z <uint8> Radius from center creature might walk <uint8> count (
<uint8> type (61 for Monster, 62 for NPC) <uint8> nameLength <string> Name
<int8> X from center <int8> Y from center
<uint16> spawntime in seconds
}
)
Attribute format:
<uint8>attributeId <char>attributeType {
- attributeType == i (
- <int32>value
) attributeType == s (
<uint16>valueLength <string with length valueLength>value) attributeType == T attributeType == F
- attributeType == l (
- <uint8>listItems <repeat this block for listItems times> -> value
)
}
}
S.unpack(str) -> (v1, v2, ...)
Return tuple containing values unpacked according to this Struct’s format. Requires len(str) == self.size. See struct.__doc__ for more on format strings.
Returns the houseId on this position, or False if none
Returns the Tile on this position.
Return the tile on this (unpacked) position.
S.unpack(str) -> (v1, v2, ...)
Return tuple containing values unpacked according to this Struct’s format. Requires len(str) == self.size. See struct.__doc__ for more on format strings.
Load sectorX.sectorY.sec. Returns True/False
Parse the code (sector data) starting at baseX,baseY. Returns the sector.
Load the sector witch holds this x,y position. Returns the result.
S.unpack(str) -> (v1, v2, ...)
Return tuple containing values unpacked according to this Struct’s format. Requires len(str) == self.size. See struct.__doc__ for more on format strings.
Returns a new instanceId
Place a creature on this position.
Remove the creature on this position.
Set the tile on this position.
S.unpack(str) -> (v1, v2, ...)
Return tuple containing values unpacked according to this Struct’s format. Requires len(str) == self.size. See struct.__doc__ for more on format strings.
Unload sectorX.sectorY, loaded into instanceId
Bases: game.creature.Creature
This function verify if the tile is walkable in a regular state (pathfinder etc) This function handle things like PZ.
Bases: object
Bases: object
Bases: object
Bases: game.creature.Creature
Bases: object
Bases: game.monster.MonsterBrain
Bases: object
Bases: game.creature_talking.PlayerTalking, game.creature_attacks.PlayerAttacks, game.creature.Creature
# Light stuff self.lightLevel = 0x7F self.lightColor = 27
Bases: object
Bases: object
Bases: exceptions.Exception
Bases: game.scriptsystem.Scripts
Bases: game.scriptsystem.TriggerScripts
Bases: object
Bases: object
Bases: object
Bases: game.spell.Spell
Bases: object
Bases: object
Set the capasity formula to formula
Return the description (name) of the vocation
Set the maximum health formula to formula
Set the maximum mana formula to formula.
Return the maximum capasity for level level
Return the maximum health for level level.
Return the maximum mana for level level.
Set max soul value to soul
Set the melee constant, used in melee damage formulas.
Set the magic level constant.
Get the vocation by name
Get the vocation by id
Register a new vocation, and return the Vocation object
Bases: object
Bases: object
Bases: object