[SCRIPT] Unbound

Intended for use on live public servers.
4 posts Page 1 of 1 First unread post
thepolm3
Scripter
Scripter
Posts: 424
Joined: Sat Feb 16, 2013 10:49 pm


This is a little something I whipped up that, nothing fancy, allows players to walk right ff the edge of the map.
Cododode
Code: Select all

"""
unbound by thepolm3
removes map boundaries
"""
from twisted.internet.task import LoopingCall

def apply_script(protocol,connection,config):
    class UnboundProtocol(protocol):
        pass
    class UnboundConnection(connection):
        save_vel=0.0
        loop=None
        def pos(self):
            position=self.world_object.position
            return position.x,position.y,position.z

        def goOverEdge(self):
            world_object=self.world_object
            if world_object:
                x,y,z=self.pos()
                if x>=511:
                    if self.world_object.velocity.x > 0:
                        self.world_object.set_position(0.5,y,z)
                if x<=1:
                    if self.world_object.velocity.x < 0:
                        self.world_object.set_position(511.5,y,z)
                if y>=511:
                    if self.world_object.velocity.y > 0:
                        self.world_object.set_position(x,0.5,z)
                if y<=1:
                    if self.world_object.velocity.y < 0:
                        self.world_object.set_position(x,511.5,z)

        def on_spawn(self,pos):
            if not self.loop:
                self.loop=LoopingCall(self.goOverEdge)
                self.loop.start(0.01)
            return connection.on_spawn(self,pos)

    return UnboundProtocol,UnboundConnection

Spoiler:
Blue_Happy1 Blue_BigSmile Blue_Happy3 Blue_Sunglasses1 Blue_Wink1 Blue_D'oh Blue_Normal Blue_Sleeping Blue_Surprised2 Blue_NotHappy Blue_Crying Blue_Septic Blue_Spade Blue_Rifle Blue_Pistol Blue_Pistol2 Blue_Angry Blue_Brasil Blue_Crying2 Blue_Devil1
Attachments
unbound.py
(1.38 KiB) Downloaded 198 times
TB_
Post Demon
Post Demon
Posts: 998
Joined: Tue Nov 20, 2012 6:59 pm


Well then, what happens when they walk off the map? do they appear on the other side, or can they walk as the chunks rendered go?
TheScar
Deuce
Posts: 21
Joined: Wed Apr 24, 2013 8:24 am


How to use
thepolm3
Scripter
Scripter
Posts: 424
Joined: Sat Feb 16, 2013 10:49 pm


sorry, yes makes them walk to other side
4 posts Page 1 of 1 First unread post
Return to “Completed Releases”

Who is online

Users browsing this forum: No registered users and 20 guests