Code Monkey home page Code Monkey logo

piqueserver-extras's Introduction

Piqueserver Extras

A collection of maps, scripts, and more from the community!

piqueserver-extras's People

Contributors

abelgraham avatar godwhoa avatar notafile avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

piqueserver-extras's Issues

Looking for ABBS python3 version, tried to port it myself but failed.

OS

Ubuntu 20.04
docker compose with dockerfile in piqueserver main repo

Why

Since the ABBS is written by python2, piqueserver can't run it.
https://github.com/tydaytygx/piqueserver-extras/blob/master/unsupported-scripts/ABBS.py

What have I done

Replace all the module and function(maybe)
***I am not good at coding, and I am stuck on function on_disconnect() ***. I use basicbots(python3 version) as a reference.

Type addbot, bot was successfully added, but soon the server could not be joined.

Type addbot again, shows the error below:

[piqueserver.player#info] B-3 [LV.6] (IP 127.0.0.1, ID 3) entered the game!
[piqueserver.commands#info] <Console> /addbot  -> Added 1 bot(s)
[-] Unhandled Error
	Traceback (most recent call last):
	  File "/usr/local/lib/python3.7/asyncio/base_events.py", line 541, in run_forever
	    self._run_once()
	  File "/usr/local/lib/python3.7/asyncio/base_events.py", line 1786, in _run_once
	    handle._run()
	  File "/usr/local/lib/python3.7/asyncio/events.py", line 88, in _run
	    self._context.run(self._callback, *self._args)
	  File "/usr/local/lib/python3.7/site-packages/twisted/internet/asyncioreactor.py", line 271, in _onTimer
	    self.runUntilCurrent()
	--- <exception caught here> ---
	  File "/usr/local/lib/python3.7/site-packages/twisted/internet/base.py", line 994, in runUntilCurrent
	    call.func(*call.args, **call.kw)
	  File "/config/scripts/ABBS.py", line 622, in bot_num_adjust_do
	    if not self.bot_bottikick(self.green_team):
	  File "/config/scripts/ABBS.py", line 635, in bot_bottikick
	    yobi.disconnect()
	  File "/config/scripts/ABBS.py", line 1033, in disconnect
	    self.on_disconnect()
	  File "/config/scripts/ABBS.py", line 3445, in on_disconnect
	    connection.on_disconnect(self)
	  File "/config/scripts/aimbot2.py", line 495, in on_disconnect
	    return connection.on_disconnect(self)
	  File "/config/scripts/votekick.py", line 337, in on_disconnect
	    connection.on_disconnect(self)
	  File "/usr/local/lib/python3.7/site-packages/piqueserver-1.0.0-py3.7-linux-x86_64.egg/piqueserver/player.py", line 115, in on_disconnect
	    ServerConnection.on_disconnect(self)
	  File "/usr/local/lib/python3.7/site-packages/piqueserver-1.0.0-py3.7-linux-x86_64.egg/pyspades/player.py", line 931, in on_disconnect
	    del self.protocol.players[self.player_id]
	builtins.KeyError: 3
# -*- coding: utf-8 -*-
def disconnect(self, data = 0):
    if self:
        if not self.local:
            callLater(0.1,self.protocol.bot_num_adjust,True)
            return connection.disconnect(self)
        if self.disconnected:
            return
        if self in self.protocol.bots:
            self.protocol.bots.remove(self)
        self.disconnected = True
        self.on_disconnect()

New Scripts Adding Policy

Although I got the rights to add anything without approval, I don't like the idea of uploading everything here.
I ask everyone interested to express their opinion on:

  1. I have uploaded 6 scripts here, do you think they are suitable for this project?
  2. What about armageddon.py with little code and little meaning?
  3. Should I add multiple implementations of the same script? For example, there is a hookshot script (teleportation to a visible block). Its code is very bloated and overcomplicated, I would like to rewrite it. So is it worth rewriting or posting a version that everyone uses. Or both?
    The same goes for mines and rpg(rocket).
  4. Should I upload ported foreign scripts such as AHT here?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.