|
Atrinik Server 2.5
|
Functions | |
| static PyObject * | Atrinik_Player_GetEquipment (Atrinik_Player *pl, PyObject *args) |
| static PyObject * | Atrinik_Player_CanCarry (Atrinik_Player *pl, PyObject *what) |
| static PyObject * | Atrinik_Player_GetSkill (Atrinik_Player *pl, PyObject *args) |
| static PyObject * | Atrinik_Player_AddExp (Atrinik_Player *pl, PyObject *args) |
| static PyObject * | Atrinik_Player_WriteToSocket (Atrinik_Player *pl, PyObject *args) |
| static PyObject * | Atrinik_Player_BankDeposit (Atrinik_Player *pl, PyObject *args) |
| static PyObject * | Atrinik_Player_BankWithdraw (Atrinik_Player *pl, PyObject *args) |
| static PyObject * | Atrinik_Player_BankBalance (Atrinik_Player *pl, PyObject *args) |
| static PyObject * | Atrinik_Player_SwapApartments (Atrinik_Player *pl, PyObject *args) |
| static PyObject * | Atrinik_Player_ExecuteCommand (Atrinik_Player *pl, PyObject *args) |
| static PyObject * | Atrinik_Player_DoKnowSpell (Atrinik_Player *pl, PyObject *args) |
| static PyObject * | Atrinik_Player_AcquireSpell (Atrinik_Player *pl, PyObject *args) |
| static PyObject * | Atrinik_Player_DoKnowSkill (Atrinik_Player *pl, PyObject *args) |
| static PyObject * | Atrinik_Player_AcquireSkill (Atrinik_Player *pl, PyObject *args) |
| static PyObject * | Atrinik_Player_FindMarkedObject (Atrinik_Player *pl, PyObject *args) |
| static PyObject * | Atrinik_Player_Sound (Atrinik_Player *pl, PyObject *args, PyObject *keywds) |
| static PyObject * | Atrinik_Player_Examine (Atrinik_Player *pl, PyObject *args) |
Functions that can only be used on players (not the objects they are controlling).
To access object's player controller, you can use something like:
activator = WhoIsActivator() player = activator.Controller()
In the above example, player points to the player structure (which Python is wrapping) that is controlling the object 'activator'. In this way, you can, for example, use something like this to get player's save bed, among other things:
print(WhoIsActivator().Controller().savebed_map)
| static PyObject* Atrinik_Player_AcquireSkill | ( | Atrinik_Player * | pl, |
| PyObject * | args | ||
| ) | [static] |
Player will learn skill.
| skill | ID of the skill to learn. |
Definition at line 411 of file atrinik_player.c.
| static PyObject* Atrinik_Player_AcquireSpell | ( | Atrinik_Player * | pl, |
| PyObject * | args | ||
| ) | [static] |
Player acquires the specified spell.
| spell | ID of the spell to acquire. |
| learn | If False, the player will forget the spell instead. |
Definition at line 368 of file atrinik_player.c.
| static PyObject* Atrinik_Player_AddExp | ( | Atrinik_Player * | pl, |
| PyObject * | args | ||
| ) | [static] |
Add (or subtract) experience.
| skill | ID of the skill to receive/lose exp in. |
| exp | How much exp to gain/lose. |
| exact | If True, the given exp will not be capped. |
Definition at line 196 of file atrinik_player.c.
| static PyObject* Atrinik_Player_BankBalance | ( | Atrinik_Player * | pl, |
| PyObject * | args | ||
| ) | [static] |
Figure out how much money player has in bank.
Definition at line 284 of file atrinik_player.c.
| static PyObject* Atrinik_Player_BankDeposit | ( | Atrinik_Player * | pl, |
| PyObject * | args | ||
| ) | [static] |
Deposit money to bank.
| text | How much money to deposit, in string representation. |
Definition at line 242 of file atrinik_player.c.
| static PyObject* Atrinik_Player_BankWithdraw | ( | Atrinik_Player * | pl, |
| PyObject * | args | ||
| ) | [static] |
Withdraw money from bank.
| text | How much money to withdraw, in string representation. |
Definition at line 264 of file atrinik_player.c.
| static PyObject* Atrinik_Player_CanCarry | ( | Atrinik_Player * | pl, |
| PyObject * | what | ||
| ) | [static] |
Check whether the player can carry the object 'what', taking weight limit into consideration.
| what | Object that player wants to get. This can be the exact weight to check instead of calculating the object's weight. |
| ValueError | if 'what' is neither an object nor an integer. |
Definition at line 121 of file atrinik_player.c.
| static PyObject* Atrinik_Player_DoKnowSkill | ( | Atrinik_Player * | pl, |
| PyObject * | args | ||
| ) | [static] |
Check if player knows a given skill.
| skill | ID of the skill to check for. |
Definition at line 395 of file atrinik_player.c.
| static PyObject* Atrinik_Player_DoKnowSpell | ( | Atrinik_Player * | pl, |
| PyObject * | args | ||
| ) | [static] |
Check if player knows a given spell.
| spell | ID of the spell to check for. |
Definition at line 351 of file atrinik_player.c.
| static PyObject* Atrinik_Player_Examine | ( | Atrinik_Player * | pl, |
| PyObject * | args | ||
| ) | [static] |
Makes player examine the specified object.
| obj | Object to examine. |
Definition at line 467 of file atrinik_player.c.
| static PyObject* Atrinik_Player_ExecuteCommand | ( | Atrinik_Player * | pl, |
| PyObject * | args | ||
| ) | [static] |
Make player execute a command.
| command | Command to execute. |
| AtrinikError | if player is not in a state to execute commands. |
Definition at line 320 of file atrinik_player.c.
| static PyObject* Atrinik_Player_FindMarkedObject | ( | Atrinik_Player * | pl, |
| PyObject * | args | ||
| ) | [static] |
Find marked object in player's inventory.
Definition at line 430 of file atrinik_player.c.
| static PyObject* Atrinik_Player_GetEquipment | ( | Atrinik_Player * | pl, |
| PyObject * | args | ||
| ) | [static] |
Get a player's current equipment for a given slot.
| slot | One of PLAYER_EQUIP_xxx constants. |
| ValueError | if 'slot' is lower than 0 or higher than PLAYER_EQUIP_MAX. |
Definition at line 95 of file atrinik_player.c.
| static PyObject* Atrinik_Player_GetSkill | ( | Atrinik_Player * | pl, |
| PyObject * | args | ||
| ) | [static] |
Get skill or experience object.
| type | One of:
|
| id | ID of the skill/experience. |
| ValueError | if 'type' or 'id' parameters are not valid. |
Definition at line 153 of file atrinik_player.c.
| static PyObject* Atrinik_Player_Sound | ( | Atrinik_Player * | pl, |
| PyObject * | args, | ||
| PyObject * | keywds | ||
| ) | [static] |
Play a sound to the specified player.
| filename | Sound file to play. |
| type | Sound type being played, one of Sound command types. |
| x | X position where the sound is playing from. Can be 0. |
| y | Y position where the sound is playing from. Can be 0. |
| loop | How many times to loop the sound, -1 for infinite number. |
| volume | Volume adjustment. |
Definition at line 446 of file atrinik_player.c.
| static PyObject* Atrinik_Player_SwapApartments | ( | Atrinik_Player * | pl, |
| PyObject * | args | ||
| ) | [static] |
Swaps oldmap apartment with newmap one.
Copies old items from oldmap to newmap at x, y and saves the map.
| oldmap | The old apartment map. |
| oldmap | The new apartment map. |
| x | X position to copy the items to. |
| y | Y position to copy the items to. |
Definition at line 301 of file atrinik_player.c.
| static PyObject* Atrinik_Player_WriteToSocket | ( | Atrinik_Player * | pl, |
| PyObject * | args | ||
| ) | [static] |
Send a socket command to player's client. This can be used to fake a book GUI, for example.
| command_id | The command's ID to send. |
| command_data | Data to send. |
Definition at line 219 of file atrinik_player.c.
1.7.4