ItsNick
Member
- Nov 19, 2013
- 96
- 15
Hey there,
I'm looking for more MUS commands for MusSocket.cs
Currently I have only :ha working.
The PHP code I have is
For the :ha Command, in MusSocket.cs I have:
Thanks
I'm looking for more MUS commands for MusSocket.cs
Currently I have only :ha working.
The PHP code I have is
PHP:
<?php
function send_MUS($command,$data)
{
$data = $command . chr(1) . $data;
$sock = socket_create(AF_INET, SOCK_STREAM, getprotobyname('tcp'));
$sock_data = socket_connect($sock,'IPADDRESSHERE','30001');
@socket_send($sock, $data, strlen($data), MSG_DONTROUTE);
@socket_close($sock);
return true;
}
send_MUS('ha','This is a test from MUS.');
print 'attempt made';
?>
For the :ha Command, in MusSocket.cs I have:
PHP:
case "ha":
{
ServerMessage HotelAlert = new ServerMessage(Outgoing.SendNotif);
HotelAlert.AppendString(LanguageLocale.GetValue("hotelallert.notice") + "\r\n" +
param + "\r\n");
HotelAlert.AppendString("");
SilverwaveEnvironment.GetGame().GetClientManager().QueueBroadcaseMessage(HotelAlert);
break;
}
Thanks