How do I add custom commands to my PHPRetro Emulator?

Status
Not open for further replies.

PylonHotel

New Member
Apr 11, 2011
87
1
I know I have to go into the emulator and all of that, but which file should I open in the Emulator?

If someone could just whip my up a quick tutorial, I would be very grateful.

Thank you (Y)
 

Kieren

The OGz
Aug 4, 2010
2,957
751
1. Okay.. open virtualUser.CS with visual c# or visual studio.
1b. If u dont do the above you can open virtualUser.CS with any text editing software.
2. Press "CTRL + F" to search. Search for case "alert":.
2b. If u dont do the above you can scroll down until you find any of the commands.
3. Above case"alert": add your command.
3b. If u dont do the above you can place your command any where between
Code:
switch (args[0].ToLower()) // arg[0] = command itself
{
and
Code:
default:
return false;
Example Code's:
Quote:

:roomid //shows the ID of the room you are in
Code:
case "roomid": //Disconnects target user

sendData("BK" + "Roomid: " + _roomID);
break;
:dcuser //disconnects the target user
Code:
case "dcuser": //Disconnects target user
{
if (rankManager.containsRight(_Rank, "fuse_moderator_access", userID) == false)
return false;
else
{
virtualUser Target = userManager.getUser(args[1]);
using (DatabaseClient dbClient = Eucalypt.dbManager.GetClient())
{
sendData("BK" + Target + " disconnected.");
Target.sendData("BK" + "A member of staff disconnected you.");
Target.Disconnect(1000);
}

}
break;
}




[mod] Any more information on how to add commands please PM me, thread closed. [/mod]
 
Status
Not open for further replies.

Users who are viewing this thread

Top