|
Atrinik Server 2.5
|
Functions | |
| static PyObject * | Atrinik_LoadObject (PyObject *self, PyObject *args) |
| static PyObject * | Atrinik_ReadyMap (PyObject *self, PyObject *args) |
| static PyObject * | Atrinik_FindPlayer (PyObject *self, PyObject *args) |
| static PyObject * | Atrinik_PlayerExists (PyObject *self, PyObject *args) |
| static PyObject * | Atrinik_WhoAmI (PyObject *self, PyObject *args) |
| static PyObject * | Atrinik_WhoIsActivator (PyObject *self, PyObject *args) |
| static PyObject * | Atrinik_WhoIsOther (PyObject *self, PyObject *args) |
| static PyObject * | Atrinik_WhatIsEvent (PyObject *self, PyObject *args) |
| static PyObject * | Atrinik_GetEventNumber (PyObject *self, PyObject *args) |
| static PyObject * | Atrinik_WhatIsMessage (PyObject *self, PyObject *args) |
| static PyObject * | Atrinik_GetOptions (PyObject *self, PyObject *args) |
| static PyObject * | Atrinik_GetReturnValue (PyObject *self, PyObject *args) |
| static PyObject * | Atrinik_SetReturnValue (PyObject *self, PyObject *args) |
| static PyObject * | Atrinik_GetEventParameters (PyObject *self, PyObject *args) |
| static PyObject * | Atrinik_GetSpellNr (PyObject *self, PyObject *args) |
| static PyObject * | Atrinik_GetSpell (PyObject *self, PyObject *args) |
| static PyObject * | Atrinik_GetSkillNr (PyObject *self, PyObject *args) |
| static PyObject * | Atrinik_RegisterCommand (PyObject *self, PyObject *args) |
| static PyObject * | Atrinik_CreatePathname (PyObject *self, PyObject *args) |
| static PyObject * | Atrinik_GetTime (PyObject *self, PyObject *args) |
| static PyObject * | Atrinik_LocateBeacon (PyObject *self, PyObject *args) |
| static PyObject * | Atrinik_FindParty (PyObject *self, PyObject *args) |
| static PyObject * | Atrinik_CleanupChatString (PyObject *self, PyObject *args) |
| static PyObject * | Atrinik_LOG (PyObject *self, PyObject *args) |
| static PyObject * | Atrinik_DestroyTimer (PyObject *self, PyObject *args) |
| static PyObject * | Atrinik_GetRangeVectorFromMapCoords (PyObject *self, PyObject *args) |
| static PyObject * | Atrinik_CostString (PyObject *self, PyObject *args) |
| static PyObject * | Atrinik_CacheAdd (PyObject *self, PyObject *args) |
| static PyObject * | Atrinik_CacheGet (PyObject *self, PyObject *args) |
| static PyObject * | Atrinik_CacheRemove (PyObject *self, PyObject *args) |
| static PyObject * | Atrinik_GetFirst (PyObject *self, PyObject *args) |
| static PyObject * | Atrinik_CreateMap (PyObject *self, PyObject *args) |
| static PyObject * | Atrinik_CreateObject (PyObject *self, PyObject *args) |
| static PyObject* Atrinik_CacheAdd | ( | PyObject * | self, |
| PyObject * | args | ||
| ) | [static] |
Store 'what' in memory identified by unique identifier 'key'.
The object will be stored forever in memory, until it's either removed by CacheRemove() or the server is shut down; in both cases, the object will be closed, if applicable (databases, file objects, etc).
A stored object can be retrieved at any time using CacheGet().
| key | The unique identifier for the cache entry. |
| what | Any Python object (string, integer, database, etc) to store in memory. |
Definition at line 1176 of file plugin_python.c.
| static PyObject* Atrinik_CacheGet | ( | PyObject * | self, |
| PyObject * | args | ||
| ) | [static] |
Attempt to find a cache entry identified by 'key' that was previously added using CacheAdd().
| key | Unique identifier of the cache entry to find. |
| ValueError | if the cache entry could not be found. |
Definition at line 1208 of file plugin_python.c.
| static PyObject* Atrinik_CacheRemove | ( | PyObject * | self, |
| PyObject * | args | ||
| ) | [static] |
Remove a cache entry that was added with a previous call to CacheAdd().
| key | Unique identifier of the cache entry to remove. |
| ValueError | if the cache entry could not be removed (it didn't exist). |
Definition at line 1246 of file plugin_python.c.
| static PyObject* Atrinik_CleanupChatString | ( | PyObject * | self, |
| PyObject * | args | ||
| ) | [static] |
Cleans up a chat text removing special characters and extra whitespace.
| text | The text to cleanup. |
Definition at line 1031 of file plugin_python.c.
| static PyObject* Atrinik_CostString | ( | PyObject * | self, |
| PyObject * | args | ||
| ) | [static] |
Build a string representation of the value in the game's money syntax, for example, a value of 134 would become "1 silver coin and 34 copper coins".
| value | Value to build the string from. |
Definition at line 1148 of file plugin_python.c.
| static PyObject* Atrinik_CreateMap | ( | PyObject * | self, |
| PyObject * | args | ||
| ) | [static] |
Creates an empty map.
| width | The new map's width. |
| height | The new map's height. |
| path | Path to the new map. This should be a unique path to avoid collisions. "/python-maps/" is prepended to this to ensure no collision with regular maps. |
Definition at line 1327 of file plugin_python.c.
| static PyObject* Atrinik_CreateObject | ( | PyObject * | self, |
| PyObject * | args | ||
| ) | [static] |
Creates a new object. If the created object is not put on map or inside an inventory of another object, it will be removed by the garbage collector.
| archname | Name of the arch to create. |
| AtrinikError | if 'archname' is not a valid archetype. |
Definition at line 1356 of file plugin_python.c.
| static PyObject* Atrinik_CreatePathname | ( | PyObject * | self, |
| PyObject * | args | ||
| ) | [static] |
Creates path to file in the maps directory using the create_pathname() function.
| path | Path to file to create. |
Definition at line 925 of file plugin_python.c.
| static PyObject* Atrinik_DestroyTimer | ( | PyObject * | self, |
| PyObject * | args | ||
| ) | [static] |
Destroy an existing timer.
| timer | ID of the timer. |
Definition at line 1083 of file plugin_python.c.
| static PyObject* Atrinik_FindParty | ( | PyObject * | self, |
| PyObject * | args | ||
| ) | [static] |
Find a party by name.
| name | The party name to find. |
Definition at line 1012 of file plugin_python.c.
| static PyObject* Atrinik_FindPlayer | ( | PyObject * | self, |
| PyObject * | args | ||
| ) | [static] |
Find a player by name.
| name | The player name to find. |
Definition at line 608 of file plugin_python.c.
| static PyObject* Atrinik_GetEventNumber | ( | PyObject * | self, |
| PyObject * | args | ||
| ) | [static] |
Get the ID of the event that is being triggered.
Definition at line 707 of file plugin_python.c.
| static PyObject* Atrinik_GetEventParameters | ( | PyObject * | self, |
| PyObject * | args | ||
| ) | [static] |
Get the parameters of an event. This varies from event to event, and some events pass all parameters as 0. EVENT_ATTACK usually passes damage done and the WC of the hit as second and third parameter, respectively.
Definition at line 775 of file plugin_python.c.
| static PyObject* Atrinik_GetFirst | ( | PyObject * | self, |
| PyObject * | args | ||
| ) | [static] |
Get first member of various linked lists.
| what | What list to get first member of. Available list names:
|
Definition at line 1282 of file plugin_python.c.
| static PyObject* Atrinik_GetOptions | ( | PyObject * | self, |
| PyObject * | args | ||
| ) | [static] |
Gets the script options (as passed in the event's slaying field).
Definition at line 729 of file plugin_python.c.
| static PyObject* Atrinik_GetRangeVectorFromMapCoords | ( | PyObject * | self, |
| PyObject * | args | ||
| ) | [static] |
Get the distance and direction from one map coordinate to another.
| map | From which map to get distance from. |
| x | X on 'map'. |
| y | Y on 'map'. |
| map2 | Which map to get distance to. |
| x2 | X on 'map2'. |
| y2 | Y on 'map2'. |
| flags | One or a combination of Range Vector Flags. |
Definition at line 1113 of file plugin_python.c.
| static PyObject* Atrinik_GetReturnValue | ( | PyObject * | self, |
| PyObject * | args | ||
| ) | [static] |
Gets the script's return value.
Definition at line 740 of file plugin_python.c.
| static PyObject* Atrinik_GetSkillNr | ( | PyObject * | self, |
| PyObject * | args | ||
| ) | [static] |
Get the ID of the skill.
| name | The skill name. |
Definition at line 857 of file plugin_python.c.
| static PyObject* Atrinik_GetSpell | ( | PyObject * | self, |
| PyObject * | args | ||
| ) | [static] |
Get various information about a spell, including things like its level, type, etc.
| spell | ID of the spell, can be acquired using GetSpellNr(). |
| ValueError | if the spell ID being looked up is invalid. |
Definition at line 823 of file plugin_python.c.
| static PyObject* Atrinik_GetSpellNr | ( | PyObject * | self, |
| PyObject * | args | ||
| ) | [static] |
Get the ID of the passed spell name.
| name | The spell name. |
Definition at line 796 of file plugin_python.c.
| static PyObject* Atrinik_GetTime | ( | PyObject * | self, |
| PyObject * | args | ||
| ) | [static] |
Get the game time.
Definition at line 956 of file plugin_python.c.
| static PyObject* Atrinik_LoadObject | ( | PyObject * | self, |
| PyObject * | args | ||
| ) | [static] |
Load an object from a string dump, for example, one stored using Save().
| dump | The string dump from which to load the actual object. |
Definition at line 562 of file plugin_python.c.
| static PyObject* Atrinik_LocateBeacon | ( | PyObject * | self, |
| PyObject * | args | ||
| ) | [static] |
Locate a beacon.
| name | The beacon name to find. |
Definition at line 987 of file plugin_python.c.
| static PyObject* Atrinik_LOG | ( | PyObject * | self, |
| PyObject * | args | ||
| ) | [static] |
Logs a message.
| mode | Logging mode to use, one of:
|
| message | The message to log. |
Definition at line 1060 of file plugin_python.c.
| static PyObject* Atrinik_PlayerExists | ( | PyObject * | self, |
| PyObject * | args | ||
| ) | [static] |
Check if player exists.
| name | The player name to check. |
Definition at line 636 of file plugin_python.c.
| static PyObject* Atrinik_ReadyMap | ( | PyObject * | self, |
| PyObject * | args | ||
| ) | [static] |
Make sure the named map is loaded into memory, loading it if necessary.
| path | Path to the map. |
| unique | Whether the destination should be loaded as unique map, for example, apartments. |
Definition at line 583 of file plugin_python.c.
| static PyObject* Atrinik_RegisterCommand | ( | PyObject * | self, |
| PyObject * | args | ||
| ) | [static] |
Register a custom command ran using Python script.
| name | Name of the command. For example, "roll" in order to create /roll command. Note the lack forward slash in the name. |
| path | Path to the Python script to be executed when the command is used. |
| speed | How long it takes to execute the command; 1.0 is usually fine. |
| ValueError | if the command is already registered. |
Definition at line 879 of file plugin_python.c.
| static PyObject* Atrinik_SetReturnValue | ( | PyObject * | self, |
| PyObject * | args | ||
| ) | [static] |
Sets the script's return value.
| value | The new return value. |
Definition at line 751 of file plugin_python.c.
| static PyObject* Atrinik_WhatIsEvent | ( | PyObject * | self, |
| PyObject * | args | ||
| ) | [static] |
Get the event object that caused this event to trigger.
Definition at line 696 of file plugin_python.c.
| static PyObject* Atrinik_WhatIsMessage | ( | PyObject * | self, |
| PyObject * | args | ||
| ) | [static] |
Gets the actual message in SAY events.
Definition at line 718 of file plugin_python.c.
| static PyObject* Atrinik_WhoAmI | ( | PyObject * | self, |
| PyObject * | args | ||
| ) | [static] |
Get the owner of the active script (the object that has the event handler).
Definition at line 662 of file plugin_python.c.
| static PyObject* Atrinik_WhoIsActivator | ( | PyObject * | self, |
| PyObject * | args | ||
| ) | [static] |
Get the object that activated the current event.
Definition at line 673 of file plugin_python.c.
| static PyObject* Atrinik_WhoIsOther | ( | PyObject * | self, |
| PyObject * | args | ||
| ) | [static] |
Get another object related to the event. What this object is depends on the event.
Definition at line 685 of file plugin_python.c.
1.7.4