Jump to content
Official BF Editor Forums


  • Content count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About Adsa

  • Rank
  1. Adsa

    Script That Displays Chat Text

    tried adding socket but still no luck so decided to move on and use socket instead of telnet. So far i can get it to respond to text typed in but as soon as i asign values for the socket it fails and doesnt display the comment in global chat. I assume it is my dodgy python programming? So when some one types !hello it responds with Hello xxxxx import bf2 import host import socket from bf2 import g_debug def init(): if g_debug: print 'initialising irc chat script' host.registerHandler('ChatMessage', onChatMessage, 1) host.rcon_invoke('echo "ircchat.py loaded sucessfully"') def onChatMessage(player_id, text, channel, flags): player = bf2.playerManager.getPlayerByIndex(player_id) # display chat in the console host.rcon_invoke('echo "<%s>%s: %s"' % (channel, player.getName(), text)) if text == "!hello": host.rcon_invoke('game.sayall "Hello %s"' % (player.getName())) # set some variables and test output user = "user\n" pwd = "pwd\n" host = "localhost" data = "say. testing\n" port = 24000 addr = (host,port) sock = socket(AF_INET, SOCK_STREAM) sock.sendto(user.addr) sock.sendto(pwd.addr) sock.sendto(data.addr) sock.close()
  2. Adsa

    Script That Displays Chat Text

    I havent had a chance to do any more until now but i get this error File "pylib-2.3.4.zip/telnetlib.py", line 39, in ? ImportError: No module named select I assume there is an issue with pylib-2.3.4.zip I get there error when i import telnetlib with no other reference to the module edit.. Looks like the python libaries doesnt conatin select.py Does any one else know of a way to telnet or connect to an irc client?
  3. Adsa

    Script That Displays Chat Text

    how would i go about doing telnet? If I can telnet to the irc channel and then .say the information this is what i have so far # script to send raw chat to irc channel import bf2 import host import sys import telnetlib from bf2 import g_debug def init(): if g_debug: print 'initialising events script' host.registerHandler('ChatMessage', onChatMessage, 1) def onChatMessage(player_id, text, channel, flags): player = bf2.playerManager.getPlayerByIndex(player_id)) message = (".say TEXT" channel, player.getName(), text) #send raw information HOST = "localhost" user = "" pwd = "" tn = telnetlib.Telnet(HOST) tn.write(user + "\n") tn.write(pwd + "\n") tn.write(message + "\n") tn.write("exit\n") I havent dabled in python before so some of this maybe wrong. eventually i want it so when people type in a specific word it then displays the information in irc.
  4. Adsa

    Script That Displays Chat Text

    I am wondering if it is possible to use python script to send chat text from players to an irc channel? would it put much load on the server? I havent attempted python before but know a bit of c and php. Any help would be apreciated.
  5. Adsa

    Using Vanilla Maps

    I was hoping not to create the mod with the vanilla maps instead reference to the mods/bf2/levels folder rather than the mods/mod/level folder for the maps
  6. For the life of me i cant remember how to use vanilla maps in a mod. Mod changes a few wepons but i want to use the vanilla maps. Could some be kind enough to point me in the right direction? Thanks
  7. Adsa


    Just wondering if any one knows how to edit the billboards. I have several custom maps i would like to place a graphic on the billboards. Is this possible?
  8. Pics from first post have gone... I am modding an original 2142 map and would like to have the load background pic come up. Not sure what else i have to change but any help would be good. I renamed the map so i didnt end up messing the vanilla version.
  9. Adsa

    Duplicating Maps

    Thanks you very much. Works a treat
  10. I am after a little adive, I want to edit/change a few settings like ticket bleed, flag status etc in some maps. So far I have been able to copy and edit the maps so they load under a different name but I am having problems when it comes to the ground textures and I am not sure how to fix it. Does any one have a sugestion on how to go about fixing it wich doesnt require using the BF2 editor? Here is a link to a SS I took. http://dd-nc.com/junk/berlin2.jpg http://dd-nc.com/junk/cerb.jpg http://dd-nc.com/junk/cerb2.jpg Thanks