feat: Added python binding to all functions

+ added docs to all functions
This commit is contained in:
AURUMVORXX
2024-11-09 20:16:25 +03:00
parent c561368b4f
commit ae0889e927
162 changed files with 2725 additions and 51 deletions

View File

@@ -0,0 +1,3 @@
# `static class` ItemsGround
---
::: g2o.classes.items.ItemsGround

3
docs/classes/mds/mds.md Normal file
View File

@@ -0,0 +1,3 @@
# `static class` Mds
---
::: g2o.classes.mds.Mds

View File

@@ -1,5 +1,5 @@
* `addEventHandler` replaced with decorator [event](events/event.md) * `addEventHandler` replaced with decorator [event](functions/event/event.md)
```python ```python
@g2o.event('onInit') @g2o.event('onInit')
def evtInitFirst(**kwargs): def evtInitFirst(**kwargs):
@@ -93,3 +93,5 @@ def evtDrop(**kwargs):
* `getPlayerRing` * `getPlayerRing`
* `getPlayerShield` * `getPlayerShield`
* `getPlayerSpell` * `getPlayerSpell`
---
* `ItemsGround.getById` throws an exception instead of returning `null` if there's no item with given ID

View File

@@ -1,12 +1,12 @@
# `event` onPlayerEquipAmulet # `event` onPlayerEquipAmulet
This event is triggered when player equips or unequips amulet. When item is unequiped, `null` is returned instead. This event is triggered when player equips or unequips amulet. When item is unequiped, empty `str` is returned instead.
Original: [onPlayerEquipAmulet](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-events/player/onPlayerEquipAmulet/) Original: [onPlayerEquipAmulet](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-events/player/onPlayerEquipAmulet/)
## Parameters ## Parameters
* `dict` **kwargs**: * `dict` **kwargs**:
* `int` **playerid**: the id of the player who equips a amulet. * `int` **playerid**: the id of the player who equips a amulet.
* `str` **str | null**: instance: the item instance from Daedalus scripts. * `str` **instance**: the item instance from Daedalus scripts.
## Usage ## Usage
```python ```python

View File

@@ -1,12 +1,12 @@
# `event` onPlayerEquipAmulet # `event` onPlayerEquipAmulet
This event is triggered when player equips or unequips armor. When item is unequiped, `null` is returned instead. This event is triggered when player equips or unequips armor. When item is unequiped, empty `str` is returned instead.
Original: [onPlayerEquipArmor](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-events/player/onPlayerEquipArmor/) Original: [onPlayerEquipArmor](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-events/player/onPlayerEquipArmor/)
## Parameters ## Parameters
* `dict` **kwargs**: * `dict` **kwargs**:
* `int` **playerid**: the id of the player who equips an armor. * `int` **playerid**: the id of the player who equips an armor.
* `str` **str | null**: instance: the item instance from Daedalus scripts. * `str` **instance**: the item instance from Daedalus scripts.
## Usage ## Usage
```python ```python

View File

@@ -1,12 +1,12 @@
# `event` onPlayerEquipBelt # `event` onPlayerEquipBelt
This event is triggered when player equips or unequips belt. When item is unequiped, `null` is returned instead. This event is triggered when player equips or unequips belt. When item is unequiped, empty `str` is returned instead.
Original: [onPlayerEquipBelt](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-events/player/onPlayerEquipBelt/) Original: [onPlayerEquipBelt](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-events/player/onPlayerEquipBelt/)
## Parameters ## Parameters
* `dict` **kwargs**: * `dict` **kwargs**:
* `int` **playerid**: the id of the player who equips a belt. * `int` **playerid**: the id of the player who equips a belt.
* `str` **str | null**: instance: the item instance from Daedalus scripts. * `str` **instance**: the item instance from Daedalus scripts.
## Usage ## Usage
```python ```python

View File

@@ -1,5 +1,5 @@
# `event` onPlayerEquipHandItem # `event` onPlayerEquipHandItem
This event is triggered when game adds item to player hand, e.g: when player opens or consumes any item. When item is removed from hand, `null` is returned instead. This event is triggered when game adds item to player hand, e.g: when player opens or consumes any item. When item is removed from hand, empty `str` is returned instead.
Original: [onPlayerEquipHandItem](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-events/player/onPlayerEquipHandItem/) Original: [onPlayerEquipHandItem](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-events/player/onPlayerEquipHandItem/)
@@ -7,7 +7,7 @@ Original: [onPlayerEquipHandItem](https://gothicmultiplayerteam.gitlab.io/docs/0
* `dict` **kwargs**: * `dict` **kwargs**:
* `int` **playerid**: the id of the player who gets an item to his hand. * `int` **playerid**: the id of the player who gets an item to his hand.
* `int` **hand**: the id of the hand in which player holds item. For more information see [Hand](../../constants/hand.md). * `int` **hand**: the id of the hand in which player holds item. For more information see [Hand](../../constants/hand.md).
* `str` **str | null**: instance: the item instance from Daedalus scripts. * `str` **instance**: the item instance from Daedalus scripts.
## Usage ## Usage
```python ```python

View File

@@ -1,12 +1,12 @@
# `event` onPlayerEquipHelmet # `event` onPlayerEquipHelmet
This event is triggered when player equips or unequips helmet. When item is unequiped, `null` is returned instead. This event is triggered when player equips or unequips helmet. When item is unequiped, empty `str` is returned instead.
Original: [onPlayerEquipHelmet](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-events/player/onPlayerEquipHelmet/) Original: [onPlayerEquipHelmet](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-events/player/onPlayerEquipHelmet/)
## Parameters ## Parameters
* `dict` **kwargs**: * `dict` **kwargs**:
* `int` **playerid**: the id of the player who equips a helmet. * `int` **playerid**: the id of the player who equips a helmet.
* `str` **str | null**: instance: the item instance from Daedalus scripts. * `str` **instance**: the item instance from Daedalus scripts.
## Usage ## Usage
```python ```python

View File

@@ -1,12 +1,12 @@
# `event` onPlayerEquipMeleeWeapon # `event` onPlayerEquipMeleeWeapon
This event is triggered when player equips or unequips melee weapon. When item is unequiped, `null` is returned instead. This event is triggered when player equips or unequips melee weapon. When item is unequiped, empty `str` is returned instead.
Original: [onPlayerEquipMeleeWeapon](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-events/player/onPlayerEquipMeleeWeapon/) Original: [onPlayerEquipMeleeWeapon](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-events/player/onPlayerEquipMeleeWeapon/)
## Parameters ## Parameters
* `dict` **kwargs**: * `dict` **kwargs**:
* `int` **playerid**: the id of the player who equips an melee weapon. * `int` **playerid**: the id of the player who equips an melee weapon.
* `str` **str | null**: instance: the item instance from Daedalus scripts. * `str` **instance**: the item instance from Daedalus scripts.
## Usage ## Usage
```python ```python

View File

@@ -1,12 +1,12 @@
# `event` onPlayerEquipRangedWeapon # `event` onPlayerEquipRangedWeapon
This event is triggered when player equips or unequips ranged weapon. When item is unequiped, `null` is returned instead. This event is triggered when player equips or unequips ranged weapon. When item is unequiped, empty `str` is returned instead.
Original: [onPlayerEquipRangedWeapon](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-events/player/onPlayerEquipRangedWeapon/) Original: [onPlayerEquipRangedWeapon](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-events/player/onPlayerEquipRangedWeapon/)
## Parameters ## Parameters
* `dict` **kwargs**: * `dict` **kwargs**:
* `int` **playerid**: the id of the player who equips an ranged weapon. * `int` **playerid**: the id of the player who equips an ranged weapon.
* `str` **str | null**: instance: the item instance from Daedalus scripts. * `str` **instance**: the item instance from Daedalus scripts.
## Usage ## Usage
```python ```python

View File

@@ -1,5 +1,5 @@
# `event` onPlayerEquipRing # `event` onPlayerEquipRing
This event is triggered when player equips or unequips ring. When item is unequiped, `null` item id is returned instead. This event is triggered when player equips or unequips ring. When item is unequiped, empty `str` is returned instead.
Original: [onPlayerEquipRing](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-events/player/onPlayerEquipRing/) Original: [onPlayerEquipRing](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-events/player/onPlayerEquipRing/)
@@ -7,7 +7,7 @@ Original: [onPlayerEquipRing](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0
* `dict` **kwargs**: * `dict` **kwargs**:
* `int` **playerid**: the id of the player who equips a ring. * `int` **playerid**: the id of the player who equips a ring.
* `int` **hand**: the hand id that the player is putting the ring on. For more information see [Hand](../../constants/hand.md). * `int` **hand**: the hand id that the player is putting the ring on. For more information see [Hand](../../constants/hand.md).
* `str` **str | null**: instance: the item instance from Daedalus scripts. * `str` **instance**: the item instance from Daedalus scripts.
## Usage ## Usage
```python ```python

View File

@@ -1,12 +1,12 @@
# `event` onPlayerEquipShield # `event` onPlayerEquipShield
This event is triggered when player equips or unequips shield. When item is unequiped, `null` is returned instead. This event is triggered when player equips or unequips shield. When item is unequiped, empty `str` is returned instead.
Original: [onPlayerEquipShield](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-events/player/onPlayerEquipShield/) Original: [onPlayerEquipShield](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-events/player/onPlayerEquipShield/)
## Parameters ## Parameters
* `dict` **kwargs**: * `dict` **kwargs**:
* `int` **playerid**: the id of the player who equips a shield. * `int` **playerid**: the id of the player who equips a shield.
* `str` **str | null**: instance: the item instance from Daedalus scripts. * `str` **instance**: the item instance from Daedalus scripts.
## Usage ## Usage
```python ```python

View File

@@ -1,5 +1,5 @@
# `event` onPlayerEquipSpell # `event` onPlayerEquipSpell
This event is triggered when player equips or unequips scroll or rune. When item is unequiped, `null` is returned instead. This event is triggered when player equips or unequips scroll or rune. When item is unequiped, empty `str` is returned instead.
Original: [onPlayerEquipSpell](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-events/player/onPlayerEquipSpell/) Original: [onPlayerEquipSpell](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-events/player/onPlayerEquipSpell/)
@@ -7,7 +7,7 @@ Original: [onPlayerEquipSpell](https://gothicmultiplayerteam.gitlab.io/docs/0.3.
* `dict` **kwargs**: * `dict` **kwargs**:
* `int` **playerid**: the id of the player who equips a spell. * `int` **playerid**: the id of the player who equips a spell.
* `int` **slotId**: the slot id that the player puts the spell on in range `<0, 6>`. * `int` **slotId**: the slot id that the player puts the spell on in range `<0, 6>`.
* `str` **str | null**: instance: the item instance from Daedalus scripts. * `str` **instance**: the item instance from Daedalus scripts.
## Usage ## Usage
```python ```python

View File

@@ -1,2 +0,0 @@
# `function` addEvent
::: g2o.events.addEvent

View File

@@ -1,2 +0,0 @@
# `function` callEvent
::: g2o.events.callEvent

View File

@@ -1,2 +0,0 @@
# `function` event
::: g2o.events.event

View File

@@ -1,2 +0,0 @@
# `function` removeEvent
::: g2o.events.removeEvent

View File

@@ -1,2 +0,0 @@
# `function` removeEventHandler
::: g2o.events.removeEventHandler

View File

@@ -1,2 +0,0 @@
# `function` toggleEvent
::: g2o.events.toggleEvent

View File

@@ -0,0 +1,2 @@
# `function` sendMessageToAll
::: g2o.functions.chat.sendMessageToAll

View File

@@ -0,0 +1,2 @@
# `function` sendMessageToPlayer
::: g2o.functions.chat.sendMessageToPlayer

View File

@@ -0,0 +1,2 @@
# `function` sendPlayerMessageToAll
::: g2o.functions.chat.sendPlayerMessageToAll

View File

@@ -0,0 +1,2 @@
# `function` sendPlayerMessageToPlayer
::: g2o.functions.chat.sendPlayerMessageToPlayer

View File

@@ -0,0 +1,2 @@
# `function` addEvent
::: g2o.functions.event.addEvent

View File

@@ -0,0 +1,2 @@
# `function` callEvent
::: g2o.functions.event.callEvent

View File

@@ -0,0 +1,2 @@
# `function` event
::: g2o.functions.event.event

View File

@@ -0,0 +1,2 @@
# `function` removeEvent
::: g2o.functions.event.removeEvent

View File

@@ -0,0 +1,2 @@
# `function` removeEventHandler
::: g2o.functions.event.removeEventHandler

View File

@@ -0,0 +1,2 @@
# `function` toggleEvent
::: g2o.functions.event.toggleEvent

View File

@@ -0,0 +1,2 @@
# `function` exit
::: g2o.functions.game.exit

View File

@@ -0,0 +1,2 @@
# `function` getDayLength
::: g2o.functions.game.getDayLength

View File

@@ -0,0 +1,2 @@
# `function` getHostname
::: g2o.functions.game.getHostname

View File

@@ -0,0 +1,2 @@
# `function` getMaxSlots
::: g2o.functions.game.getMaxSlots

View File

@@ -0,0 +1,2 @@
# `function` getPlayersCount
::: g2o.functions.game.getPlayersCount

View File

@@ -0,0 +1,2 @@
# `function` getServerDescription
::: g2o.functions.game.getServerDescription

View File

@@ -0,0 +1,2 @@
# `function` getServerWorld
::: g2o.functions.game.getServerWorld

View File

@@ -0,0 +1,2 @@
# `function` getTime
::: g2o.functions.game.getTime

View File

@@ -0,0 +1,2 @@
# `function` serverLog
::: g2o.functions.game.serverLog

View File

@@ -0,0 +1,2 @@
# `function` setDayLength
::: g2o.functions.game.setDayLength

View File

@@ -0,0 +1,2 @@
# `function` setServerDescription
::: g2o.functions.game.setServerDescription

View File

@@ -0,0 +1,2 @@
# `function` setServerWorld
::: g2o.functions.game.setServerWorld

View File

@@ -0,0 +1,2 @@
# `function` setTime
::: g2o.functions.game.setTime

View File

@@ -0,0 +1,2 @@
# `function` clearNpcActions
::: g2o.functions.npc.clearNpcActions

View File

@@ -0,0 +1,2 @@
# `function` createNpc
::: g2o.functions.npc.createNpc

View File

@@ -0,0 +1,2 @@
# `function` destroyNpc
::: g2o.functions.npc.destroyNpc

View File

@@ -0,0 +1,2 @@
# `function` getNpcAction
::: g2o.functions.npc.getNpcAction

View File

@@ -0,0 +1,2 @@
# `function` getNpcActions
::: g2o.functions.npc.getNpcActions

View File

@@ -0,0 +1,2 @@
# `function` getNpcActionsCount
::: g2o.functions.npc.getNpcActionsCount

View File

@@ -0,0 +1,2 @@
# `function` getNpcHostPlayer
::: g2o.functions.npc.getNpcHostPlayer

View File

@@ -0,0 +1,2 @@
# `function` getNpcLastActionId
::: g2o.functions.npc.getNpcLastActionId

View File

@@ -0,0 +1,2 @@
# `function` isNpc
::: g2o.functions.npc.isNpc

View File

@@ -0,0 +1,2 @@
# `function` isNpcActionFinished
::: g2o.functions.npc.isNpcActionFinished

View File

@@ -0,0 +1,2 @@
# `function` npcAttackMelee
::: g2o.functions.npc.npcAttackMelee

View File

@@ -0,0 +1,2 @@
# `function` npcAttackRanged
::: g2o.functions.npc.npcAttackRanged

View File

@@ -0,0 +1,2 @@
# `function` npcSpellCast
::: g2o.functions.npc.npcSpellCast

View File

@@ -0,0 +1,2 @@
# `function` npcUseClosestMob
::: g2o.functions.npc.npcUseClosestMob

View File

@@ -0,0 +1,2 @@
# `function` setNpcHostPlayer
::: g2o.functions.npc.setNpcHostPlayer

View File

@@ -0,0 +1,2 @@
#`function` addBan
::: g2o.functions.player.addBan

View File

@@ -0,0 +1,2 @@
#`function` applyPlayerOverlay
::: g2o.functions.player.applyPlayerOverlay

View File

@@ -0,0 +1,2 @@
#`function` ban
::: g2o.functions.player.ban

View File

@@ -0,0 +1,2 @@
#`function` drawWeapon
::: g2o.functions.player.drawWeapon

View File

@@ -0,0 +1,2 @@
#`function` equipItem
::: g2o.functions.player.equipItem

View File

@@ -0,0 +1,2 @@
#`function` getPlayerAmulet
::: g2o.functions.player.getPlayerAmulet

View File

@@ -0,0 +1,2 @@
#`function` getPlayerAngle
::: g2o.functions.player.getPlayerAngle

View File

@@ -0,0 +1,2 @@
#`function` getPlayerAni
::: g2o.functions.player.getPlayerAni

View File

@@ -0,0 +1,2 @@
#`function` getPlayerArmor
::: g2o.functions.player.getPlayerArmor

View File

@@ -0,0 +1,2 @@
#`function` getPlayerAtVector
::: g2o.functions.player.getPlayerAtVector

View File

@@ -0,0 +1,2 @@
#`function` getPlayerBelt
::: g2o.functions.player.getPlayerBelt

View File

@@ -0,0 +1,2 @@
#`function` getPlayerCameraPosition
::: g2o.functions.player.getPlayerCameraPosition

View File

@@ -0,0 +1,2 @@
#`function` getPlayerCollision
::: g2o.functions.player.getPlayerCollision

View File

@@ -0,0 +1,2 @@
#`function` getPlayerColor
::: g2o.functions.player.getPlayerColor

View File

@@ -0,0 +1,2 @@
#`function` getPlayerContext
::: g2o.functions.player.getPlayerContext

View File

@@ -0,0 +1,2 @@
#`function` getPlayerDexterity
::: g2o.functions.player.getPlayerDexterity

View File

@@ -0,0 +1,2 @@
#`function` getPlayerFaceAnis
::: g2o.functions.player.getPlayerFaceAnis

View File

@@ -0,0 +1,2 @@
#`function` getPlayerFatness
::: g2o.functions.player.getPlayerFatness

View File

@@ -0,0 +1,2 @@
#`function` getPlayerFocus
::: g2o.functions.player.getPlayerFocus

View File

@@ -0,0 +1,2 @@
#`function` getPlayerHealth
::: g2o.functions.player.getPlayerHealth

View File

@@ -0,0 +1,2 @@
#`function` getPlayerHelmet
::: g2o.functions.player.getPlayerHelmet

View File

@@ -0,0 +1,2 @@
#`function` getPlayerIP
::: g2o.functions.player.getPlayerIP

View File

@@ -0,0 +1,2 @@
#`function` getPlayerInstance
::: g2o.functions.player.getPlayerInstance

View File

@@ -0,0 +1,2 @@
#`function` getPlayerInvisible
::: g2o.functions.player.getPlayerInvisible

View File

@@ -0,0 +1,2 @@
#`function` getPlayerMacAddr
::: g2o.functions.player.getPlayerMacAddr

View File

@@ -0,0 +1,2 @@
#`function` getPlayerMana
::: g2o.functions.player.getPlayerMana

View File

@@ -0,0 +1,2 @@
#`function` getPlayerMaxHealth
::: g2o.functions.player.getPlayerMaxHealth

View File

@@ -0,0 +1,2 @@
#`function` getPlayerMaxMana
::: g2o.functions.player.getPlayerMaxMana

View File

@@ -0,0 +1,2 @@
#`function` getPlayerMeleeWeapon
::: g2o.functions.player.getPlayerMeleeWeapon

View File

@@ -0,0 +1,2 @@
#`function` getPlayerName
::: g2o.functions.player.getPlayerName

View File

@@ -0,0 +1,2 @@
#`function` getPlayerPing
::: g2o.functions.player.getPlayerPing

View File

@@ -0,0 +1,2 @@
#`function` getPlayerPosition
::: g2o.functions.player.getPlayerPosition

View File

@@ -0,0 +1,2 @@
#`function` getPlayerRangedWeapon
::: g2o.functions.player.getPlayerRangedWeapon

View File

@@ -0,0 +1,2 @@
#`function` getPlayerRespawnTime
::: g2o.functions.player.getPlayerRespawnTime

View File

@@ -0,0 +1,2 @@
#`function` getPlayerRing
::: g2o.functions.player.getPlayerRing

View File

@@ -0,0 +1,2 @@
#`function` getPlayerScale
::: g2o.functions.player.getPlayerScale

View File

@@ -0,0 +1,2 @@
#`function` getPlayerSerial
::: g2o.functions.player.getPlayerSerial

View File

@@ -0,0 +1,2 @@
#`function` getPlayerShield
::: g2o.functions.player.getPlayerShield

View File

@@ -0,0 +1,2 @@
#`function` getPlayerSkillWeapon
::: g2o.functions.player.getPlayerSkillWeapon

View File

@@ -0,0 +1,2 @@
#`function` getPlayerSpell
::: g2o.functions.player.getPlayerSpell

View File

@@ -0,0 +1,2 @@
#`function` getPlayerStrength
::: g2o.functions.player.getPlayerStrength

View File

@@ -0,0 +1,2 @@
#`function` getPlayerTalent
::: g2o.functions.player.getPlayerTalent

View File

@@ -0,0 +1,2 @@
#`function` getPlayerVirtualWorld
::: g2o.functions.player.getPlayerVirtualWorld

Some files were not shown because too many files have changed in this diff Show More