Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - thob

Pages: [1] 2
1
PlaneShift News and Rules / Re: New PlaneShift main server!
« on: February 29, 2012, 09:30:22 am »
Ho,

could you tell us some details why the server changes so often? ('Because it's better' is not a valid argument.)

Because, I assume they sponsor PS to gain new customers. But they have some work with it. By switching too often maybe PS gets a negative reputation. Like the employee that has 5 employers in 3 years. Not what I want for PS.

o/ thob

2
PlaneShift Mods / pspos - sniff PS position data
« on: November 08, 2011, 03:27:55 pm »
Heya,

made this just for fun.. maybe it is useful for those still using these mapmaker-tools.
Asks questions.. use it or not.

Code: (python) [Select]
#!/usr/bin/python2
# License: WTFPL <http://sam.zoy.org/wtfpl>
#  >You just DO WHAT THE FUCK YOU WANT TO.<
import pcap
import struct


class Packet(object):
    def __init__(self, data):
        self.pos = (0, 0, 0)
        self.rotation = 0
        self.sector = ''
        self.is_valid = False
        self.data = data
        self.strip_header()
        if self.data: self.unpack()

    def __str__(self):
        return str((self.pos, self.rotation, self.sector))

    def __repr__(self):
        return str((self.pos, self.rotation, self.sector))

    def strip_header(self):
        #  Strip UDP header / extract data
        if self.data and self.data[12:14] == '\x08\x00':
            header_len = ord(self.data[14]) & 0x0f
            self.data = self.data[22 + (4 * header_len):]
        else: self.data = b''

        # Strip PS header:
        # 4 bytes id / 4 bytes offset / 4 bytes size
        # 2 bytes size / 1 byte priority / 2 bytes size
        # 1 byte msg_type = 15 bytes
        if len(self.data) > 15:  # Acks are smaller
            (msg_type, ) = struct.unpack('<B', self.data[15])
            # DeadReckoningPacket
            if msg_type == 16: self.data = self.data[18:]
            else: self.data = b''
        else: self.data = b''

    def struct_unpack(self, pattern):
        size = struct.calcsize(pattern)
        (data,) = struct.unpack(pattern, self.data[:size])
        self.data = self.data[size:]
        return data

    def unpack(self):
        eid = self.struct_unpack('<L')
        counter = self.struct_unpack('<B')
        flags = self.struct_unpack('<B')

        if flags & 1: mode = self.struct_unpack('<B')
        if flags & 2: ang_vel = self.struct_unpack('<f')
        if flags & 4: vel = (self.struct_unpack('<f'), 0, 0)
        if flags & 8: vel = (0, self.struct_unpack('<f'), 0)
        if flags & 16: vel = (0, 0, self.struct_unpack('<f'))
        if flags & 32: world_vel = (self.struct_unpack('<f'), 0, 0)
        if flags & 64: world_vel = (0, self.struct_unpack('<f'), 0)
        if flags & 128: world_vel = (0, 0, self.struct_unpack('<f'))

        self.pos = (self.struct_unpack('<f'),
               self.struct_unpack('<f'),
               self.struct_unpack('<f'))
        rotation = self.struct_unpack('<B')
        # quantized to 0 - 256: radian = (2pi * quan) / 256
        self.rotation = (2 * 3.14159 * rotation) / 256

        if self.struct_unpack('<L') == 4294967295:
            self.sector = self.data[:-1].decode('utf-8')
        else: self.sector = ''
        self.is_valid = True


class Sniffer(pcap.pcapObject):
    def __init__(self, dst, port=7777, device=None):
        pcap.pcapObject.__init__(self)
        if device is None: device = pcap.lookupdev()
        self.open_live(device, 65535, 0, 100)
        self.setfilter('dst {} and port {} and udp'.format(dst, port), 0, 0)

    def get_callback(self, callback):
        def process_packet(pktlen, data, timestamp):
            packet = Packet(data)
            if packet.is_valid: callback(timestamp, packet)
        return process_packet

    def loop(self, count, callback):
        pcap.pcapObject.loop(self, count, self.get_callback(callback))

    def dispatch(self, count, callback):
        pcap.pcapObject.dispatch(self, count, self.get_callback(callback))

    def next(self, *args):
        ret = pcap.pcapObject.next(self)
        if not ret in None:
            (pktlen, data, timestamp) = ret
            packet = Packet(data)
            if packet.is_valid: return (timestamp, packet)
        return None


def main():
    def print_it(*args): print args
    sniffer = Sniffer('62.173.168.9')
    try: sniffer.loop(0, print_it)
    except KeyboardInterrupt: pass

if __name__ == '__main__': main()
https://gist.github.com/1349063

You need to run it as root or find a way to access the buffer as user.
If you make something cool using this code, please inform me :).

o/ Thob

EDIT:
Cause Nanos asked:
That thing observes the network traffic between the PlaneShift client and the server. Its picks the packets from the sever and unpacks fthem if they contain position data.
It then calls a callback (here it prints the information). Just install pcap, run it as root and move your char ingame.

3
The Hydlaa Plaza / Re: I'm back!
« on: February 02, 2011, 03:08:24 pm »

4
General Discussion / Re: Planeshift in the Mac App Store?
« on: January 28, 2011, 09:19:57 am »
Apple appstores have issues with GPL. VLC was pulled out of one recently because of it.
*nods*
Apple demands to be the only way of distribution. GPL says you need to Source. Does not work together.

Thob

5
PlaneShift Mods / Re: Serverpinger
« on: January 27, 2011, 03:33:12 am »
Im confuzzled, are you reccomending a new server? or an edit or what...
either way.. we've already switched twice, why ad more >.>

Laanx is easier to remember as the main server.
And for sure you can use 'planeshift.zeroping.it' if it resolves the right way.

Thob

PS: Sorry, I expected basic knowledge of python. Ask if you are unsure about certain things.

6
PlaneShift Mods / Serverpinger
« on: January 25, 2011, 11:10:15 am »
Ähm, yes..

here it is:

http://paste.frubar.net/13313

Code: [Select]
# serverpinger.py by Thob
# Usage: Just run it! (It's python 3)
# You may want to change the ip adress or if it runs once/continously.
# License: WTFPL (http://sam.zoy.org/wtfpl/)

import socket
import random
import time

GENERIC =  b'\x00\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x08\x00\x00'
QUESTION = GENERIC + b'\x01\x05\x00\x00\x00\x00\x00\x03'

class Connection:
    def __init__(self, ip, port):
        self.socket = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
        self.socket.bind(('', random.randint(1025, 8000)))
        self.socket.settimeout(2)
        (self.port, self.ip)  = (port, ip)

    def poke(self):
        self.socket.sendto(QUESTION, (self.ip, self.port))
        try:
            (msg, (ip, port)) = self.socket.recvfrom(1400)
            if len(msg) == 23 and msg[15] == 1: # Is ping packet?
                if msg[-1] == 6: state = 'up'
                elif msg[-1] == 8: state = 'full'
                elif msg[-1] == 4: state = 'up but locked'
                else: state = 'is coming back up'
            else: state = 'unkown'
        except socket.timeout: state = 'down'
        return 'Server ({}) {}!'.format(self.ip, state)


def one_time(con):
    print(con.poke())

def continously(con, sleep):
    time_1 = 3000
    time_2 = 0

    while True:
        time_1 = time.time()
        if time_1 - time_2 > sleep:
            print(con.poke())
            time_2 = time.time()
        else:
            time.sleep(0.5)

def main():
    ip = '62.173.168.9' # laanx
    #ip = '70.167.49.20' # ezpcusa
    con = Connection(ip, 7777)

    one_time(con)
    #continously(con, 5)

if __name__ == '__main__':
    try: main()
    except KeyboardInterrupt: pass


Have fun... or ask questions.

Thob

7
General Discussion / Re: Tutorial Voiceover
« on: December 04, 2010, 12:32:38 pm »
Oi,

I would like to take part.. but I've got two questions:
- Why the atomic blue license? (I understand the arguments for the other art stuff (I don't like them), but I don't see why not using cc-by-nc-sa, or similar)
- Why don't you make the decision public? A wikipage with all submissions and a poll or something. As this is a thing that concerns us all and that is contribution by us. That's called democracy, voting and published results. Works quite well.

o/ thob

8
Complaint Department / Re: Automated crash reports
« on: June 17, 2010, 03:06:41 am »
heya,

Quote from: verden
And the code for the client is open, so this function should be available for scrutiny in the CVS.

Right, same with Googles browser. Wich used to sent a lot of data until the users protestet. The problem is _that_ it sends automated crash report. Not what this report contains (for me).

Quote from: Sen
I believe one workaround for what thob basically asks for is e.g. a popup where it asks for that permission.

Right.

Quote from: kaerli2
Lock thread please and move further discussion to PS#4554

Uhm.. why? This is a much better place for discussion. And often there are parallel discussion threads here :).

\o thob

PS: Still looking for "Please consult the PlaneShift forums for more details."...

9
Complaint Department / Re: Automated crash reports
« on: June 16, 2010, 05:06:29 pm »
Let the user decide if he/she wants to upload the dump file!
I dont use Microsoft, WoW, ATi... this is no argument for me. We do it, cause others do it aswell.


10
Complaint Department / Automated crash reports
« on: June 16, 2010, 04:03:12 pm »
Heya,

just started this game after some time. I had a crash (well I don't complain about that) and at the end I got this:
"""A report containing only information strictly necessary to identify this problem will be sent to the PlaneShift developers.
Please consult the PlaneShift forums for more details.
Attempting to upload crash report.""" followed by a libcurl exception.

I dont know how you think about this,  but I think this is totally WRONG. We have discussions about net neutralism, data protection (google and their street view cars) all over the world. I thought open source was open source, cause it uses other methods than big companies, cause it does not harvest data about their users (I know, this is not the point about open source, but a point in the ideology).

I know, this is about "user friendliness" for you, but why not ask the users to be so kind to open a ticket at the bugtracker?

Because nobody does? Well, thats not true. And I dont think that automated bug reports help much.

Unfortunately, for me, another detail why PlaneShift becomes unplayable. I hope you got the point.

cheers, thob

PS: "Please consult the PlaneShift forums for more details." Uhm.. where?

11
Wish list / Re: Combine crafting/blacksmith with a minigame
« on: April 21, 2010, 11:16:36 am »
Hm..

actually I dont like this idea. There is just one, but I think a sort of important reason: This is a RPG.
So I could be a 65 years old men unable to hurt a fly. But I could play a young dermorian. A young one sneaking arround and killing... dwarfs?

So what I want to say: Dont mix the users and the chars skills. I am good at hitting a key so Thob is a good smith? No.

:) thob

(I am not 65 years old o.O but you may think about why chosed this number)

12
General Discussion / Re: Warning: Clean Your Guildhouse.
« on: January 25, 2010, 03:01:00 pm »
:o One week is ridiculous.

I am only able to play during weekends at all.  :'(

I demand Strength=200 for all mules.  :-\

Yes, at least a month. There are many guilds with inactive Players. To guarantee access to the items the guild needs "guild-mules" that everyone can access.
These mules need to be created and (if possible trained).

Impossible for a guild with one, two or three active members.

Yes, it is a RP server. But players need a way to store their items. And a guild-house is way more RPish than a mule. And if there is that big problem, either there is a bad concept behind the server, or we need a better way of storing: large boxes, shelves.

A big problem for merchants. The Woipers,  something as a merchant guild, need a lot of space and space that is accessible by every member. Equivalent to a depot. It is our way of role playing to use the house as a depot?!

Hope you got the point.

Thob

A last word. Nearly every house has an attic. Some do not, well the people have to store their things where they find free space. Same as we do in PS. So don't ask us to improve the situation, present an alternative and we will see.

13
Poetry, Comedy, and other. / Re: Xiosimass: "And how do you feel?"
« on: December 25, 2009, 03:34:41 pm »
Looking at the date of your registration.. you cant understand it.

It is just fun.

Read about Xiosiaxmas (although we are not allowed to use this word).

14
General Discussion / Re: Gold Prices
« on: December 22, 2009, 04:30:42 pm »
Nairan: nobody dug gold befor and sold it. everyone was on plat.
No we have a chance to talk to the miners and get them to dig gold/iron/coal.

Lets make them a good offer. They cant deny, the dont have platinum anymore.

*laughs*

Thob

15
General Discussion / Re: Markets: We need some statistics.
« on: December 16, 2009, 05:32:21 am »
You are right what you are saying about profit. Maybe.

I dont really know you, you maybe dont know me.. but pease read about the merchantile order of commerce (sig).
We set up markets in former times, we announced them, many well known merchants came.. well but no customer (sometimes).
And this was in Hydlaa, not in Oja.

Eh. I bet things have changed and there is some intrest in such a market. If Thob hears some IG announcement he will pay I think. *grins* But then he expects guards and maybe a moneychanger...

Maybe Aiwendil.

Pages: [1] 2