Register for your free account! | Forgot your password?

You last visited: Today at 06:38

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

Advertisement



[Release] XpSkill [CoEmu v2]

Discussion on [Release] XpSkill [CoEmu v2] within the CO2 PServer Guides & Releases forum part of the CO2 Private Server category.

Reply
 
Old   #1
 
12tails's Avatar
 
elite*gold: 0
Join Date: Apr 2009
Posts: 773
Received Thanks: 441
[Release] XpSkill [CoEmu v2]

Hello....

before all... thanks to all helped me whith it... speacialy samehven.... many private mensages to him.... but here we go....

at Nano.cs find : public static OpenSSL.DH ServerKey;

bellow it add:

Code:
public static System.Timers.Timer GlobalTimer = new System.Timers.Timer();
then go to the public static void StartServer().... is at nano.cs too
you will see something like this:

Code:
public static void StartServer()
		{
			GenerateKey();
			Struct.LoadItems("items.txt");
			Struct.LoadItemPluses("itemadd.ini");
			Struct.LoadMaps();
			Struct.LoadMonsters();
			Struct.LoadNpcs();
			Struct.LoadPortals();
			Struct.LoadServerskills();
			Struct.LoadTNpcs();
bellow Struct.LoadTNpcs();... add this:

Code:
            GlobalTimer.Interval = 1000;
            GlobalTimer.Elapsed += delegate
            {
                foreach (KeyValuePair<int, ClientSocket> Clients in Nano.ClientPool)
                {
                    ClientSocket CSocket = Clients.Value;
                    CSocket.Client.XpSkillCounter += 1000;
                    if (CSocket.Client.XpSkillCounter == 340000)
                    {
                        CSocket.Client.XpSkillCounter = 0;
                        CSocket.Client.XpTime = true;
                        CSocket.Send(CoEmu_v2_GameServer.Packets.ConquerPacket.Status(CSocket, 2, 16, Struct.StatusTypes.StatusEffect));
                    }
                }
            };
            GlobalTimer.Start();
now go to the Packets/Status.cs

you will see something like this:

Code:
							Status += 0x4000;
						if(CSocket.Client.Flashing)
							Status += 0x1;
						if(CSocket.Client.Stigged)
							Status += 0x200;
						if(CSocket.Client.SuperMan)
                            Status += 0x262144;
						if(CSocket.Client.Cyclone)
                            Status += 0x8388608;
                        if (CSocket.Client.Poisoned)
                            Status += 0x2;
then... add this bellow the posioned:

Code:
                        if (CSocket.Client.XpTime)
                            Status += 0x10;
Edit:
like you asked samehven

in Character.cs put the definitions:

Code:
public int XpSkillCounter = 0;
public bool XpTime = false;
them go to Handlers/Attack.cs
you will find a region called #region Checks add before or after it

Code:
if (MagicID == 1110 || MagicID == 1025 || MagicID == 6010)
            {
                XpSkill(CSocket, MagicID);
            }
At the very bottom of that class add this void

Code:
public static void XpSkill(ClientSocket CSocket, int SkillId)
        {
            CSocket.Client.XpTime = false; CSocket.Client.XpSkillCounter = 0;
            CSocket.Send(ConquerPacket.Status(CSocket, 2, 0, Struct.StatusTypes.StatusEffect));
            switch (SkillId)
            {
                case 1025://SuperMan
                    {
                        CSocket.Client.SuperMan = true;
                        CSocket.Send(ConquerPacket.Status(CSocket, 2, 262144, Struct.StatusTypes.StatusEffect));
                        break;
                    }
                case 1110://Cyclone
                    {
                        CSocket.Client.Cyclone = true;
                        CSocket.Send(ConquerPacket.Status(CSocket, 2, 8388608, Struct.StatusTypes.StatusEffect));
                        break;
                    }
                case 6010://Vortex Ninja
                    {
                       
                        break;
                    }
            }
        }
Save/debug ur project (F5)...

and if you wan't a code to start the xpskill whith the PM/GM here is....

at Chat.cs seach for case "cyclone"... and below it add:

Code:
                        case "superman":
                            {
                                if (CSocket.Client.isGM || CSocket.Client.isPM)
                                {
                                    CSocket.Client.SuperMan = true;
                                    CSocket.Send(ConquerPacket.Status(CSocket, 2, 262144, Struct.StatusTypes.StatusEffect));
                                }
                                break;
                            }
                        case "xp":
                            {
                                if (CSocket.Client.isGM || CSocket.Client.isPM)
                                {
                                    CSocket.Client.XpTime = true;
                                    CSocket.Send(CoEmu_v2_GameServer.Packets.ConquerPacket.Status(CSocket, 2, 16, Struct.StatusTypes.StatusEffect));
                                }
                                break;
                            }
Edit 2 (By: samehven):

A- add 2 variables at Character.cs named for example

Code:
public short XpToEnd=0;
public short XpStarted=0;
B- when the xpskill starts add the max time for it, if it will last for 40 seconds then

Code:
CSocket.Client.XpToEnd=40;
CSocket.Client.XpStarted=1;
C- At Nano.cs /the globaltimer elapsed add this

Code:
if (CSocket.Client.XpStarted>0) 
{
CSocket.Client.XpStarted+=1;
if (CSocket.Client.XpStarted>=CSocket.Client.XpToEnd)
{
CSocket.Client.XpStarted=0;CSocket.Client.XpTime = false;
CSocket.Client.Cyclone = false;
//Add here all other XpSkills u have and need to be ended
}
}
tkx again ^^

if someone find something more to put here.... post it i will change!!

CYA!
12tails is offline  
Thanks
4 Users
Old 08/13/2009, 15:03   #2

 
Kiyono's Avatar
 
elite*gold: 20
Join Date: Jun 2006
Posts: 3,296
Received Thanks: 924
Only if you need to use it more than once.
Instead of
Code:
CoEmu_v2_GameServer.Packets.ConquerPacket.
Just add
Code:
using CoEmu_v2_GameServer.Packets;
at the top and you can just do
Code:
ConquerPacket.
It's not really a problem, just looks ugly lol
Kiyono is offline  
Old 08/13/2009, 15:37   #3

 
Kiyono's Avatar
 
elite*gold: 20
Join Date: Jun 2006
Posts: 3,296
Received Thanks: 924
Quote:
Originally Posted by samehvan View Post
he uses it just once so instead of loading the whole class he simply call the status packet only , think that would be more practical and CPU cost cheaper
I didn't knew that he only used it once.

Now that we're on the topic of XP skills, FatalStrike (Ninja XPskill 6011)
Do you know how to code that one?
Kiyono is offline  
Thanks
1 User
Old 08/13/2009, 15:50   #4
 
12tails's Avatar
 
elite*gold: 0
Join Date: Apr 2009
Posts: 773
Received Thanks: 441
someone know the status id of ninja skills?
12tails is offline  
Old 08/13/2009, 15:54   #5
 
elite*gold: 20
Join Date: Jul 2007
Posts: 613
Received Thanks: 486
Quote:
Originally Posted by Kiyono View Post
I didn't knew that he only used it once.

Now that we're on the topic of XP skills, FatalStrike (Ninja XPskill 6011)
Do you know how to code that one?
i think it would be easy ,u just need to send the status effect then it would be a normal melee attack

@12tails

copy my posts (2&5) to ur first post so the first post will be a complete system and i'll remove them after u do
samehvan is offline  
Old 08/13/2009, 16:07   #6

 
Kiyono's Avatar
 
elite*gold: 20
Join Date: Jun 2006
Posts: 3,296
Received Thanks: 924
Quote:
Originally Posted by samehvan View Post
i think it would be easy ,u just need to send the status effect then it would be a normal melee attack

@12tails

copy my posts (2&5) to ur first post so the first post will be a complete system and i'll remove them after u do
It kinda doesn't work for me no matter what I do lol
But I guess that I could try a modified Superman since it's SM gives 10x the atk power and FS gives 500% damages (= 5x atk power)... but still is the teleporting to mobs handled client side then?

Quote:
Originally Posted by 12tails View Post
someone know the status id of ninja skills?
Code:
 if (CSocket.Client.Vortex)
                    Status += 0x400000000000;
                if (CSocket.Client.FatalStrike)
                    Status += 0x800000000000;
Kiyono is offline  
Old 08/13/2009, 16:52   #7
 
12tails's Avatar
 
elite*gold: 0
Join Date: Apr 2009
Posts: 773
Received Thanks: 441
kyonno i take look at the photo xD
Attached Images
File Type: jpg jpeg.JPG (135.6 KB, 44 views)
12tails is offline  
Old 08/13/2009, 17:01   #8

 
Kiyono's Avatar
 
elite*gold: 20
Join Date: Jun 2006
Posts: 3,296
Received Thanks: 924
C'mon I can't code and even know what the problem is xD
Scroll up a bit, should see
Code:
uint Status = 0;
Change it to
Code:
ulong Status = 0;
Should fix it.
Kiyono is offline  
Old 08/13/2009, 17:05   #9
 
12tails's Avatar
 
elite*gold: 0
Join Date: Apr 2009
Posts: 773
Received Thanks: 441
what a stupid haha...

why u can't code... code is soo cool !!! thats why i'm learning yet xD
12tails is offline  
Old 08/13/2009, 17:13   #10
 
n0mansland's Avatar
 
elite*gold: 0
Join Date: Aug 2008
Posts: 780
Received Thanks: 255
I already have all this stuff so I won't use it but nice to see you're helping everyone.. I've never seen anyone attempt to release skills for CoEmuV2, unless I missed it..

Anyway, where's the part that calculates if you have super man attack x2?

Code:
                if (Attacker.SuperMan)
                    Damage = (int)(Damage * 1.9);
Good luck finding where it goes.. I won't tell you =O Add it to your guide if you do. Also you needa do the stigma etc.
n0mansland is offline  
Old 08/13/2009, 17:27   #11

 
Kiyono's Avatar
 
elite*gold: 20
Join Date: Jun 2006
Posts: 3,296
Received Thanks: 924
Quote:
Originally Posted by 12tails View Post
what a stupid haha...

why u can't code... code is soo cool !!! thats why i'm learning yet xD
Not motivated enough to learn.

Quote:
Originally Posted by n0mansland View Post
I already have all this stuff so I won't use it but nice to see you're helping everyone.. I've never seen anyone attempt to release skills for CoEmuV2, unless I missed it..

Anyway, where's the part that calculates if you have super man attack x2?

Code:
                if (Attacker.SuperMan)
                    Damage = (int)(Damage * 1.9);
Good luck finding where it goes.. I won't tell you =O Add it to your guide if you do. Also you needa do the stigma etc.
danielcharaf released samehvan's wep skill code xD
Alex's source with a lot of coded skills also got released (or leaked)
Kiyono is offline  
Old 08/13/2009, 17:49   #12
 
n0mansland's Avatar
 
elite*gold: 0
Join Date: Aug 2008
Posts: 780
Received Thanks: 255
Wow, seems like I've been gone for a while.. When did this happen?
n0mansland is offline  
Old 08/13/2009, 17:57   #13

 
Kiyono's Avatar
 
elite*gold: 20
Join Date: Jun 2006
Posts: 3,296
Received Thanks: 924
Quote:
Originally Posted by n0mansland View Post
Wow, seems like I've been gone for a while.. When did this happen?
No idea.
Kiyono is offline  
Old 08/13/2009, 18:46   #14
 
elite*gold: 20
Join Date: Jul 2007
Posts: 613
Received Thanks: 486
Quote:
Originally Posted by Kiyono View Post
It kinda doesn't work for me no matter what I do lol
But I guess that I could try a modified Superman since it's SM gives 10x the atk power and FS gives 500% damages (= 5x atk power)... but still is the teleporting to mobs handled client side then?
i'll have a look and c what i can do

Quote:
Originally Posted by n0mansland View Post
I already have all this stuff so I won't use it but nice to see you're helping everyone.. I've never seen anyone attempt to release skills for CoEmuV2, unless I missed it..

Anyway, where's the part that calculates if you have super man attack x2?

Code:
                if (Attacker.SuperMan)
                    Damage = (int)(Damage * 1.9);
Good luck finding where it goes.. I won't tell you =O Add it to your guide if you do. Also you needa do the stigma etc.
if no one released them why wouldn't u be the first ,just kidding of course u have the r8 to keep ur hard working

*The Superman power with co2 calc =10x your normal power
and simply u can make it at the Superman case ,like that

Code:
 case 1025://SuperMan
                    {
                        CSocket.Client.SuperMan = true;
                        CSocket.Send(ConquerPacket.Status(CSocket, 2, 262144, Struct.StatusTypes.StatusEffect));
                        CSocket.Client.MinAttack *= 10;
                        CSocket.Client.MaxAttack *= 10;
                        break;
                    }
Dont forget to return it back when the skill ends
samehvan is offline  
Old 08/14/2009, 13:22   #15
 
elite*gold: 0
Join Date: Jun 2008
Posts: 18
Received Thanks: 3
samhvan, When I added that code you previously posted, It didnt change the multiplier for Superman Damage, Could you please help me fix that? Thanks
Waterku is offline  
Reply


Similar Threads Similar Threads
xpskill error with coemu
04/28/2010 - CO2 Private Server - 4 Replies
everytime someone jumps on my server the xp time just keeps going back up.... where should i be looking to alter this coz i looked in jump.cs with no luck :/
No XPskill
03/05/2010 - EO PServer Hosting - 9 Replies
Any ideas how to make the xpskill work. Max level warrior character, not databased. The skill never worked. Candy based client on win 7. Also, randoms dont work, any ideas?
[Release] >>>> CoEmu.V3
11/09/2009 - CO2 PServer Guides & Releases - 20 Replies
i got a new CoEmu from a china site but i don't know how to setup it this is the link of the source 4shared.com - online file sharing and storage - download NewCoemu.rar pass: AhmedZero
[HELP] xpskill not going off
02/27/2009 - EO PServer Hosting - 1 Replies
solved ty



All times are GMT +2. The time now is 06:38.


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.