|
You last visited: Today at 20:31
Advertisement
[REQUEST] an example spell
Discussion on [REQUEST] an example spell within the CO2 Private Server forum part of the Conquer Online 2 category.
06/25/2009, 17:16
|
#1
|
elite*gold: 0
Join Date: Jun 2009
Posts: 33
Received Thanks: 3
|
[REQUEST] an example spell
i honestly do not get at all how to add spells.
can someone please like give me an example skill and how to code it and explain what certain things mean?
|
|
|
06/25/2009, 17:23
|
#2
|
elite*gold: 20
Join Date: Jun 2006
Posts: 3,296
Received Thanks: 925
|
Here is a example of a TwoFoldBlades code:
Code:
case 6000: //TwoFoldBlades
{
Dictionary<int, int> Targets = new Dictionary<int, int>();
int RemainingHP = AttackedMob.CurrentHP;
int Level = AttackSkill.Level;
double ExtPCT = 0;
if (Level == 0)
ExtPCT = 1.10;
if (Level == 1)
ExtPCT = 1.15;
if (Level == 2)
ExtPCT = 1.20;
if (Level == 3)
ExtPCT = 1.25;
if (Level == 4)
ExtPCT = 1.30;
Damage = (int)Math.Floor((Calculation.Damage(Attacker, AttackedMob, 2, 0, 0) * 1.725) * ExtPCT);
bool killed = Calculation.doMonster(AttackedMob, Damage, AType, CSocket);
Targets.Add(AttackedMob.UID, Damage);
ConquerPacket.ToLocal(ConquerPacket.MagicAttack(CSocket.Client.ID, AttackSkill.ID, AttackSkill.Level, Targets, AttackedMob.X, AttackedMob.Y), CSocket.Client.X, CSocket.Client.Y, (int)CSocket.Client.Map, 0, 0);
Targets.Clear();
break;
}
|
|
|
06/25/2009, 17:34
|
#3
|
elite*gold: 0
Join Date: Jun 2009
Posts: 33
Received Thanks: 3
|
Quote:
Originally Posted by Kiyono
Here is a example of a TwoFoldBlades code:
Code:
case 6000: //TwoFoldBlades
{
Dictionary<int, int> Targets = new Dictionary<int, int>();
int RemainingHP = AttackedMob.CurrentHP;
int Level = AttackSkill.Level;
double ExtPCT = 0;
if (Level == 0)
ExtPCT = 1.10;
if (Level == 1)
ExtPCT = 1.15;
if (Level == 2)
ExtPCT = 1.20;
if (Level == 3)
ExtPCT = 1.25;
if (Level == 4)
ExtPCT = 1.30;
Damage = (int)Math.Floor((Calculation.Damage(Attacker, AttackedMob, 2, 0, 0) * 1.725) * ExtPCT);
bool killed = Calculation.doMonster(AttackedMob, Damage, AType, CSocket);
Targets.Add(AttackedMob.UID, Damage);
ConquerPacket.ToLocal(ConquerPacket.MagicAttack(CSocket.Client.ID, AttackSkill.ID, AttackSkill.Level, Targets, AttackedMob.X, AttackedMob.Y), CSocket.Client.X, CSocket.Client.Y, (int)CSocket.Client.Map, 0, 0);
Targets.Clear();
break;
}
|
that helps alot. could you tell me how you can take a percentage of someones hp when they use a skill?
|
|
|
06/25/2009, 21:17
|
#4
|
elite*gold: 0
Join Date: Sep 2007
Posts: 36
Received Thanks: 6
|
Quote:
|
Damage = (int)Math.Floor((Calculation.Damage(Attacker, AttackedMob, 2, 0, 0) * 1.725) * ExtPCT);
|
Not a 100% sure on this, im taking a shot in the dark but this looks Like the Damage.
|
|
|
06/25/2009, 21:46
|
#5
|
elite*gold: 20
Join Date: Jun 2006
Posts: 3,296
Received Thanks: 925
|
Yes that's the damage xD
|
|
|
06/25/2009, 22:29
|
#6
|
elite*gold: 0
Join Date: Aug 2008
Posts: 780
Received Thanks: 255
|
Quote:
Yeah im gonna bet thats the damage lol.. Btw kiyono thanks for the two folds Ill thank you again for it
|
|
|
06/25/2009, 22:40
|
#7
|
elite*gold: 0
Join Date: Jun 2009
Posts: 33
Received Thanks: 3
|
instead of asking for something simple i will ask about this error in general
if something says "<name> doesnt exist in the current context" what would the code be to add in order to fix this?
i have a couple errors with that twinfold code from that
|
|
|
06/25/2009, 23:05
|
#8
|
elite*gold: 20
Join Date: Jun 2006
Posts: 3,296
Received Thanks: 925
|
Well you probably placed this in the wrong place cause I added nothing more and nothing less then what I posted.
|
|
|
06/26/2009, 02:46
|
#9
|
elite*gold: 0
Join Date: Aug 2008
Posts: 780
Received Thanks: 255
|
no code most likely right click the error then see if it has extract method stub or something if it does there you go.. If not then you placed it in wrong.. btw it goes in attack.cs if you didnt know (handlers)
|
|
|
06/26/2009, 04:18
|
#10
|
elite*gold: 0
Join Date: Jun 2009
Posts: 33
Received Thanks: 3
|
i put it in attack.cs, and the extract method sub doesnt work
|
|
|
06/26/2009, 04:22
|
#11
|
elite*gold: 0
Join Date: Mar 2008
Posts: 83
Received Thanks: 10
|
What ist the place for thes speel what cs?
|
|
|
06/26/2009, 05:16
|
#12
|
elite*gold: 0
Join Date: Aug 2008
Posts: 780
Received Thanks: 255
|
Quote:
Originally Posted by dextercsar
What ist the place for thes speel what cs?
|
Go into C# then Handlers/Attack.cs/ then add the code somewhere in the middle or w/e works for you
|
|
|
 |
Similar Threads
|
[Request] All Spell Id's and more!
06/03/2010 - CO2 Private Server - 15 Replies
Guy's i need all spell id's and weapon's if possible
Pleas and Thank you
Plus title say's it all :P
|
[REQUEST]Spell ID
10/26/2009 - CO2 Private Server - 4 Replies
Hello everybody. I looking for a Spell ID.
Thanks for UP :).
|
request gacha spell book hack
10/09/2009 - Grand Chase Philippines - 14 Replies
sana po may makagawa nung hack para dun sa mga spell book, kasi ang hirap hirap at masyadong magastos ang pagkakaroon nung set+pet+spectral mask,
sana po ay may makagawa,
btw, nasa mga KOM files po ba yun at pwede ba ma edit?
sensya na sa pagkanoob ko
tnx
|
request gacha spell book hack
10/06/2009 - Grand Chase Philippines - 1 Replies
sana po may makagawa ng hack kung pwede sa mga spell book, kahit anung form po basta mabawasan lang yung gagastusin para magkaroon ng set, ang laki kasi dapat gastusin pag gus2 ng set+weapon+mask+pet e,
tnx
|
[REQUEST]Skill/Spell ID's
08/16/2009 - CO2 Private Server - 5 Replies
#request close
found my answer
|
All times are GMT +1. The time now is 20:32.
|
|