Python and Enemy Territory !


(system) #21

So why is etpro not open source? if it should be then I Want a anti cheat left right and center :wink:


(Mateos) #22

No need for the source to make an AC.


(Dragonji) #23

Because it doesn’t have to.


(muessli) #24

[QUOTE=Ododo;482246]HI every one !

I’m taking back the development of PyEt !
The plugin is now designed to be runnable with any ET mod :slight_smile:

I’m sorry for the poor documentation at the moment , however Pyet is very similar to lua scripting.

Try it ! :

--How to: [readme.md](https://github.com/Ododo/Pyet2/blob/master/README.md)

--Download link : [pyet2-0.0.1.tar.gz](http://sourceforge.net/projects/pywet/files/pyet2-0.0.1.tar.gz/download)

--addon example : [example.py](https://github.com/Ododo/Pyet2/blob/master/pymodule/addons/example.py)[/QUOTE]

Hi Ododo, sounds very good! :slight_smile:
Can i use PyEt also with “Enemy Territory:Legacy”?

mfg muessli


(muessli) #25

ups, i forgot to ask, whether i can use PyET with Python 3.3?


(muessli) #26

sorry, another Question: can I use PyET only in “ETDED”-Environment, not in “Client”-Environment?


(Ododo) #27

Hi, sorry for the delay .
Yes, I think there is no problem in using PyET with ET:L
Pyet is not using the Client evironment.
Unfortunately i compiled Pyet using python2.7, maybe i will build a python3 version when i’ll have time :slight_smile:


(Ododo) #28

PyEt r0.0.2

[ul]
[li] Fixed some path issues and some obscure symbol-related problems.
[/li][li] pymodule improvement and ajustments.
[/li][li]Easy way to parse UserInfo strings explained in the example 2
[/li][li] ET to IRC bot that you can find in the /addons directory
[/li][/ul]

Try it !

[ul]
[li]Download Link
[/li][/ul]

Happy New Year !

#pyet @quakenet ;
github.com/Ododo ;


(Ododo) #29

Pyet rc0.0.3
release

You can now manage entities with pyet :slight_smile:

Here is a quick example:


from pyet import World
from pyetw import Addon

class Example3(Addon):
    """
- How to use the pyetw.World class
and how to manage entities in Pyet -
A list of fields can be found in fields.py


ent = World.GetFreeEntity()
if ent:
    World.InitEntity(ent)
    ent.SetField("sess.muted", 1, 1) //client only field (int)
    ent.SetField("classname", "SuperPlayer", 1) //string
    ent.SetField("health" , 100 , 1) // int
    ent.SetField("rotate", [42,42,42], 1) //vec3_t

"""
    group="example"
    name = "Example3"
        
    def ClientThink(self, client):
        ent = World(client)
        ping = ent.GetField("ps.ping")
        if ping > 100:
            self.call.DropCLient(client, "Too high ping !", 60)


source code

I also generated (partial) documentation : here
Get pyet 0.0.3 here :penguin:

If you encounter bugs or massive segfaults, do not hesitate to post feedback :smiley:


(morsik) #30

Bad that it’s not PEP8 correct :stuck_out_tongue:


(acQu) #31

I guess it’s not “abc”, and not even “def”. Just a great python plugin :slight_smile:


(Ododo) #32

:stuck_out_tongue: you are free to contribute

ty acQu <3

EDIt: does someone knows why i have a ‘lightbulb’ on my topic , i mean this is so nice but
why


(Ododo) #33

Hi,
Pyet now works with Python 3 (Python 2 build still possible)
-program restructured and addon system simplified
-i386/x86_64 builds available
-entity fields added

Have fun !