|
You last visited: Today at 18:03
Advertisement
[5165] how 2 make free items +15 -7 sdg sdg
Discussion on [5165] how 2 make free items +15 -7 sdg sdg within the CO2 Private Server forum part of the Conquer Online 2 category.
01/30/2010, 04:03
|
#1
|
elite*gold: 0
Join Date: Oct 2006
Posts: 52
Received Thanks: 8
|
[5165] how 2 make free items +15 -7 sdg sdg
ok theres a free items npc script allready out but all it has is free super +12 item
Code:
GC.MyChar.AddItem(121129, 12); //Bag
how can i change the code above 2 make it give +15 and bless -7 2socket itmems?
|
|
|
01/30/2010, 04:14
|
#2
|
elite*gold: 0
Join Date: Oct 2009
Posts: 8,765
Received Thanks: 5,291
|
Quote:
Originally Posted by ASSN9NE
ok theres a free items npc script allready out but all it has is free super +12 item
Code:
GC.MyChar.AddItem(121129, 12); //Bag
how can i change the code above 2 make it give +15 and bless -7 2socket itmems?
|
Code:
GC.MyChar.AddItem(121129-15-7-255-255-255); //Bag
I reckon.
|
|
|
01/30/2010, 04:30
|
#3
|
elite*gold: 20
Join Date: Oct 2009
Posts: 1,009
Received Thanks: 621
|
Add this in Game.Character class.
Code:
public void AddItem(uint ID, byte Plus, byte ench, byte bless, Item.Gem soc1, Item.Gem soc2)
{
Item I = new Item();
I.Plus = Plus;
I.ID = ID;
I.UID = (uint)Rnd.Next(10000000);
I.MaxDur = I.DBInfo.Durability;
I.CurDur = I.MaxDur;
I.Enchant = ench;
I.Bless = bless;
I.Soc1 = soc1;
I.Soc2 = soc2;
if (I.UID == 0)
{
I.UID = (uint)Rnd.Next(10000000);
}
Inventory.Add(I);
MyClient.AddSend(Packets.AddItem(I, 0));
}
Then use the following code to get the item you want. 121129 has to be replaced with the correct item ID.
Code:
GC.MyChar.AddItem(121129, 15, 255, 7,Game.Item.Gem.SuperDragonGem,Game.Item.Gem.SuperDragonGem);
|
|
|
01/30/2010, 04:33
|
#4
|
elite*gold: 0
Join Date: Oct 2009
Posts: 8,765
Received Thanks: 5,291
|
Quote:
Originally Posted by spare2
Add this in Game.Character class.
Code:
public void AddItem(uint ID, byte Plus, byte ench, byte bless, Item.Gem soc1, Item.Gem soc2)
{
Item I = new Item();
I.Plus = Plus;
I.ID = ID;
I.UID = (uint)Rnd.Next(10000000);
I.MaxDur = I.DBInfo.Durability;
I.CurDur = I.MaxDur;
I.Enchant = ench;
I.Bless = bless;
I.Soc1 = soc1;
I.Soc2 = soc2;
if (I.UID == 0)
{
I.UID = (uint)Rnd.Next(10000000);
}
Inventory.Add(I);
MyClient.AddSend(Packets.AddItem(I, 0));
}
Then use the following code to get the item you want. 121129 has to be replaced with the correct item ID.
Code:
GC.MyChar.AddItem(121129, 15, 255, 7,Game.Item.Gem.SuperDragonGem,Game.Item.Gem.SuperDragonGem);
|
The gem part needs to be replaced with the correct gemid.
255 is default for empty socket.
|
|
|
01/30/2010, 04:57
|
#5
|
elite*gold: 20
Join Date: Oct 2009
Posts: 1,009
Received Thanks: 621
|
Quote:
Originally Posted by .Arco
The gem part needs to be replaced with the correct gemid.
255 is default for empty socket.
|
O.O
Isn't that what
Code:
Game.Item.Gem.EmptySocket
is for?
....
|
|
|
01/30/2010, 06:29
|
#6
|
elite*gold: 0
Join Date: Apr 2008
Posts: 29
Received Thanks: 5
|
hey guys im kinda retarded and dont know much abt codes, so where do i paste it? into the cheat engine?
|
|
|
01/30/2010, 07:42
|
#7
|
elite*gold: 111
Join Date: Feb 2008
Posts: 2,161
Received Thanks: 646
|
Quote:
Originally Posted by ukumaran10
hey guys im kinda retarded and dont know much abt codes, so where do i paste it? into the cheat engine?
|
That seriously made me lol.
|
|
|
01/30/2010, 08:22
|
#8
|
elite*gold: 0
Join Date: Oct 2009
Posts: 8,765
Received Thanks: 5,291
|
Quote:
Originally Posted by spare2
O.O
Isn't that what
Code:
Game.Item.Gem.EmptySocket
is for?
....
|
Um no ftw?
I've worked with lotf forever.
And this one I'm pretty good with.
I'm 100% sure I am right.
|
|
|
01/30/2010, 08:51
|
#9
|
elite*gold: 0
Join Date: Oct 2006
Posts: 52
Received Thanks: 8
|
|
|
|
01/30/2010, 09:05
|
#10
|
elite*gold: 0
Join Date: Oct 2009
Posts: 8,765
Received Thanks: 5,291
|
Quote:
Originally Posted by ASSN9NE
|
Try what I showed you.
And that additem whatever he posted wasn't meant for you to paste lol.
He was attempting to show an example.
But yeah try what I showed you.
If that doesn't work try this:
GC.MyChar.AddItem("121129-15-7-255-255-255");
|
|
|
01/30/2010, 17:41
|
#11
|
elite*gold: 20
Join Date: Mar 2006
Posts: 6,125
Received Thanks: 2,518
|
Quote:
Originally Posted by .Arco
Um no ftw?
I've worked with lotf forever.
And this one I'm pretty good with.
I'm 100% sure I am right.
|
But sadly your mistaken,
Code:
public enum Gem : byte
{
NormalPhoenixGem = 1,
RefinedPhoenixGem = 2,
SuperPhoenixGem = 3,
NormalDragonGem = 11,
RefinedDragonGem = 12,
SuperDragonGem = 13,
NormalFuryGem = 21,
RefinedFuryGem = 22,
SuperFuryGem = 23,
NormalRainbowGem = 31,
RefinedRainbowGem = 32,
SuperRainbowGem = 33,
NormalKylinGem = 41,
RefinedKylinGem = 42,
SuperKylinGem = 43,
NormalVioletGem = 51,
RefinedVioletGem = 52,
SuperVioletGem = 53,
NormalMoonGem = 61,
RefinedMoonGem = 62,
SuperMoonGem = 63,
NormalTortoiseGem = 71,
RefinedTortoiseGem = 72,
SuperTortoiseGem = 73,
NormalGloryGem = 121,
RefinedGloryGem = 122,
SuperGloryGem = 123,
NormalThunderGem = 101,
RefinedThunderGem = 102,
SuperThunderGem = 103,
NoSocket = 0,
EmptySocket = 255
}
As you can see Game.Item.Gem is an enum which contains values for the various gems in the game, so spare is correct Game.Item.Gem.EmptySocket is the intended way of entering an empty socket into an item.
|
|
|
01/30/2010, 17:41
|
#12
|
elite*gold: 0
Join Date: Oct 2009
Posts: 8,765
Received Thanks: 5,291
|
Quote:
Originally Posted by Korvacs
But sadly your mistaken,
Code:
public enum Gem : byte
{
NormalPhoenixGem = 1,
RefinedPhoenixGem = 2,
SuperPhoenixGem = 3,
NormalDragonGem = 11,
RefinedDragonGem = 12,
SuperDragonGem = 13,
NormalFuryGem = 21,
RefinedFuryGem = 22,
SuperFuryGem = 23,
NormalRainbowGem = 31,
RefinedRainbowGem = 32,
SuperRainbowGem = 33,
NormalKylinGem = 41,
RefinedKylinGem = 42,
SuperKylinGem = 43,
NormalVioletGem = 51,
RefinedVioletGem = 52,
SuperVioletGem = 53,
NormalMoonGem = 61,
RefinedMoonGem = 62,
SuperMoonGem = 63,
NormalTortoiseGem = 71,
RefinedTortoiseGem = 72,
SuperTortoiseGem = 73,
NormalGloryGem = 121,
RefinedGloryGem = 122,
SuperGloryGem = 123,
NormalThunderGem = 101,
RefinedThunderGem = 102,
SuperThunderGem = 103,
NoSocket = 0,
EmptySocket = 255
}
As you can see Game.Item.Gem is an enum which contains values for the various gems in the game, so spare is correct Game.Item.Gem.EmptySocket is the intended way of entering an empty socket into an item.
|
Care to explain why the way I did it works?
|
|
|
01/30/2010, 17:44
|
#13
|
elite*gold: 20
Join Date: Mar 2006
Posts: 6,125
Received Thanks: 2,518
|
Quote:
Originally Posted by .Arco
Care to explain why the way I did it works?
|
Sure, because it will be converted to the enum value when you put in an id which is in the enum. If its not in the enum it will remain a number.
|
|
|
01/30/2010, 17:52
|
#14
|
elite*gold: 0
Join Date: Oct 2009
Posts: 8,765
Received Thanks: 5,291
|
Quote:
Originally Posted by Korvacs
Sure, because it will be converted to the enum value when you put in an id which is in the enum. If its not in the enum it will remain a number.
|
So what your saying is either way works?
|
|
|
01/30/2010, 18:30
|
#15
|
elite*gold: 20
Join Date: Mar 2006
Posts: 6,125
Received Thanks: 2,518
|
Quote:
Originally Posted by .Arco
So what your saying is either way works?
|
Correct, when i said you were mistaken i was referring to the "um...no?" comment of yours
However using the enum correctly is prefered, it reduces the chance of human error.
|
|
|
Similar Threads
|
[Help] new items in 5165
12/21/2009 - CO2 Private Server - 0 Replies
why when making items in 5165 and adding items in client its appear in my items but when wear it cant see it but i can see it in stuff what is the reason
|
[Question] Make items Free in Binary
08/27/2009 - CO2 Private Server - 4 Replies
I want make a NPC who give items free to new player but I dont know how do.
Who can help me to do this, will get a reward!!
|
All times are GMT +2. The time now is 18:03.
|
|