Anyone Know the Shop ID of shopping mail of the latest client?
namespace Hellmouth
{
partial class Handler
{
public static void BuyFromNPC(byte[] Data, Client Client)
{
uint Item = BitConverter.ToUInt32(Data, 8),
Amount = BitConverter.ToUInt32(Data, 20),
ShopID = BitConverter.ToUInt32(Data, 4),
gPrice = 0, cPrice= 0, MoneyType = 1;
string ItemName = string.Empty;
Amount = Math.Max(1, Amount);
switch (ShopID)
{
case 432:
case 433:
case 2888:
MoneyType = 2;
break;
}
foreach (Hellmouth.Struct.ItemData _Item in Dictionary.ItemData.Values)
if (_Item.ID == Item)
{
ItemName = _Item.Name;
gPrice = _Item.GoldCost;
gPrice *= Amount;
cPrice = _Item.CpCost;
cPrice *= Amount;
}
byte Plus = 0;
switch (Item)
{
case 730001:
Plus = 1;
break;
case 730002:
Plus = 2;
break;
case 730003:
Plus = 3;
break;
case 730004:
Plus = 4;
break;
case 730005:
Plus = 5;
break;
case 730006:
Plus = 6;
break;
case 730007:
Plus = 7;
break;
case 730008:
Plus = 8;
break;
case 730009:
Plus = 9;
break;
}
switch (MoneyType)
{
case 1:
if (Client.Inventory.Count + Amount <= 40)
{
if (Client.Money >= gPrice)
{
Client.Money -= gPrice;
Client.AddItems(Item,Plus, Convert.ToByte(Amount));
Client.Send(Packets.Chat("Bought " + Amount + " " + ItemName + "! Check your inventory!", "SYSTEM", Client.Name, Struct.ChatType.Top));
}
else
Client.Send(Packets.Chat("Not enough silvers to purchase " + Amount + " " + ItemName, "SYSTEM", Client.Name, Struct.ChatType.Top));
}
else
Client.Send(Packets.Chat("You don't have enough inventory space!", "SYSTEM", Client.Name, Struct.ChatType.Top));
break;
case 2:
if (Client.Inventory.Count + Amount <= 40)
{
if (Client.CP >= cPrice)
{
Client.CP -= cPrice;
Client.AddItems(Item, Plus, Convert.ToByte(Amount));
Client.Send(Packets.Chat("Bought " + Amount + " " + ItemName + "! Check your inventory!", "SYSTEM", Client.Name, Struct.ChatType.Top));
}
else
Client.Send(Packets.Chat("Not enough cps to purchase " + Amount + " " + ItemName, "SYSTEM", Client.Name, Struct.ChatType.Top));
}
else
Client.Send(Packets.Chat("You don't have enough inventory space!", "SYSTEM", Client.Name, Struct.ChatType.Top));
break;
}
}
}
}
That Didn't help. Anyway Thanks for trying.Quote:
this from hell mouth check if it'll help
Code:namespace Hellmouth { partial class Handler { public static void BuyFromNPC(byte[] Data, Client Client) { uint Item = BitConverter.ToUInt32(Data, 8), Amount = BitConverter.ToUInt32(Data, 20), ShopID = BitConverter.ToUInt32(Data, 4), gPrice = 0, cPrice= 0, MoneyType = 1; string ItemName = string.Empty; Amount = Math.Max(1, Amount); switch (ShopID) { case 432: case 433: case 2888: MoneyType = 2; break; } foreach (Hellmouth.Struct.ItemData _Item in Dictionary.ItemData.Values) if (_Item.ID == Item) { ItemName = _Item.Name; gPrice = _Item.GoldCost; gPrice *= Amount; cPrice = _Item.CpCost; cPrice *= Amount; } byte Plus = 0; switch (Item) { case 730001: Plus = 1; break; case 730002: Plus = 2; break; case 730003: Plus = 3; break; case 730004: Plus = 4; break; case 730005: Plus = 5; break; case 730006: Plus = 6; break; case 730007: Plus = 7; break; case 730008: Plus = 8; break; case 730009: Plus = 9; break; } switch (MoneyType) { case 1: if (Client.Inventory.Count + Amount <= 40) { if (Client.Money >= gPrice) { Client.Money -= gPrice; Client.AddItems(Item,Plus, Convert.ToByte(Amount)); Client.Send(Packets.Chat("Bought " + Amount + " " + ItemName + "! Check your inventory!", "SYSTEM", Client.Name, Struct.ChatType.Top)); } else Client.Send(Packets.Chat("Not enough silvers to purchase " + Amount + " " + ItemName, "SYSTEM", Client.Name, Struct.ChatType.Top)); } else Client.Send(Packets.Chat("You don't have enough inventory space!", "SYSTEM", Client.Name, Struct.ChatType.Top)); break; case 2: if (Client.Inventory.Count + Amount <= 40) { if (Client.CP >= cPrice) { Client.CP -= cPrice; Client.AddItems(Item, Plus, Convert.ToByte(Amount)); Client.Send(Packets.Chat("Bought " + Amount + " " + ItemName + "! Check your inventory!", "SYSTEM", Client.Name, Struct.ChatType.Top)); } else Client.Send(Packets.Chat("Not enough cps to purchase " + Amount + " " + ItemName, "SYSTEM", Client.Name, Struct.ChatType.Top)); } else Client.Send(Packets.Chat("You don't have enough inventory space!", "SYSTEM", Client.Name, Struct.ChatType.Top)); break; } } } }
if you Bothered to Read what i replayed earlier it wold be much more easier thought .Quote:
I'm Actually buying ingame.
Quote:
if you Bothered to Read what i replayed earlier it wold be much more easier thought .
ITS CLIENT SIDED , the ID for the shopping mall 2888 and you'll find it in the client folder Coblabla/ini/emoneyshop.ini open it and search for shopID 2888,
Ps.You cant change/add any items to the shopping mall with out modifying that file ,
Good luck.
to add a new shop take the same path and find the emonyshpt.ini file and add the shop inside that file .Quote:
Dude. Changing items is not the problem, I Can't Buy from it. I Tried adding new shop in my Shop.dat (Server sided) with an ID 2888, and it didn't work.
Please contact me on msn [Only registered and activated users can see links. Click Here To Register...]