Transport Tycoon Forums

The place to talk about Transport Tycoon
It is currently Mon Mar 25, 2019 5:07 am

All times are UTC




Post new topic  Reply to topic  [ 5 posts ] 
Author Message
PostPosted: Sun Jan 06, 2019 9:16 pm 
Offline
Engineer
Engineer

Joined: Tue Sep 02, 2008 7:45 am
Posts: 21
I've created my own Admin Port library for the open-source language Monkey2

You can grab it here: https://github.com/Hezkore/m2oan
It comes with two examples.
First example shows how to connect and setup all events.
Second example shows how to kick people with illegal names.

Image


Last edited by Hezkore on Mon Jan 07, 2019 1:11 am, edited 1 time in total.

Top
   
PostPosted: Sun Jan 06, 2019 10:09 pm 
Offline
Traffic Manager
Traffic Manager

Joined: Fri Apr 14, 2017 3:51 pm
Posts: 145
Location: Czech Republic
I tried it:

C:\Monkey2-v2018.09\bin>mx2cc_windows.exe makemods m2oan

Mx2cc version 1.1.15

***** Making module 'm2oan' (windows debug x86 gcc mx) *****

Parsing...
Semanting...
C:/Monkey2-v2018.09/modules/m2oan/inc/admin.monkey2 [14] : Error : Type 'JsonObject' not found
C:/Monkey2-v2018.09/modules/m2oan/inc/admin.monkey2 [32] : Error : Type 'JsonObject' not found
C:/Monkey2-v2018.09/modules/m2oan/inc/admin.monkey2 [25] : Error : Type 'JsonObject' not found
C:/Monkey2-v2018.09/modules/m2oan/inc/admin.monkey2 [22] : Error : Type 'JsonObject' not found
C:/Monkey2-v2018.09/modules/m2oan/inc/admin.monkey2 [21] : Error : Type 'JsonObject' not found
C:/Monkey2-v2018.09/modules/m2oan/inc/admin.monkey2 [24] : Error : Type 'JsonObject' not found
C:/Monkey2-v2018.09/modules/m2oan/inc/admin.monkey2 [23] : Error : Type 'JsonObject' not found
C:/Monkey2-v2018.09/modules/m2oan/inc/admin.monkey2 [36] : Error : Type 'JsonObject' not found
C:/Monkey2-v2018.09/modules/m2oan/inc/admin.monkey2 [35] : Error : Type 'JsonObject' not found
C:/Monkey2-v2018.09/modules/m2oan/inc/admin.monkey2 [30] : Error : Type 'JsonObject' not found
C:/Monkey2-v2018.09/modules/m2oan/inc/admin.monkey2 [27] : Error : Type 'JsonObject' not found
C:/Monkey2-v2018.09/modules/m2oan/inc/admin.monkey2 [26] : Error : Type 'JsonObject' not found
C:/Monkey2-v2018.09/modules/m2oan/inc/admin.monkey2 [29] : Error : Type 'JsonObject' not found
C:/Monkey2-v2018.09/modules/m2oan/inc/admin.monkey2 [31] : Error : Type 'JsonObject' not found
C:/Monkey2-v2018.09/modules/m2oan/inc/admin.monkey2 [28] : Error : Type 'JsonObject' not found
C:/Monkey2-v2018.09/modules/m2oan/inc/admin.monkey2 [34] : Error : Type 'JsonObject' not found
C:/Monkey2-v2018.09/modules/m2oan/inc/admin.monkey2 [20] : Error : Type 'JsonObject' not found
C:/Monkey2-v2018.09/modules/m2oan/inc/admin.monkey2 [15] : Error : Type 'JsonObject' not found
C:/Monkey2-v2018.09/modules/m2oan/inc/admin.monkey2 [13] : Error : Type 'JsonObject' not found
C:/Monkey2-v2018.09/modules/m2oan/inc/admin.monkey2 [37] : Error : Type 'JsonObject' not found
C:/Monkey2-v2018.09/modules/m2oan/inc/admin.monkey2 [18] : Error : Type 'JsonObject' not found
C:/Monkey2-v2018.09/modules/m2oan/inc/admin.monkey2 [39] : Error : Type 'JsonObject' not found
C:/Monkey2-v2018.09/modules/m2oan/inc/admin.monkey2 [16] : Error : Type 'JsonObject' not found
C:/Monkey2-v2018.09/modules/m2oan/inc/admin.monkey2 [33] : Error : Type 'JsonObject' not found
C:/Monkey2-v2018.09/modules/m2oan/inc/admin.monkey2 [38] : Error : Type 'JsonObject' not found
C:/Monkey2-v2018.09/modules/m2oan/inc/admin.monkey2 [19] : Error : Type 'JsonObject' not found
C:/Monkey2-v2018.09/modules/m2oan/inc/admin.monkey2 [17] : Error : Type 'JsonObject' not found
C:/Monkey2-v2018.09/modules/m2oan/inc/admin.monkey2 [3] : Error : Type 'Socket' not found
C:/Monkey2-v2018.09/modules/m2oan/inc/admin.monkey2 [4] : Error : Type 'SocketStream' not found
C:/Monkey2-v2018.09/modules/m2oan/inc/packet.monkey2 [54] : Error : Type 'DataBuffer' not found

C:/Monkey2-v2018.09/modules/m2oan/inc/packet.monkey2 [54] : Error : PropertyList.OnSemant() Internal Error

C:/Monkey2-v2018.09/modules/m2oan/inc/adminpack.monkey2 [11] : Error : ClassType.IsAbstract() Internal Error
C:/Monkey2-v2018.09/modules/m2oan/inc/adminpack.monkey2 [13] : Error : Identifier 'p' Not found
C:/Monkey2-v2018.09/modules/m2oan/inc/adminpack.monkey2 [14] : Error : Identifier 'p' Not found
C:/Monkey2-v2018.09/modules/m2oan/inc/adminpack.monkey2 [16] : Error : Identifier 'p' Not found

C:/Monkey2-v2018.09/modules/m2oan/inc/adminpack.monkey2 [65] : Error : ClassType.IsAbstract() Internal Error
C:/Monkey2-v2018.09/modules/m2oan/inc/adminpack.monkey2 [67] : Error : Identifier 'p' Not found
C:/Monkey2-v2018.09/modules/m2oan/inc/adminpack.monkey2 [69] : Error : Identifier 'p' Not found

C:/Monkey2-v2018.09/modules/m2oan/inc/adminpack.monkey2 [35] : Error : ClassType.IsAbstract() Internal Error
C:/Monkey2-v2018.09/modules/m2oan/inc/adminpack.monkey2 [37] : Error : Identifier 'p' Not found
C:/Monkey2-v2018.09/modules/m2oan/inc/adminpack.monkey2 [38] : Error : Identifier 'p' Not found
C:/Monkey2-v2018.09/modules/m2oan/inc/adminpack.monkey2 [40] : Error : Identifier 'p' Not found

C:/Monkey2-v2018.09/modules/m2oan/inc/adminpack.monkey2 [83] : Error : ClassType.IsAbstract() Internal Error
C:/Monkey2-v2018.09/modules/m2oan/inc/adminpack.monkey2 [85] : Error : Identifier 'p' Not found
C:/Monkey2-v2018.09/modules/m2oan/inc/adminpack.monkey2 [87] : Error : Identifier 'p' Not found

C:/Monkey2-v2018.09/modules/m2oan/inc/adminpack.monkey2 [74] : Error : ClassType.IsAbstract() Internal Error
C:/Monkey2-v2018.09/modules/m2oan/inc/adminpack.monkey2 [76] : Error : Identifier 'p' Not found
C:/Monkey2-v2018.09/modules/m2oan/inc/adminpack.monkey2 [78] : Error : Identifier 'p' Not found

C:/Monkey2-v2018.09/modules/m2oan/inc/adminpack.monkey2 [45] : Error : ClassType.IsAbstract() Internal Error
C:/Monkey2-v2018.09/modules/m2oan/inc/adminpack.monkey2 [47] : Error : Identifier 'p' Not found
C:/Monkey2-v2018.09/modules/m2oan/inc/adminpack.monkey2 [48] : Error : Identifier 'p' Not found
C:/Monkey2-v2018.09/modules/m2oan/inc/adminpack.monkey2 [49] : Error : Identifier 'p' Not found
C:/Monkey2-v2018.09/modules/m2oan/inc/adminpack.monkey2 [57] : Error : Identifier 'p' Not found
C:/Monkey2-v2018.09/modules/m2oan/inc/adminpack.monkey2 [58] : Error : Identifier 'p' Not found
C:/Monkey2-v2018.09/modules/m2oan/inc/adminpack.monkey2 [60] : Error : Identifier 'p' Not found
C:/Monkey2-v2018.09/modules/m2oan/inc/serverpack.monkey2 [7] : Error : Type 'JsonObject' not found

C:/Monkey2-v2018.09/modules/m2oan/inc/serverpack.monkey2 [9] : Error : ClassType.FindNode() class='default.Packet', ident='ID' Internal Error

C:/Monkey2-v2018.09/modules/m2oan/inc/serverpack.monkey2 [240] : Error : ClassType.FindNode() class='default.Packet', ident='Offset' Internal Error

C:/Monkey2-v2018.09/modules/m2oan/inc/packet.monkey2 [8] : Error : ClassType.FindNode() class='default.Packet', ident='not' Internal Error

C:/Monkey2-v2018.09/modules/m2oan/inc/packet.monkey2 [10] : Error : ClassType.IsAbstract() Internal Error

C:/Monkey2-v2018.09/modules/m2oan/inc/packet.monkey2 [11] : Error : ClassType.FindNode() class='default.Packet', ident='Offset' Internal Error

C:/Monkey2-v2018.09/modules/m2oan/inc/packet.monkey2 [14] : Error : ClassType.FindNode() class='default.Packet', ident='WriteUByte' Internal Error

C:/Monkey2-v2018.09/modules/m2oan/inc/packet.monkey2 [16] : Error : ClassType.FindNode() class='default.Packet', ident='Offset' Internal Error

C:/Monkey2-v2018.09/modules/m2oan/inc/packet.monkey2 [20] : Error : ClassType.FindNode() class='default.Packet', ident='Offset' Internal Error

C:/Monkey2-v2018.09/modules/m2oan/inc/packet.monkey2 [22] : Error : ClassType.FindNode() class='default.Packet', ident='Offset' Internal Error

C:/Monkey2-v2018.09/modules/m2oan/inc/packet.monkey2 [26] : Error : ClassType.FindNode() class='default.Packet', ident='Discard' Internal Error
C:/Monkey2-v2018.09/modules/m2oan/inc/admin.monkey2 [181] : Error : Identifier '_socket' Not found
C:/Monkey2-v2018.09/modules/m2oan/inc/admin.monkey2 [183] : Error : Identifier '_stream' Not found

C:/Monkey2-v2018.09/modules/m2oan/inc/admin.monkey2 [162] : Error : ClassType.IsAbstract() Internal Error

C:/Monkey2-v2018.09/modules/m2oan/inc/admin.monkey2 [152] : Error : ClassType.IsAbstract() Internal Error
C:/Monkey2-v2018.09/modules/m2oan/inc/admin.monkey2 [153] : Error : Identifier 'p' Not found
C:/Monkey2-v2018.09/modules/m2oan/inc/admin.monkey2 [154] : Error : Identifier 'p' Not found
C:/Monkey2-v2018.09/modules/m2oan/inc/admin.monkey2 [155] : Error : Identifier 'p' Not found
C:/Monkey2-v2018.09/modules/m2oan/inc/admin.monkey2 [157] : Error : Identifier 'p' Not found

C:/Monkey2-v2018.09/modules/m2oan/inc/admin.monkey2 [171] : Error : ClassType.FindNode() class='default.Packet', ident='Size' Internal Error
C:/Monkey2-v2018.09/modules/m2oan/inc/admin.monkey2 [140] : Error : Identifier '_stream' Not found
C:/Monkey2-v2018.09/modules/m2oan/inc/admin.monkey2 [140] : Error : Identifier '_stream' Not found
C:/Monkey2-v2018.09/modules/m2oan/inc/admin.monkey2 [141] : Error : Identifier '_stream' Not found
C:/Monkey2-v2018.09/modules/m2oan/inc/admin.monkey2 [142] : Error : Identifier '_stream' Not found
C:/Monkey2-v2018.09/modules/m2oan/inc/admin.monkey2 [144] : Error : Identifier '_socket' Not found
C:/Monkey2-v2018.09/modules/m2oan/inc/admin.monkey2 [144] : Error : Identifier '_stream' Not found
C:/Monkey2-v2018.09/modules/m2oan/inc/admin.monkey2 [145] : Error : Identifier '_socket' Not found
C:/Monkey2-v2018.09/modules/m2oan/inc/admin.monkey2 [146] : Error : Identifier '_socket' Not found
C:/Monkey2-v2018.09/modules/m2oan/inc/admin.monkey2 [91] : Error : Identifier '_socket' Not found
C:/Monkey2-v2018.09/modules/m2oan/inc/admin.monkey2 [92] : Error : Identifier '_socket' Not found
C:/Monkey2-v2018.09/modules/m2oan/inc/admin.monkey2 [93] : Error : Identifier '_stream' Not found
C:/Monkey2-v2018.09/modules/m2oan/inc/admin.monkey2 [94] : Error : Identifier '_stream' Not found
C:/Monkey2-v2018.09/modules/m2oan/inc/admin.monkey2 [117] : Error : Identifier '_socket' Not found
C:/Monkey2-v2018.09/modules/m2oan/inc/admin.monkey2 [118] : Error : Identifier '_socket' Not found
C:/Monkey2-v2018.09/modules/m2oan/inc/admin.monkey2 [124] : Error : Identifier '_socket' Not found
C:/Monkey2-v2018.09/modules/m2oan/inc/admin.monkey2 [127] : Error : Identifier '_socket' Not found
C:/Monkey2-v2018.09/modules/m2oan/inc/admin.monkey2 [129] : Error : Identifier '_stream' Not found

_________________
Owner and admin of servers:
Experimental games 01 (92.63.57.152:3979), Experimental games 02 (92.63.57.152:3879), Experimental games 03 (92.63.57.152:3779).
My heightmaps: Flat Earth Map and United nations logo
My scenarios: Game Fallout 1,2,3 Map scenario
My gamescripts: City Founder GS
My newGRFs: ---


Top
   
PostPosted: Mon Jan 07, 2019 12:25 am 
Offline
Traffic Manager
Traffic Manager

Joined: Fri Apr 14, 2017 3:51 pm
Posts: 145
Location: Czech Republic
It is ok now.

_________________
Owner and admin of servers:
Experimental games 01 (92.63.57.152:3979), Experimental games 02 (92.63.57.152:3879), Experimental games 03 (92.63.57.152:3779).
My heightmaps: Flat Earth Map and United nations logo
My scenarios: Game Fallout 1,2,3 Map scenario
My gamescripts: City Founder GS
My newGRFs: ---


Top
   
PostPosted: Mon Jan 07, 2019 1:13 am 
Offline
Engineer
Engineer

Joined: Tue Sep 02, 2008 7:45 am
Posts: 21
Good.
I'd love to hear if you develop something using it.


Top
   
PostPosted: Thu Jan 10, 2019 9:37 pm 
Offline
Engineer
Engineer

Joined: Tue Sep 02, 2008 7:45 am
Posts: 21
I've updated the module with a new "GameHandler" (and a bunch of other fixes)
The GameHandler tries to keep track of all the clients and companies on the server.
And any action done to a client or company in your code will automatically happen in-game as well.
If anyone needs any more methods or actions, give me a shout.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 5 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000-2019 phpBB Limited

Copyright © Owen Rudge/The Transport Tycoon Forums 2001-2019.
Hosted by Zernebok Hosting.