|
You last visited: Today at 23:13
Advertisement
vote shop
Discussion on vote shop within the CO2 Private Server forum part of the Conquer Online 2 category.
08/05/2014, 02:16
|
#1
|
elite*gold: 0
Join Date: Aug 2009
Posts: 94
Received Thanks: 6
|
vote shop
Hello guys
--------------
can i ask about vote shop ?
how can i make shop selling items for vote points or online points or else
and i mean shop not NPC
same like horse race store or horse race shop
---------------
thanks
|
|
|
08/05/2014, 02:36
|
#2
|
elite*gold: 0
Join Date: Jul 2009
Posts: 943
Received Thanks: 408
|
Thats why i use cq_goods, there is a column moneytype so i can create subtypes...
You should try the same
|
|
|
08/05/2014, 03:29
|
#3
|
elite*gold: 0
Join Date: Jul 2008
Posts: 874
Received Thanks: 238
|
case votepoints:
in HandleBuyFromNpc
|
|
|
08/05/2014, 06:09
|
#4
|
elite*gold: 0
Join Date: Aug 2009
Posts: 94
Received Thanks: 6
|
Quote:
Originally Posted by pintinho12
Thats why i use cq_goods, there is a column moneytype so i can create subtypes...
You should try the same
|
that hard for me . cq_goods was work on 5095
and i never try 5095 b4 so i cant do the same
Quote:
Originally Posted by abdoumatrix
case votepoints:
in HandleBuyFromNpc
|
can u show me ex. abdo ?
i have to try ones
and i take copy from
Race point shop
and made it like that
PHP Code:
#region Online point shop
if (itemUsage.UID == Database.OnlinePointShop.UID)
{
Database.OnlinePointShop.OnlinePointItem item;
if (Database.OnlinePointShop.Shop.Items.TryGetValue(itemUsage.dwParam, out item))
{
if (client.Inventory.Count <= 39)
{
if (client.Entity.TreasuerPoints >= item.Price)
{
ConquerItem newItem = new GamePackets.ConquerItem(true);
newItem.ID = itemUsage.dwParam;
Database.ConquerItemBaseInformation ibi;
if (Database.ConquerItemInformation.BaseInformations.TryGetValue(newItem.ID, out ibi))
{
if (ibi.Durability > 0)
{
newItem.Durability = ibi.Durability;
newItem.MaximDurability = ibi.Durability;
}
}
client.Inventory.Add(newItem, Game.Enums.ItemUse.CreateAndAdd);
client.Entity.TreasuerPoints -= item.Price;
}
else client.Send(new Message("You do not have enough Online Points", Color.Red, Message.TopLeft));
}
else client.Send(new Message("You do not have enough space in your inventory", Color.Red, Message.TopLeft));
}
else client.Send(new Message("Can not find this item", Color.Red, Message.TopLeft));
return;
}
#endregion
and made file with name . OnlinePointShop.cs
and another in database with name OnlinePointShop.ini
but after all of that i filed to make the shop is avilable in my client
i filed to make navicat npc read items with points
|
|
|
08/05/2014, 06:53
|
#5
|
elite*gold: 0
Join Date: Jul 2009
Posts: 943
Received Thanks: 408
|
Well, you add all items you want to sell on your table, assign them to a shop, set a moneytype, example, 1 silver, 2 cps, 3 bcps, 4 vote points
Then when buying, you just search on your dictionary if that item exists on that shop and handle the right moneytype
|
|
|
08/05/2014, 08:01
|
#6
|
elite*gold: 0
Join Date: Aug 2009
Posts: 94
Received Thanks: 6
|
Quote:
Originally Posted by abdoumatrix
case votepoints:
in HandleBuyFromNpc
|
i have to try that
PHP Code:
case Conquer_Online_Server.Database.ShopFile.MoneyType.TreasuerPoints:
{
if (iteminfo.BaseInformation.TreasuerPointsWorth * Amount > client.Entity.TreasuerPoints)
return;
if (client.Entity.TreasuerPoints - (iteminfo.BaseInformation.TreasuerPointsWorth * Amount) > client.Entity.TreasuerPoints)
return;
item.ID = itemUsage.dwParam;
item.Durability = item.MaximDurability = iteminfo.BaseInformation.Durability;
item.Color = (Conquer_Online_Server.Game.Enums.Color)3;
uint NewAmount = itemUsage.dwExtraInfo > 0 ? itemUsage.dwExtraInfo : 1;
while (NewAmount > 0)
{
if (iteminfo.BaseInformation.StackSize == 0)
{
item = new ConquerItem(true);
item.ID = itemUsage.dwParam;
item.Durability = item.MaximDurability = iteminfo.BaseInformation.Durability;
item.Color = (Conquer_Online_Server.Game.Enums.Color)3;
client.Inventory.Add(item, Game.Enums.ItemUse.CreateAndAdd);
item.MaxStackSize = item.StackSize = 1;
NewAmount--;
}
else
{
if (client.Inventory.GetStackContainer(iteminfo.BaseInformation.ID, iteminfo.BaseInformation.StackSize, 1, out _ExistingItem))
{
_ExistingItem.StackSize++;
Database.ConquerItemTable.UpdateStack(_ExistingItem);
_ExistingItem.Mode = Game.Enums.ItemMode.Update;
_ExistingItem.Send(client);
NewAmount -= 1;
}
else
{
item = new ConquerItem(true);
item.ID = itemUsage.dwParam;
item.Durability = item.MaximDurability = iteminfo.BaseInformation.Durability;
item.Color = (Conquer_Online_Server.Game.Enums.Color)3;
item.MaxStackSize = iteminfo.BaseInformation.StackSize;
item.StackSize = 1;
if (NewAmount >= item.MaxStackSize)
{
item.StackSize = item.MaxStackSize;
NewAmount -= item.StackSize;
}
else
{
item.StackSize = (ushort)NewAmount;
NewAmount = 0;
}
client.Inventory.Add(item, Game.Enums.ItemUse.CreateAndAdd);
Database.ConquerItemTable.UpdateStack(item);
}
}
}
client.Entity.TreasuerPoints -= (iteminfo.BaseInformation.TreasuerPointsWorth * Amount);
break;
}
and use
PHP Code:
public enum MoneyType
{
Gold = 0,
ConquerPoints = 1,
HonorPoints = 2,
TreasuerPoints = 18
and made shop in my emoneyshop and use moneytype 18
and made npc in navicat
try with type 18 and try with type 1
when i use type 18 i got no replay from npc
and when i use type 1 i got CP mall but he selling items to me for 0 cps or 0 money or 0 TreasuerPoints
Quote:
Originally Posted by pintinho12
Well, you add all items you want to sell on your table, assign them to a shop, set a moneytype, example, 1 silver, 2 cps, 3 bcps, 4 vote points
Then when buying, you just search on your dictionary if that item exists on that shop and handle the right moneytype
|
cant make table in navicat do that
i try to make it with C# codes same like honer shops
|
|
|
 |
Similar Threads
|
Vote point shop
07/05/2013 - Rappelz Private Server - 1 Replies
How to make a CS vote point shop only for vot points not Donations any help would be great tyvm.
|
Vote shop
05/26/2013 - WoW Private Server - 2 Replies
Hallo,
Unser team hat vor ein paar tagen einen server aufgestzt.
Nun wollt ich mal fragen ab jemand ein TuT für ein vote/spenden-shop hat.
Falls diese frage schon mal aufgetaucht ist bitte nicht flamen...bin hier nicht ganz so oft.
Danke schonmal im vorraus
wir suchen auch noch leute die sich mit core arbeiten auskennen und sctripten können.einfach pm schreiben
ich sollte vl dazu schreiben das wir eine Trinity-core haben
|
[Suche] Vote/coin shop
01/05/2013 - WoW Private Server - 0 Replies
Moinchen an alle elitepvpers,
Ich suche einen Script wo sich registrierte User für gekauft Coins oder gevotetete Punkte sich bestimmte Items kaufen können und ihren Character selektieren müssen dann wird das item dem char per post geschickt..
Vote & Coin System ist bei mir vorhanden blos is halt noch nutzlos ohne shop^^
würde mich freuen wenn mir jemand weiterhelfen könnte.
Infos:
|
Vote Shop
08/24/2012 - Rappelz Private Server - 1 Replies
Hi all,
Who can help me or who can give me files to do vote-shop on my site?
Thanks a lot
|
All times are GMT +1. The time now is 23:13.
|
|