Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Conquer Online 2 > CO2 Private Server
You last visited: Today at 09:11

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[Development] 4267 conquer server.

Discussion on [Development] 4267 conquer server. within the CO2 Private Server forum part of the Conquer Online 2 category.

Reply
 
Old 03/10/2010, 17:37   #211
 
elite*gold: 0
Join Date: Feb 2006
Posts: 550
Received Thanks: 82
if(player.isBulker())
return rand(1, 200);
else return rand(1, 200000);
ChingChong23 is offline  
Old 03/10/2010, 17:48   #212

 
Kiyono's Avatar
 
elite*gold: 20
Join Date: Jun 2006
Posts: 3,296
Received Thanks: 925
//no nvm
Kiyono is offline  
Old 03/10/2010, 18:14   #213
 
ImmuneOne's Avatar
 
elite*gold: 0
Join Date: Nov 2009
Posts: 754
Received Thanks: 544
Quote:
Originally Posted by ChingChong23 View Post
if(player.isBulker())
return rand(1, 200);
else return rand(1, 200000
);
Decreasing chances because of bulkers, good concept. A bit unfair though.
ImmuneOne is offline  
Thanks
1 User
Old 03/10/2010, 18:24   #214
 
elite*gold: 0
Join Date: Nov 2009
Posts: 129
Received Thanks: 45
Quote:
Originally Posted by ImmuneOne View Post
Decreasing chances because of bulkers, good concept. A bit unfair though.
I interpreted it as some sort of jibe at TQ, implying they gave bulkers a higher chance of upgrading than others. (who knows, they may have).

Chances for upgrading level and quality from the EO source:

At the processing of upgrading we have a check to upgrade, this is the same for both level and quality.
Code:
      
int nRateSucc =  RateSuccForEquipLevel(pEquipItem);
if( RandGet(100) < nRateSucc ) { //Upgrade };
RateSuccForEquipLevel:
Code:
int CMsgDataArray::RateSuccForEquipLevel(CItemPtr pEquipItem)
{
	IF_NOT(pEquipItem)
		return 0;

	int nLevel = pEquipItem->GetLevel();
	if (pEquipItem->IsShield() || pEquipItem->IsArmor() || pEquipItem->IsHelmet())
	{
		if (nLevel>=0 && nLevel < 2)		 	    return 100;
		else if(nLevel>=2 && nLevel < 4)			return 35;
		else if(nLevel>=4 && nLevel < 6)			return 20;
		else if(nLevel>=6 && nLevel < 7)			return 10;
		else if(nLevel>=7 && nLevel < 8)			return 7;
		else if(nLevel>=8 && nLevel < 9)			return 4;		
	}
	else
	{
		if (nLevel>=0 && nLevel < 4)		 	    return 100;
		else if(nLevel>=4 && nLevel < 7)			return 35;
		else if(nLevel>=7 && nLevel < 10)			return 20;
		else if(nLevel>=10 && nLevel < 13)			return 10;
		else if(nLevel>=13 && nLevel < 16)			return 7;
		else if(nLevel>=16 && nLevel < 19)			return 4;
		else if(nLevel>=19&&nLevel<22) 			return 2;
	}	
	return 0;
}
bReset is false when the RandGet() method is called, its an optional parameter in the BaseFunc header.

Code:
static _int64 RandSeed = 3721 ;
int RandGet(int nMax, BOOL bReset)
{
	if (bReset)
		RandSeed = ::TimeGet();

	_int64 x = 0xffffffff;
	double i ;
	unsigned long final ;
	
	RandSeed *= ((_int64)134775813);
	RandSeed += 1 ;
	RandSeed = RandSeed % x ;
	i = ((double)RandSeed) / (double)0xffffffff ;
	final = (long) (nMax * i) ;
	
	return (int)final;
}
And the chance upgrade for quality:

Code:
int CMsgDataArray::RateSuccForQuality(CItemPtr pEquipItem)
{
	int iQuality = pEquipItem->GetQuality();
	
	if (iQuality==0)	return 30;
	else if(iQuality==1)	return 12;
	else if(iQuality==2)	return 6;
	else if(iQuality==3)	return 4;
	
	return 0;
}
Hope this helps you
~Falcon is offline  
Thanks
1 User
Old 03/10/2010, 19:03   #215
 
ImmuneOne's Avatar
 
elite*gold: 0
Join Date: Nov 2009
Posts: 754
Received Thanks: 544
Quote:
Originally Posted by ~Falcon View Post
Hope this helps you
I actually just asked for the chance rates, thanks for putting effort in it anyway.
ImmuneOne is offline  
Thanks
1 User
Old 03/10/2010, 19:12   #216
 
elite*gold: 0
Join Date: Nov 2009
Posts: 129
Received Thanks: 45
Quote:
Originally Posted by ImmuneOne View Post
I actually just asked for the chance rates, thanks for putting effort in it anyway.
I honestly have nothing better to do, lol.

Sat looking at loads of work I've got to do, just don't have the motivation to start it

Good luck with the project mind, nice to see something that at least has the motivation to document progress and ensure us you're not fading into obscurity.
I hope your very successful
~Falcon is offline  
Old 03/11/2010, 10:27   #217


 
Korvacs's Avatar
 
elite*gold: 20
Join Date: Mar 2006
Posts: 6,126
Received Thanks: 2,518
Does anyone remember if you can update items using the item creation packet in 4267, i was pretty certain you could but the update switch isnt working >_>", it just makes the item disappear or does nothing at all.
Korvacs is offline  
Old 03/11/2010, 14:18   #218


 
KraHen's Avatar
 
elite*gold: 0
Join Date: Jul 2006
Posts: 2,216
Received Thanks: 794
Quote:
Originally Posted by Korvacs View Post
Does anyone remember if you can update items using the item creation packet in 4267, i was pretty certain you could but the update switch isnt working >_>", it just makes the item disappear or does nothing at all.
Is there a packet which updates your items? I always did stuff like this by removing the initial item and adding the new one.
KraHen is offline  
Old 03/11/2010, 14:22   #219


 
Korvacs's Avatar
 
elite*gold: 20
Join Date: Mar 2006
Posts: 6,126
Received Thanks: 2,518
Yeah there is. But it doesnt appear to be working in 4267
Korvacs is offline  
Old 03/11/2010, 16:37   #220
 
ImmuneOne's Avatar
 
elite*gold: 0
Join Date: Nov 2009
Posts: 754
Received Thanks: 544
Quote:
Originally Posted by Korvacs View Post
Yeah there is. But it doesnt appear to be working in 4267
It does,

Code:
                        #region SendPackets
                        Client.SendPacket(new ItemInfo(I.UID, I.ID, I.Dura, I.MaxDura, Loc, I.Soc1, I.Soc2, I.Plus));
                        Client.SendPacket(new UseItem(I.UID, I.Location, 5));
                        Client.SendPacket(new UseItem(I.UID, I.Location, 3));
                        Client.SendPacketToAll(new CharacterSpawn(Client.Character));
                        #endregion
ImmuneOne is offline  
Thanks
1 User
Old 03/11/2010, 17:13   #221


 
Korvacs's Avatar
 
elite*gold: 20
Join Date: Mar 2006
Posts: 6,126
Received Thanks: 2,518
Code:
            Server.packetServer.SendData(Packets.ItemInfomation(_Item, ItemCreationType.Update, Data.ConnectionID));
Is what i was thinking of, the ItemInfo packet.

You have posted Updating the item equipment, im on about updating items in your inventory.
Korvacs is offline  
Old 03/11/2010, 17:27   #222
 
ImmuneOne's Avatar
 
elite*gold: 0
Join Date: Nov 2009
Posts: 754
Received Thanks: 544
Quote:
Originally Posted by Korvacs View Post
Code:
            Server.packetServer.SendData(Packets.ItemInfomation(_Item, ItemCreationType.Update, Data.ConnectionID));
Is what i was thinking of, the ItemInfo packet.

You have posted Updating the item equipment, im on about updating items in your inventory.
In that case, remove the item with;

Code:
[B]// UID, LOC, 3[/B]
        public UseItem(uint UID, uint Loc, uint Type)
            : base(20)
        {
            WriteUInt16((ushort)Packet.Length);
            WriteUInt16(1009);
            WriteUInt32(UID);
            WriteUInt32(Loc);
            WriteUInt32(Type);
            WriteUInt32(0);
        }
And send the new item information.
ImmuneOne is offline  
Thanks
1 User
Old 03/11/2010, 17:29   #223


 
Korvacs's Avatar
 
elite*gold: 20
Join Date: Mar 2006
Posts: 6,126
Received Thanks: 2,518
Thats definately not the correct way to do it, all you had to do was send one packet, and it was the one i posted, i just dont think it was in this client.
Korvacs is offline  
Old 03/11/2010, 17:32   #224
 
ImmuneOne's Avatar
 
elite*gold: 0
Join Date: Nov 2009
Posts: 754
Received Thanks: 544
Quote:
Originally Posted by Korvacs View Post
Thats definately not the correct way to do it, all you had to do was send one packet, and it was the one i posted, i just dont think it was in this client.
Check my edited post, I made a little mistake.

BTW; The previous post I made before the UseItem packet was for equipping items instead for updating equipped items.
ImmuneOne is offline  
Thanks
1 User
Old 03/11/2010, 17:36   #225


 
Korvacs's Avatar
 
elite*gold: 20
Join Date: Mar 2006
Posts: 6,126
Received Thanks: 2,518
That still isnt right, thats what im having to do now, remove the old item and recreate it.

Your meant to just send the update packet and it makes the adjustments itself, without removing & recreating.

Turns out it is just:

Code:
            Server.packetServer.SendData(Packets.ItemInfomation(Upgrade, ItemCreationType.Update, Data.ConnectionID));
Sadly it moves the item to the last position in your inventory, i guess thats how the 4267 worked.
Korvacs is offline  
Reply




All times are GMT +1. The time now is 09:11.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.