PHP Code:
if (Cmd[0] == "/agi")
GC.MyChar.Agi = ushort.Parse(Cmd[1]);
if (Cmd[0] == "/spi")
GC.MyChar.Spi = ushort.Parse(Cmd[1]);
if (Cmd[0] == "/str")
GC.MyChar.Str = ushort.Parse(Cmd[1]);
if (Cmd[0] == "/vit")
GC.MyChar.Vit = ushort.Parse(Cmd[1]);
in the chat.cs file. how do u no where to put it in this ?
PHP Code:
using System;
using System.Collections.Generic;
using System.Collections;
using System.Linq;
using System.Text;
using System.IO;
namespace NewestCOServer.PacketHandling
{
public class Chat
{
public static void Handle(Main.GameClient GC, byte[] Data)
{
MemoryStream MS = new MemoryStream(Data);
BinaryReader BR = new BinaryReader(MS);
BR.ReadBytes(8);
ushort ChatType = (ushort)BR.ReadUInt32();
BR.ReadBytes(13);
string From = Encoding.ASCII.GetString(BR.ReadBytes(BR.ReadByte()));
string To = Encoding.ASCII.GetString(BR.ReadBytes(BR.ReadByte()));
BR.ReadByte();
string Message = Encoding.ASCII.GetString(BR.ReadBytes(BR.ReadByte()));
BR.Close();
MS.Close();
#region BadWords
Message = Message.Replace("damn", "****");
Message = Message.Replace("fuck", "****");
Message = Message.Replace("shit", "****");
Message = Message.Replace("stupid", "******");
Message = Message.Replace("wtf", "***");
Message = Message.Replace("idiot", "*****");
Message = Message.Replace("fucker", "******");
#endregion
if (ChatType == 2104 && GC.MyChar.MyShop != null)
GC.MyChar.MyShop.Hawk = Message;
try
{
if (Message[0] == '/')
{
string[] Cmd = Message.Split(' ');
if (Cmd[0] == "/dc")
{
GC.Disconnect();
return;
}
if (Cmd[0] == "/players")
{
GC.LocalMessage(2000, "Players Online: " + Game.World.H_Chars.Count);
string eMsg = "";
foreach (Game.Character C in Game.World.H_Chars.Values)
eMsg += C.Name + ", ";
if (eMsg.Length > 1)
eMsg = eMsg.Remove(eMsg.Length - 2, 2);
GC.LocalMessage(2000, eMsg);
plzz help i wud love if sumone showed me