User Tag List

Results 1 to 2 of 2

Thread: node.js + UT

  1. #1
    Whicked Sick UT-Sniper-SJA94's Avatar
    Join Date
    Oct 2011
    Location
    What was England
    Posts
    4,427
    Country:

    node.js + UT

    It's only something very small, and simple, but I made something I can use in UT that a node.js script creates.

    I was thinking you could do something useful like connect to a pug bot, so the server can advertise pugs in the server like you can in IRC (SiegePug [3/12] Noob, Hamster, Toilet) I might even try and make an node.js IRC bot for fun.




    I'm planning on making something to automatically organise my demos, and screenshots for me, and probably make a tool to convert UT logs to HTML.

    Code:
    let fs = require('fs');
    
    
    function updateDate() {
      
    	let date = new Date();
    
    	let year = date.getYear();
    	let month = date.getMonth();
    	let day = date.getDate();
    	let hour = date.getHours();
    	let minutes = date.getMinutes();
    	let seconds = date.getSeconds();
      
    	let string = "say The current date is: "+day+"."+(month+1)+".2016 "+hour+":"+minutes+":"+seconds+" (node.js module)";
      
      fs.writeFileSync('test.txt',string,'utf-8');
    
    
    }
    
    
    function tick(){
    	updateDate();
    }
    
    
    setInterval(tick,1000);
    All i have to do to use it in game is to make a keybind:

    set input b exec test.txt

  2. #2
    Moderator TimTim's Avatar
    Join Date
    Aug 2013
    Posts
    1,804
    Country:
    Generating a text file for UT to execute is pretty clever!

    GUBER (the bot I made for GlobalUnreal years ago) was 100% Node.js. It also had the ability to control UT servers - e.g., change maps, set player limits, set game types, enable mutators, etc. Basically all I did was create a server-side UT mod that allowed the servers to accept data (with a private key) which told the server what to do, and GUBER (Node.js) would send the correct parameters to whichever server we wanted to update.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •