Quote:
Originally Posted by mohamad512
hey, hmm@ it's a question for the Programmer's Specially C#
I wanna make a Auto Notice program !! i just need the code the make my program wright in captain /;
like ;
wright in captian (#notice("%Textbox1.text%")
and a timer depend on another textboxtime.text
so the time that i put in textboxtime.text it's run tha notice bay@@
---------------------------------------------------------------------------------------------
hmmmm i dont now if any one get it
|
Notice application; I think is best to create a program (small exe) who sit @ your server machine and send the notice command via telnet on a timer. (Hooking windows is not something a beginner should be trying.)
Small Telnet example for you:
Quote:
using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Net.Sockets;
using System.Text.RegularExpressions;
using System.Threading;
/// <summary>
/// Summary description for test
/// </summary>
public partial class fetch_info : System.Web.UI.Page
{
public TcpClient tcpc;
public NetworkStream ns;
public Byte[] output = new Byte[1024];
public string responseoutput = String.Empty;
public Byte[] cmd = System.Text.Encoding.ASCII.GetBytes("\n");
public int i = 0;
public Regex objToMatch;
public string val {get; set;}
public void Page_Load(object sender, EventArgs e)
{
fetch_server_info();
}
public void fetch_server_info()
{
telnet();
}
public void telnet()
{
//Define the Telnet Host Connection Details
string host_val = "127.0.0.1";
int port_val = 4515;
string passwd = "telnetPassword";
//Define Telnet Client
tcpc = new TcpClient(host_val, port_val);
//Define the Telnet Stream
ns = tcpc.GetStream();
//Read the Telnets response
Int32 bytes = ns.Read(output, 0, output.Length);
//Convert from raw bytes to String
responseoutput = System.Text.Encoding.Default.GetString(output, 0, bytes);
//Create an expression to be matched
objToMatch = new Regex("Password");
//Read for Game001
bytes = ns.Read(output, 0, output.Length);
string ex = System.Text.Encoding.Default.GetString(output, 0, bytes);
//Check the Response || if it contains Password:
if (ex.Contains("Password:"))
{
//Create the command to be sent (The Telnet Password)
cmd = System.Text.Encoding.ASCII.GetBytes(passwd + "\r");
//If the Telnet's Stream can be written to
if (ns.CanWrite)
{
//Write the password to the Telnet Stream
ns.BeginWrite(cmd, 0, cmd.Length, new AsyncCallback(sys), ns);
}
//
bytes = ns.Read(output, 0, output.Length);
}
while (tcpc.Connected)
{
//Send Password
//------------------
cmd = System.Text.Encoding.ASCII.GetBytes(passwd + "\r");
// Check to see if this NetworkStream is writable.
if (ns.CanWrite)
{
ns.BeginWrite(cmd, 0, cmd.Length, new AsyncCallback(sys), ns);
}
//Read Response
Int32 respBuffer = ns.Read(output, 0, output.Length);
val = System.Text.Encoding.Default.GetString(output, 0, respBuffer);
break;
}
returned_val.Text = responseoutput;
returned_str.Text = "String " + val;
}
//
public void sys(IAsyncResult ar)
{
NetworkStream NS = (NetworkStream)ar.AsyncState;
NS.EndWrite(ar);
}
|
Quote:
Originally Posted by c1ph3r
Sorry but you are wrong xD nfa stores collision nfc stores worldlocations as smoke said.
The "call_lc_in(id)" is setting the locations.
|
YEP NFC purpose is to establish areas on the map, that when you step into one it calls lua function call_lc_in(location_id) this location id calls to WorldLocationResource who then sets the sky, cloud, fog colors and background music etc.. of that location and then he calls to StringResource to get the actual name of the location :D