- Get(<string> filePath) returns <bytearray>
Similar to old app.Get, allows to extract any file encrypted.
- IsPositionBlocked(<int>x,<int>y) returns <boolean>
Allows to check if a map position is walkable(mobs don't count), true if is walkable or false if is not walkable.
Note: For better pathfinding, unblocked points that are close(1 unit) to a blocked point, are considered blocked too.
There is a bug with objects, since i can't figure out how to load the objects.
- FindPath(<int>x_start,<int>y_start,<int>x_end,<int >y_end) returns <tuple>(x,y)
Finds a path between 2 points.
The path will not contain the current point.
It's possible to edit the maps, by changing the files in Resources/Maps, 0 represents a blocked location and the 1 represents a walkable position. The module will generate a new map if the same does not exist.
- SendPacket(<int>size,<bytearray>buffer) return None
Sends a packet to the server bypassing any encryption set.
- SendAttackPacket(<int>vid,<byte>type)
Sends an attack packet to the server, the type is usually 0.
- SendStatePacket(<float>x,<float>y,<float>rotation_ angle,<byte>eFunc, <byte>uArgs)
Sends a packet containing the current state of the main player, can be used to change position,rotation and attack state on server side only.
The value eFunc can take the fallowing values: CHAR_STATE_ATTACK,CHAR_STATE_STOP,CHAR_STATE_WALK
If eFunc == CHAR_STATE_ATTACK then the uArgs value can take one of the following values:
- CHAR_STATE_ARG_HORSE_ATTACK1
- CHAR_STATE_ARG_HORSE_ATTACK2
- CHAR_STATE_ARG_HORSE_ATTACK3
- CHAR_STATE_ARG_COMBO_ATTACK1
- CHAR_STATE_ARG_COMBO_ATTACK2
- CHAR_STATE_ARG_COMBO_ATTACK3
- CHAR_STATE_ARG_COMBO_ATTACK4
otherwise the value can be NULL or CHAR_STATE_ARG_NONE
All this constants are defined in the module.
- <dict>InstancesList
Is a dictionary containing all vids currently in sight as keys and values
- IsDead(<int>vid) returns 1 or 0
Returns 1 if the instance with the vid provided is dead or doesn't exist and returns 0 otherwise
- SendStartFishing(<word>direction)
Sends a packet to the server to start fishing, the direction parameter is a word only understandable by the server(will be converted in the future).
- SendStopFishing(<byte>type,<float>timeLeft)
Sends a packet to the server to stop fishing, the type can be any of the following parameters:
- SUCCESS_FISHING -> The mini game was solve successfully.
- UNSUCCESS_FISHING -> The mini game was not solve.
The timeLeft represents the time left to fish.
- SendAddFlyTarget(<int>vid,<float>x,<float>y)
Sends a packet to send an arrow at an enemy.
- SendShoot(<byte>uSkill)
Sends an attack packet to the current selected enemy (should be used after SendAddFlyTarget).
uSkill can be:
- COMBO_SKILL_ARCH -> Normal attack.
- BlockFishingPackets()
Blocks client from sending fishing packets (this module will still be able to send)
- UnblockFishingPackets()
Unblocks client from sending fishing packets.
- DisableCollisions()
Disable client colisions with objects and the terrain (Wallhack).
- EnableCollisions()
Enable client colisions.
- RegisterNewShopCallback(<callable_function>callbac k)
Sets a callback function, that will be called whenever a new private shop is created arround.
That callback will be called with the shop vid as the first argument.
- <string>PATH
Path of the location where the library was injected
- GetCloseItemGround(<int>x,<int>y) returns a tupple (<int>vid,<int>x,<int>y)
Returns the closest pickable item in the ground relative to the position given.
The items will be fitler acording to the pickup filter (see below).
Also, it will ignore items owned by other player.
- SendPickupItem(<int>itemVID)
Sends a packet to pickup an item from the ground
### Pickup Filter
A filter o be applied when calling GetCloseItemGround, by default the filter is set to pick items not present in filter.
- ItemGrndDelFilter(<int> index)
Delets an item id from the filter.
- ItemGrndAddFilter(<int> index)
Adds an item id to the filter.
- ItemGrndOnFilter()
Changes the filter mode, to only return items in the filter.
- ItemGrndNotOnFilter()
Changes the filter mode, to ignore all items present in the filter.
- ItemGrndFilterClear()
Deletes every item in the filter.
### Simulation of old functions
These simulates the functions that were removed from the modules by Gameforge.
This functions can also be accessed from their older modules.
- GetPixelPosition(<int>vid) returns a tupple (x,y,z)
Returns the position of the player by vid
- MoveToDestPosition(<float> x,<float> y)
Moves to a destination.[/CODE]