From ae0889e9278d8279b0cfcb8ca580ebd7c205b73c Mon Sep 17 00:00:00 2001 From: AURUMVORXX Date: Sat, 9 Nov 2024 20:16:25 +0300 Subject: [PATCH] feat: Added python binding to all functions + added docs to all functions --- docs/classes/item/ItemsGround.md | 3 + docs/classes/mds/mds.md | 3 + docs/comparing.md | 6 +- .../player/onPlayerEquipAmulet.md | 4 +- .../player/onPlayerEquipArmor.md | 4 +- .../defaultEvents/player/onPlayerEquipBelt.md | 4 +- .../player/onPlayerEquipHandItem.md | 4 +- .../player/onPlayerEquipHelmet.md | 4 +- .../player/onPlayerEquipMeleeWeapon.md | 4 +- .../player/onPlayerEquipRangedWeapon.md | 4 +- .../defaultEvents/player/onPlayerEquipRing.md | 4 +- .../player/onPlayerEquipShield.md | 4 +- .../player/onPlayerEquipSpell.md | 4 +- docs/events/addEvent.md | 2 - docs/events/callEvent.md | 2 - docs/events/event.md | 2 - docs/events/removeEvent.md | 2 - docs/events/removeEventHandler.md | 2 - docs/events/toggleEvent.md | 2 - docs/functions/chat/sendMessageToAll.md | 2 + docs/functions/chat/sendMessageToPlayer.md | 2 + docs/functions/chat/sendPlayerMessageToAll.md | 2 + .../chat/sendPlayerMessageToPlayer.md | 2 + docs/functions/event/addEvent.md | 2 + docs/functions/event/callEvent.md | 2 + docs/functions/event/event.md | 2 + docs/functions/event/removeEvent.md | 2 + docs/functions/event/removeEventHandler.md | 2 + docs/functions/event/toggleEvent.md | 2 + docs/functions/game/exit.md | 2 + docs/functions/game/getDayLength.md | 2 + docs/functions/game/getHostname.md | 2 + docs/functions/game/getMaxSlots.md | 2 + docs/functions/game/getPlayersCount.md | 2 + docs/functions/game/getServerDescription.md | 2 + docs/functions/game/getServerWorld.md | 2 + docs/functions/game/getTime.md | 2 + docs/functions/game/serverLog.md | 2 + docs/functions/game/setDayLength.md | 2 + docs/functions/game/setServerDescription.md | 2 + docs/functions/game/setServerWorld.md | 2 + docs/functions/game/setTime.md | 2 + docs/functions/npc/clearNpcActions.md | 2 + docs/functions/npc/createNpc.md | 2 + docs/functions/npc/destroyNpc.md | 2 + docs/functions/npc/getNpcAction.md | 2 + docs/functions/npc/getNpcActions.md | 2 + docs/functions/npc/getNpcActionsCount.md | 2 + docs/functions/npc/getNpcHostPlayer.md | 2 + docs/functions/npc/getNpcLastActionId.md | 2 + docs/functions/npc/isNpc.md | 2 + docs/functions/npc/isNpcActionFinished.md | 2 + docs/functions/npc/npcAttackMelee.md | 2 + docs/functions/npc/npcAttackRanged.md | 2 + docs/functions/npc/npcSpellCast.md | 2 + docs/functions/npc/npcUseClosestMob.md | 2 + docs/functions/npc/setNpcHostPlayer.md | 2 + docs/functions/player/addBan.md | 2 + docs/functions/player/applyPlayerOverlay.md | 2 + docs/functions/player/ban.md | 2 + docs/functions/player/drawWeapon.md | 2 + docs/functions/player/equipItem.md | 2 + docs/functions/player/getPlayerAmulet.md | 2 + docs/functions/player/getPlayerAngle.md | 2 + docs/functions/player/getPlayerAni.md | 2 + docs/functions/player/getPlayerArmor.md | 2 + docs/functions/player/getPlayerAtVector.md | 2 + docs/functions/player/getPlayerBelt.md | 2 + .../player/getPlayerCameraPosition.md | 2 + docs/functions/player/getPlayerCollision.md | 2 + docs/functions/player/getPlayerColor.md | 2 + docs/functions/player/getPlayerContext.md | 2 + docs/functions/player/getPlayerDexterity.md | 2 + docs/functions/player/getPlayerFaceAnis.md | 2 + docs/functions/player/getPlayerFatness.md | 2 + docs/functions/player/getPlayerFocus.md | 2 + docs/functions/player/getPlayerHealth.md | 2 + docs/functions/player/getPlayerHelmet.md | 2 + docs/functions/player/getPlayerIP.md | 2 + docs/functions/player/getPlayerInstance.md | 2 + docs/functions/player/getPlayerInvisible.md | 2 + docs/functions/player/getPlayerMacAddr.md | 2 + docs/functions/player/getPlayerMana.md | 2 + docs/functions/player/getPlayerMaxHealth.md | 2 + docs/functions/player/getPlayerMaxMana.md | 2 + docs/functions/player/getPlayerMeleeWeapon.md | 2 + docs/functions/player/getPlayerName.md | 2 + docs/functions/player/getPlayerPing.md | 2 + docs/functions/player/getPlayerPosition.md | 2 + .../functions/player/getPlayerRangedWeapon.md | 2 + docs/functions/player/getPlayerRespawnTime.md | 2 + docs/functions/player/getPlayerRing.md | 2 + docs/functions/player/getPlayerScale.md | 2 + docs/functions/player/getPlayerSerial.md | 2 + docs/functions/player/getPlayerShield.md | 2 + docs/functions/player/getPlayerSkillWeapon.md | 2 + docs/functions/player/getPlayerSpell.md | 2 + docs/functions/player/getPlayerStrength.md | 2 + docs/functions/player/getPlayerTalent.md | 2 + .../functions/player/getPlayerVirtualWorld.md | 2 + docs/functions/player/getPlayerVisual.md | 2 + docs/functions/player/getPlayerWeaponMode.md | 2 + docs/functions/player/getPlayerWorld.md | 2 + docs/functions/player/giveItem.md | 2 + docs/functions/player/hitPlayer.md | 2 + docs/functions/player/isPlayerConnected.md | 2 + docs/functions/player/isPlayerDead.md | 2 + docs/functions/player/isPlayerSpawned.md | 2 + docs/functions/player/isPlayerUnconscious.md | 2 + docs/functions/player/kick.md | 2 + docs/functions/player/playAni.md | 2 + docs/functions/player/playFaceAni.md | 2 + docs/functions/player/readySpell.md | 2 + docs/functions/player/removeItem.md | 2 + docs/functions/player/removePlayerOverlay.md | 2 + docs/functions/player/removeWeapon.md | 2 + docs/functions/player/setPlayerAngle.md | 2 + docs/functions/player/setPlayerCollision.md | 2 + docs/functions/player/setPlayerColor.md | 2 + docs/functions/player/setPlayerDexterity.md | 2 + docs/functions/player/setPlayerFatness.md | 2 + docs/functions/player/setPlayerHealth.md | 2 + docs/functions/player/setPlayerInstance.md | 2 + docs/functions/player/setPlayerInvisible.md | 2 + docs/functions/player/setPlayerMana.md | 2 + docs/functions/player/setPlayerMaxHealth.md | 2 + docs/functions/player/setPlayerMaxMana.md | 2 + docs/functions/player/setPlayerName.md | 2 + docs/functions/player/setPlayerRespawnTime.md | 2 + docs/functions/player/setPlayerScale.md | 2 + docs/functions/player/setPlayerSkillWeapon.md | 2 + docs/functions/player/setPlayerStrength.md | 2 + docs/functions/player/setPlayerTalent.md | 2 + .../functions/player/setPlayerVirtualWorld.md | 2 + docs/functions/player/setPlayerVisual.md | 2 + docs/functions/player/setPlayerWeaponMode.md | 2 + docs/functions/player/setPlayerWorld.md | 2 + docs/functions/player/spawnPlayer.md | 2 + docs/functions/player/stopAni.md | 2 + docs/functions/player/stopFaceAni.md | 2 + docs/functions/player/unequipItem.md | 2 + docs/functions/player/unreadySpell.md | 2 + docs/functions/player/unspawnPlayer.md | 2 + docs/functions/player/useItem.md | 2 + docs/functions/player/useItemToState.md | 2 + docs/functions/streamer/findNearbyPlayers.md | 2 + .../streamer/getSpawnedPlayersForPlayer.md | 2 + .../streamer/getStreamedPlayersByPlayer.md | 2 + docs/functions/waypoint/getNearestWaypoint.md | 2 + docs/functions/waypoint/getWaypoint.md | 2 + g2o/__init__.py | 141 +- g2o/classes/items.py | 34 +- g2o/classes/mds.py | 23 +- g2o/functions/__init__.py | 0 g2o/functions/chat.py | 81 + g2o/{events.py => functions/event.py} | 0 g2o/functions/game.py | 223 +++ g2o/functions/npc.py | 247 +++ g2o/functions/player.py | 1462 +++++++++++++++++ g2o/functions/streamer.py | 52 + g2o/functions/waypoint.py | 37 + mkdocs.yml | 150 +- 162 files changed, 2725 insertions(+), 51 deletions(-) create mode 100644 docs/classes/item/ItemsGround.md create mode 100644 docs/classes/mds/mds.md delete mode 100644 docs/events/addEvent.md delete mode 100644 docs/events/callEvent.md delete mode 100644 docs/events/event.md delete mode 100644 docs/events/removeEvent.md delete mode 100644 docs/events/removeEventHandler.md delete mode 100644 docs/events/toggleEvent.md create mode 100644 docs/functions/chat/sendMessageToAll.md create mode 100644 docs/functions/chat/sendMessageToPlayer.md create mode 100644 docs/functions/chat/sendPlayerMessageToAll.md create mode 100644 docs/functions/chat/sendPlayerMessageToPlayer.md create mode 100644 docs/functions/event/addEvent.md create mode 100644 docs/functions/event/callEvent.md create mode 100644 docs/functions/event/event.md create mode 100644 docs/functions/event/removeEvent.md create mode 100644 docs/functions/event/removeEventHandler.md create mode 100644 docs/functions/event/toggleEvent.md create mode 100644 docs/functions/game/exit.md create mode 100644 docs/functions/game/getDayLength.md create mode 100644 docs/functions/game/getHostname.md create mode 100644 docs/functions/game/getMaxSlots.md create mode 100644 docs/functions/game/getPlayersCount.md create mode 100644 docs/functions/game/getServerDescription.md create mode 100644 docs/functions/game/getServerWorld.md create mode 100644 docs/functions/game/getTime.md create mode 100644 docs/functions/game/serverLog.md create mode 100644 docs/functions/game/setDayLength.md create mode 100644 docs/functions/game/setServerDescription.md create mode 100644 docs/functions/game/setServerWorld.md create mode 100644 docs/functions/game/setTime.md create mode 100644 docs/functions/npc/clearNpcActions.md create mode 100644 docs/functions/npc/createNpc.md create mode 100644 docs/functions/npc/destroyNpc.md create mode 100644 docs/functions/npc/getNpcAction.md create mode 100644 docs/functions/npc/getNpcActions.md create mode 100644 docs/functions/npc/getNpcActionsCount.md create mode 100644 docs/functions/npc/getNpcHostPlayer.md create mode 100644 docs/functions/npc/getNpcLastActionId.md create mode 100644 docs/functions/npc/isNpc.md create mode 100644 docs/functions/npc/isNpcActionFinished.md create mode 100644 docs/functions/npc/npcAttackMelee.md create mode 100644 docs/functions/npc/npcAttackRanged.md create mode 100644 docs/functions/npc/npcSpellCast.md create mode 100644 docs/functions/npc/npcUseClosestMob.md create mode 100644 docs/functions/npc/setNpcHostPlayer.md create mode 100644 docs/functions/player/addBan.md create mode 100644 docs/functions/player/applyPlayerOverlay.md create mode 100644 docs/functions/player/ban.md create mode 100644 docs/functions/player/drawWeapon.md create mode 100644 docs/functions/player/equipItem.md create mode 100644 docs/functions/player/getPlayerAmulet.md create mode 100644 docs/functions/player/getPlayerAngle.md create mode 100644 docs/functions/player/getPlayerAni.md create mode 100644 docs/functions/player/getPlayerArmor.md create mode 100644 docs/functions/player/getPlayerAtVector.md create mode 100644 docs/functions/player/getPlayerBelt.md create mode 100644 docs/functions/player/getPlayerCameraPosition.md create mode 100644 docs/functions/player/getPlayerCollision.md create mode 100644 docs/functions/player/getPlayerColor.md create mode 100644 docs/functions/player/getPlayerContext.md create mode 100644 docs/functions/player/getPlayerDexterity.md create mode 100644 docs/functions/player/getPlayerFaceAnis.md create mode 100644 docs/functions/player/getPlayerFatness.md create mode 100644 docs/functions/player/getPlayerFocus.md create mode 100644 docs/functions/player/getPlayerHealth.md create mode 100644 docs/functions/player/getPlayerHelmet.md create mode 100644 docs/functions/player/getPlayerIP.md create mode 100644 docs/functions/player/getPlayerInstance.md create mode 100644 docs/functions/player/getPlayerInvisible.md create mode 100644 docs/functions/player/getPlayerMacAddr.md create mode 100644 docs/functions/player/getPlayerMana.md create mode 100644 docs/functions/player/getPlayerMaxHealth.md create mode 100644 docs/functions/player/getPlayerMaxMana.md create mode 100644 docs/functions/player/getPlayerMeleeWeapon.md create mode 100644 docs/functions/player/getPlayerName.md create mode 100644 docs/functions/player/getPlayerPing.md create mode 100644 docs/functions/player/getPlayerPosition.md create mode 100644 docs/functions/player/getPlayerRangedWeapon.md create mode 100644 docs/functions/player/getPlayerRespawnTime.md create mode 100644 docs/functions/player/getPlayerRing.md create mode 100644 docs/functions/player/getPlayerScale.md create mode 100644 docs/functions/player/getPlayerSerial.md create mode 100644 docs/functions/player/getPlayerShield.md create mode 100644 docs/functions/player/getPlayerSkillWeapon.md create mode 100644 docs/functions/player/getPlayerSpell.md create mode 100644 docs/functions/player/getPlayerStrength.md create mode 100644 docs/functions/player/getPlayerTalent.md create mode 100644 docs/functions/player/getPlayerVirtualWorld.md create mode 100644 docs/functions/player/getPlayerVisual.md create mode 100644 docs/functions/player/getPlayerWeaponMode.md create mode 100644 docs/functions/player/getPlayerWorld.md create mode 100644 docs/functions/player/giveItem.md create mode 100644 docs/functions/player/hitPlayer.md create mode 100644 docs/functions/player/isPlayerConnected.md create mode 100644 docs/functions/player/isPlayerDead.md create mode 100644 docs/functions/player/isPlayerSpawned.md create mode 100644 docs/functions/player/isPlayerUnconscious.md create mode 100644 docs/functions/player/kick.md create mode 100644 docs/functions/player/playAni.md create mode 100644 docs/functions/player/playFaceAni.md create mode 100644 docs/functions/player/readySpell.md create mode 100644 docs/functions/player/removeItem.md create mode 100644 docs/functions/player/removePlayerOverlay.md create mode 100644 docs/functions/player/removeWeapon.md create mode 100644 docs/functions/player/setPlayerAngle.md create mode 100644 docs/functions/player/setPlayerCollision.md create mode 100644 docs/functions/player/setPlayerColor.md create mode 100644 docs/functions/player/setPlayerDexterity.md create mode 100644 docs/functions/player/setPlayerFatness.md create mode 100644 docs/functions/player/setPlayerHealth.md create mode 100644 docs/functions/player/setPlayerInstance.md create mode 100644 docs/functions/player/setPlayerInvisible.md create mode 100644 docs/functions/player/setPlayerMana.md create mode 100644 docs/functions/player/setPlayerMaxHealth.md create mode 100644 docs/functions/player/setPlayerMaxMana.md create mode 100644 docs/functions/player/setPlayerName.md create mode 100644 docs/functions/player/setPlayerRespawnTime.md create mode 100644 docs/functions/player/setPlayerScale.md create mode 100644 docs/functions/player/setPlayerSkillWeapon.md create mode 100644 docs/functions/player/setPlayerStrength.md create mode 100644 docs/functions/player/setPlayerTalent.md create mode 100644 docs/functions/player/setPlayerVirtualWorld.md create mode 100644 docs/functions/player/setPlayerVisual.md create mode 100644 docs/functions/player/setPlayerWeaponMode.md create mode 100644 docs/functions/player/setPlayerWorld.md create mode 100644 docs/functions/player/spawnPlayer.md create mode 100644 docs/functions/player/stopAni.md create mode 100644 docs/functions/player/stopFaceAni.md create mode 100644 docs/functions/player/unequipItem.md create mode 100644 docs/functions/player/unreadySpell.md create mode 100644 docs/functions/player/unspawnPlayer.md create mode 100644 docs/functions/player/useItem.md create mode 100644 docs/functions/player/useItemToState.md create mode 100644 docs/functions/streamer/findNearbyPlayers.md create mode 100644 docs/functions/streamer/getSpawnedPlayersForPlayer.md create mode 100644 docs/functions/streamer/getStreamedPlayersByPlayer.md create mode 100644 docs/functions/waypoint/getNearestWaypoint.md create mode 100644 docs/functions/waypoint/getWaypoint.md create mode 100644 g2o/functions/__init__.py create mode 100644 g2o/functions/chat.py rename g2o/{events.py => functions/event.py} (100%) create mode 100644 g2o/functions/game.py create mode 100644 g2o/functions/npc.py create mode 100644 g2o/functions/player.py create mode 100644 g2o/functions/streamer.py create mode 100644 g2o/functions/waypoint.py diff --git a/docs/classes/item/ItemsGround.md b/docs/classes/item/ItemsGround.md new file mode 100644 index 0000000..055f4cf --- /dev/null +++ b/docs/classes/item/ItemsGround.md @@ -0,0 +1,3 @@ +# `static class` ItemsGround +--- +::: g2o.classes.items.ItemsGround \ No newline at end of file diff --git a/docs/classes/mds/mds.md b/docs/classes/mds/mds.md new file mode 100644 index 0000000..cd9306f --- /dev/null +++ b/docs/classes/mds/mds.md @@ -0,0 +1,3 @@ +# `static class` Mds +--- +::: g2o.classes.mds.Mds \ No newline at end of file diff --git a/docs/comparing.md b/docs/comparing.md index 8e10403..f5714cf 100644 --- a/docs/comparing.md +++ b/docs/comparing.md @@ -1,5 +1,5 @@ -* `addEventHandler` replaced with decorator [event](events/event.md) +* `addEventHandler` replaced with decorator [event](functions/event/event.md) ```python @g2o.event('onInit') def evtInitFirst(**kwargs): @@ -92,4 +92,6 @@ def evtDrop(**kwargs): * `getPlayerRangedWeapon` * `getPlayerRing` * `getPlayerShield` - * `getPlayerSpell` \ No newline at end of file + * `getPlayerSpell` +--- +* `ItemsGround.getById` throws an exception instead of returning `null` if there's no item with given ID \ No newline at end of file diff --git a/docs/defaultEvents/player/onPlayerEquipAmulet.md b/docs/defaultEvents/player/onPlayerEquipAmulet.md index 6b5f5c8..62dff20 100644 --- a/docs/defaultEvents/player/onPlayerEquipAmulet.md +++ b/docs/defaultEvents/player/onPlayerEquipAmulet.md @@ -1,12 +1,12 @@ # `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/) ## Parameters * `dict` **kwargs**: * `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 ```python diff --git a/docs/defaultEvents/player/onPlayerEquipArmor.md b/docs/defaultEvents/player/onPlayerEquipArmor.md index 1730268..6854e2a 100644 --- a/docs/defaultEvents/player/onPlayerEquipArmor.md +++ b/docs/defaultEvents/player/onPlayerEquipArmor.md @@ -1,12 +1,12 @@ # `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/) ## Parameters * `dict` **kwargs**: * `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 ```python diff --git a/docs/defaultEvents/player/onPlayerEquipBelt.md b/docs/defaultEvents/player/onPlayerEquipBelt.md index 876b358..469bf79 100644 --- a/docs/defaultEvents/player/onPlayerEquipBelt.md +++ b/docs/defaultEvents/player/onPlayerEquipBelt.md @@ -1,12 +1,12 @@ # `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/) ## Parameters * `dict` **kwargs**: * `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 ```python diff --git a/docs/defaultEvents/player/onPlayerEquipHandItem.md b/docs/defaultEvents/player/onPlayerEquipHandItem.md index 098d63c..04437f8 100644 --- a/docs/defaultEvents/player/onPlayerEquipHandItem.md +++ b/docs/defaultEvents/player/onPlayerEquipHandItem.md @@ -1,5 +1,5 @@ # `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/) @@ -7,7 +7,7 @@ Original: [onPlayerEquipHandItem](https://gothicmultiplayerteam.gitlab.io/docs/0 * `dict` **kwargs**: * `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). - * `str` **str | null**: instance: the item instance from Daedalus scripts. + * `str` **instance**: the item instance from Daedalus scripts. ## Usage ```python diff --git a/docs/defaultEvents/player/onPlayerEquipHelmet.md b/docs/defaultEvents/player/onPlayerEquipHelmet.md index 76ba016..6d11b31 100644 --- a/docs/defaultEvents/player/onPlayerEquipHelmet.md +++ b/docs/defaultEvents/player/onPlayerEquipHelmet.md @@ -1,12 +1,12 @@ # `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/) ## Parameters * `dict` **kwargs**: * `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 ```python diff --git a/docs/defaultEvents/player/onPlayerEquipMeleeWeapon.md b/docs/defaultEvents/player/onPlayerEquipMeleeWeapon.md index 9678b34..41a7ecc 100644 --- a/docs/defaultEvents/player/onPlayerEquipMeleeWeapon.md +++ b/docs/defaultEvents/player/onPlayerEquipMeleeWeapon.md @@ -1,12 +1,12 @@ # `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/) ## Parameters * `dict` **kwargs**: * `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 ```python diff --git a/docs/defaultEvents/player/onPlayerEquipRangedWeapon.md b/docs/defaultEvents/player/onPlayerEquipRangedWeapon.md index 3402707..0315a9b 100644 --- a/docs/defaultEvents/player/onPlayerEquipRangedWeapon.md +++ b/docs/defaultEvents/player/onPlayerEquipRangedWeapon.md @@ -1,12 +1,12 @@ # `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/) ## Parameters * `dict` **kwargs**: * `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 ```python diff --git a/docs/defaultEvents/player/onPlayerEquipRing.md b/docs/defaultEvents/player/onPlayerEquipRing.md index 768b6eb..0fd08e6 100644 --- a/docs/defaultEvents/player/onPlayerEquipRing.md +++ b/docs/defaultEvents/player/onPlayerEquipRing.md @@ -1,5 +1,5 @@ # `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/) @@ -7,7 +7,7 @@ Original: [onPlayerEquipRing](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0 * `dict` **kwargs**: * `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). - * `str` **str | null**: instance: the item instance from Daedalus scripts. + * `str` **instance**: the item instance from Daedalus scripts. ## Usage ```python diff --git a/docs/defaultEvents/player/onPlayerEquipShield.md b/docs/defaultEvents/player/onPlayerEquipShield.md index 3f7755a..2098ef0 100644 --- a/docs/defaultEvents/player/onPlayerEquipShield.md +++ b/docs/defaultEvents/player/onPlayerEquipShield.md @@ -1,12 +1,12 @@ # `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/) ## Parameters * `dict` **kwargs**: * `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 ```python diff --git a/docs/defaultEvents/player/onPlayerEquipSpell.md b/docs/defaultEvents/player/onPlayerEquipSpell.md index abf9d36..c4cc779 100644 --- a/docs/defaultEvents/player/onPlayerEquipSpell.md +++ b/docs/defaultEvents/player/onPlayerEquipSpell.md @@ -1,5 +1,5 @@ # `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/) @@ -7,7 +7,7 @@ Original: [onPlayerEquipSpell](https://gothicmultiplayerteam.gitlab.io/docs/0.3. * `dict` **kwargs**: * `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>`. - * `str` **str | null**: instance: the item instance from Daedalus scripts. + * `str` **instance**: the item instance from Daedalus scripts. ## Usage ```python diff --git a/docs/events/addEvent.md b/docs/events/addEvent.md deleted file mode 100644 index a93b05c..0000000 --- a/docs/events/addEvent.md +++ /dev/null @@ -1,2 +0,0 @@ -# `function` addEvent -::: g2o.events.addEvent \ No newline at end of file diff --git a/docs/events/callEvent.md b/docs/events/callEvent.md deleted file mode 100644 index 207cd08..0000000 --- a/docs/events/callEvent.md +++ /dev/null @@ -1,2 +0,0 @@ -# `function` callEvent -::: g2o.events.callEvent \ No newline at end of file diff --git a/docs/events/event.md b/docs/events/event.md deleted file mode 100644 index 915b3ad..0000000 --- a/docs/events/event.md +++ /dev/null @@ -1,2 +0,0 @@ -# `function` event -::: g2o.events.event \ No newline at end of file diff --git a/docs/events/removeEvent.md b/docs/events/removeEvent.md deleted file mode 100644 index 355756a..0000000 --- a/docs/events/removeEvent.md +++ /dev/null @@ -1,2 +0,0 @@ -# `function` removeEvent -::: g2o.events.removeEvent \ No newline at end of file diff --git a/docs/events/removeEventHandler.md b/docs/events/removeEventHandler.md deleted file mode 100644 index c993332..0000000 --- a/docs/events/removeEventHandler.md +++ /dev/null @@ -1,2 +0,0 @@ -# `function` removeEventHandler -::: g2o.events.removeEventHandler \ No newline at end of file diff --git a/docs/events/toggleEvent.md b/docs/events/toggleEvent.md deleted file mode 100644 index 3f04a0f..0000000 --- a/docs/events/toggleEvent.md +++ /dev/null @@ -1,2 +0,0 @@ -# `function` toggleEvent -::: g2o.events.toggleEvent \ No newline at end of file diff --git a/docs/functions/chat/sendMessageToAll.md b/docs/functions/chat/sendMessageToAll.md new file mode 100644 index 0000000..2fe2f91 --- /dev/null +++ b/docs/functions/chat/sendMessageToAll.md @@ -0,0 +1,2 @@ +# `function` sendMessageToAll +::: g2o.functions.chat.sendMessageToAll \ No newline at end of file diff --git a/docs/functions/chat/sendMessageToPlayer.md b/docs/functions/chat/sendMessageToPlayer.md new file mode 100644 index 0000000..a5bef73 --- /dev/null +++ b/docs/functions/chat/sendMessageToPlayer.md @@ -0,0 +1,2 @@ +# `function` sendMessageToPlayer +::: g2o.functions.chat.sendMessageToPlayer \ No newline at end of file diff --git a/docs/functions/chat/sendPlayerMessageToAll.md b/docs/functions/chat/sendPlayerMessageToAll.md new file mode 100644 index 0000000..ea00374 --- /dev/null +++ b/docs/functions/chat/sendPlayerMessageToAll.md @@ -0,0 +1,2 @@ +# `function` sendPlayerMessageToAll +::: g2o.functions.chat.sendPlayerMessageToAll \ No newline at end of file diff --git a/docs/functions/chat/sendPlayerMessageToPlayer.md b/docs/functions/chat/sendPlayerMessageToPlayer.md new file mode 100644 index 0000000..d694243 --- /dev/null +++ b/docs/functions/chat/sendPlayerMessageToPlayer.md @@ -0,0 +1,2 @@ +# `function` sendPlayerMessageToPlayer +::: g2o.functions.chat.sendPlayerMessageToPlayer \ No newline at end of file diff --git a/docs/functions/event/addEvent.md b/docs/functions/event/addEvent.md new file mode 100644 index 0000000..af46255 --- /dev/null +++ b/docs/functions/event/addEvent.md @@ -0,0 +1,2 @@ +# `function` addEvent +::: g2o.functions.event.addEvent \ No newline at end of file diff --git a/docs/functions/event/callEvent.md b/docs/functions/event/callEvent.md new file mode 100644 index 0000000..67d5b71 --- /dev/null +++ b/docs/functions/event/callEvent.md @@ -0,0 +1,2 @@ +# `function` callEvent +::: g2o.functions.event.callEvent \ No newline at end of file diff --git a/docs/functions/event/event.md b/docs/functions/event/event.md new file mode 100644 index 0000000..572ab42 --- /dev/null +++ b/docs/functions/event/event.md @@ -0,0 +1,2 @@ +# `function` event +::: g2o.functions.event.event \ No newline at end of file diff --git a/docs/functions/event/removeEvent.md b/docs/functions/event/removeEvent.md new file mode 100644 index 0000000..63a4d69 --- /dev/null +++ b/docs/functions/event/removeEvent.md @@ -0,0 +1,2 @@ +# `function` removeEvent +::: g2o.functions.event.removeEvent \ No newline at end of file diff --git a/docs/functions/event/removeEventHandler.md b/docs/functions/event/removeEventHandler.md new file mode 100644 index 0000000..f8bf97d --- /dev/null +++ b/docs/functions/event/removeEventHandler.md @@ -0,0 +1,2 @@ +# `function` removeEventHandler +::: g2o.functions.event.removeEventHandler \ No newline at end of file diff --git a/docs/functions/event/toggleEvent.md b/docs/functions/event/toggleEvent.md new file mode 100644 index 0000000..64ce90c --- /dev/null +++ b/docs/functions/event/toggleEvent.md @@ -0,0 +1,2 @@ +# `function` toggleEvent +::: g2o.functions.event.toggleEvent \ No newline at end of file diff --git a/docs/functions/game/exit.md b/docs/functions/game/exit.md new file mode 100644 index 0000000..a5c79e0 --- /dev/null +++ b/docs/functions/game/exit.md @@ -0,0 +1,2 @@ +# `function` exit +::: g2o.functions.game.exit \ No newline at end of file diff --git a/docs/functions/game/getDayLength.md b/docs/functions/game/getDayLength.md new file mode 100644 index 0000000..26ed93b --- /dev/null +++ b/docs/functions/game/getDayLength.md @@ -0,0 +1,2 @@ +# `function` getDayLength +::: g2o.functions.game.getDayLength \ No newline at end of file diff --git a/docs/functions/game/getHostname.md b/docs/functions/game/getHostname.md new file mode 100644 index 0000000..37db951 --- /dev/null +++ b/docs/functions/game/getHostname.md @@ -0,0 +1,2 @@ +# `function` getHostname +::: g2o.functions.game.getHostname \ No newline at end of file diff --git a/docs/functions/game/getMaxSlots.md b/docs/functions/game/getMaxSlots.md new file mode 100644 index 0000000..b81f2c0 --- /dev/null +++ b/docs/functions/game/getMaxSlots.md @@ -0,0 +1,2 @@ +# `function` getMaxSlots +::: g2o.functions.game.getMaxSlots \ No newline at end of file diff --git a/docs/functions/game/getPlayersCount.md b/docs/functions/game/getPlayersCount.md new file mode 100644 index 0000000..6541a41 --- /dev/null +++ b/docs/functions/game/getPlayersCount.md @@ -0,0 +1,2 @@ +# `function` getPlayersCount +::: g2o.functions.game.getPlayersCount \ No newline at end of file diff --git a/docs/functions/game/getServerDescription.md b/docs/functions/game/getServerDescription.md new file mode 100644 index 0000000..3084222 --- /dev/null +++ b/docs/functions/game/getServerDescription.md @@ -0,0 +1,2 @@ +# `function` getServerDescription +::: g2o.functions.game.getServerDescription \ No newline at end of file diff --git a/docs/functions/game/getServerWorld.md b/docs/functions/game/getServerWorld.md new file mode 100644 index 0000000..bcf8cc7 --- /dev/null +++ b/docs/functions/game/getServerWorld.md @@ -0,0 +1,2 @@ +# `function` getServerWorld +::: g2o.functions.game.getServerWorld \ No newline at end of file diff --git a/docs/functions/game/getTime.md b/docs/functions/game/getTime.md new file mode 100644 index 0000000..9795d93 --- /dev/null +++ b/docs/functions/game/getTime.md @@ -0,0 +1,2 @@ +# `function` getTime +::: g2o.functions.game.getTime \ No newline at end of file diff --git a/docs/functions/game/serverLog.md b/docs/functions/game/serverLog.md new file mode 100644 index 0000000..3a6cb5a --- /dev/null +++ b/docs/functions/game/serverLog.md @@ -0,0 +1,2 @@ +# `function` serverLog +::: g2o.functions.game.serverLog \ No newline at end of file diff --git a/docs/functions/game/setDayLength.md b/docs/functions/game/setDayLength.md new file mode 100644 index 0000000..f8c8c13 --- /dev/null +++ b/docs/functions/game/setDayLength.md @@ -0,0 +1,2 @@ +# `function` setDayLength +::: g2o.functions.game.setDayLength \ No newline at end of file diff --git a/docs/functions/game/setServerDescription.md b/docs/functions/game/setServerDescription.md new file mode 100644 index 0000000..e87d103 --- /dev/null +++ b/docs/functions/game/setServerDescription.md @@ -0,0 +1,2 @@ +# `function` setServerDescription +::: g2o.functions.game.setServerDescription \ No newline at end of file diff --git a/docs/functions/game/setServerWorld.md b/docs/functions/game/setServerWorld.md new file mode 100644 index 0000000..aa39aea --- /dev/null +++ b/docs/functions/game/setServerWorld.md @@ -0,0 +1,2 @@ +# `function` setServerWorld +::: g2o.functions.game.setServerWorld \ No newline at end of file diff --git a/docs/functions/game/setTime.md b/docs/functions/game/setTime.md new file mode 100644 index 0000000..746da62 --- /dev/null +++ b/docs/functions/game/setTime.md @@ -0,0 +1,2 @@ +# `function` setTime +::: g2o.functions.game.setTime \ No newline at end of file diff --git a/docs/functions/npc/clearNpcActions.md b/docs/functions/npc/clearNpcActions.md new file mode 100644 index 0000000..260b721 --- /dev/null +++ b/docs/functions/npc/clearNpcActions.md @@ -0,0 +1,2 @@ +# `function` clearNpcActions +::: g2o.functions.npc.clearNpcActions \ No newline at end of file diff --git a/docs/functions/npc/createNpc.md b/docs/functions/npc/createNpc.md new file mode 100644 index 0000000..9ca47f4 --- /dev/null +++ b/docs/functions/npc/createNpc.md @@ -0,0 +1,2 @@ +# `function` createNpc +::: g2o.functions.npc.createNpc \ No newline at end of file diff --git a/docs/functions/npc/destroyNpc.md b/docs/functions/npc/destroyNpc.md new file mode 100644 index 0000000..749a635 --- /dev/null +++ b/docs/functions/npc/destroyNpc.md @@ -0,0 +1,2 @@ +# `function` destroyNpc +::: g2o.functions.npc.destroyNpc \ No newline at end of file diff --git a/docs/functions/npc/getNpcAction.md b/docs/functions/npc/getNpcAction.md new file mode 100644 index 0000000..a4eecbe --- /dev/null +++ b/docs/functions/npc/getNpcAction.md @@ -0,0 +1,2 @@ +# `function` getNpcAction +::: g2o.functions.npc.getNpcAction \ No newline at end of file diff --git a/docs/functions/npc/getNpcActions.md b/docs/functions/npc/getNpcActions.md new file mode 100644 index 0000000..87e4f57 --- /dev/null +++ b/docs/functions/npc/getNpcActions.md @@ -0,0 +1,2 @@ +# `function` getNpcActions +::: g2o.functions.npc.getNpcActions \ No newline at end of file diff --git a/docs/functions/npc/getNpcActionsCount.md b/docs/functions/npc/getNpcActionsCount.md new file mode 100644 index 0000000..a142724 --- /dev/null +++ b/docs/functions/npc/getNpcActionsCount.md @@ -0,0 +1,2 @@ +# `function` getNpcActionsCount +::: g2o.functions.npc.getNpcActionsCount \ No newline at end of file diff --git a/docs/functions/npc/getNpcHostPlayer.md b/docs/functions/npc/getNpcHostPlayer.md new file mode 100644 index 0000000..3b05e65 --- /dev/null +++ b/docs/functions/npc/getNpcHostPlayer.md @@ -0,0 +1,2 @@ +# `function` getNpcHostPlayer +::: g2o.functions.npc.getNpcHostPlayer \ No newline at end of file diff --git a/docs/functions/npc/getNpcLastActionId.md b/docs/functions/npc/getNpcLastActionId.md new file mode 100644 index 0000000..cc8d304 --- /dev/null +++ b/docs/functions/npc/getNpcLastActionId.md @@ -0,0 +1,2 @@ +# `function` getNpcLastActionId +::: g2o.functions.npc.getNpcLastActionId \ No newline at end of file diff --git a/docs/functions/npc/isNpc.md b/docs/functions/npc/isNpc.md new file mode 100644 index 0000000..0f1a383 --- /dev/null +++ b/docs/functions/npc/isNpc.md @@ -0,0 +1,2 @@ +# `function` isNpc +::: g2o.functions.npc.isNpc \ No newline at end of file diff --git a/docs/functions/npc/isNpcActionFinished.md b/docs/functions/npc/isNpcActionFinished.md new file mode 100644 index 0000000..9af658e --- /dev/null +++ b/docs/functions/npc/isNpcActionFinished.md @@ -0,0 +1,2 @@ +# `function` isNpcActionFinished +::: g2o.functions.npc.isNpcActionFinished \ No newline at end of file diff --git a/docs/functions/npc/npcAttackMelee.md b/docs/functions/npc/npcAttackMelee.md new file mode 100644 index 0000000..3c2037c --- /dev/null +++ b/docs/functions/npc/npcAttackMelee.md @@ -0,0 +1,2 @@ +# `function` npcAttackMelee +::: g2o.functions.npc.npcAttackMelee \ No newline at end of file diff --git a/docs/functions/npc/npcAttackRanged.md b/docs/functions/npc/npcAttackRanged.md new file mode 100644 index 0000000..de22ed0 --- /dev/null +++ b/docs/functions/npc/npcAttackRanged.md @@ -0,0 +1,2 @@ +# `function` npcAttackRanged +::: g2o.functions.npc.npcAttackRanged \ No newline at end of file diff --git a/docs/functions/npc/npcSpellCast.md b/docs/functions/npc/npcSpellCast.md new file mode 100644 index 0000000..ff3a578 --- /dev/null +++ b/docs/functions/npc/npcSpellCast.md @@ -0,0 +1,2 @@ +# `function` npcSpellCast +::: g2o.functions.npc.npcSpellCast \ No newline at end of file diff --git a/docs/functions/npc/npcUseClosestMob.md b/docs/functions/npc/npcUseClosestMob.md new file mode 100644 index 0000000..8fed2db --- /dev/null +++ b/docs/functions/npc/npcUseClosestMob.md @@ -0,0 +1,2 @@ +# `function` npcUseClosestMob +::: g2o.functions.npc.npcUseClosestMob \ No newline at end of file diff --git a/docs/functions/npc/setNpcHostPlayer.md b/docs/functions/npc/setNpcHostPlayer.md new file mode 100644 index 0000000..4ba8aa7 --- /dev/null +++ b/docs/functions/npc/setNpcHostPlayer.md @@ -0,0 +1,2 @@ +# `function` setNpcHostPlayer +::: g2o.functions.npc.setNpcHostPlayer \ No newline at end of file diff --git a/docs/functions/player/addBan.md b/docs/functions/player/addBan.md new file mode 100644 index 0000000..e8b588e --- /dev/null +++ b/docs/functions/player/addBan.md @@ -0,0 +1,2 @@ +#`function` addBan +::: g2o.functions.player.addBan \ No newline at end of file diff --git a/docs/functions/player/applyPlayerOverlay.md b/docs/functions/player/applyPlayerOverlay.md new file mode 100644 index 0000000..3db1421 --- /dev/null +++ b/docs/functions/player/applyPlayerOverlay.md @@ -0,0 +1,2 @@ +#`function` applyPlayerOverlay +::: g2o.functions.player.applyPlayerOverlay \ No newline at end of file diff --git a/docs/functions/player/ban.md b/docs/functions/player/ban.md new file mode 100644 index 0000000..4cbdb94 --- /dev/null +++ b/docs/functions/player/ban.md @@ -0,0 +1,2 @@ +#`function` ban +::: g2o.functions.player.ban \ No newline at end of file diff --git a/docs/functions/player/drawWeapon.md b/docs/functions/player/drawWeapon.md new file mode 100644 index 0000000..d4564c4 --- /dev/null +++ b/docs/functions/player/drawWeapon.md @@ -0,0 +1,2 @@ +#`function` drawWeapon +::: g2o.functions.player.drawWeapon \ No newline at end of file diff --git a/docs/functions/player/equipItem.md b/docs/functions/player/equipItem.md new file mode 100644 index 0000000..e243166 --- /dev/null +++ b/docs/functions/player/equipItem.md @@ -0,0 +1,2 @@ +#`function` equipItem +::: g2o.functions.player.equipItem \ No newline at end of file diff --git a/docs/functions/player/getPlayerAmulet.md b/docs/functions/player/getPlayerAmulet.md new file mode 100644 index 0000000..12a4a4e --- /dev/null +++ b/docs/functions/player/getPlayerAmulet.md @@ -0,0 +1,2 @@ +#`function` getPlayerAmulet +::: g2o.functions.player.getPlayerAmulet \ No newline at end of file diff --git a/docs/functions/player/getPlayerAngle.md b/docs/functions/player/getPlayerAngle.md new file mode 100644 index 0000000..d4dd1d0 --- /dev/null +++ b/docs/functions/player/getPlayerAngle.md @@ -0,0 +1,2 @@ +#`function` getPlayerAngle +::: g2o.functions.player.getPlayerAngle \ No newline at end of file diff --git a/docs/functions/player/getPlayerAni.md b/docs/functions/player/getPlayerAni.md new file mode 100644 index 0000000..36a0e42 --- /dev/null +++ b/docs/functions/player/getPlayerAni.md @@ -0,0 +1,2 @@ +#`function` getPlayerAni +::: g2o.functions.player.getPlayerAni \ No newline at end of file diff --git a/docs/functions/player/getPlayerArmor.md b/docs/functions/player/getPlayerArmor.md new file mode 100644 index 0000000..1dac6b1 --- /dev/null +++ b/docs/functions/player/getPlayerArmor.md @@ -0,0 +1,2 @@ +#`function` getPlayerArmor +::: g2o.functions.player.getPlayerArmor \ No newline at end of file diff --git a/docs/functions/player/getPlayerAtVector.md b/docs/functions/player/getPlayerAtVector.md new file mode 100644 index 0000000..73bbfd7 --- /dev/null +++ b/docs/functions/player/getPlayerAtVector.md @@ -0,0 +1,2 @@ +#`function` getPlayerAtVector +::: g2o.functions.player.getPlayerAtVector \ No newline at end of file diff --git a/docs/functions/player/getPlayerBelt.md b/docs/functions/player/getPlayerBelt.md new file mode 100644 index 0000000..9e1c5e7 --- /dev/null +++ b/docs/functions/player/getPlayerBelt.md @@ -0,0 +1,2 @@ +#`function` getPlayerBelt +::: g2o.functions.player.getPlayerBelt \ No newline at end of file diff --git a/docs/functions/player/getPlayerCameraPosition.md b/docs/functions/player/getPlayerCameraPosition.md new file mode 100644 index 0000000..c71e714 --- /dev/null +++ b/docs/functions/player/getPlayerCameraPosition.md @@ -0,0 +1,2 @@ +#`function` getPlayerCameraPosition +::: g2o.functions.player.getPlayerCameraPosition \ No newline at end of file diff --git a/docs/functions/player/getPlayerCollision.md b/docs/functions/player/getPlayerCollision.md new file mode 100644 index 0000000..cc22aef --- /dev/null +++ b/docs/functions/player/getPlayerCollision.md @@ -0,0 +1,2 @@ +#`function` getPlayerCollision +::: g2o.functions.player.getPlayerCollision \ No newline at end of file diff --git a/docs/functions/player/getPlayerColor.md b/docs/functions/player/getPlayerColor.md new file mode 100644 index 0000000..6e80b3a --- /dev/null +++ b/docs/functions/player/getPlayerColor.md @@ -0,0 +1,2 @@ +#`function` getPlayerColor +::: g2o.functions.player.getPlayerColor \ No newline at end of file diff --git a/docs/functions/player/getPlayerContext.md b/docs/functions/player/getPlayerContext.md new file mode 100644 index 0000000..ba6c143 --- /dev/null +++ b/docs/functions/player/getPlayerContext.md @@ -0,0 +1,2 @@ +#`function` getPlayerContext +::: g2o.functions.player.getPlayerContext \ No newline at end of file diff --git a/docs/functions/player/getPlayerDexterity.md b/docs/functions/player/getPlayerDexterity.md new file mode 100644 index 0000000..d42be22 --- /dev/null +++ b/docs/functions/player/getPlayerDexterity.md @@ -0,0 +1,2 @@ +#`function` getPlayerDexterity +::: g2o.functions.player.getPlayerDexterity \ No newline at end of file diff --git a/docs/functions/player/getPlayerFaceAnis.md b/docs/functions/player/getPlayerFaceAnis.md new file mode 100644 index 0000000..3aa2adf --- /dev/null +++ b/docs/functions/player/getPlayerFaceAnis.md @@ -0,0 +1,2 @@ +#`function` getPlayerFaceAnis +::: g2o.functions.player.getPlayerFaceAnis \ No newline at end of file diff --git a/docs/functions/player/getPlayerFatness.md b/docs/functions/player/getPlayerFatness.md new file mode 100644 index 0000000..65e5722 --- /dev/null +++ b/docs/functions/player/getPlayerFatness.md @@ -0,0 +1,2 @@ +#`function` getPlayerFatness +::: g2o.functions.player.getPlayerFatness \ No newline at end of file diff --git a/docs/functions/player/getPlayerFocus.md b/docs/functions/player/getPlayerFocus.md new file mode 100644 index 0000000..c42b479 --- /dev/null +++ b/docs/functions/player/getPlayerFocus.md @@ -0,0 +1,2 @@ +#`function` getPlayerFocus +::: g2o.functions.player.getPlayerFocus \ No newline at end of file diff --git a/docs/functions/player/getPlayerHealth.md b/docs/functions/player/getPlayerHealth.md new file mode 100644 index 0000000..2196ace --- /dev/null +++ b/docs/functions/player/getPlayerHealth.md @@ -0,0 +1,2 @@ +#`function` getPlayerHealth +::: g2o.functions.player.getPlayerHealth \ No newline at end of file diff --git a/docs/functions/player/getPlayerHelmet.md b/docs/functions/player/getPlayerHelmet.md new file mode 100644 index 0000000..3fe611c --- /dev/null +++ b/docs/functions/player/getPlayerHelmet.md @@ -0,0 +1,2 @@ +#`function` getPlayerHelmet +::: g2o.functions.player.getPlayerHelmet \ No newline at end of file diff --git a/docs/functions/player/getPlayerIP.md b/docs/functions/player/getPlayerIP.md new file mode 100644 index 0000000..39a3316 --- /dev/null +++ b/docs/functions/player/getPlayerIP.md @@ -0,0 +1,2 @@ +#`function` getPlayerIP +::: g2o.functions.player.getPlayerIP \ No newline at end of file diff --git a/docs/functions/player/getPlayerInstance.md b/docs/functions/player/getPlayerInstance.md new file mode 100644 index 0000000..38f7b08 --- /dev/null +++ b/docs/functions/player/getPlayerInstance.md @@ -0,0 +1,2 @@ +#`function` getPlayerInstance +::: g2o.functions.player.getPlayerInstance \ No newline at end of file diff --git a/docs/functions/player/getPlayerInvisible.md b/docs/functions/player/getPlayerInvisible.md new file mode 100644 index 0000000..7f8670d --- /dev/null +++ b/docs/functions/player/getPlayerInvisible.md @@ -0,0 +1,2 @@ +#`function` getPlayerInvisible +::: g2o.functions.player.getPlayerInvisible \ No newline at end of file diff --git a/docs/functions/player/getPlayerMacAddr.md b/docs/functions/player/getPlayerMacAddr.md new file mode 100644 index 0000000..81218b5 --- /dev/null +++ b/docs/functions/player/getPlayerMacAddr.md @@ -0,0 +1,2 @@ +#`function` getPlayerMacAddr +::: g2o.functions.player.getPlayerMacAddr \ No newline at end of file diff --git a/docs/functions/player/getPlayerMana.md b/docs/functions/player/getPlayerMana.md new file mode 100644 index 0000000..ebecf40 --- /dev/null +++ b/docs/functions/player/getPlayerMana.md @@ -0,0 +1,2 @@ +#`function` getPlayerMana +::: g2o.functions.player.getPlayerMana \ No newline at end of file diff --git a/docs/functions/player/getPlayerMaxHealth.md b/docs/functions/player/getPlayerMaxHealth.md new file mode 100644 index 0000000..3094e52 --- /dev/null +++ b/docs/functions/player/getPlayerMaxHealth.md @@ -0,0 +1,2 @@ +#`function` getPlayerMaxHealth +::: g2o.functions.player.getPlayerMaxHealth \ No newline at end of file diff --git a/docs/functions/player/getPlayerMaxMana.md b/docs/functions/player/getPlayerMaxMana.md new file mode 100644 index 0000000..b711d6e --- /dev/null +++ b/docs/functions/player/getPlayerMaxMana.md @@ -0,0 +1,2 @@ +#`function` getPlayerMaxMana +::: g2o.functions.player.getPlayerMaxMana \ No newline at end of file diff --git a/docs/functions/player/getPlayerMeleeWeapon.md b/docs/functions/player/getPlayerMeleeWeapon.md new file mode 100644 index 0000000..e6c5c71 --- /dev/null +++ b/docs/functions/player/getPlayerMeleeWeapon.md @@ -0,0 +1,2 @@ +#`function` getPlayerMeleeWeapon +::: g2o.functions.player.getPlayerMeleeWeapon \ No newline at end of file diff --git a/docs/functions/player/getPlayerName.md b/docs/functions/player/getPlayerName.md new file mode 100644 index 0000000..90a499e --- /dev/null +++ b/docs/functions/player/getPlayerName.md @@ -0,0 +1,2 @@ +#`function` getPlayerName +::: g2o.functions.player.getPlayerName \ No newline at end of file diff --git a/docs/functions/player/getPlayerPing.md b/docs/functions/player/getPlayerPing.md new file mode 100644 index 0000000..b6f20da --- /dev/null +++ b/docs/functions/player/getPlayerPing.md @@ -0,0 +1,2 @@ +#`function` getPlayerPing +::: g2o.functions.player.getPlayerPing \ No newline at end of file diff --git a/docs/functions/player/getPlayerPosition.md b/docs/functions/player/getPlayerPosition.md new file mode 100644 index 0000000..bb0552f --- /dev/null +++ b/docs/functions/player/getPlayerPosition.md @@ -0,0 +1,2 @@ +#`function` getPlayerPosition +::: g2o.functions.player.getPlayerPosition \ No newline at end of file diff --git a/docs/functions/player/getPlayerRangedWeapon.md b/docs/functions/player/getPlayerRangedWeapon.md new file mode 100644 index 0000000..8d468c5 --- /dev/null +++ b/docs/functions/player/getPlayerRangedWeapon.md @@ -0,0 +1,2 @@ +#`function` getPlayerRangedWeapon +::: g2o.functions.player.getPlayerRangedWeapon \ No newline at end of file diff --git a/docs/functions/player/getPlayerRespawnTime.md b/docs/functions/player/getPlayerRespawnTime.md new file mode 100644 index 0000000..392b55a --- /dev/null +++ b/docs/functions/player/getPlayerRespawnTime.md @@ -0,0 +1,2 @@ +#`function` getPlayerRespawnTime +::: g2o.functions.player.getPlayerRespawnTime \ No newline at end of file diff --git a/docs/functions/player/getPlayerRing.md b/docs/functions/player/getPlayerRing.md new file mode 100644 index 0000000..9ca2f35 --- /dev/null +++ b/docs/functions/player/getPlayerRing.md @@ -0,0 +1,2 @@ +#`function` getPlayerRing +::: g2o.functions.player.getPlayerRing \ No newline at end of file diff --git a/docs/functions/player/getPlayerScale.md b/docs/functions/player/getPlayerScale.md new file mode 100644 index 0000000..aaa2423 --- /dev/null +++ b/docs/functions/player/getPlayerScale.md @@ -0,0 +1,2 @@ +#`function` getPlayerScale +::: g2o.functions.player.getPlayerScale \ No newline at end of file diff --git a/docs/functions/player/getPlayerSerial.md b/docs/functions/player/getPlayerSerial.md new file mode 100644 index 0000000..b589492 --- /dev/null +++ b/docs/functions/player/getPlayerSerial.md @@ -0,0 +1,2 @@ +#`function` getPlayerSerial +::: g2o.functions.player.getPlayerSerial \ No newline at end of file diff --git a/docs/functions/player/getPlayerShield.md b/docs/functions/player/getPlayerShield.md new file mode 100644 index 0000000..b05ab9a --- /dev/null +++ b/docs/functions/player/getPlayerShield.md @@ -0,0 +1,2 @@ +#`function` getPlayerShield +::: g2o.functions.player.getPlayerShield \ No newline at end of file diff --git a/docs/functions/player/getPlayerSkillWeapon.md b/docs/functions/player/getPlayerSkillWeapon.md new file mode 100644 index 0000000..96f13e3 --- /dev/null +++ b/docs/functions/player/getPlayerSkillWeapon.md @@ -0,0 +1,2 @@ +#`function` getPlayerSkillWeapon +::: g2o.functions.player.getPlayerSkillWeapon \ No newline at end of file diff --git a/docs/functions/player/getPlayerSpell.md b/docs/functions/player/getPlayerSpell.md new file mode 100644 index 0000000..3b550ca --- /dev/null +++ b/docs/functions/player/getPlayerSpell.md @@ -0,0 +1,2 @@ +#`function` getPlayerSpell +::: g2o.functions.player.getPlayerSpell \ No newline at end of file diff --git a/docs/functions/player/getPlayerStrength.md b/docs/functions/player/getPlayerStrength.md new file mode 100644 index 0000000..6cb167f --- /dev/null +++ b/docs/functions/player/getPlayerStrength.md @@ -0,0 +1,2 @@ +#`function` getPlayerStrength +::: g2o.functions.player.getPlayerStrength \ No newline at end of file diff --git a/docs/functions/player/getPlayerTalent.md b/docs/functions/player/getPlayerTalent.md new file mode 100644 index 0000000..c2b977d --- /dev/null +++ b/docs/functions/player/getPlayerTalent.md @@ -0,0 +1,2 @@ +#`function` getPlayerTalent +::: g2o.functions.player.getPlayerTalent \ No newline at end of file diff --git a/docs/functions/player/getPlayerVirtualWorld.md b/docs/functions/player/getPlayerVirtualWorld.md new file mode 100644 index 0000000..2a83835 --- /dev/null +++ b/docs/functions/player/getPlayerVirtualWorld.md @@ -0,0 +1,2 @@ +#`function` getPlayerVirtualWorld +::: g2o.functions.player.getPlayerVirtualWorld \ No newline at end of file diff --git a/docs/functions/player/getPlayerVisual.md b/docs/functions/player/getPlayerVisual.md new file mode 100644 index 0000000..7aeabce --- /dev/null +++ b/docs/functions/player/getPlayerVisual.md @@ -0,0 +1,2 @@ +#`function` getPlayerVisual +::: g2o.functions.player.getPlayerVisual \ No newline at end of file diff --git a/docs/functions/player/getPlayerWeaponMode.md b/docs/functions/player/getPlayerWeaponMode.md new file mode 100644 index 0000000..9978588 --- /dev/null +++ b/docs/functions/player/getPlayerWeaponMode.md @@ -0,0 +1,2 @@ +#`function` getPlayerWeaponMode +::: g2o.functions.player.getPlayerWeaponMode \ No newline at end of file diff --git a/docs/functions/player/getPlayerWorld.md b/docs/functions/player/getPlayerWorld.md new file mode 100644 index 0000000..5d6450c --- /dev/null +++ b/docs/functions/player/getPlayerWorld.md @@ -0,0 +1,2 @@ +#`function` getPlayerWorld +::: g2o.functions.player.getPlayerWorld \ No newline at end of file diff --git a/docs/functions/player/giveItem.md b/docs/functions/player/giveItem.md new file mode 100644 index 0000000..4419f7d --- /dev/null +++ b/docs/functions/player/giveItem.md @@ -0,0 +1,2 @@ +#`function` giveItem +::: g2o.functions.player.giveItem \ No newline at end of file diff --git a/docs/functions/player/hitPlayer.md b/docs/functions/player/hitPlayer.md new file mode 100644 index 0000000..251e1ad --- /dev/null +++ b/docs/functions/player/hitPlayer.md @@ -0,0 +1,2 @@ +#`function` hitPlayer +::: g2o.functions.player.hitPlayer \ No newline at end of file diff --git a/docs/functions/player/isPlayerConnected.md b/docs/functions/player/isPlayerConnected.md new file mode 100644 index 0000000..2cd80fa --- /dev/null +++ b/docs/functions/player/isPlayerConnected.md @@ -0,0 +1,2 @@ +#`function` isPlayerConnected +::: g2o.functions.player.isPlayerConnected \ No newline at end of file diff --git a/docs/functions/player/isPlayerDead.md b/docs/functions/player/isPlayerDead.md new file mode 100644 index 0000000..81a0577 --- /dev/null +++ b/docs/functions/player/isPlayerDead.md @@ -0,0 +1,2 @@ +#`function` isPlayerDead +::: g2o.functions.player.isPlayerDead \ No newline at end of file diff --git a/docs/functions/player/isPlayerSpawned.md b/docs/functions/player/isPlayerSpawned.md new file mode 100644 index 0000000..d8255a7 --- /dev/null +++ b/docs/functions/player/isPlayerSpawned.md @@ -0,0 +1,2 @@ +#`function` isPlayerSpawned +::: g2o.functions.player.isPlayerSpawned \ No newline at end of file diff --git a/docs/functions/player/isPlayerUnconscious.md b/docs/functions/player/isPlayerUnconscious.md new file mode 100644 index 0000000..c707ddc --- /dev/null +++ b/docs/functions/player/isPlayerUnconscious.md @@ -0,0 +1,2 @@ +#`function` isPlayerUnconscious +::: g2o.functions.player.isPlayerUnconscious \ No newline at end of file diff --git a/docs/functions/player/kick.md b/docs/functions/player/kick.md new file mode 100644 index 0000000..d0c6bc7 --- /dev/null +++ b/docs/functions/player/kick.md @@ -0,0 +1,2 @@ +#`function` kick +::: g2o.functions.player.kick \ No newline at end of file diff --git a/docs/functions/player/playAni.md b/docs/functions/player/playAni.md new file mode 100644 index 0000000..2d307de --- /dev/null +++ b/docs/functions/player/playAni.md @@ -0,0 +1,2 @@ +#`function` playAni +::: g2o.functions.player.playAni \ No newline at end of file diff --git a/docs/functions/player/playFaceAni.md b/docs/functions/player/playFaceAni.md new file mode 100644 index 0000000..344f81f --- /dev/null +++ b/docs/functions/player/playFaceAni.md @@ -0,0 +1,2 @@ +#`function` playFaceAni +::: g2o.functions.player.playFaceAni \ No newline at end of file diff --git a/docs/functions/player/readySpell.md b/docs/functions/player/readySpell.md new file mode 100644 index 0000000..9625532 --- /dev/null +++ b/docs/functions/player/readySpell.md @@ -0,0 +1,2 @@ +#`function` readySpell +::: g2o.functions.player.readySpell \ No newline at end of file diff --git a/docs/functions/player/removeItem.md b/docs/functions/player/removeItem.md new file mode 100644 index 0000000..fe8ff65 --- /dev/null +++ b/docs/functions/player/removeItem.md @@ -0,0 +1,2 @@ +#`function` removeItem +::: g2o.functions.player.removeItem \ No newline at end of file diff --git a/docs/functions/player/removePlayerOverlay.md b/docs/functions/player/removePlayerOverlay.md new file mode 100644 index 0000000..4b4d934 --- /dev/null +++ b/docs/functions/player/removePlayerOverlay.md @@ -0,0 +1,2 @@ +#`function` removePlayerOverlay +::: g2o.functions.player.removePlayerOverlay \ No newline at end of file diff --git a/docs/functions/player/removeWeapon.md b/docs/functions/player/removeWeapon.md new file mode 100644 index 0000000..077e642 --- /dev/null +++ b/docs/functions/player/removeWeapon.md @@ -0,0 +1,2 @@ +#`function` removeWeapon +::: g2o.functions.player.removeWeapon \ No newline at end of file diff --git a/docs/functions/player/setPlayerAngle.md b/docs/functions/player/setPlayerAngle.md new file mode 100644 index 0000000..df389a3 --- /dev/null +++ b/docs/functions/player/setPlayerAngle.md @@ -0,0 +1,2 @@ +#`function` setPlayerAngle +::: g2o.functions.player.setPlayerAngle \ No newline at end of file diff --git a/docs/functions/player/setPlayerCollision.md b/docs/functions/player/setPlayerCollision.md new file mode 100644 index 0000000..51ae600 --- /dev/null +++ b/docs/functions/player/setPlayerCollision.md @@ -0,0 +1,2 @@ +#`function` setPlayerCollision +::: g2o.functions.player.setPlayerCollision \ No newline at end of file diff --git a/docs/functions/player/setPlayerColor.md b/docs/functions/player/setPlayerColor.md new file mode 100644 index 0000000..eb3bf4b --- /dev/null +++ b/docs/functions/player/setPlayerColor.md @@ -0,0 +1,2 @@ +#`function` setPlayerColor +::: g2o.functions.player.setPlayerColor \ No newline at end of file diff --git a/docs/functions/player/setPlayerDexterity.md b/docs/functions/player/setPlayerDexterity.md new file mode 100644 index 0000000..7881693 --- /dev/null +++ b/docs/functions/player/setPlayerDexterity.md @@ -0,0 +1,2 @@ +#`function` setPlayerDexterity +::: g2o.functions.player.setPlayerDexterity \ No newline at end of file diff --git a/docs/functions/player/setPlayerFatness.md b/docs/functions/player/setPlayerFatness.md new file mode 100644 index 0000000..85b8693 --- /dev/null +++ b/docs/functions/player/setPlayerFatness.md @@ -0,0 +1,2 @@ +#`function` setPlayerFatness +::: g2o.functions.player.setPlayerFatness \ No newline at end of file diff --git a/docs/functions/player/setPlayerHealth.md b/docs/functions/player/setPlayerHealth.md new file mode 100644 index 0000000..de58fb3 --- /dev/null +++ b/docs/functions/player/setPlayerHealth.md @@ -0,0 +1,2 @@ +#`function` setPlayerHealth +::: g2o.functions.player.setPlayerHealth \ No newline at end of file diff --git a/docs/functions/player/setPlayerInstance.md b/docs/functions/player/setPlayerInstance.md new file mode 100644 index 0000000..6cb4168 --- /dev/null +++ b/docs/functions/player/setPlayerInstance.md @@ -0,0 +1,2 @@ +#`function` setPlayerInstance +::: g2o.functions.player.setPlayerInstance \ No newline at end of file diff --git a/docs/functions/player/setPlayerInvisible.md b/docs/functions/player/setPlayerInvisible.md new file mode 100644 index 0000000..a2e08aa --- /dev/null +++ b/docs/functions/player/setPlayerInvisible.md @@ -0,0 +1,2 @@ +#`function` setPlayerInvisible +::: g2o.functions.player.setPlayerInvisible \ No newline at end of file diff --git a/docs/functions/player/setPlayerMana.md b/docs/functions/player/setPlayerMana.md new file mode 100644 index 0000000..c9d6985 --- /dev/null +++ b/docs/functions/player/setPlayerMana.md @@ -0,0 +1,2 @@ +#`function` setPlayerMana +::: g2o.functions.player.setPlayerMana \ No newline at end of file diff --git a/docs/functions/player/setPlayerMaxHealth.md b/docs/functions/player/setPlayerMaxHealth.md new file mode 100644 index 0000000..1344701 --- /dev/null +++ b/docs/functions/player/setPlayerMaxHealth.md @@ -0,0 +1,2 @@ +#`function` setPlayerMaxHealth +::: g2o.functions.player.setPlayerMaxHealth \ No newline at end of file diff --git a/docs/functions/player/setPlayerMaxMana.md b/docs/functions/player/setPlayerMaxMana.md new file mode 100644 index 0000000..aeb55cb --- /dev/null +++ b/docs/functions/player/setPlayerMaxMana.md @@ -0,0 +1,2 @@ +#`function` setPlayerMaxMana +::: g2o.functions.player.setPlayerMaxMana \ No newline at end of file diff --git a/docs/functions/player/setPlayerName.md b/docs/functions/player/setPlayerName.md new file mode 100644 index 0000000..a3598a2 --- /dev/null +++ b/docs/functions/player/setPlayerName.md @@ -0,0 +1,2 @@ +#`function` setPlayerName +::: g2o.functions.player.setPlayerName \ No newline at end of file diff --git a/docs/functions/player/setPlayerRespawnTime.md b/docs/functions/player/setPlayerRespawnTime.md new file mode 100644 index 0000000..153e560 --- /dev/null +++ b/docs/functions/player/setPlayerRespawnTime.md @@ -0,0 +1,2 @@ +#`function` setPlayerRespawnTime +::: g2o.functions.player.setPlayerRespawnTime \ No newline at end of file diff --git a/docs/functions/player/setPlayerScale.md b/docs/functions/player/setPlayerScale.md new file mode 100644 index 0000000..0ad2ca2 --- /dev/null +++ b/docs/functions/player/setPlayerScale.md @@ -0,0 +1,2 @@ +#`function` setPlayerScale +::: g2o.functions.player.setPlayerScale \ No newline at end of file diff --git a/docs/functions/player/setPlayerSkillWeapon.md b/docs/functions/player/setPlayerSkillWeapon.md new file mode 100644 index 0000000..855f05b --- /dev/null +++ b/docs/functions/player/setPlayerSkillWeapon.md @@ -0,0 +1,2 @@ +#`function` setPlayerSkillWeapon +::: g2o.functions.player.setPlayerSkillWeapon \ No newline at end of file diff --git a/docs/functions/player/setPlayerStrength.md b/docs/functions/player/setPlayerStrength.md new file mode 100644 index 0000000..2c22a05 --- /dev/null +++ b/docs/functions/player/setPlayerStrength.md @@ -0,0 +1,2 @@ +#`function` setPlayerStrength +::: g2o.functions.player.setPlayerStrength \ No newline at end of file diff --git a/docs/functions/player/setPlayerTalent.md b/docs/functions/player/setPlayerTalent.md new file mode 100644 index 0000000..cb880f3 --- /dev/null +++ b/docs/functions/player/setPlayerTalent.md @@ -0,0 +1,2 @@ +#`function` setPlayerTalent +::: g2o.functions.player.setPlayerTalent \ No newline at end of file diff --git a/docs/functions/player/setPlayerVirtualWorld.md b/docs/functions/player/setPlayerVirtualWorld.md new file mode 100644 index 0000000..8f504d2 --- /dev/null +++ b/docs/functions/player/setPlayerVirtualWorld.md @@ -0,0 +1,2 @@ +#`function` setPlayerVirtualWorld +::: g2o.functions.player.setPlayerVirtualWorld \ No newline at end of file diff --git a/docs/functions/player/setPlayerVisual.md b/docs/functions/player/setPlayerVisual.md new file mode 100644 index 0000000..004b4b0 --- /dev/null +++ b/docs/functions/player/setPlayerVisual.md @@ -0,0 +1,2 @@ +#`function` setPlayerVisual +::: g2o.functions.player.setPlayerVisual \ No newline at end of file diff --git a/docs/functions/player/setPlayerWeaponMode.md b/docs/functions/player/setPlayerWeaponMode.md new file mode 100644 index 0000000..3deeb74 --- /dev/null +++ b/docs/functions/player/setPlayerWeaponMode.md @@ -0,0 +1,2 @@ +#`function` setPlayerWeaponMode +::: g2o.functions.player.setPlayerWeaponMode \ No newline at end of file diff --git a/docs/functions/player/setPlayerWorld.md b/docs/functions/player/setPlayerWorld.md new file mode 100644 index 0000000..794c51b --- /dev/null +++ b/docs/functions/player/setPlayerWorld.md @@ -0,0 +1,2 @@ +#`function` setPlayerWorld +::: g2o.functions.player.setPlayerWorld \ No newline at end of file diff --git a/docs/functions/player/spawnPlayer.md b/docs/functions/player/spawnPlayer.md new file mode 100644 index 0000000..2282583 --- /dev/null +++ b/docs/functions/player/spawnPlayer.md @@ -0,0 +1,2 @@ +#`function` spawnPlayer +::: g2o.functions.player.spawnPlayer \ No newline at end of file diff --git a/docs/functions/player/stopAni.md b/docs/functions/player/stopAni.md new file mode 100644 index 0000000..e50be7c --- /dev/null +++ b/docs/functions/player/stopAni.md @@ -0,0 +1,2 @@ +#`function` stopAni +::: g2o.functions.player.stopAni \ No newline at end of file diff --git a/docs/functions/player/stopFaceAni.md b/docs/functions/player/stopFaceAni.md new file mode 100644 index 0000000..9868f31 --- /dev/null +++ b/docs/functions/player/stopFaceAni.md @@ -0,0 +1,2 @@ +#`function` stopFaceAni +::: g2o.functions.player.stopFaceAni \ No newline at end of file diff --git a/docs/functions/player/unequipItem.md b/docs/functions/player/unequipItem.md new file mode 100644 index 0000000..e3506c0 --- /dev/null +++ b/docs/functions/player/unequipItem.md @@ -0,0 +1,2 @@ +#`function` unequipItem +::: g2o.functions.player.unequipItem \ No newline at end of file diff --git a/docs/functions/player/unreadySpell.md b/docs/functions/player/unreadySpell.md new file mode 100644 index 0000000..af8a8aa --- /dev/null +++ b/docs/functions/player/unreadySpell.md @@ -0,0 +1,2 @@ +#`function` unreadySpell +::: g2o.functions.player.unreadySpell \ No newline at end of file diff --git a/docs/functions/player/unspawnPlayer.md b/docs/functions/player/unspawnPlayer.md new file mode 100644 index 0000000..33e0d9d --- /dev/null +++ b/docs/functions/player/unspawnPlayer.md @@ -0,0 +1,2 @@ +#`function` unspawnPlayer +::: g2o.functions.player.unspawnPlayer \ No newline at end of file diff --git a/docs/functions/player/useItem.md b/docs/functions/player/useItem.md new file mode 100644 index 0000000..33fb460 --- /dev/null +++ b/docs/functions/player/useItem.md @@ -0,0 +1,2 @@ +#`function` useItem +::: g2o.functions.player.useItem \ No newline at end of file diff --git a/docs/functions/player/useItemToState.md b/docs/functions/player/useItemToState.md new file mode 100644 index 0000000..38b5762 --- /dev/null +++ b/docs/functions/player/useItemToState.md @@ -0,0 +1,2 @@ +#`function` useItemToState +::: g2o.functions.player.useItemToState \ No newline at end of file diff --git a/docs/functions/streamer/findNearbyPlayers.md b/docs/functions/streamer/findNearbyPlayers.md new file mode 100644 index 0000000..c2fe294 --- /dev/null +++ b/docs/functions/streamer/findNearbyPlayers.md @@ -0,0 +1,2 @@ +#`function` findNearbyPlayers +::: g2o.functions.streamer.findNearbyPlayers \ No newline at end of file diff --git a/docs/functions/streamer/getSpawnedPlayersForPlayer.md b/docs/functions/streamer/getSpawnedPlayersForPlayer.md new file mode 100644 index 0000000..3d5301e --- /dev/null +++ b/docs/functions/streamer/getSpawnedPlayersForPlayer.md @@ -0,0 +1,2 @@ +#`function` getSpawnedPlayersForPlayer +::: g2o.functions.streamer.getSpawnedPlayersForPlayer \ No newline at end of file diff --git a/docs/functions/streamer/getStreamedPlayersByPlayer.md b/docs/functions/streamer/getStreamedPlayersByPlayer.md new file mode 100644 index 0000000..6532fd8 --- /dev/null +++ b/docs/functions/streamer/getStreamedPlayersByPlayer.md @@ -0,0 +1,2 @@ +#`function` getStreamedPlayersByPlayer +::: g2o.functions.streamer.getStreamedPlayersByPlayer \ No newline at end of file diff --git a/docs/functions/waypoint/getNearestWaypoint.md b/docs/functions/waypoint/getNearestWaypoint.md new file mode 100644 index 0000000..210aa26 --- /dev/null +++ b/docs/functions/waypoint/getNearestWaypoint.md @@ -0,0 +1,2 @@ +#`function` getNearestWaypoint +::: g2o.functions.waypoint.getNearestWaypoint \ No newline at end of file diff --git a/docs/functions/waypoint/getWaypoint.md b/docs/functions/waypoint/getWaypoint.md new file mode 100644 index 0000000..3245be3 --- /dev/null +++ b/docs/functions/waypoint/getWaypoint.md @@ -0,0 +1,2 @@ +#`function` getWaypoint +::: g2o.functions.waypoint.getWaypoint \ No newline at end of file diff --git a/g2o/__init__.py b/g2o/__init__.py index 047e979..15b638b 100644 --- a/g2o/__init__.py +++ b/g2o/__init__.py @@ -1,10 +1,10 @@ -from g2o.events import addEvent -from g2o.events import callEvent -from g2o.events import event -from g2o.events import removeEventHandler -from g2o.events import toggleEvent -from g2o.events import removeEvent +from g2o.functions.event import addEvent +from g2o.functions.event import callEvent +from g2o.functions.event import event +from g2o.functions.event import removeEventHandler +from g2o.functions.event import toggleEvent +from g2o.functions.event import removeEvent from g2o.classes.packets import Packet from g2o.classes.damage import DamageDescription @@ -14,4 +14,131 @@ from g2o.classes.daedalus import Daedalus from g2o.classes.sky import Sky from g2o.classes.mds import Mds -from sqg2oconst import * \ No newline at end of file +from g2o.functions.chat import sendMessageToAll +from g2o.functions.chat import sendMessageToPlayer +from g2o.functions.chat import sendPlayerMessageToAll +from g2o.functions.chat import sendPlayerMessageToPlayer + +from g2o.functions.game import getHostname +from g2o.functions.game import getMaxSlots +from g2o.functions.game import getPlayersCount +from g2o.functions.game import exit +from g2o.functions.game import getDayLength +from g2o.functions.game import getServerDescription +from g2o.functions.game import getServerWorld +from g2o.functions.game import getTime +from g2o.functions.game import serverLog +from g2o.functions.game import setDayLength +from g2o.functions.game import setServerDescription +from g2o.functions.game import setServerWorld +from g2o.functions.game import setTime + +from g2o.functions.npc import clearNpcActions +from g2o.functions.npc import createNpc +from g2o.functions.npc import destroyNpc +from g2o.functions.npc import getNpcAction +from g2o.functions.npc import getNpcActions +from g2o.functions.npc import getNpcActionsCount +from g2o.functions.npc import getNpcHostPlayer +from g2o.functions.npc import getNpcLastActionId +from g2o.functions.npc import isNpc +from g2o.functions.npc import isNpcActionFinished +from g2o.functions.npc import npcAttackMelee +from g2o.functions.npc import npcAttackRanged +from g2o.functions.npc import npcSpellCast +from g2o.functions.npc import npcUseClosestMob +from g2o.functions.npc import setNpcHostPlayer + +from g2o.functions.player import addBan +from g2o.functions.player import applyPlayerOverlay +from g2o.functions.player import ban +from g2o.functions.player import drawWeapon +from g2o.functions.player import equipItem +from g2o.functions.player import getPlayerAmulet +from g2o.functions.player import getPlayerAngle +from g2o.functions.player import getPlayerAni +from g2o.functions.player import getPlayerArmor +from g2o.functions.player import getPlayerAtVector +from g2o.functions.player import getPlayerBelt +from g2o.functions.player import getPlayerCameraPosition +from g2o.functions.player import getPlayerCollision +from g2o.functions.player import getPlayerColor +from g2o.functions.player import getPlayerContext +from g2o.functions.player import getPlayerDexterity +from g2o.functions.player import getPlayerFaceAnis +from g2o.functions.player import getPlayerFatness +from g2o.functions.player import getPlayerFocus +from g2o.functions.player import getPlayerHealth +from g2o.functions.player import getPlayerHelmet +from g2o.functions.player import getPlayerIP +from g2o.functions.player import getPlayerInstance +from g2o.functions.player import getPlayerInvisible +from g2o.functions.player import getPlayerMacAddr +from g2o.functions.player import getPlayerMana +from g2o.functions.player import getPlayerMaxHealth +from g2o.functions.player import getPlayerMaxMana +from g2o.functions.player import getPlayerMeleeWeapon +from g2o.functions.player import getPlayerName +from g2o.functions.player import getPlayerPing +from g2o.functions.player import getPlayerPosition +from g2o.functions.player import getPlayerRangedWeapon +from g2o.functions.player import getPlayerRespawnTime +from g2o.functions.player import getPlayerRing +from g2o.functions.player import getPlayerScale +from g2o.functions.player import getPlayerSerial +from g2o.functions.player import getPlayerShield +from g2o.functions.player import getPlayerSkillWeapon +from g2o.functions.player import getPlayerSpell +from g2o.functions.player import getPlayerStrength +from g2o.functions.player import getPlayerTalent +from g2o.functions.player import getPlayerVirtualWorld +from g2o.functions.player import getPlayerVisual +from g2o.functions.player import getPlayerWeaponMode +from g2o.functions.player import getPlayerWorld +from g2o.functions.player import giveItem +from g2o.functions.player import hitPlayer +from g2o.functions.player import isPlayerConnected +from g2o.functions.player import isPlayerDead +from g2o.functions.player import isPlayerSpawned +from g2o.functions.player import isPlayerUnconscious +from g2o.functions.player import kick +from g2o.functions.player import playAni +from g2o.functions.player import playFaceAni +from g2o.functions.player import readySpell +from g2o.functions.player import removeItem +from g2o.functions.player import removePlayerOverlay +from g2o.functions.player import removeWeapon +from g2o.functions.player import setPlayerAngle +from g2o.functions.player import setPlayerCollision +from g2o.functions.player import setPlayerColor +from g2o.functions.player import setPlayerDexterity +from g2o.functions.player import setPlayerDexterity +from g2o.functions.player import setPlayerFatness +from g2o.functions.player import setPlayerHealth +from g2o.functions.player import setPlayerInstance +from g2o.functions.player import setPlayerInvisible +from g2o.functions.player import setPlayerMana +from g2o.functions.player import setPlayerMaxHealth +from g2o.functions.player import setPlayerMaxMana +from g2o.functions.player import setPlayerName +from g2o.functions.player import setPlayerScale +from g2o.functions.player import setPlayerRespawnTime +from g2o.functions.player import setPlayerScale +from g2o.functions.player import setPlayerSkillWeapon +from g2o.functions.player import setPlayerStrength +from g2o.functions.player import setPlayerTalent +from g2o.functions.player import setPlayerVirtualWorld +from g2o.functions.player import setPlayerVisual +from g2o.functions.player import setPlayerWeaponMode +from g2o.functions.player import setPlayerWorld +from g2o.functions.player import spawnPlayer +from g2o.functions.player import stopAni +from g2o.functions.player import stopFaceAni +from g2o.functions.player import unequipItem +from g2o.functions.player import unreadySpell +from g2o.functions.player import unspawnPlayer +from g2o.functions.player import useItem +from g2o.functions.player import useItemToState + + +from sqg2oconst import * \ No newline at end of file diff --git a/g2o/classes/items.py b/g2o/classes/items.py index e92dbdb..13adaf9 100644 --- a/g2o/classes/items.py +++ b/g2o/classes/items.py @@ -1,17 +1,49 @@ import sqg2o class ItemsGround: - + """ + This class represents item ground manager. + Original: [ItemsGround](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-classes/item/ItemsGround/) + """ @staticmethod def getById(id : int): + """ + This method will retrieve the item ground object by its unique id. + + **Parameters:** + * `int` **itemGroundId**: the unique item ground id. + + **Returns `ItemGround`:** + the item ground object or `throws an exception` if the object cannot be found. + """ return sqg2o.ItemsGround.getById(id) @staticmethod def create(data : dict) -> int: + """ + This method will create the item ground. + + **Parameters:** + * `dict {instance, amount=1, physicsEnabled=false position={x=0,y=0,z=0}, rotation={x=0,y=0,z=0}, world=CONFIG_WORLD, virtualWorld=0}`: + * `string` **instance**: the scripting instance of game item. + * `bool` **physicsEnabled**: the physics state of the item ground. + * `dict {x, y, z}` **position**: the position of the item ground in the world. + * `dict {x, y, z}` **rotation**: the rotation of the item ground in the world. + * `string` **world**: the world the item ground is in (.ZEN file path). + * `int` **virtualWorld**: the virtual world id in range <0, 65535>. + + **Returns `int`:** + the item ground id. + """ return sqg2o.ItemsGround.create(data) @staticmethod def destroy(id : int): + """ + This method will destroy the item ground by it's unique id. + **Parameters:** + * `int` **itemGroundId**: the item ground unique id. + """ sqg2o.ItemsGround.destroy(id) class ItemGround(sqg2o.ItemGround): diff --git a/g2o/classes/mds.py b/g2o/classes/mds.py index 68a8a3d..c66dd4c 100644 --- a/g2o/classes/mds.py +++ b/g2o/classes/mds.py @@ -1,11 +1,30 @@ import sqg2o class Mds: - + """ + This class represents mds manager for conversion between mds id & mds instance. This manager will work for every registered mds in `mds.xml` file. + Original: [Mds](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/shared-classes/mds/Mds/) + """ @staticmethod def id(mdsName : str) -> int: + """ + This method will convert the mds name to mds id. + **Parameters:** + * `str` **mdsName**: the mds name, e.g: `"HumanS_Sprint.mds"`. + + **Returns `int`:** + the unique mds id. + """ return sqg2o.Mds.id(mdsName) @staticmethod - def name(mdsId : id) -> str: + def name(mdsId : int) -> str: + """ + This method will convert the mds id to mds name. + **Parameters:** + * `int` **mdsId**: the mds id. + + **Returns `str`:** + the mds name, e.g: `"HumanS_Sprint.mds"`. + """ return sqg2o.Mds.name(mdsId) \ No newline at end of file diff --git a/g2o/functions/__init__.py b/g2o/functions/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/g2o/functions/chat.py b/g2o/functions/chat.py new file mode 100644 index 0000000..51a00a9 --- /dev/null +++ b/g2o/functions/chat.py @@ -0,0 +1,81 @@ +import sqg2o + +def sendMessageToAll(r : int, g : int, b : int, text : str): + """ + This function will send a chat message to every connected player. + Sending a message triggers client side event [onPlayerMessage](../../defaultEvents/player/onPlayerMessage.md) with playerid set as `-1`. + Original: [sendMessageToAll](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-functions/chat/sendMessageToAll/) + + ## Declaration + ```python + def sendMessageToAll(r : int, g : int, b : int, text : str) + ``` + + ## Parameters + * `int` **r**: the red color component in RGB model. + * `int` **g**: the green color component in RGB model. + * `int` **b**: the blue color component in RGB model. + * `str` **text**: that will be send. + """ + return sqg2o.sendMessageToAll(*locals()) + +def sendMessageToPlayer(playerid : int, r : int, g : int, b : int, text : str): + """ + This function will send a chat message to specific player. + Sending a message triggers client side event [onPlayerMessage](../../defaultEvents/player/onPlayerMessage.md) with playerid set as `-1`. + Original: [sendMessageToPlayer](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-functions/chat/sendMessageToPlayer/) + + ## Declaration + ```python + def sendMessageToPlayer(playerid : int, r : int, g : int, b : int, text : str) + ``` + + ## Parameters + * `int` **playerid**: the id of the player which will receive a message. + * `int` **r**: the red color component in RGB model. + * `int` **g**: the green color component in RGB model. + * `int` **b**: the blue color component in RGB model. + * `str` **text**: that will be send. + """ + return sqg2o.sendMessageToPlayer(*locals()) + +def sendPlayerMessageToAll(senderid : int, r : int, g : int, b : int, text : str): + """ + This function will send a chat message from one player to every player. Sending a message + Sending a message triggers client side event [onPlayerMessage](../../defaultEvents/player/onPlayerMessage.md) with playerid set as **senderid**. + Original: [sendPlayerMessageToAll](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-functions/chat/sendPlayerMessageToAll/) + + ## Declaration + ```python + def sendPlayerMessageToAll(senderid : int, r : int, g : int, b : int, text : str) + ``` + + ## Parameters + * `int` **senderid**: the id of the player which will send a message. + * `int` **r**: the red color component in RGB model. + * `int` **g**: the green color component in RGB model. + * `int` **b**: the blue color component in RGB model. + * `str` **text**: that will be send. + """ + return sqg2o.sendPlayerMessageToAll(*locals()) + +def sendPlayerMessageToPlayer(senderid : int, receiverid : int, r : int, g : int, b : int, text : str): + """ + This function will send a chat message from one player to another player. + Sending a message triggers client side event [onPlayerMessage](../../defaultEvents/player/onPlayerMessage.md) with playerid set as **senderid**. + Original: [sendPlayerMessageToPlayer](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-functions/chat/sendPlayerMessageToPlayer/) + + ## Declaration + ```python + sendPlayerMessageToPlayer(senderid : int, receiverid : int, r : int, g : int, b : int, text : str) + ``` + + ## Parameters + * `int` **senderid**: the id of the player which will send a message. + * `int` **receiverid**: the id of the player which will receive a message. + * `int` **r**: the red color component in RGB model. + * `int` **g**: the green color component in RGB model. + * `int` **b**: the blue color component in RGB model. + * `str` **text**: that will be send. + """ + return sqg2o.sendPlayerMessageToAll(*locals()) \ No newline at end of file diff --git a/g2o/events.py b/g2o/functions/event.py similarity index 100% rename from g2o/events.py rename to g2o/functions/event.py diff --git a/g2o/functions/game.py b/g2o/functions/game.py new file mode 100644 index 0000000..7bfd84c --- /dev/null +++ b/g2o/functions/game.py @@ -0,0 +1,223 @@ +import sqg2o + +def getHostname() -> str: + """ + This function will get the hostname of the server. + Original: [getHostname](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/shared-functions/game/getHostname/) + + ## Declaration + ```python + def getHostname() -> str + ``` + ## Returns + `str`: Server hostname. + + ## Usage + ```python + import g2o + + @g2o.event('onInit') + def evtInit(**kwargs): + print('Server hostname:', g2o.getHostname()) + ``` + """ + return sqg2o.getHostname() + +def getMaxSlots() -> int: + """ + This function will get the max number of slots available on the server. + Original: [getMaxSlots](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/shared-functions/game/getMaxSlots/) + + ## Declaration + ```python + def getMaxSlots() -> int + ``` + ## Returns + `int`: Max slots number on the server. + + ## Usage + ```python + import g2o + + @g2o.event('onInit') + def evtInit(**kwargs): + print('Server max slots:', g2o.getMaxSlots()) + ``` + """ + return sqg2o.getMaxSlots() + +def getPlayersCount() -> int: + """ + This function will get the max number of slots available on the server. + Original: [getPlayersCount](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/shared-functions/game/getPlayersCount/) + + ## Declaration + ```python + def getPlayersCount() -> int + ``` + ## Returns + `int`: Number of players on the server. + + ## Usage + ```python + import g2o + + @g2o.event('onInit') + def evtInit(**kwargs): + print('Players online:', g2o.getPlayersCount()) + ``` + """ + return sqg2o.getPlayersCount() + +def exit(exitCode : int = 0): + """ + This function will close the server with specified exit code. + Original: [exit](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-functions/game/exit/) + + ## Declaration + ```python + def exit(exitCode : int = 0) + ``` + ## Parameters + * `int` **exitCode**: exit status for g2o server. + """ + return sqg2o.exit(*locals()) + +def getDayLength() -> float: + """ + The function is used to get the day length in miliseconds. + Original: [getDayLength](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-functions/game/getDayLength/) + + ## Declaration + ```python + def getDayLength() -> float + ``` + ## Returns + `float`: the current day length in miliseconds. + """ + return sqg2o.getDayLength() + +def getServerDescription() -> str: + """ + This function will get the description of the server. + Original: [getServerDescription](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-functions/game/getServerDescription/) + + ## Declaration + ```python + def getServerDescription() -> str + ``` + ## Returns + `str`: Server description. + """ + return sqg2o.getServerDescription() + +def getServerWorld() -> str: + """ + The function is used to get the path of the default world on the server. + Original: [getServerWorld](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-functions/game/getServerWorld/) + + ## Declaration + ```python + def getServerWorld() -> str + ``` + ## Returns + `str`: The world path name. + """ + return sqg2o.getServerWorld() + +def getTime() -> dict: + """ + The function is used to get the path of the default world on the server. + Original: [getTime](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-functions/game/getTime/) + + ## Declaration + ```python + def getTime() -> dict + ``` + ## Returns + `dict {day, hour, min}`: The current time in the game. + """ + return sqg2o.getTime() + +def serverLog(text : str): + """ + This function will log the text into server.log file. + Original: [serverLog](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-functions/game/serverLog/) + + ## Declaration + ```python + def serverLog(text : str) + ``` + ## Parameters + `str` **text**: the text message that you want to append to server.log file. + """ + return sqg2o.serverLog(*locals()) + +def setDayLength(miliseconds : float): + """ + !!! note + Day length can't be smaller than 10 000 miliseconds. + + This function will set the day length in miliseconds. + Original: [setDayLength](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-functions/game/setDayLength/) + + ## Declaration + ```python + def setDayLength(miliseconds : float) + ``` + ## Parameters + `float` **miliseconds**: day length in miliseconds. + """ + return sqg2o.setDayLength(*locals()) + +def setServerDescription(description : str): + """ + This function will set the description of the server. + Original: [setServerDescription](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-functions/game/setServerDescription/) + + ## Declaration + ```python + def setServerDescription(description : str) + ``` + ## Parameters + `str` **description**: the server description. + ## Returns + `bool`: `true` if server description was set successfully, otherwise `false`. + """ + return sqg2o.setServerDescription(*locals()) + +def setServerWorld(world : str): + """ + !!! note + The server world limit is set to 32 characters. + + !!! note + If the target world path is written with backslashes instead of normal slashes, you need to escape it with another backslashes e.g. "NEWWORLD\\NEWWORLD.ZEN". + + This function will change the default world to which players will enter after joining. + Original: [setServerWorld](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-functions/game/setServerWorld/) + + ## Declaration + ```python + def setServerWorld(world : str) + ``` + ## Parameters + `str` **world**: the path to the target world. + """ + return sqg2o.setServerWorld(*locals()) + +def setTime(hour : int, min : int, day : int = 0): + """ + This function will set the current time in the game to the given time, for all the players. + Original: [setTime](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-functions/game/setTime/) + + ## Declaration + ```python + def setTime(hour : int, min : int, day : int = 0) + ``` + ## Parameters + `int` **hour**: the hour of new time (in the range between 0-23). + `int` **min**: the minute of new time (in the range between 0-59). + `int` **day**: the day of new time. + """ + return sqg2o.setTime(*locals()) \ No newline at end of file diff --git a/g2o/functions/npc.py b/g2o/functions/npc.py new file mode 100644 index 0000000..9bc17c3 --- /dev/null +++ b/g2o/functions/npc.py @@ -0,0 +1,247 @@ +import sqg2o + +def clearNpcActions(npc_id : int): + """ + This function clears remote NPC actions queue. Remote NPCs uses actions queue to execute thier tasks. + Original: [clearNpcActions](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-functions/npc/clearNpcActions/) + + ## Declaration + ```python + clearNpcActions(npc_id : int) + ``` + ## Parameters + `int` **npc_id**: the npc identifier. + """ + return sqg2o.clearNpcActions(*locals()) + +def createNpc(name : str, instance : str = 'PC_HERO') -> int: + """ + !!! note + By default npcs won't be added to world. In order to do that, you have to call **TBD**. + !!! note + Remote NPC id will always begins from max slots value. + This function creates remote NPC. + Original: [createNpc](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-functions/npc/createNpc/) + + ## Declaration + ```python + def createNpc(name : str, instance : str = 'PC_HERO') -> int + ``` + ## Parameters + `str` **name**: the displayed name of the npc. + `str` **instance**: the instance name of for the npc. + """ + return sqg2o.createNpc(*locals()) + +def destroyNpc(npc_id : int) -> bool: + """ + This function destroys remote NPC. + Original: [destroyNpc](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-functions/npc/destroyNpc/) + + ## Declaration + ```python + def destroyNpc(npc_id : int) -> bool + ``` + ## Parameters + `int` **npc_id**: the identifier of npc. + ## Returns + `bool`: `true` when npc was successfully destroyed, otherwise false`. + """ + return sqg2o.destroyNpc(*locals()) + +def getNpcAction(npc_id : int, index : int) -> dict: + """ + This function gets information about element on specified index in NPC action queue. + Original: [getNpcAction](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-functions/npc/getNpcAction/) + + ## Declaration + ```python + getNpcAction(npc_id : int, index : int) -> dict + ``` + ## Parameters + `int` **npc_id**: the identifier of npc. + `int` **index**: the index of element in the queue. + ## Returns + `dict {type, id, status}`: The table containing information about selected element. + """ + return sqg2o.getNpcAction(*locals()) + +def getNpcActions(npc_id : int) -> list: + """ + This function gets informations about elements in NPC action queue. + Original: [getNpcActions](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-functions/npc/getNpcActions/) + + ## Declaration + ```python + def getNpcActions(npc_id : int) -> list + ``` + ## Parameters + `int` **npc_id**: the identifier of npc. + ## Returns + `list [{type, id}]`: The array containing information about queue elements. + """ + return sqg2o.getNpcActions(*locals()) + +def getNpcActionsCount(npc_id : int) -> int: + """ + This function gets elements count in NPC action queue. + Original: [getNpcActionsCount](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-functions/npc/getNpcActionsCount/) + + ## Declaration + ```python + def getNpcActionsCount(npc_id : int) -> int + ``` + ## Parameters + `int` **npc_id**: the identifier of npc. + ## Returns + `int`: The count of elements inside queue, otherwise `-1`. + """ + return sqg2o.getNpcActionsCount(*locals()) + +def getNpcHostPlayer(npc_id : int) -> int: + """ + This function gets NPC host player id. + Original: [getNpcHostPlayer](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-functions/npc/getNpcHostPlayer/) + + ## Declaration + ```python + getNpcHostPlayer(npc_id : int) -> int + ``` + ## Parameters + `int` **npc_id**: the identifier of npc. + ## Returns + `int`: the host player identifier. If there is no host player `-1` is returned instead. + """ + return sqg2o.getNpcHostPlayer(*locals()) + +def getNpcLastActionId(npc_id : int) -> int: + """ + This function gets last action identifier, that was enqued to the NPC action queue. Every action in queue has associated unique id, by which can be identified. + Original: [getNpcLastActionId](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-functions/npc/getNpcLastActionId/) + + ## Declaration + ```python + getNpcLastActionId(npc_id : int) -> int + ``` + ## Parameters + `int` **npc_id**: the identifier of npc. + ## Returns + `int`: The last finished action identifier, otherwise `-1`. + """ + return sqg2o.getNpcLastActionId(*locals()) + +def isNpc(npc_id : int) -> bool: + """ + This function checks whether id related to given object is remote NPC. + Original: [isNpc](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-functions/npc/isNpc/) + + ## Declaration + ```python + def isNpc(npc_id : int) -> bool + ``` + ## Parameters + `int` **npc_id**: the identifier of npc. + ## Returns + `bool`: `true` when object is NPC, otherwise `false`. + """ + return sqg2o.isNpc(*locals()) + +def isNpcActionFinished(npc_id : int, action_id : int) -> bool: + """ + This function checks whether specified NPC action was finished. + Original: [isNpcActionFinished](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-functions/npc/isNpcActionFinished/) + + ## Declaration + ```python + def isNpcActionFinished(npc_id : int, action_id : int) -> bool + ``` + ## Parameters + `int` **npc_id**: the identifier of npc. + `int` **action_id**: the unique action identifier. + ## Returns + `bool`: `true` if specified action identifier was already finished, otherwise `false`. + """ + return sqg2o.isNpcActionFinished(*locals()) + +def npcAttackMelee(attacker_id : int, enemy_id : int, attack_type : int, combo : int): + """ + !!! note + Combo is internal Gothic value. Its behaviour can be sometimes undefined. For example -1 value doesn't work for not humanoid NPCs. + + This function enqueues attack melee action to the remote NPC action queue. + Original: [npcAttackMelee](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-functions/npc/npcAttackMelee/) + + ## Declaration + ```python + def npcAttackMelee(attacker_id : int, enemy_id : int, attack_type : int, combo : int) + ``` + ## Parameters + `int` **attacker_id**: the remote npc id. + `int` **enemy_id**: the remote npc or player id. + `int` **attack_type**: the type of attack. + `int` **combol**: the combo sequence. For `-1` execute next command immediately. + """ + return sqg2o.npcAttackMelee(*locals()) + +def npcAttackRanged(attacker_id : int, enemy_id : int): + """ + This function enqueues attack ranged action to the remote NPC action queue. + Original: [npcAttackRanged](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-functions/npc/npcAttackRanged/) + + ## Declaration + ```python + def npcAttackRanged(attacker_id : int, enemy_id : int) + ``` + ## Parameters + `int` **attacker_id**: the remote npc id. + `int` **enemy_id**: the remote npc or player id. + """ + return sqg2o.npcAttackRanged(*locals()) + +def npcSpellCast(attacker_id : int, enemy_id : int): + """ + This function enqueues spell cast action to the remote NPC action queue. + Original: [npcSpellCast](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-functions/npc/npcSpellCast/) + + ## Declaration + ```python + def npcSpellCast(attacker_id : int, enemy_id : int) + ``` + ## Parameters + `int` **attacker_id**: the remote npc id. + `int` **enemy_id**: the remote npc or player id. + """ + return sqg2o.npcSpellCast(*locals()) + +def npcUseClosestMob(npc_id : int, sceme : str, target_state : int): + """ + This function enqueues use closest mob action to the remote NPC action queue. + Original: [npcUseClosestMob](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-functions/npc/npcUseClosestMob/) + + ## Declaration + ```python + def npcUseClosestMob(npc_id : int, sceme : str, target_state : int) + ``` + ## Parameters + `int` **npc_id**: the npc identifier. + `str` **sceme**: the animation sceme name, e.g: `"BENCH"` when you want to interact with bench. + `int` **target_state**: the target state, use `1` if you want to start interaction and `-1` to end it. + """ + return sqg2o.npcUseClosestMob(*locals()) + +def setNpcHostPlayer(npc_id : int, host_id : int) -> bool: + """ + This function sets new NPC host player. + Original: [setNpcHostPlayer](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-functions/npc/setNpcHostPlayer/) + + ## Declaration + ```python + def setNpcHostPlayer(npc_id : int, host_id : int) -> bool + ``` + ## Parameters + `int` **npc_id**: the npc identifier. + `int` **host_id**: the player host identifier. + ## Returns + `bool`: `true` if host was successfully changed, otherwise `false`. + """ + return sqg2o.setNpcHostPlayer(*locals()) \ No newline at end of file diff --git a/g2o/functions/player.py b/g2o/functions/player.py new file mode 100644 index 0000000..8be4c85 --- /dev/null +++ b/g2o/functions/player.py @@ -0,0 +1,1462 @@ +import sqg2o + +def addBan(info : dict) -> bool: + """ + !!! note + All properties should be of primitive types and are optional, but you still need to provide at least one of them. + !!! note + The reason string can't be longer than 255 characters. + !!! note + The meta table is used for storing custom data. + This function will add a new ban on the server. + Original: [addBan](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-functions/player/addBan/) + + ## Declaration + ```python + def addBan(info : dict) -> bool + ``` + ## Parameters + `dict {serial, mac, ip, name, reason, timestamp, meta={..}}` **info**: the ban properties. + `int` **host_id**: the player host identifier. + ## Returns + `bool`: `true` if ban was added, otherwise `false`. + """ + return sqg2o.addBan(*locals()) + +def applyPlayerOverlay(id : int, overlayId : int) -> bool: + """ + This function will apply animation overlay on player for all players. + Original: [applyPlayerOverlay](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-functions/player/applyPlayerOverlay/) + + ## Declaration + ```python + def applyPlayerOverlay(id : int, overlayId : int) -> bool + ``` + ## Parameters + `int` **id**: the player id. + `int` **overlayId**: the overlay id from `mds.xml` file, e.g: `Mds.id("HUMANS_MILITIA.MDS")` + ## Returns + `bool`: `true` if animation overlay was successfully applied on player, otherwise `false`. + """ + return sqg2o.applyPlayerOverlay(*locals()) + +def ban(id : int, minutes : int, reason : str): + """ + !!! note + The reason string can't be longer than 255 characters. + This function will ban the player on the server. + Original: [ban](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-functions/player/ban/) + + ## Declaration + ```python + def ban(id : int, minutes : int, reason : str) + ``` + ## Parameters + `int` **id**: the player id. + `int` **minutes**: the time how long ban will take in minutes. Passing `0` will cause the player to have permanent ban. + `str` **reason**: the reason why player was banned. + """ + return sqg2o.ban(*locals()) + +def drawWeapon(id : int, weaponMode : int): + """ + This function will cause player to draw a weapon. If hero/npc doesn't have equipped weapon assosiated with the preffered weapon mode, then it will try to draw melee weapon, otherwise `WEAPONMODE_FIST` will be used instead. + Original: [drawWeapon](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-functions/player/drawWeapon/) + + ## Declaration + ```python + def drawWeapon(id : int, weaponMode : int) + ``` + ## Parameters + `int` **id**: the player id. + `int` **weaponMode**: the preffered weapon mode. For more information see [Weapon mode constants](../../constants/weapon-mode.md). + """ + return sqg2o.drawWeapon(*locals()) + + +def equipItem(id : int, instance : str, slotId : int = -1): + """ + !!! note + If you want to equip weapon/shield, first make sure that player is in `WEAPONMODE_NONE`. + This function is used to equip item on player for all players. + Original: [equipItem](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-functions/player/equipItem/) + + ## Declaration + ```python + def equipItem(id : int, instance : str, slotId : int = -1) + ``` + ## Parameters + `int` **id**: the player id. + `str` **instance**: the item instance from Daedalus scripts. + `int` **slotId**: the slot id in which you want to equip item on player, e.g scrolls, runes, rings, by default the item will be equipped on the first free slot. + """ + return sqg2o.equipItem(*locals()) + +def getPlayerAmulet(id : int) -> str: + """ + This function will get the equipped player amulet. + Original: [getPlayerAmulet](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-functions/player/getPlayerAmulet/) + + ## Declaration + ```python + getPlayerAmulet(id : int) -> str + ``` + ## Parameters + `int` **id**: the player id. + ## Returns + `str`: the item instance from Daedalus scripts. + """ + return sqg2o.getPlayerAmulet(*locals()) + +def getPlayerAngle(id : int) -> float: + """ + This function will get the player facing rotation on y axis. + Original: [getPlayerAngle](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-functions/player/getPlayerAngle/) + + ## Declaration + ```python + def getPlayerAngle(id : int) -> float + ``` + ## Parameters + `int` **id**: the player id. + ## Returns + `float`: the facing rotation on y axis. + """ + return sqg2o.getPlayerAngle(*locals()) + +def getPlayerAni(id : int) -> str: + """ + This function will get the player facing rotation on y axis. + Original: [getPlayerAni](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-functions/player/getPlayerAni/) + + ## Declaration + ```python + def getPlayerAni(id : int) -> str + ``` + ## Parameters + `int` **id**: the player id. + ## Returns + `str`: the ani name, e.g: `"S_RUN"`. + """ + return sqg2o.getPlayerAni(*locals()) + +def getPlayerArmor(id : int) -> str: + """ + This function will get the equipped player armor. + Original: [getPlayerArmor](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-functions/player/getPlayerArmor/) + + ## Declaration + ```python + def getPlayerArmor(id : int) -> str + ``` + ## Parameters + `int` **id**: the player id. + ## Returns + `str`: the item instance from Daedalus scripts. + """ + return sqg2o.getPlayerArmor(*locals()) + +def getPlayerAtVector(id : int) -> dict: + """ + This function will get player at vector. + Original: [getPlayerAtVector](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-functions/player/getPlayerAtVector/) + + ## Declaration + ```python + getPlayerAtVector(id : int) -> dict + ``` + ## Parameters + `int` **id**: the player id. + ## Returns + `dict {x, y, z}`: the player at vector. + """ + return sqg2o.getPlayerAtVector(*locals()) + +def getPlayerBelt(id : int) -> str: + """ + This function will get the equipped player belt. + Original: [getPlayerBelt](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-functions/player/getPlayerBelt/) + + ## Declaration + ```python + def getPlayerBelt(id : int) -> str + ``` + ## Parameters + `int` **id**: the player id. + ## Returns + `str`: the item instance from Daedalus scripts. + """ + return sqg2o.getPlayerBelt(*locals()) + +def getPlayerCameraPosition(id : int) -> dict: + """ + This function will get the player camera position in world. + Original: [getPlayerCameraPosition](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-functions/player/getPlayerCameraPosition/) + + ## Declaration + ```python + getPlayerCameraPosition(id : int) -> dict + ``` + ## Parameters + `int` **id**: the player id. + ## Returns + `dict {x, y, z}`: the dictionary that represents camera position. + """ + return sqg2o.getPlayerCameraPosition(*locals()) + +def getPlayerCollision(id : int) -> bool: + """ + This function will get the player collision. + Original: [getPlayerCollision](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-functions/player/getPlayerCollision/) + + ## Declaration + ```python + def getPlayerCollision(id : int) -> bool + ``` + ## Parameters + `int` **id**: the player id. + ## Returns + `bool`: `true` if collision is enabled, otherwise `false`. + """ + return sqg2o.getPlayerCollision(*locals()) + +def getPlayerColor(id : int) -> dict: + """ + This function will get the player nickname color. + Original: [getPlayerColor](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-functions/player/getPlayerColor/) + + ## Declaration + ```python + def getPlayerColor(id : int) -> dict + ``` + ## Parameters + `int` **id**: the player id. + ## Returns + `dict {r, g, b}`: the player nickname color. + """ + return sqg2o.getPlayerColor(*locals()) + +def getPlayerContext(id : int, type : int) -> int: + """ + This function is used to get player script context. For more information see [this article](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/multiplayer/script-context/). + Original: [getPlayerContext](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-functions/player/getPlayerContext/) + + ## Declaration + ```python + def getPlayerContext(id : int, type : int) -> int + ``` + ## Parameters + `int` **id**: the player id. + ## Returns + `int`: the value stored within selected context. + """ + return sqg2o.getPlayerContext(*locals()) + +def getPlayerDexterity(id : int) -> int: + """ + This function will get the player dexterity points. + Original: [getPlayerDexterity](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-functions/player/getPlayerDexterity/) + + ## Declaration + ```python + def getPlayerDexterity(id : int) -> int + ``` + ## Parameters + `int` **id**: the player id. + ## Returns + `int`: the dexterity points amount. + """ + return sqg2o.getPlayerDexterity(*locals()) + +def getPlayerFaceAnis(id : int) -> list: + """ + This function will get the player dexterity points. + Original: [getPlayerFaceAnis](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-functions/player/getPlayerFaceAnis/) + + ## Declaration + ```python + def getPlayerFaceAnis(id : int) -> list + ``` + ## Parameters + `int` **id**: the player id. + ## Returns + `list [{aniName, layer}]`: the list of objects describing face animation. + """ + return sqg2o.getPlayerFaceAnis(*locals()) + +def getPlayerFatness(id : int) -> float: + """ + This function will get the player fatness factor. + Original: [getPlayerFatness](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-functions/player/getPlayerFatness/) + + ## Declaration + ```python + def getPlayerFatness(id : int) -> float + ``` + ## Parameters + `int` **id**: the player id. + ## Returns + `float`: the fatness ratio. + """ + return sqg2o.getPlayerFatness(*locals()) + +def getPlayerFocus(id : int) -> int: + """ + This function is used to get current focused player by other player. + Original: [getPlayerFocus](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-functions/player/getPlayerFocus/) + + ## Declaration + ```python + def getPlayerFocus(id : int) -> int + ``` + ## Parameters + `int` **id**: the player id. + ## Returns + `int`: the current focused player id. In case were there is no focus returns `-1`. + """ + return sqg2o.getPlayerFocus(*locals()) + +def getPlayerHealth(id : int) -> int: + """ + This function will get the player health points. + Original: [getPlayerHealth](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-functions/player/getPlayerHealth/) + + ## Declaration + ```python + def getPlayerHealth(id : int) -> int + ``` + ## Parameters + `int` **id**: the player id. + ## Returns + `int`: the health points amount. + """ + return sqg2o.getPlayerHealth(*locals()) + +def getPlayerHelmet(id : int) -> str: + """ + This function will get the equipped player helmet. + Original: [getPlayerHelmet](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-functions/player/getPlayerHelmet/) + + ## Declaration + ```python + def getPlayerHelmet(id : int) -> str + ``` + ## Parameters + `int` **id**: the player id. + ## Returns + `str`: the item instance from Daedalus scripts. + """ + return sqg2o.getPlayerHelmet(*locals()) + +def getPlayerIP(id : int) -> str: + """ + This function will get the player ipv4 ip address. + Original: [getPlayerIP](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-functions/player/getPlayerIP/) + + ## Declaration + ```python + def getPlayerIP(id : int) -> str + ``` + ## Parameters + `int` **id**: the player id. + ## Returns + `str`: the player ip address, e.g `"127.0.0.1"`. + """ + return sqg2o.getPlayerIP(*locals()) + +def getPlayerInstance(id : int) -> str: + """ + This function will get the player instance. + Original: [getPlayerInstance](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-functions/player/getPlayerInstance/) + + ## Declaration + ```python + def getPlayerInstance(id : int) -> str + ``` + ## Parameters + `int` **id**: the player id. + ## Returns + `str`: the player instance. + """ + return sqg2o.getPlayerInstance(*locals()) + +def getPlayerInvisible(id : int) -> bool: + """ + This function will get the player invisiblity for all players. + Original: [getPlayerInvisible](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-functions/player/getPlayerInvisible/) + + ## Declaration + ```python + def getPlayerInvisible(id : int) -> bool + ``` + ## Parameters + `int` **id**: the player id. + ## Returns + `bool`: `true` when player is invisible for all players, otherwise `false`. + """ + return sqg2o.getPlayerInvisible(*locals()) + +def getPlayerMacAddr(id : int) -> str: + """ + !!! note + The function can return null if player isn't connected. + This function will get the player MAC address. + MAC is used to uniquely idientify each player, + however it can be changed/spoofed by more advance users. + Original: [getPlayerMacAddr](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-functions/player/getPlayerMacAddr/) + + ## Declaration + ```python + def getPlayerMacAddr(id : int) -> str + ``` + ## Parameters + `int` **id**: the player id. + ## Returns + `str`: the player mac address, e.g `"00-1b-44-11-3a-b7"`. + """ + return sqg2o.getPlayerMacAddr(*locals()) + +def getPlayerMana(id : int) -> int: + """ + This function will get the player mana points. + Original: [getPlayerMana](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-functions/player/getPlayerMana/) + + ## Declaration + ```python + def getPlayerMana(id : int) -> int + ``` + ## Parameters + `int` **id**: the player id. + ## Returns + `int`: the mana points amount. + """ + return sqg2o.getPlayerMana(*locals()) + +def getPlayerMaxHealth(id : int) -> int: + """ + This function will get the player max health points. + Original: [getPlayerMaxHealth](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-functions/player/getPlayerMaxHealth/) + + ## Declaration + ```python + def getPlayerMaxHealth(id : int) -> int + ``` + ## Parameters + `int` **id**: the player id. + ## Returns + `int`: the max health points amount. + """ + return sqg2o.getPlayerMaxHealth(*locals()) + +def getPlayerMaxMana(id : int) -> int: + """ + This function will get the player max mana points. + Original: [getPlayerMaxMana](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-functions/player/getPlayerMaxMana/) + + ## Declaration + ```python + def getPlayerMaxMana(id : int) -> int + ``` + ## Parameters + `int` **id**: the player id. + ## Returns + `int`: the max mana points amount. + """ + return sqg2o.getPlayerMaxMana(*locals()) + +def getPlayerMeleeWeapon(id : int) -> str: + """ + This function will get the equipped player melee weapon. + Original: [getPlayerMeleeWeapon](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-functions/player/getPlayerMeleeWeapon/) + + ## Declaration + ```python + def getPlayerMeleeWeapon(id : int) -> str + ``` + ## Parameters + `int` **id**: the player id. + ## Returns + `str`: the item instance from Daedalus scripts. + """ + return sqg2o.getPlayerMeleeWeapon(*locals()) + +def getPlayerName(id : int) -> str: + """ + This function will get the player nickname. + Original: [getPlayerName](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-functions/player/getPlayerName/) + + ## Declaration + ```python + def getPlayerName(id : int) -> str + ``` + ## Parameters + `int` **id**: the player id. + ## Returns + `str`: the player nickname. + """ + return sqg2o.getPlayerName(*locals()) + +def getPlayerPing(id : int) -> int: + """ + !!! note + The function can return `-1` if player isn't connected. + This function will get the player ping. Ping gets updated after each 2500 miliseconds. + Original: [getPlayerPing](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-functions/player/getPlayerPing/) + + ## Declaration + ```python + def getPlayerPing(id : int) -> int + ``` + ## Parameters + `int` **id**: the player id. + ## Returns + `str`: the current player ping. + """ + return sqg2o.getPlayerPing(*locals()) + +def getPlayerPosition(id : int) -> dict: + """ + This function will get the player world position. + Original: [getPlayerPosition](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-functions/player/getPlayerPosition/) + + ## Declaration + ```python + def getPlayerPosition(id : int) -> dict + ``` + ## Parameters + `int` **id**: the player id. + ## Returns + `dict {x, y, z}`: the player world position. + """ + return sqg2o.getPlayerPosition(*locals()) + +def getPlayerRangedWeapon(id : int) -> str: + """ + This function will get the equipped player ranged weapon. + Original: [getPlayerRangedWeapon](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-functions/player/getPlayerRangedWeapon/) + + ## Declaration + ```python + def getPlayerRangedWeapon(id : int) -> str + ``` + ## Parameters + `int` **id**: the player id. + ## Returns + `str`: the item instance from Daedalus scripts. + """ + return sqg2o.getPlayerRangedWeapon(*locals()) + +def getPlayerRespawnTime(id : int) -> int: + """ + This function will get the player time to respawn after death. + Original: [getPlayerRespawnTime](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-functions/player/getPlayerRespawnTime/) + + ## Declaration + ```python + def getPlayerRespawnTime(id : int) -> int + ``` + ## Parameters + `int` **id**: the player id. + ## Returns + `str`: the player respawn time. + """ + return sqg2o.getPlayerRespawnTime(*locals()) + +def getPlayerRing(id : int, handId : int) -> str: + """ + This function will get the equipped player ring. + Original: [getPlayerRing](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-functions/player/getPlayerRing/) + + ## Declaration + ```python + ddef getPlayerRing(id : int, handId : int) -> str + ``` + ## Parameters + `int` **id**: the player id. + `int` **handId**: the handId. For more information see [Hand constants](../../constants/hand.md). + ## Returns + `str`: the item instance from Daedalus scripts. + """ + return sqg2o.getPlayerRing(*locals()) + +def getPlayerScale(id : int) -> dict: + """ + This function will get the player scale. + Original: [getPlayerScale](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-functions/player/getPlayerScale/) + + ## Declaration + ```python + def getPlayerScale(id : int) -> dict + ``` + ## Parameters + `int` **id**: the player id. + ## Returns + `dict {x, y, z}`: the player scale. + """ + return sqg2o.getPlayerScale(*locals()) + +def getPlayerSerial(id : int) -> str: + """ + !!! note + The function can return `null` if player isn't connected. + !!! note + For some players (e.g: that are playing on linux using WINE) this function might return empty string. + This function will get the player serial. + Serial is used to uniquely idientify each player. + Original: [getPlayerSerial](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-functions/player/getPlayerSerial/) + + ## Declaration + ```python + def getPlayerSerial(id : int) -> str + ``` + ## Parameters + `int` **id**: the player id. + ## Returns + `str`: the player serial. + """ + return sqg2o.getPlayerSerial(*locals()) + +def getPlayerShield(id : int) -> str: + """ + This function will get the equipped player shield. + Original: [getPlayerShield](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-functions/player/getPlayerShield/) + + ## Declaration + ```python + def getPlayerShield(id : int) -> str + ``` + ## Parameters + `int` **id**: the player id. + ## Returns + `str`: the item instance from Daedalus scripts. + """ + return sqg2o.getPlayerShield(*locals()) + +def getPlayerSkillWeapon(id : int, skillId : int) -> int: + """ + This function will get the player skill weapon. + Original: [getPlayerSkillWeapon](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-functions/player/getPlayerSkillWeapon/) + + ## Declaration + ```python + def getPlayerSkillWeapon(id : int, skillId : int) -> int + ``` + ## Parameters + `int` **id**: the player id. + `int` **skillId**: For more information see [Skill weapon constants](../../constants/skill-weapon.md). + ## Returns + `int`: the percentage value in range <0, 100>. + """ + return sqg2o.getPlayerSkillWeapon(*locals()) + +def getPlayerSpell(id : int, slotId : int) -> str: + """ + This function will get the equipped player spell. + Original: [getPlayerSpell](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-functions/player/getPlayerSpell/) + + ## Declaration + ```python + ddef getPlayerSpell(id : int, slotId : int) -> str + ``` + ## Parameters + `int` **id**: the player id. + `int` **slotId**: the equipped slotId in range <0, 6>. + ## Returns + `str`: the item instance from Daedalus scripts. + """ + return sqg2o.getPlayerSpell(*locals()) + +def getPlayerStrength(id : int) -> int: + """ + This function will get the player strength points. + Original: [getPlayerStrength](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-functions/player/getPlayerStrength/) + + ## Declaration + ```python + def getPlayerStrength(id : int) -> int + ``` + ## Parameters + `int` **id**: the player id. + ## Returns + `int`: the strength points amount. + """ + return sqg2o.getPlayerStrength(*locals()) + +def getPlayerTalent(id : int, talentId : int) -> int: + """ + This function will get the player talent. + Original: [getPlayerTalent](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-functions/player/getPlayerTalent/) + + ## Declaration + ```python + def getPlayerTalent(id : int, talentId : int) -> int + ``` + ## Parameters + `int` **id**: the player id. + `int` **talentId**: the talent id. For more information see [Talent constants](../../constants/talent.md). + ## Returns + `int`: the current talent value for specific talent id. + """ + return sqg2o.getPlayerTalent(*locals()) + +def getPlayerVirtualWorld(id : int) -> int: + """ + This function will get the player virtual world. + Original: [getPlayerVirtualWorld](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-functions/player/getPlayerVirtualWorld/) + + ## Declaration + ```python + def getPlayerVirtualWorld(id : int) -> int + ``` + ## Parameters + `int` **id**: the player id. + ## Returns + `int`: the player virtual world id. + """ + return sqg2o.getPlayerVirtualWorld(*locals()) + +def getPlayerVisual(id : int) -> dict: + """ + This function will get the player visual. + Original: [getPlayerVisual](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-functions/player/getPlayerVisual/) + + ## Declaration + ```python + def getPlayerVisual(id : int) -> dict + ``` + ## Parameters + `int` **id**: the player id. + ## Returns + `dict {bodyModel, bodyTxt, headModel, headTxt}`: player visual. + """ + return sqg2o.getPlayerVisual(*locals()) + +def getPlayerWeaponMode(id : int) -> int: + """ + This function will get the player weapon mode. + Original: [getPlayerWeaponMode](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-functions/player/getPlayerWeaponMode/) + + ## Declaration + ```python + def getPlayerWeaponMode(id : int) -> int + ``` + ## Parameters + `int` **id**: the player id. + ## Returns + `int`: the player weaponMode, for more information see [Weapon mode constants](../../constants/weapon-mode.md). + """ + return sqg2o.getPlayerWeaponMode(*locals()) + +def getPlayerWorld(id : int) -> str: + """ + This function will get the player world. + Original: [getPlayerWorld](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-functions/player/getPlayerWorld/) + + ## Declaration + ```python + def getPlayerWorld(id : int) -> str + ``` + ## Parameters + `int` **id**: the player id. + ## Returns + `str`: the player world. + """ + return sqg2o.getPlayerWorld(*locals()) + +def giveItem(id : int, instance : str, amount : int): + """ + This function is used to give item for player. + Original: [giveItem](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-functions/player/giveItem/) + + ## Declaration + ```python + def giveItem(id : int, instance : str, amount : int) + ``` + ## Parameters + `int` **id**: the player id. + `str` **instance**: the item instance from Daedalus scripts. + `int` **amount**: the amount of item, e.g: `1000` gold coins. + """ + return sqg2o.giveItem(*locals()) + +def hitPlayer(id : int, target_id : int) -> bool: + """ + This function is used to simulate hit between attacker and victim. It will only work with if killer or victim is a real player. The victim will receive damage calculated damage by the game. + Original: [hitPlayer](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-functions/player/hitPlayer/) + + ## Declaration + ```python + def hitPlayer(id : int, target_id : int) -> bool + ``` + ## Parameters + `int` **id**: the player id. + `int` **target_id**: the victim id. + ## Returns + `bool`: `true` if hit was successfully simulated, otherwise `false`. + """ + return sqg2o.hitPlayer(*locals()) + +def isPlayerConnected(id : int) -> bool: + """ + The function is used to check whether player is connected to the server. + Original: [isPlayerConnected](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-functions/player/isPlayerConnected/) + + ## Declaration + ```python + def isPlayerConnected(id : int) -> bool + ``` + ## Parameters + `int` **id**: the player id. + ## Returns + `bool`: `true` when player is connected, otherwise `false`. + """ + return sqg2o.isPlayerConnected(*locals()) + +def isPlayerDead(id : int) -> bool: + """ + The function is used to check whether player is dead. + Original: [isPlayerDead](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-functions/player/isPlayerDead/) + + ## Declaration + ```python + def isPlayerDead(id : int) -> bool + ``` + ## Parameters + `int` **id**: the player id. + ## Returns + `bool`: `true` when player is dead, otherwise `false`. + """ + return sqg2o.isPlayerDead(*locals()) + +def isPlayerSpawned(id : int) -> bool: + """ + The function is used to check whether player is spawned. + Original: [isPlayerSpawned](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-functions/player/isPlayerSpawned/) + + ## Declaration + ```python + def isPlayerSpawned(id : int) -> bool + ``` + ## Parameters + `int` **id**: the player id. + ## Returns + `bool`: `true` when player is spawned, otherwise `false`. + """ + return sqg2o.isPlayerSpawned(*locals()) + +def isPlayerUnconscious(id : int) -> bool: + """ + The function is used to check whether player is in unconscious state. The player will be unconscious, when it gets beaten up, but not killed. + Original: [isPlayerUnconscious](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-functions/player/isPlayerUnconscious/) + + ## Declaration + ```python + def isPlayerUnconscious(id : int) -> bool + ``` + ## Parameters + `int` **id**: the player id. + ## Returns + `bool`: `true` when player is unconscious, otherwise `false`. + """ + return sqg2o.isPlayerUnconscious(*locals()) + +def kick(id : int, reason : str): + """ + !!! note + The reason string can't be longer than 255 characters. + This function will kick the player from the server. + Original: [kick](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-functions/player/kick/) + + ## Declaration + ```python + def kick(id : int, reason : str) + ``` + ## Parameters + `int` **id**: the reason why player was kicked. + `str` **reason**: the reason why player was kicked. + """ + return sqg2o.kick(*locals()) + +def playAni(id : int, aniName : str): + """ + This function is used to play animation on player for all players. + Original: [playAni](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-functions/player/playAni/) + + ## Declaration + ```python + def playAni(id : int, aniName : str) + ``` + ## Parameters + `int` **id**: the player id. + `str` **aniName**: the name of the animation, e.g: `"T_STAND_2_SIT"`. + """ + return sqg2o.playAni(*locals()) + +def playFaceAni(id : int, aniName : str): + """ + This function is used to play face animation on player. + Original: [playFaceAni](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-functions/player/playFaceAni/) + + ## Declaration + ```python + def playFaceAni(id : int, aniName : str) + ``` + ## Parameters + `int` **id**: the player id. + `str` **aniName**: the name of the animation, e.g: `"S_FRIENDLY"`. + """ + return sqg2o.playFaceAni(*locals()) + +def readySpell(id : int, slotId : int, manaInvested : int): + """ + This function will cause player to ready equipped spell. + Original: [readySpell](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-functions/player/readySpell/) + + ## Declaration + ```python + def readySpell(id : int, slotId : int, manaInvested : int) + ``` + ## Parameters + `int` **id**: the player id. + `int` **slotId**: the equipped spell slotId in range <0, 6>. + `int` **manaInvested**: the spell cast cost in mana points. + """ + return sqg2o.readySpell(*locals()) + +def removeItem(id : int, instance : str, amount : int): + """ + This function is used to remove item from player. + Original: [removeItem](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-functions/player/removeItem/) + + ## Declaration + ```python + def removeItem(id : int, instance : str, amount : int) + ``` + ## Parameters + `int` **id**: the player id. + `str` **instance**: the item instance from Daedalus scripts. + `int` **amount**: the amount of item, e.g: `1000` gold coins. + """ + return sqg2o.removeItem(*locals()) + +def removePlayerOverlay(id : int, overlayId : int) -> bool: + """ + This function will remove animation overlay from player for all players. + Original: [removePlayerOverlay](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-functions/player/removePlayerOverlay/) + + ## Declaration + ```python + def removePlayerOverlay(id : int, overlayId : int) -> bool + ``` + ## Parameters + `int` **id**: the player id. + `int` **overlayId**: the overlay id from `mds.xml` file, e.g: `Mds.id("HUMANS_MILITIA.MDS")` + ## Returns + `bool`: `true` if animation overlay was successfully removed from player, otherwise `false`. + """ + return sqg2o.removePlayerOverlay(*locals()) + +def removeWeapon(id : int): + """ + This function will cause player to hide a weapon. + Original: [removeWeapon](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-functions/player/removeWeapon/) + + ## Declaration + ```python + def removeWeapon(id : int) + ``` + ## Parameters + `int` **id**: the player id. + """ + return sqg2o.removeWeapon(*locals()) + +def setPlayerAngle(id : int, angle : float): + """ + This function will set the player facing rotation on y axis for all players. + Original: [setPlayerAngle](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-functions/player/setPlayerAngle/) + + ## Declaration + ```python + def setPlayerAngle(id : int, angle : float) + ``` + ## Parameters + `int` **id**: the player id. + `float` **angle**: the facing rotation on y axis. + """ + return sqg2o.setPlayerAngle(*locals()) + +def setPlayerCollision(id : int, collision : bool): + """ + This function will set the player collision. + Original: [setPlayerCollision](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-functions/player/setPlayerCollision/) + + ## Declaration + ```python + def setPlayerCollision(id : int, collision : bool) + ``` + ## Parameters + `int` **id**: the player id. + `bool` **collision**: `true` if want to enable collision, otherwise `false`. + """ + return sqg2o.setPlayerCollision(*locals()) + +def setPlayerColor(id : int, r : int, g : int, b : int): + """ + This function will set the player nickname color for all players. + Original: [setPlayerColor](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-functions/player/setPlayerColor/) + + ## Declaration + ```python + def setPlayerColor(id : int, r : int, g : int, b : int) + ``` + ## Parameters + `int` **id**: the player id. + `int` **r**: the red color component in RGB model. + `int` **g**: the green color component in RGB model. + `int` **b**: the blue color component in RGB model. + """ + return sqg2o.setPlayerColor(*locals()) + +def setPlayerDexterity(id : int, type : int, value : int): + """ + This function is used to set player script context. For more information see [this article](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/multiplayer/script-context/). + Original: [setPlayerDexterity](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-functions/player/setPlayerDexterity/) + + ## Declaration + ```python + def setPlayerDexterity(id : int, type : int, value : int) + ``` + ## Parameters + `int` **id**: the player id. + `int` **type**: the type of modified context. + `int` **value**: the new value written into context. + """ + return sqg2o.setPlayerDexterity(*locals()) + +def setPlayerDexterity(id : int, dexterity : int): + """ + This function will set the player dexterity points for all players. + Original: [setPlayerDexterity](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-functions/player/setPlayerDexterity/) + + ## Declaration + ```python + def setPlayerDexterity(id : int, dexterity : int) + ``` + ## Parameters + `int` **id**: the player id. + `int` **dexterity**: the dexterity points amount. + """ + return sqg2o.setPlayerDexterity(*locals()) + +def setPlayerFatness(id : int, fatness : float): + """ + This function will set the player fatness factor for all players. + Original: [setPlayerFatness](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-functions/player/setPlayerFatness/) + + ## Declaration + ```python + def setPlayerFatness(id : int, fatness : float) + ``` + ## Parameters + `int` **id**: the player id. + `float` **fatness**: ratio of how much you want to make player fatter, `0.0` is default fatness (none). + """ + return sqg2o.setPlayerFatness(*locals()) + +def setPlayerHealth(id : int, health : int): + """ + This function will set the player health points for all players. + Original: [setPlayerHealth](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-functions/player/setPlayerHealth/) + + ## Declaration + ```python + def setPlayerHealth(id : int, health : int) + ``` + ## Parameters + `int` **id**: the player id. + `int` **health**: health points amount. + """ + return sqg2o.setPlayerHealth(*locals()) + +def setPlayerInstance(id : int, instance : str): + """ + This function will set the player instance for all players. Instance describes the player attributes, like visual, stats, and more.. You can find more information about npc instances in daedalus scripts. + Original: [setPlayerInstance](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-functions/player/setPlayerInstance/) + + ## Declaration + ```python + def setPlayerInstance(id : int, instance : str) + ``` + ## Parameters + `int` **id**: the player id. + `str` **instance**: the new player instance. + """ + return sqg2o.setPlayerInstance(*locals()) + +def setPlayerInvisible(id : int, toggle : bool): + """ + This function will toggle the player invisiblity for all players. + The invisible player will still see other visible players. + Original: [setPlayerInvisible](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-functions/player/setPlayerInvisible/) + + ## Declaration + ```python + def setPlayerInvisible(id : int, toggle : bool) + ``` + ## Parameters + `int` **id**: the player id. + `bool` **toggle**: `true` if the player should be invisible for all players, otherwise `false`. + """ + return sqg2o.setPlayerInvisible(*locals()) + +def setPlayerMana(id : int, mana : int): + """ + This function will set the player mana points for all players. + Original: [setPlayerMana](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-functions/player/setPlayerMana/) + + ## Declaration + ```python + def setPlayerMana(id : int, Mana : int) + ``` + ## Parameters + `int` **id**: the player id. + `int` **mana**: mana points amount. + """ + return sqg2o.setPlayerMana(*locals()) + +def setPlayerMaxHealth(id : int, maxHealth : int): + """ + This function will set the player max health points for all players. + Original: [setPlayerMaxHealth](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-functions/player/setPlayerMaxHealth/) + + ## Declaration + ```python + def setPlayerMaxHealth(id : int, maxHealth : int) + ``` + ## Parameters + `int` **id**: the player id. + `int` **maxHealth**: max health points amount. + """ + return sqg2o.setPlayerMaxHealth(*locals()) + +def setPlayerMaxMana(id : int, maxMana : int): + """ + This function will set the player max mana points for all players. + Original: [setPlayerMaxMana](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-functions/player/setPlayerMaxMana/) + + ## Declaration + ```python + def setPlayerMaxMana(id : int, maxMana : int) + ``` + ## Parameters + `int` **id**: the player id. + `int` **maxMana**: max mana points amount. + """ + return sqg2o.setPlayerMaxMana(*locals()) + +def setPlayerName(id : int, name : str) -> bool: + """ + !!! note + The name string can't be longer than 18 characters, and must be unique for each player. + This function will set the player unique nickname for all players. + Original: [setPlayerName](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-functions/player/setPlayerName/) + + ## Declaration + ```python + def setPlayerName(id : int, name : str) + ``` + ## Parameters + `int` **id**: the player id. + `str` **instance**: the new unique player name. + ## Returns + `bool`: `true` when unique player name was set, otherwise `false`. + """ + return sqg2o.setPlayerName(*locals()) + +def setPlayerScale(id : int, x : float, y : float, z : float): + """ + This function will set the player world position for all players. + Original: [setPlayerScale](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-functions/player/setPlayerScale/) + + ## Declaration + ```python + def setPlayerScale(id : int, x : float, y : float, z : float) + ``` + ## Parameters + `int` **id**: the player id. + `float` **x**: the position in the world on the x axis. + `float` **y**: the position in the world on the y axis. + `float` **z**: the position in the world on the z axis. + """ + return sqg2o.setPlayerScale(*locals()) + +def setPlayerRespawnTime(id : int, respawnTime : int): + """ + !!! note + The respawnTime can't be smaller than 1001 miliseconds. + This function will set the player time to respawn after death. If set to 0, respawn is disabled for selected player. + Original: [setPlayerRespawnTime](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-functions/player/setPlayerRespawnTime/) + + ## Declaration + ```python + def setPlayerRespawnTime(id : int, respawnTime : int) + ``` + ## Parameters + `int` **id**: the player id. + `int` **respawnTime**: the new respawn time in miliseconds. + """ + return sqg2o.setPlayerRespawnTime(*locals()) + +def setPlayerScale(id : int, x : float, y : float, z : float): + """ + This function will set the player scale for all players. + Original: [setPlayerScale](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-functions/player/setPlayerScale/) + + ## Declaration + ```python + def setPlayerScale(id : int, x : float, y : float, z : float) + ``` + ## Parameters + `int` **id**: the player id. + `float` **x**: the scale factor on x axis. + `float` **y**: the scale factor on y axis. + `float` **z**: the scale factor on z axis. + """ + return sqg2o.setPlayerScale(*locals()) + +def setPlayerSkillWeapon(id : int, skillId : int, percentage : int): + """ + This function will set the player skill weapon for all players. + Original: [setPlayerSkillWeapon](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-functions/player/setPlayerSkillWeapon/) + + ## Declaration + ```python + def setPlayerSkillWeapon(id : int, skillId : int, percentage : int) + ``` + ## Parameters + `int` **id**: the player id. + `int` **skillId**: For more information see [Skill weapon constants](../../constants/skill-weapon.md). + `int` **percentage**: the percentage in range <0, 100>. + """ + return sqg2o.setPlayerSkillWeapon(*locals()) + +def setPlayerStrength(id : int, strength : int): + """ + This function will set the player strength points for all players. + Original: [setPlayerStrength](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-functions/player/setPlayerStrength/) + + ## Declaration + ```python + def setPlayerStrength(id : int, strength : int) + ``` + ## Parameters + `int` **id**: the player id. + `int` **strength**: strength points amount. + """ + return sqg2o.setPlayerStrength(*locals()) + +def setPlayerTalent(id : int, talentId : int, talentValue : int): + """ + This function will toggle the player talent for all players. + Original: [setPlayerTalent](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-functions/player/setPlayerTalent/) + + ## Declaration + ```python + def setPlayerTalent(id : int, talentId : int, talentValue : int) + ``` + ## Parameters + `int` **id**: the player id. + `int` **talentId**: the talent id. For more information see [Talent constants](../../constants/talent.md). + `int` **talentValue**: the new talent value. + """ + return sqg2o.setPlayerTalent(*locals()) + +def setPlayerVirtualWorld(id : int, virtualWorld : int): + """ + This function will set the player virtual world for all players. + Virtual worlds are separate logical worlds on the same physical world. + Original: [setPlayerVirtualWorld](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-functions/player/setPlayerVirtualWorld/) + + ## Declaration + ```python + def setPlayerVirtualWorld(id : int, virtualWorld : int) + ``` + ## Parameters + `int` **id**: the player id. + `int` **virtualWorld**: the virtual world id in range <0, 65535>. + """ + return sqg2o.setPlayerVirtualWorld(*locals()) + +def setPlayerVisual(id : int, bodyModel : str, bodyTxt : int, headModel : str, headTxt : int): + """ + This function will set the player visual for all players. + Original: [setPlayerVisual](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-functions/player/setPlayerVisual/) + + ## Declaration + ```python + def setPlayerVisual(id : int, bodyModel : str, bodyTxt : int, headModel : str, headTxt : int) + ``` + ## Parameters + `int` **id**: the player id. + `str` **bodyModel**: the name of the body model (ASC), e.g: `HUM_BODY_NAKED0`. + `int` **bodyTxt**: the numeric id of body texture file. Texture id can be read from V(number) filename part, for example, in this file: `HUM_BODY_NAKED_V8_C0-C.TEX` id is 8. + `str` **headModel**: the name of the head model (MMS), e.g: `HUM_HEAD_PONY`. + `int` **headTxt**: the numeric id of head texture file. Texture id can be read from V(number) filename part, for example, in this file: `HUM_HEAD_V18_C0-C.TEX` id is 18. + """ + return sqg2o.setPlayerVisual(*locals()) + +def setPlayerWeaponMode(id : int, weaponMode : int): + """ + This function will set the player weapon mode for all players. + Original: [setPlayerWeaponMode](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-functions/player/setPlayerWeaponMode/) + + ## Declaration + ```python + def setPlayerWeaponMode(id : int, weaponMode : int) + ``` + ## Parameters + `int` **id**: the player id. + `int` **weaponMode**: For more information see [Weapon mode constants](../../constants/weapon-mode.md). + """ + return sqg2o.setPlayerWeaponMode(*locals()) + +def setPlayerWorld(id : int, world : str, startPointName : str): + """ + This function will set the player world for all players. + Original: [setPlayerWorld](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-functions/player/setPlayerWorld/) + + ## Declaration + ```python + def setPlayerWorld(id : int, world : str, startPointName : str) + ``` + ## Parameters + `int` **id**: the player id. + `str` **world**: the path to the target world (.ZEN). World path is relative to directory `_Work/Data/Worlds`. + `str` **startPointName**: the name of the vob to which the player will be moved. If passed empty string, player will be placed at world start point. If vob with specified name doesn't exists or world doesn't have start point, player will be placed at {0, 150, 0} coordinates. + """ + return sqg2o.setPlayerWorld(*locals()) + +def spawnPlayer(id : int): + """ + !!! note + Unspawned players can't see other players, items, etc. and are invisible for others. + This function will spawn the player. + Players are always in unspawned state after joining to server or after respawning. + Original: [spawnPlayer](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-functions/player/spawnPlayer/) + + ## Declaration + ```python + def spawnPlayer(id : int) + ``` + ## Parameters + `int` **id**: the player id. + """ + return sqg2o.spawnPlayer(*locals()) + +def stopAni(id : int, aniName : str = ""): + """ + This function is used to stop played animation on player for all players. + Original: [stopAni](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-functions/player/stopAni/) + + ## Declaration + ```python + def stopAni(id : int, aniName : str) + ``` + ## Parameters + `int` **id**: the player id. + `str` **aniName**: the name of the animation that you want to stop. The default value is \"\" which means that the first active ani will be stopped. + """ + return sqg2o.stopAni(*locals()) + +def stopFaceAni(id : int, aniName : str = ""): + """ + This function is used to stop played face animation on player. + Original: [stopFaceAni](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-functions/player/stopFaceAni/) + + ## Declaration + ```python + def stopFaceAni(id : int, aniName : str) + ``` + ## Parameters + `int` **id**: the player id. + `str` **aniName**: the name of the animation that you want to stop. The default value is \"\" which means that the first active ani will be stopped. + """ + return sqg2o.stopFaceAni(*locals()) + +def unequipItem(id : int, instance : str): + """ + !!! note + If you want to unequip weapon/shield, first make sure that player is in `WEAPONMODE_NONE`. + This function is used to unequip item from player for all players. + Original: [unequipItem](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-functions/player/unequipItem/) + + ## Declaration + ```python + def unequipItem(id : int, instance : str) + ``` + ## Parameters + `int` **id**: the player id. + `str` **instance**: the item instance from Daedalus scripts. + """ + return sqg2o.unequipItem(*locals()) + +def unreadySpell(id : int): + """ + This function will cause player to unready active spell. It works almost the same as [removeWeapon](removeWeapon.md), but also stops hero if he's moving before hiding the active spell. + Original: [unreadySpell](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-functions/player/unreadySpell/) + + ## Declaration + ```python + def unreadySpell(id : int) + ``` + ## Parameters + `int` **id**: the player id. + """ + return sqg2o.unreadySpell(*locals()) + +def unspawnPlayer(id : int): + """ + !!! note + Unspawned players can't see other players, items, etc. and are invisible for others. + This function will unspawn the player. + Original: [unspawnPlayer](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-functions/player/unspawnPlayer/) + + ## Declaration + ```python + def unspawnPlayer(id : int) + ``` + ## Parameters + `int` **id**: the player id. + """ + return sqg2o.unspawnPlayer(*locals()) + +def useItem(id : int, instance : str): + """ + This function will try to use, interact, open item by player. + Original: [useItem](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-functions/player/useItem/) + + ## Declaration + ```python + def useItem(id : int, instance : str) + ``` + ## Parameters + `int` **id**: the player id. + `str` **instance**: the item instance from Daedalus scripts. + """ + return sqg2o.useItem(*locals()) + +def useItemToState(id : int, instance : str, state : int): + """ + This function will try to use, interact, open item in specific state by player. + Original: [useItemToState](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-functions/player/useItemToState/) + + ## Declaration + ```python + def useItemToState(id : int, instance : str, state : int) + ``` + ## Parameters + `int` **id**: the player id. + `str` **instance**: the item instance from Daedalus scripts. + `int` **state**: the state that you'll start from interacting with item. + """ + return sqg2o.useItemToState(*locals()) \ No newline at end of file diff --git a/g2o/functions/streamer.py b/g2o/functions/streamer.py new file mode 100644 index 0000000..c1000cf --- /dev/null +++ b/g2o/functions/streamer.py @@ -0,0 +1,52 @@ +import sqg2o + +def findNearbyPlayers(position : dict, radius : int, world : str, virtual_world : int = 0) -> list: + """ + This function will search for nearest players, that matches given query arguments. + Original: [findNearbyPlayers](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-functions/streamer/findNearbyPlayers/) + + ## Declaration + ```python + def findNearbyPlayers(position : dict, radius : int, world : str, virtual_world : int = 0) -> list + ``` + ## Parameters + `dict {x, y, z}` **position**: the centroid position. + `int` **radius**: the maximum radius to search from centroid. + `str` **world**: the world used to find players. + `int` **virtual_world**: the virtual world used to find players. + ## Returns + `list [int]`: ids of nearby players. + """ + return sqg2o.findNearbyPlayers(*locals()) + +def getSpawnedPlayersForPlayer(id : int) -> list: + """ + This function is used to retrieve currently spawned players for given player. + Original: [getSpawnedPlayersForPlayer](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-functions/streamer/getSpawnedPlayersForPlayer/) + + ## Declaration + ```python + def getSpawnedPlayersForPlayer(id : int) -> list + ``` + ## Parameters + `int` **id**: the player id. + ## Returns + `list [int]`: ids of spawned players. + """ + return sqg2o.getSpawnedPlayersForPlayer(*locals()) + +def getStreamedPlayersByPlayer(id : int) -> list: + """ + This function is used to retrieve currently streamed players by given player. More details: Streamed players are basically clients, that has spawned given player in their game. Please notice, that player can be spawned only one way. Which means that there are situation were player 1 is spawned for player 2, but not the other way arount. Simple examples: - Invisible players cannot be seen, but they can see everyone nearby. - Flying around world using camera. + Original: [getStreamedPlayersByPlayer](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-functions/streamer/getStreamedPlayersByPlayer/) + + ## Declaration + ```python + def getStreamedPlayersByPlayer(id : int) -> list + ``` + ## Parameters + `int` **id**: the player id. + ## Returns + `list [int]`: ids of streamed players. + """ + return sqg2o.getStreamedPlayersByPlayer(*locals()) \ No newline at end of file diff --git a/g2o/functions/waypoint.py b/g2o/functions/waypoint.py new file mode 100644 index 0000000..a19dc92 --- /dev/null +++ b/g2o/functions/waypoint.py @@ -0,0 +1,37 @@ +import sqg2o + +def getNearestWaypoint(world : str, x : int, y : int, z : int) -> dict: + """ + This function is used to retrieve the information about nearest waypoint from the specified position. + Original: [getNearestWaypoint](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-functions/waypoint/getNearestWaypoint/) + + ## Declaration + ```python + def getNearestWaypoint(world : str, x : int, y : int, z : int) -> dict + ``` + ## Parameters + `str` **world**: the world name in which the waypoint exists. + `int` **x**: the position in the world on the x axis. + `int` **y**: the position in the world on the y axis. + `int` **z**: the position in the world on the z axis. + ## Returns + `dict {name, x, y, z}`: Waypoint information. + """ + return sqg2o.getNearestWaypoint(*locals()) + +def getWaypoint(world : str, name : str) -> dict: + """ + This function is used to retrieve the position of specified waypoint. + Original: [getWaypoint](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-functions/waypoint/getWaypoint/) + + ## Declaration + ```python + def getWaypoint(world : str, name : str) -> dict + ``` + ## Parameters + `str` **world**: the world name in which the waypoint exists. + `str` **name**: the name of the waypoint. + ## Returns + `dict {x, y, z}`: The position of waypoint. + """ + return sqg2o.getWaypoint(*locals()) \ No newline at end of file diff --git a/mkdocs.yml b/mkdocs.yml index 1f8462f..fc6e403 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -25,8 +25,11 @@ nav: - DamageDescription: classes/game/DamageDescription.md - Item: - ItemGround: classes/item/ItemGround.md + - ItemsGround: classes/item/ItemsGround.md - Network: - Packet: classes/network/Packet.md + - Mds: + - Mds: classes/mds/mds.md - Constants: - AntiCheat: constants/anticheat.md - Context: constants/context.md @@ -95,13 +98,146 @@ nav: - onPlayerTeleport: defaultEvents/player/onPlayerTeleport.md - onPlayerToggleFaceAni: defaultEvents/player/onPlayerToggleFaceAni.md - Functions: - - Events: - - addEvent: events/addEvent.md - - event: events/event.md - - callEvent: events/callEvent.md - - removeEvent: events/removeEvent.md - - removeEventHandler: events/removeEventHandler.md - - toggleEvent: events/toggleEvent.md + - Chat: + - sendMessageToAll: functions/chat/sendMessageToAll.md + - sendMessageToPlayer: functions/chat/sendMessageToPlayer.md + - sendPlayerMessageToAll: functions/chat/sendPlayerMessageToAll.md + - sendPlayerMessageToPlayer: functions/chat/sendPlayerMessageToPlayer.md + - Game: + - getHostname: functions/game/getHostname.md + - getMaxSlots: functions/game/getMaxSlots.md + - getPlayersCount: functions/game/getPlayersCount.md + - exit: functions/game/exit.md + - getDayLength: functions/game/getDayLength.md + - getServerDescription: functions/game/getServerDescription.md + - getServerWorld: functions/game/getServerWorld.md + - getTime: functions/game/getTime.md + - serverLog: functions/game/serverLog.md + - setDayLength: functions/game/setDayLength.md + - setServerDescription: functions/game/setServerDescription.md + - setServerWorld: functions/game/setServerWorld.md + - setTime: functions/game/setTime.md + - Npc: + - clearNpcActions: functions/npc/clearNpcActions.md + - createNpc: functions/npc/createNpc.md + - destroyNpc: functions/npc/destroyNpc.md + - getNpcAction: functions/npc/getNpcAction.md + - getNpcActions: functions/npc/getNpcActions.md + - getNpcActionsCount: functions/npc/getNpcActionsCount.md + - getNpcHostPlayer: functions/npc/getNpcHostPlayer.md + - getNpcLastActionId: functions/npc/getNpcLastActionId.md + - isNpc: functions/npc/isNpc.md + - isNpcActionFinished: functions/npc/isNpcActionFinished.md + - npcAttackMelee: functions/npc/npcAttackMelee.md + - npcAttackRanged: functions/npc/npcAttackRanged.md + - npcSpellCast: functions/npc/npcSpellCast.md + - npcUseClosestMob: functions/npc/npcUseClosestMob.md + - setNpcHostPlayer: functions/npc/setNpcHostPlayer.md + - Player: + - addBan: functions/player/addBan.md + - applyPlayerOverlay: functions/player/applyPlayerOverlay.md + - ban: functions/player/ban.md + - drawWeapon: functions/player/drawWeapon.md + - equipItem: functions/player/equipItem.md + - getPlayerAmulet: functions/player/getPlayerAmulet.md + - getPlayerAngle: functions/player/getPlayerAngle.md + - getPlayerAni: functions/player/getPlayerAni.md + - getPlayerArmor: functions/player/getPlayerArmor.md + - getPlayerAtVector: functions/player/getPlayerAtVector.md + - getPlayerBelt: functions/player/getPlayerBelt.md + - getPlayerCameraPosition: functions/player/getPlayerCameraPosition.md + - getPlayerCollision: functions/player/getPlayerCollision.md + - getPlayerColor: functions/player/getPlayerColor.md + - getPlayerContext: functions/player/getPlayerContext.md + - getPlayerDexterity: functions/player/getPlayerDexterity.md + - getPlayerFaceAnis: functions/player/getPlayerFaceAnis.md + - getPlayerFatness: functions/player/getPlayerFatness.md + - getPlayerFocus: functions/player/getPlayerFocus.md + - getPlayerHealth: functions/player/getPlayerHealth.md + - getPlayerHelmet: functions/player/getPlayerHelmet.md + - getPlayerIP: functions/player/getPlayerIP.md + - getPlayerInstance: functions/player/getPlayerInstance.md + - getPlayerInvisible: functions/player/getPlayerInvisible.md + - getPlayerMacAddr: functions/player/getPlayerMacAddr.md + - getPlayerMana: functions/player/getPlayerMana.md + - getPlayerMaxHealth: functions/player/getPlayerMaxHealth.md + - getPlayerMaxMana: functions/player/getPlayerMaxMana.md + - getPlayerMeleeWeapon: functions/player/getPlayerMeleeWeapon.md + - getPlayerName: functions/player/getPlayerName.md + - getPlayerPing: functions/player/getPlayerPing.md + - getPlayerPosition: functions/player/getPlayerPosition.md + - getPlayerRangedWeapon: functions/player/getPlayerRangedWeapon.md + - getPlayerRespawnTime: functions/player/getPlayerRespawnTime.md + - getPlayerRing: functions/player/getPlayerRing.md + - getPlayerScale: functions/player/getPlayerScale.md + - getPlayerSerial: functions/player/getPlayerSerial.md + - getPlayerShield: functions/player/getPlayerShield.md + - getPlayerSkillWeapon: functions/player/getPlayerSkillWeapon.md + - getPlayerSpell: functions/player/getPlayerSpell.md + - getPlayerStrength: functions/player/getPlayerStrength.md + - getPlayerTalent: functions/player/getPlayerTalent.md + - getPlayerVirtualWorld: functions/player/getPlayerVirtualWorld.md + - getPlayerVisual: functions/player/getPlayerVisual.md + - getPlayerWeaponMode: functions/player/getPlayerWeaponMode.md + - getPlayerWorld: functions/player/getPlayerWorld.md + - giveItem: functions/player/giveItem.md + - hitPlayer: functions/player/hitPlayer.md + - isPlayerConnected: functions/player/isPlayerConnected.md + - isPlayerDead: functions/player/isPlayerDead.md + - isPlayerSpawned: functions/player/isPlayerSpawned.md + - isPlayerUnconscious: functions/player/isPlayerUnconscious.md + - kick: functions/player/kick.md + - playAni: functions/player/playAni.md + - playFaceAni: functions/player/playFaceAni.md + - readySpell: functions/player/readySpell.md + - removeItem: functions/player/removeItem.md + - removePlayerOverlay: functions/player/removePlayerOverlay.md + - removeWeapon: functions/player/removeWeapon.md + - setPlayerAngle: functions/player/setPlayerAngle.md + - setPlayerCollision: functions/player/setPlayerCollision.md + - setPlayerColor: functions/player/setPlayerColor.md + - setPlayerDexterity: functions/player/setPlayerDexterity.md + - setPlayerDexterity: functions/player/setPlayerDexterity.md + - setPlayerFatness: functions/player/setPlayerFatness.md + - setPlayerHealth: functions/player/setPlayerHealth.md + - setPlayerInstance: functions/player/setPlayerInstance.md + - setPlayerInvisible: functions/player/setPlayerInvisible.md + - setPlayerMana: functions/player/setPlayerMana.md + - setPlayerMaxHealth: functions/player/setPlayerMaxHealth.md + - setPlayerMaxMana: functions/player/setPlayerMaxMana.md + - setPlayerName: functions/player/setPlayerName.md + - setPlayerScale: functions/player/setPlayerScale.md + - setPlayerRespawnTime: functions/player/setPlayerRespawnTime.md + - setPlayerScale: functions/player/setPlayerScale.md + - setPlayerSkillWeapon: functions/player/setPlayerSkillWeapon.md + - setPlayerStrength: functions/player/setPlayerStrength.md + - setPlayerTalent: functions/player/setPlayerTalent.md + - setPlayerVirtualWorld: functions/player/setPlayerVirtualWorld.md + - setPlayerVisual: functions/player/setPlayerVisual.md + - setPlayerWeaponMode: functions/player/setPlayerWeaponMode.md + - setPlayerWorld: functions/player/setPlayerWorld.md + - spawnPlayer: functions/player/spawnPlayer.md + - stopAni: functions/player/stopAni.md + - stopFaceAni: functions/player/stopFaceAni.md + - unequipItem: functions/player/unequipItem.md + - unreadySpell: functions/player/unreadySpell.md + - unspawnPlayer: functions/player/unspawnPlayer.md + - useItem: functions/player/useItem.md + - useItemToState: functions/player/useItemToState.md + - Event: + - addEvent: functions/event/addEvent.md + - event: functions/event/event.md + - callEvent: functions/event/callEvent.md + - removeEvent: functions/event/removeEvent.md + - removeEventHandler: functions/event/removeEventHandler.md + - toggleEvent: functions/event/toggleEvent.md + - Streamer: + - findNearbyPlayers: functions/streamer/findNearbyPlayers.md + - getSpawnedPlayersForPlayer: functions/streamer/getSpawnedPlayersForPlayer.md + - getStreamedPlayersByPlayer: functions/streamer/getStreamedPlayersByPlayer.md + - Waypoint: + - getNearestWaypoint: functions/waypoint/getNearestWaypoint.md + - getWaypoint: functions/waypoint/getWaypoint.md theme: name: material