sanctuary/d1.py

Name: d1.py

Owner: sanctuary

Description: Scripts for interacting with Diablo 1 from Python.

Created: 2018-04-20 14:26:23.0

Updated: 2018-05-13 22:23:32.0

Pushed: 2018-05-13 22:23:31.0

Homepage: null

Size: 17

Language: Python

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

d1.py

This project provides scripts for interacting with Diablo 1 from Python.

Installation on Windows
  1. Install MSYS2.
  2. Launch MSYS2 terminal.
  3. pacman -Sy mingw-w64-x86_64-llvm mingw-w64-x86_64-lldb
  4. go get -u github.com/mewkiz/cmd/sar
  5. make -C typ

Note, the MSYS2 Windows port of LLDB is currently lacking Python support (see upstream issue).

Installation on Linux
  1. pacman -Sy lldb python2-cffi
  2. go get -u github.com/mewkiz/cmd/sar
  3. make -C typ
Usage

The following example changes the name of the item equipped in the right hand to Hello from Python.

do python2 -i d1.py
player = get_player()
player.x

player.y

stream = BytesIO(b'Hello from Python')
stream.readinto(ffi.buffer(player.body_items[4].unidentified_name))
set_player(player)

Interacting with Diablo 1 from Python


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.