polserver/testsuite/testclient/pyuo
turleypol c588c51a33
Expansion helper classes for central handling of features (#756)
* use uoexpansion enums for A9, B9 flags
added TOL to uoexpansion
currently unsure where this will end

simplified account initialisation, added errorcheck

* Expansion classes for server and account
fixed flags

* use of AccountExpansion,ServerExpansion
extended tests
splitted unittest file
added missing test for Min/MaxAttackRange

* more micro performance for world saving
use all 4 cores in CI builds
fix compiler flag warning on windows

* save test for weight_multiplier

* enable gothic,rustictiles when using HSA expansion

* removed ancient unused files

* addressed comments
renamed ServerExpansion to ServerFeatures
added method for expansion name

* got rid of client UOExpansionFlag which is the same as the accout
expansion

* updated core-changes and docs

* updated generated ssopt

* test for tooltips
changed method names
removed/clarified comments

* npc hitchance was never saved
added missing npc save tests

* hitchance bug exists also for items...
added missing test for movemode
2025-02-05 19:02:25 +01:00
..
pyuo Expansion helper classes for central handling of features (#756) 2025-02-05 19:02:25 +01:00
.gitignore Testclient (#390) 2021-03-25 19:26:09 +01:00
LICENSE Testclient (#390) 2021-03-25 19:26:09 +01:00
README.md Testclient (#390) 2021-03-25 19:26:09 +01:00
terminal.py Testclient (#390) 2021-03-25 19:26:09 +01:00
testclient.cfg Testclient (#390) 2021-03-25 19:26:09 +01:00
testclient.py Expansion helper classes for central handling of features (#756) 2025-02-05 19:02:25 +01:00

Build Status

pyuo

A text-only UO client written in Python Copyright (C) 2015-2016 Gabriele Tozzi

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA

System Requirements

  • Python 3.4+

Archive content

Examples:

  • spary.py is a very simple draft of a script using this client
  • terminal.py is curses-based interactive command line client

The library itself is contained in the pyuo folder:

  • brain.py contains the classes useful for writing your scripts
  • client.py contains the client classes

How to use this stuff

Just start terminal.py and play with it or create your own script.

Here is a very minimal draft:

from pyuo import client
from pyuo import brain

class MyBrain(brain.Brain):
    ''' Override the base brain's methods to do your fancy things '''

if __name__ == '__main__':
    # Create a new client
    client = client.Client()
    # Connect to the server, get list of available servers
    servers = cclient.connect(ip_or_host, port, username, password)
    # Select first server, get list of characters
    chars = client.selectServer(servers[0]['idx'])
    # Select first character
    client.selectCharacter(chars[0]['name'], 0)
    # Finally start the main ai loop and enter it
    MyBrain(client)