Register for your free account! | Forgot your password?

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

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

Advertisement



transforming Effect Value .

Discussion on transforming Effect Value . within the CO2 Private Server forum part of the Conquer Online 2 category.

Reply
 
Old   #1
 
{ Angelius }'s Avatar
 
elite*gold: 0
Join Date: Aug 2010
Posts: 991
Received Thanks: 1,107
transforming Effect Value .

i recoded the transforming skills today such as Golom/DivineHare/etc

and so far it works fine the health/mesh/spawning player/We

but the only problem i had is spawning the transformed char to other players if i had a player that is already in range the transforming packet is being sent to that player and he will be able to see the effect.
but lets say another player has logged in.

it dosent matter if the new player was in range or not cus he want be able to see the effect on the transformed player any way.

the reason is I dont have the effect value to add it to the spawnentity Packet .

when i spawn the transformed char i dont need the value cus im doing it depending on the packet that is being sent to the Player+the in range players .and that packet contains the transforming mesh + the transforming time but no values .

so how can i fix that or how can i figure the effects values out of the client so i can add it to the spawnEntity Packet .

IE.This is the spawnEffect Packet that im using .
Quote:
public static byte[] SpawnEffect(uint UID, CharStatusStruct.Status Type, ulong Value, Character C)
{
ulong Status = C.Effects;
byte[] Packet = new byte[8 + 36];
COPacket P = new COPacket(Packet);
P.WriteUshortAddPos2((ushort)(Packet.Length - 8));
P.WriteUshortAddPos2((ushort)10017);
P.WriteUintAddPos4(UID);
P.WriteUintAddPos4(0x01);
P.WriteUintAddPos4((uint)Type);
if (!C.Shadow)
{
if (C.RedName)
Status += 0x4000;
if (C.BlackName)
Status += 0x8000;
if (C.Hostile)
Status += 0x1;
if (C.Poisoned)
Status += 0x2;
if (C.TeamLeader)
Status += 0x40;
if (C.Accuracy)
Status += 0x80;
if (C.Stigged)
Status += 0x0;
if (C.Invisible)
Status += 0x400000;
if (C.Shield)
Status += 0x100;
if (C.Flying)
Status += 0x8000000;
if (C.Praying)
Status += 0x80000000;
if (C.CastingPray)
Status += 0x40000000;
if (C.Vortex)
Status += 70368744177664;
if (C.FatalStrike)
Status += 140737488355328;
if (C.RidingHours)
Status += 1125899906842624;
if (C.CurseStart)
Status += 0x100000000;
if (C.SuperMan)
Status += 0x40000;
if (C.Cyclone)
Status += 0x800000;
if (C.XPSkillList)
Status += 0x10;
}
else
{
if (C.Shadow)
Status += 0x420;
if (C.RedName)
Status += 0x4000;
if (C.BlackName)
Status += 0x8000;
}
P.WriteUlongAddPos8((ulong)Status);
P.WriteUlongAddPos8(0);
P.WriteUintAddPos4(0);

return P.AddTQServer8Byte();
}
lets take the Stigged Status its = 0x0;
but that value well spawn the player as Stigged with a level 4 stigma skill even if he was been stigged with a level 1 stigma skill which is wrong

so i really need to figure that out an i need some help

thanks everyone .
{ Angelius } is offline  
Old 01/31/2011, 21:39   #2
 
elite*gold: 0
Join Date: Jan 2011
Posts: 50
Received Thanks: 6
This is the way I do the effects public side
Code:
case "/effect":
                 {
                         Game.World.Action(GC.MyChar,Packets.String(GC.MyChar.EntityID, [COLOR="Red"]10[/COLOR], Cmd[1]).Get);
                         break;
                 }
And remember , you must not change the number in the red color.. Otherwise it wouldn't make the effect public
§hift is offline  
Thanks
1 User
Old 01/31/2011, 21:46   #3
 
elite*gold: 21
Join Date: Jul 2005
Posts: 9,193
Received Thanks: 5,377
You should be sending the disguise mesh as your player mesh when spawning to the new clients.


What I would do is a fairly simple accessor type setup for your mesh and write that to the spawn packet.

IE

return uint.Parse(this.disguise + this.avatar + this.basemesh);

where those are strings. That's how the meshes are built...

IE

2003 for base mesh

102 for a female avatar

80 as disguise mesh (dunno if thats a mob mesh or not but w/e)

Your mesh in spawn packet would be

801022003
pro4never is offline  
Thanks
1 User
Old 02/01/2011, 00:26   #4
 
{ Angelius }'s Avatar
 
elite*gold: 0
Join Date: Aug 2010
Posts: 991
Received Thanks: 1,107
PHP Code:
Player.BaseMeash Player.Body//1003
Player.TransformMesh = (ushort)TransformID;//2740000000
this.Send();

//player Transformed .

if (Transformed)//on spawn Entity
                    
return uint.Parse(Player.TranformMesh Player.Avatar Player.Body); 
when i login with the new char the player is gonna look normal cept that the name is not there .

i dont know whats wrong .

EDIT... its working now .

PHP Code:
//besfoe Transform 
Player.TransformMesh = (ushort)TransformID;//2740000000

//After Transform and when its time to send the Spawn Entity Packet i did something like .

if (C.Transformed)
P.WriteUintAddPos4(Player.Mesh Player.TranformMesh);
else
P.WriteUintAddPos4(Player.Mesh); 
Thank you §hift Thank you Pro

#Request Close .
{ Angelius } is offline  
Old 02/01/2011, 00:31   #5
 
elite*gold: 0
Join Date: Oct 2008
Posts: 25
Received Thanks: 9
Quote:
Originally Posted by { Angelius } View Post
PHP Code:
Player.BaseMeash Player.Body//1003
Player.TransformMesh = (ushort)TransformID;//2740000000
this.Send();

//player Transformed .

if (Transformed)//on spawn Entity
                    
return uint.Parse(Player.TranformMesh Player.Avatar Player.Body); 
when i login with the new char the player is gonna look normal cept that the name is not there .

i dont know whats wrong .
Shouldn't it be?
uint.Parse(Player.TranformMesh.ToString() + Player.Avatar.ToString() + Player.Body.ToString());

Correct me if I'm wrong.
Its Arco is offline  
Old 02/01/2011, 00:52   #6
 
{ Angelius }'s Avatar
 
elite*gold: 0
Join Date: Aug 2010
Posts: 991
Received Thanks: 1,107
Quote:
Originally Posted by stigs View Post
Shouldn't it be?
uint.Parse(Player.TranformMesh.ToString() + Player.Avatar.ToString() + Player.Body.ToString());

Correct me if I'm wrong.
nope it works Different down here lol .

however the mesh for the Golom/Dhair/etc is to large to be a uint and the packet had some miss understanding with the convert to ushort though
but now its working i added a small if statement in side the spawn entity packet and it works fine

Thank you
{ Angelius } is offline  
Old 02/01/2011, 08:06   #7
 
elite*gold: 20
Join Date: Aug 2005
Posts: 1,734
Received Thanks: 1,000
You could always do it like this:

PHP Code:
public uint Mesh
{
    
get
    
{
        return (
Model 10000 Avatar 10000000 Transformation);
    }

This would allow you to have Mode, (Avatar), Transformation as unsigned shorts.
tanelipe is offline  
Thanks
1 User
Old 02/01/2011, 13:53   #8
 
{ Angelius }'s Avatar
 
elite*gold: 0
Join Date: Aug 2010
Posts: 991
Received Thanks: 1,107
Quote:
Originally Posted by tanelipe View Post
You could always do it like this:

PHP Code:
public uint Mesh
{
    
get
    
{
        return (
Model 10000 Avatar 10000000 Transformation);
    }

This would allow you to have Mode, (Avatar), Transformation as unsigned shorts.

nice thank you

i'll try it now better than adding the if statements to the packet .
{ Angelius } is offline  
Old 02/01/2011, 14:11   #9
 
12tails's Avatar
 
elite*gold: 0
Join Date: Apr 2009
Posts: 773
Received Thanks: 441
try making an ulong value with all the stuatus ... and them just send it... is better than you keep checking always for all effects...

them you just do :
Code:
public static byte[] SpawnEffect(uint UID, CharStatusStruct.Status Type, ulong Status, Character C)
{
ulong Status = C.Effects;
byte[] Packet = new byte[8 + 36];
COPacket P = new COPacket(Packet);
P.WriteUshortAddPos2((ushort)(Packet.Length - 8));
P.WriteUshortAddPos2((ushort)10017);
P.WriteUintAddPos4(UID);
P.WriteUintAddPos4(0x01);
P.WriteUintAddPos4((uint)Type);
P.WriteUlongAddPos8((ulong)Status);
P.WriteUlongAddPos8(0);
P.WriteUintAddPos4(0);

return P.AddTQServer8Byte();
}
12tails is offline  
Old 02/01/2011, 21:25   #10
 
{ Angelius }'s Avatar
 
elite*gold: 0
Join Date: Aug 2010
Posts: 991
Received Thanks: 1,107
Quote:
Originally Posted by 12tails View Post
try making an ulong value with all the stuatus ... and them just send it... is better than you keep checking always for all effects...

them you just do :
Code:
public static byte[] SpawnEffect(uint UID, CharStatusStruct.Status Type, ulong Status, Character C)
{
ulong Status = C.Effects;
byte[] Packet = new byte[8 + 36];
COPacket P = new COPacket(Packet);
P.WriteUshortAddPos2((ushort)(Packet.Length - 8));
P.WriteUshortAddPos2((ushort)10017);
P.WriteUintAddPos4(UID);
P.WriteUintAddPos4(0x01);
P.WriteUintAddPos4((uint)Type);
P.WriteUlongAddPos8((ulong)Status);
P.WriteUlongAddPos8(0);
P.WriteUintAddPos4(0);

return P.AddTQServer8Byte();
}
true but i was thinking .

a bool with a true/false in the end of every skill case and make the packet check for the effects looks better than >>>
PHP Code:
Player.vortex true ;
Player.Effects += 546565612;
Player.supply(Player.Effects);

///and when the skill time is up .

Player.vortex false ;
Player.Effects -= 546565612;
Player.supply(Player.Effects); 
i dont know correct me if im wrong the only thing im not sure about is ........the packet and if what i added was making it slower to be sent .
{ Angelius } is offline  
Reply


Similar Threads Similar Threads
3D Effect-Less Lag
07/07/2016 - Conquer Online 2 - 12 Replies
Can anyone help me with taking out some 3D Effects like the nobility ranking and heaven blessing effects if possible. A tutorial in learning how to do this on my own would be okey as well. :bandit:
[Help] How I can Add New Effect
05/12/2010 - CO2 Weapon, Armor, Effects & Interface edits - 3 Replies
im trying to add anew effect to backsowrd and im modified all files 3dtexture.ini 3DEffectObj.ini 3DEffect.ini and added the new effect in the backsowrd effect folder but its still icant add the effect, the normal backsowrd have 2 effects only and my effect dosen't appear
Dodge effect , Warp effect
01/04/2010 - S4 League - 7 Replies
this is a threat to glados , but other can answer. how can u have that effect? this is the video YouTube - S4 League GLaDO is Hacking
[Help] 2nd RB Effect Fix
04/21/2009 - CO2 Private Server - 2 Replies
Okay here's the problem. The 2nd RB Effect keeps looping over and over even if I add a timer for it. It overlaps each other until it turns bright purple. It's really disturbing and I spent almost two hours trying to fix it and I can't get it to work. And I am really annoyed because it's as if I wasted those two hours and learned nothing at all. So please, if you know how to fix it please help me...



All times are GMT +2. The time now is 01:00.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

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