الموضوع : اضافه ماكينه الحظ
شرح الاضافة:
اولا : ارفع دول في النافي كات
الكود:
INSERT INTO `npcs` VALUES ('9817', 'SilverOne-armedB', '0060', '19776', '1036', '0204', '0212', '');
INSERT INTO `npcs` VALUES ('9826', 'CPOnearmedBandit', '0060', '19786', '1036', '0232', '0235', '');
INSERT INTO `npcs` VALUES ('9827', 'CPOnearmedBandit', '0060', '19796', '1036', '0232', '0242', '');
INSERT INTO `npcs` VALUES ('9828', 'CPOnearmedBandit', '0060', '19806', '1036', '0242', '0235', '');
INSERT INTO `npcs` VALUES ('15462', 'CPOne-armedBandi', '0060', '19806', '1002', '0350', '0271', '');
INSERT INTO `npcs` VALUES ('15461', 'CPOne-armedBandi', '0060', '19796', '1002', '0350', '0277', '');
INSERT INTO `npcs` VALUES ('15460', 'CPOne-armedBandi', '0060', '19786', '1002', '0350', '0283', '');
INSERT INTO `npcs` VALUES ('15459', 'SilverOne-armedB', '0060', '19776', '1002', '0350', '0289', '');
ابحث عن الكود ده
الكود:
class SlotMachineRequest
بدل كل الي جوها بدول
وغير اسم البروجيكت
الكود:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConquerProject.Network.GamePackets
{
public class SlotMachineRequest : Writer, Interfaces.IPacket
{
byte[] Buffer;
public SlotMachineRequest(bool Create = false)
{
}
public Game.SlotMachineSubType Mode
{
get { return (Game.SlotMachineSubType)Buffer[4]; }
set { Buffer[4] = (byte)value; }
}
public byte BetMultiplier
{
get { return Buffer[5]; }
set { Buffer[5] = value; }
}
public uint NpcID
{
get { return BitConverter.ToUInt32(Buffer, 8); }
set { WriteUInt32(value, 8, Buffer); }
}
public void Send(Client.GameClient client)
{
client.Send(Buffer);
}
public byte[] ToArray()
{
return Buffer;
}
public void Deserialize(byte[] buffer)
{
Buffer = buffer;
}
}
}
وبعدين ابحث عن
الكود:
class SlotMachineResponse
وبدل كل الي فيه بدة
الكود:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConquerProject.Network.GamePackets
{
public class SlotMachineResponse : Writer, Interfaces.IPacket
{
byte[] Buffer;
public SlotMachineResponse(bool Create = false)
{
Buffer = new byte[28];
WriteUInt16(20, 0, Buffer);
WriteUInt16(1352, 2, Buffer);
}
public Game.SlotMachineSubType Mode
{
get { return (Game.SlotMachineSubType)Buffer[4]; }
set { Buffer[4] = (byte)value; }
}
public byte WheelOne
{
get { return Buffer[5]; }
set { Buffer[5] = value; }
}
public byte WheelTwo
{
get { return Buffer[6]; }
set { Buffer[6] = value; }
}
public byte WheelThree
{
get { return Buffer[7]; }
set { Buffer[7] = value; }
}
public uint NpcID
{
get { return BitConverter.ToUInt32(Buffer, 16); }
set { WriteUInt32(value,16, Buffer); }
}
public void Send(Client.GameClient client)
{
client.Send(Buffer);
}
public byte[] ToArray()
{
return Buffer;
}
public void Deserialize(byte[] buffer)
{
Buffer = buffer;
}
}
}