Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Conquer Online 2 > CO2 Private Server > CO2 PServer Guides & Releases
You last visited: Today at 01:48

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

Advertisement



[Release]New skill - Restore ([Guide])

Discussion on [Release]New skill - Restore ([Guide]) within the CO2 PServer Guides & Releases forum part of the CO2 Private Server category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Feb 2008
Posts: 1,590
Received Thanks: 154
[Release]New skill - Restore ([Guide])

Okay, so I was playing around with effects and I got here.
Big + thanks to ntlefty for telling me the statuseffect.ini file =D
____________

So first, my favorite effect in the CO client already is "mass"... It looks sweet.
Its a blue kinda vortex around you, but its temporary, so I edited it to loop forever.
Next, the CO Client has a ton of unused skills, one I found is the XP Skill - Restore. It's skill ID is 1105, and it only has one level: 0/Fixed. We're going to make use of both for our coolio skill.
_______________

What it does here: Shows an effect around your character(using a good way, not spamming it)
Adds HP slowly over 50 seconds.

_________________

I tried to comment very well, so if you don't understand, ask questions.
Don't ask retarted questions though, such as "how to change hp rate?".
I won't answer such questions, as it's not hard to do yourself.
________________

Reminder: I don't use LOTF, this hasn't been tested. Plx report bugs in a non-noobish way.
Ex: "um cant see efct plx help"
BEEEP! WRONG!

Ex: "My compiler is asking for a ';' here, do I need to add one?"
Ding Ding! Winner!
I will respond to these questions if I can.

_______________________________________


If you want to do it like me, start off by making it loop forever.

[Editin' 3deffect.ini]
So yeah, not that hard... open client\ini\3deffect.ini just in notepad.
ctrl + f(your handy search function!) and search for [mass].
This will lead you to where the client finds its data for the effect "mass".
All we're really concerned about is making it loop, so change the key of "LoopTime" to 99999999.(lol)

After that, the [mass] section should look like this....
Code:
[mass]
Amount=2
EffectId0=2809
TextureId0=5819
ASB0=5
ADB0=6
EffectId1=2810
TextureId1=5820
ASB1=5
ADB1=6
Delay=0
LoopTime=99999999
FrameInterval=40
LoopInterval=0
OffsetX=0
OffsetY=0
OffsetZ=0



Now for teh fun part, that i just figured you could do today!

Okay, so if you know a little about CO, they have these thingz called statflags. Flags in programming are an easy way to get a lot of bools(i guess) into a value, because a bool really only needs one bit(1 or 0). The way LOTF handles it = pretty gay.... anyways............ I found a flag thats not in use(by me or LOTF that I know of), and changed it so it'll show our coolio little effect! Nice 'eh?

[Editin' statuseffect.ini]
This file contains statflags + effects to show with them...
Guess what, let's add a new one with our effect.

The file itself may seem weird, but bare with me here.
The first serious of numbers is the statflag(in HEXADECIMAL LEARN IT), and the next string is effect. Not sure what the last one is xD.
Anyways...
Find where it says...
Code:
00000200 attackup40 NULL
and then the next two lines are
Code:
00000400 NULL NULL
00000800 NULL NULL
Right after those two lines add this line that I made...
Code:
00001000 mass NULL
See? StatFlag + effect + NULL.
Easy!
Now, for easier reference for you n00ps, use MS calc to convert from hex/normal(dec). 0x1000(hex starts with 0x in most high level languages) in decimal or normal format would be 4096.


Now REMEMBER THIS!!!!
People will only be able to see the effect and stuff IF YOU SEND OUT A PATCH WITH THESE FILES IN IT. DONT ASK STUPID QUESTIONS K?


[Source part!]

Okay, so now we did the easy part.
The next part is easy too, just add some variables to the top of our character class(Character.cs).

Doesn't matter where up there, I did it here...
right under..
Code:
public bool Flying = false;
just add these two variables...
Code:
public bool Restoring = false;//our little bool for the restore flag.
public DateTime RestoreTime = DateTime.Now;// a time for when restore started(like lotf does..)
Now that we've made our variables, first things first.
Lets add our newest bool to the GetStat() in Character.cs
This serves as a way to get the total statflag from all the bools(Not a good way!! but meh..)

Search Character.cs for
Code:
public ulong GetStat()
Now, just like the other bools,
add in the value...
Doesn't matter where as long as its in this method.
Code:
            if (BlueName)
                it++;
[b]
            if (Restoring)
                it += 4096;
[/b]
            if (TeamLeader)
                it += 64;
            if (Poisoned)
                it += 2;
Now that we've done that, we can actually move onto the skill part!

[Adding the skill to the database!]

Well, LOTF loads skills gayly(as usual)...
But here you go...

In Database.cs
search for
Code:
public static void DefineSkills()
Under it somewhere in the skills, add this little snippet.
Code:
//1105 is skill ID. 0 is highest level
SkillAttributes[1105] = new ushort[1][];//LOTF has this ushort[][][] for skills.
//your putting the ushort[][] SkillAttributes[1105] and initializing it as a "new ushort[1][]
SkillAttributes[1105][0] = new ushort[6] { 7, 0, 0, 0, 0, 0 };
//now you're setting the first item in the array to a new ushort[] with 6 values, which are then listed beside it(7...)
//Each value represents stuff in certain skills, but since restore is self cast, you dont need much info...
//the 7 refers to the SkillType i'll use later in the UseSkill() function in Character.cs
SkillsDone.Add(1105, 0);// Finally, add it to the hashtable of all the skills done, so the server knows that this skill has been done, and will process it if a client uses that skill.
Well, if you have powersource, or use those other database methods, DO NOT ASK. I WILLLLLLL NOTTTT HELLLLLLPPPP YOU! Challenge yourself to figure it out yourself!!

[Actually doing the skill in Character.UseSkill()]
Okay, well once the server receives a packet, it calls this method for the character to use a skill.
It's broken down into several #region's depending on skill type(that 7! remember the lucky 7!).
In this case, we'll be dealing with skill type 7, which is all those XPskills/self buffs(Fly, SM, Cyclone, etc).

To get here(if you cant find it >.>) search character.cs for..
Code:
public void UseSkill(ushort SkillId, ushort X, ushort Y, uint TargID)
This is a big section, and not very organized(HAH LOTF being organized. HAHA.)

Make your way to #region SkillAttributes7 (LUCKY 7!)
or look for skills until you find 8003/fly and 1025/SM, you'll know you're there.

Right under accuracy I added my skill usage.
find
Code:
if (SkillId == 1015)
                        {
                            XpList = false;
                            AccuracyOn = true;
                            AccuracyActivated = DateTime.Now;
                            MyClient.SendPacket(General.MyPackets.Vital(UID, 26, GetStat()));
                            MyClient.SendPacket(General.MyPackets.SendMsg(MyClient.MessageId, "SYSTEM", Name, "Accuracy XP: Your accuracy wil be increased for 200 seconds.", 2005));

                        }
And under it add my new code...
Code:
if (SkillId == 1105)
                        {
                            XpList = false;//turn off xp list
                            XpCircle = 0;//reset xp counter
                            Restoring = true;//turn on the restore flag we added, so the server keeps adding HP + the c00l effect.
                            RestoreTime = DateTime.Now;//So the server will know when to remove the restore.
                            MyClient.SendPacket(General.MyPackets.Vital(UID, 26, GetStat()));//Send the update to the client, so it starts the effect we added.
                            World.UpdateSpawn(this);//send the update to everyone else
                        }
I commented pretty well there soo.....

Moving on....

[Adding the actual skill part(what it does!)]
So we all know(well...) that LOTF has a timer for characters, and most of this stuff justs loops on the timer(not a good idea but... as i said before.. `Meh.`)

To find the timer elapsed method, it's easiest to search around in Character.cs for if (StigBuff)
And find where it actually removes stig.
That code is like this...
Code:
if (StigBuff)
                if (DateTime.Now > Stigged.AddSeconds(20 + StigLevel * 5))
                {
                    StigBuff = false;
                    MyClient.SendPacket(General.MyPackets.Vital(UID, 26, GetStat()));
                    World.UpdateSpawn(this);
                }
Right under it we'll add the code for Restore.
Code:
if (Restoring)//If this person has the restore flag on...
            {
                if (CurHP < MaxHP)//Dont want to update if they have more than full HP, thats gay.
                {
                    CurHP += (ushort)(MaxHP / 15);//Obvious, add their MaxHP divided by 15... change this if you like.
                    if (CurHP > MaxHP)
                        CurHP = MaxHP;//So the HP isn't higher than max, that'd be gay also.

                    MyClient.SendPacket(General.MyPackets.Vital(UID, 0, CurHP));//Send the packet so the client updates health.
                }
                if (DateTime.Now > RestoreTime.AddSeconds(50))//If they've been restoring for more than 50 seconds
                {
                    Restoring = false; //Remove the flag for restoring(The effect + Adding HP)
                    MyClient.SendPacket(General.MyPackets.Vital(UID, 26, GetStat()));//Send the statflag packet
                    World.UpdateSpawn(this);//update the character with new flag.
                }
            }
There you have it!
_______________

I believe that's all, someone test and get back to me.
I hope that doing this super in depth guide will give people some insight...
This goes out to Incariuz mainly for being cool .
_______________

I HAVE NOT TESTED THIS, DONT COMPLAIN, ILL FIX IT IF I MESSED UP.
tao4229 is offline  
Thanks
11 Users
Old 11/30/2008, 07:46   #2
 
sherwin9's Avatar
 
elite*gold: 0
Join Date: Oct 2006
Posts: 222
Received Thanks: 27
Nice

Going to test it soon

Ciao!
sherwin9 is offline  
Thanks
1 User
Old 11/30/2008, 08:42   #3
 
elite*gold: 0
Join Date: Oct 2008
Posts: 430
Received Thanks: 176
Awesome work, love the regen idea, could be a usefull skill for my future classes. I haven't tested yet, but I will in a few hours. If I find any bugs, I'll try and correct them to help save you some time.
Incariuz is offline  
Old 11/30/2008, 11:04   #4
 
elite*gold: 0
Join Date: Feb 2008
Posts: 668
Received Thanks: 160
Were you'f got that skill from?
And what about the Status Effect?
YukiXian is offline  
Old 11/30/2008, 11:55   #5


 
Korvacs's Avatar
 
elite*gold: 20
Join Date: Mar 2006
Posts: 6,126
Received Thanks: 2,518
Very nice work
Korvacs is offline  
Old 11/30/2008, 12:09   #6

 
Kiyono's Avatar
 
elite*gold: 20
Join Date: Jun 2006
Posts: 3,296
Received Thanks: 925
Works great but if you get attacked with the skill activated your HP resets after a hit from a mob other then that good work.
Kiyono is offline  
Old 11/30/2008, 12:29   #7
 
elite*gold: 0
Join Date: Dec 2007
Posts: 618
Received Thanks: 213
nice one! great job...go go buddy!
alexbigfoot is offline  
Old 11/30/2008, 13:09   #8
 
elite*gold: 0
Join Date: Oct 2008
Posts: 342
Received Thanks: 66
Tao i have to thank u alot not 4 the skill .. but 4 the guide now i wont have any probs

Btw if u getting attacked it resets so just add a// save() // with just saves your hp and it should be fixed

And a question.. im a bit dumb i think But how much ms pass till it heals again?
µ~Xero~µ is offline  
Old 11/30/2008, 13:43   #9
 
elite*gold: 0
Join Date: Oct 2008
Posts: 430
Received Thanks: 176
On second thought, won't be trying this till much later then expected. Need a break from coding for a bit. Giving me a headache. ><
Incariuz is offline  
Old 11/30/2008, 13:49   #10
 
© Haydz's Avatar
 
elite*gold: 20
Join Date: Jan 2008
Posts: 1,042
Received Thanks: 252
Really good work tao, also ntlefty or however you spell his name. Now i can play around and add stupid flags to my source LOL...
© Haydz is offline  
Old 11/30/2008, 14:22   #11
 
elite*gold: 0
Join Date: Oct 2008
Posts: 430
Received Thanks: 176
Ok, I couldn't help it, I was too curious so I added it. XD

Everything works perfect, I can't fin an issue with it. I'm not sure what you meant by it resetting Xero. It continue's healing for the alloted xp time, it doesn't reset the timer or anything.
Incariuz is offline  
Old 11/30/2008, 14:22   #12
 
nTL3fTy's Avatar
 
elite*gold: 0
Join Date: Jun 2005
Posts: 692
Received Thanks: 353
I see you finished it, good work.
nTL3fTy is offline  
Old 11/30/2008, 15:18   #13

 
Kiyono's Avatar
 
elite*gold: 20
Join Date: Jun 2006
Posts: 3,296
Received Thanks: 925
So how did you got the MagicType.dat "readable"
Kiyono is offline  
Old 11/30/2008, 15:49   #14
 
elite*gold: 0
Join Date: Feb 2008
Posts: 1,590
Received Thanks: 154
Quote:
Originally Posted by © Haydz View Post
Really good work tao, also ntlefty or however you spell his name. Now i can play around and add stupid flags to my source LOL...
That was teh main point of the guide.
Was going to screw around, I did restore before a different way
1 + 1 = 2 ;D
Quote:
Originally Posted by µ~Xero~µ View Post
Tao i have to thank u alot not 4 the skill .. but 4 the guide now i wont have any probs

Btw if u getting attacked it resets so just add a// save() // with just saves your hp and it should be fixed

And a question.. im a bit dumb i think But how much ms pass till it heals again?
I don't get what you're saying but...
Once I understand it I'll work on it.

The ms delay is the delay of your timer for stamina and everything.(Usually around 500ms i think).

Quote:
Originally Posted by Djago160 View Post
Works great but if you get attacked with the skill activated your HP resets after a hit from a mob other then that good work.
What do you mean the HP Resets?
Quote:
Originally Posted by YukiXian View Post
Were you'f got that skill from?
And what about the Status Effect?
I actually have had that skillID for a while, I seriously guessed that one.
The status effect I just used one that isn't in use already.
tao4229 is offline  
Old 11/30/2008, 16:30   #15
 
Ultimatum's Avatar
 
elite*gold: 0
Join Date: Feb 2008
Posts: 277
Received Thanks: 52
Nice work tao =D
Ultimatum is offline  
Reply


Similar Threads Similar Threads
[GUIDE] How to Skill Guide für alle Klassen (Teil 1/2 Krieger und Ninjas)
06/20/2010 - Metin2 Guides & Templates - 3 Replies
So hier ist mein erster Guide hoffe er gefällt euch 1. Der Krieger 1.1 Der Körper Krieger Die Vorteile des Körper-Kriegers ( KK ) sind Schnelligkeit, und der Dmg den dieser Char reinzimmern kann.
My Client's Help/Guide Menu is empty. How to restore?
01/18/2010 - Dekaron Private Server - 6 Replies
SOLVED ================================================= ========================== Solution - just copy the original client's helpermapping.csv from data/script to your client data/script. It works for me! ================================================= ==========================
[GC PH][Release] 1 hit and HP MP restore when using any potions.. :D
10/27/2009 - Grand Chase Hacks, Bots, Cheats & Exploits - 17 Replies
1 hit and HP MP restore when using any potions.. :D ------------------------------------------------- ------------------------------- I edited this script myself with a help of Brian's and company idea.. I use Craymel's 1 hit pet and yellow lines by Brian.. thanks to them.. Newest script file as of Oct 22 12:02am -Download Link Script.kom : script.kom



All times are GMT +1. The time now is 01:53.


Powered by vBulletin®
Copyright ©2000 - 2025, 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 ©2025 elitepvpers All Rights Reserved.