|
You last visited: Today at 03:43
Advertisement
Guide/Release: Conquer Server (CoFuture) Using MySql!
Discussion on Guide/Release: Conquer Server (CoFuture) Using MySql! within the CO2 PServer Guides & Releases forum part of the CO2 Private Server category.
03/24/2008, 19:52
|
#616
|
elite*gold: 20
Join Date: Mar 2006
Posts: 6,126
Received Thanks: 2,518
|
you would need to adapt the magicattack.cs file
|
|
|
03/24/2008, 20:53
|
#617
|
elite*gold: 20
Join Date: Jun 2006
Posts: 3,296
Received Thanks: 925
|
Quote:
Originally Posted by Korvacs
you would need to adapt the magicattack.cs file
|
thanks and i have another question i wanted to learn C# to atleast understand how the server works but there so many tutorials do can you recomend me one?
|
|
|
03/24/2008, 23:07
|
#618
|
elite*gold: 0
Join Date: Mar 2007
Posts: 187
Received Thanks: 67
|
How come i cant import the data base where can i get script?all i see is scripts
|
|
|
03/24/2008, 23:41
|
#619
|
elite*gold: 0
Join Date: Mar 2007
Posts: 187
Received Thanks: 67
|
omg im on step 2 or 3 i forget lawl but anyways i cant import the Db cuz sum errorcomes up how do i import the script??of SQL
|
|
|
03/25/2008, 03:53
|
#620
|
elite*gold: 0
Join Date: Jul 2007
Posts: 10
Received Thanks: 0
|
I am on step 2 or 3 I think and I cant import database because I get a stupid error and I don't know how to import scripts. How can i get the database?
|
|
|
03/25/2008, 16:25
|
#621
|
elite*gold: 20
Join Date: Jun 2006
Posts: 3,296
Received Thanks: 925
|
i can't seem to figure out how to at something like fastblade i have it based on a mana spell
else if (Skill[0] == 1145 && SpellID == 1145)
{
switch (Skill[1])
{
case 0:
BaseDmg = Weapon;
ManaUse = 20;
break;
case 1:
BaseDmg = Weapon;
ManaUse = 20;
break;
case 2:
BaseDmg = Weapon;
ManaUse = 20;
break;
case 3:
BaseDmg = Weapon;
ManaUse = 20;
break;
case 4:
BaseDmg = Weapon;
ManaUse = 20;
break;
}
Chance = 100;
Targets = new Target[1];
Targets[0] = new Target();
SendAttack(Skill, Client, Target);
RemoveStamina(Client, StaminaUse);
break;
}
probably full of errors and not close to working oh well just tried the easiest
|
|
|
03/25/2008, 21:20
|
#622
|
elite*gold: 20
Join Date: Jun 2006
Posts: 3,296
Received Thanks: 925
|
Quote:
Originally Posted by Korvacs
if you take a look at the way the other spells are coded they are setup to only attack 1 player, however you can adapt it and add more targets to the array and attack multiple players, but i think it would get abit complicated,
i didnt even think about area skills and multiple target spells when i was working on that source
|
so randomly putting area skills in the list is not gonne work right
and you have :
//Self
xp skills
//Player not self
mana skills
//Monster
summon spells?
//AOE
no idea weapen skills?
so what skills do i put under //monster and AOE
cause i just sorted out all the spells and now i don't know what to put where
|
|
|
03/25/2008, 22:17
|
#623
|
elite*gold: 0
Join Date: Mar 2007
Posts: 187
Received Thanks: 67
|
I am on step 2 or 3 I think and I cant import database because I get a stupid error and I don't know how to import scripts. How can i get the database?
|
|
|
03/26/2008, 11:34
|
#624
|
elite*gold: 20
Join Date: Mar 2006
Posts: 6,126
Received Thanks: 2,518
|
Quote:
Originally Posted by Djago160
so randomly putting area skills in the list is not gonne work right
and you have :
//Self
xp skills
//Player not self
mana skills
//Monster
summon spells?
//AOE
no idea weapen skills?
so what skills do i put under //monster and AOE
cause i just sorted out all the spells and now i don't know what to put where
|
no err, those catergories are based upon the incomming userid, if its your ID then you are casting a spell on yourself, this system is badly designed btw :P
So self = your id
player not self = any otherplayer
monster = monster
and AOE = area of effect spell, for multiple targets,
back then my theory was that if you attack with firecircle or something similar it wouldnt send a specific userID as the target, however i never confirmed this as i said, so you would need to run the source in debug mode add a break point near the top after its decoded everything and then see whats in a packet for fastblade, that is if its even a magic attack packet
|
|
|
03/26/2008, 17:11
|
#625
|
elite*gold: 20
Join Date: Jun 2006
Posts: 3,296
Received Thanks: 925
|
Quote:
Originally Posted by Korvacs
no err, those catergories are based upon the incomming userid, if its your ID then you are casting a spell on yourself, this system is badly designed btw :P
So self = your id
player not self = any otherplayer
monster = monster
and AOE = area of effect spell, for multiple targets,
back then my theory was that if you attack with firecircle or something similar it wouldnt send a specific userID as the target, however i never confirmed this as i said, so you would need to run the source in debug mode add a break point near the top after its decoded everything and then see whats in a packet for fastblade, that is if its even a magic attack packet
|
doesn't matter is its designed badly as long as it works^^
ok but almost every skill can also be used against monsters...and fastblade uses weapon damage so how would you do that and here is apart of my magicatack.cs:
Code:
using System;
using System.Collections;
using System.Collections.Generic;
using System.Text;
using System.Timers;
using COServer.Network.Packet;
namespace COServer.GamePacketsIncomming
{
public class MagicAttack : GameBasePacket
{
private int SpellID;
private int SpellLevel;
private int TargetID;
private int TimeStamp;
private int CharID;
private int Attack;
private int BaseDmg = 0;
private int Amount = 0;
private double Bless = 1;
private double PlusDef = 0;
private double Defense = 1;
private double FinalDmg = 0;
private int ManaUse = 0;
private int StamUse = 0;
private int Chance = 0;
private COClient Client;
private COClient Target;
private Location TargetLoc;
private Target[] Targets;
private ConquerPacket CPacket = new ConquerPacket();
private Random RND = new Random();
public MagicAttack(byte[] data, COClient _Client)
{
Client = _Client;
TimeStamp = (data[7] << 24) + (data[6] << 16) + (data[5] << 8) + (data[4]);
CharID = (data[11] << 24) + (data[10] << 16) + (data[9] << 8) + (data[8]);
GetSpellID(data[24], data[25]);
GetTargetID(data[12], data[13], data[14], data[15]);
GetTargetLoc(data[16], data[17], data[18], data[19]);
//int PacketType = (data[23] << 24) + (data[22] << 16) + (data[21] << 8) + (data[20]);
GetSpellLevel(data[26], data[27]);
Target = Spawn.LookUpChar(TargetID);
if (Client.Char.IsGhost == true)
{
Client.SendData(CPacket.Chat(Client.MessageID, "SYSTEM", Client.Char.Name, "You are already dead!", ChatType.Top));
return;
}
else if (Target.Char.Invincible == true)
{
return;
}
else if (Target.Char.IsGhost == true)
{
Client.SendData(CPacket.Chat(Client.MessageID, "SYSTEM", Client.Char.Name, "The target is already dead!", ChatType.Top));
return;
}
else if (TargetID == Client.Char.CharID)
{
//Self
foreach (int[] Skill in Client.Char.Skills)
{
if (Skill != null)
{
if (Skill[0] == 1025 && SpellID == 1025)
{
if (Client.Char.XpSkill == 0)
{
Client.Char.XpSkill = SpellID;
Client.Char.Status += (int)(CharStatus.Supermaan);
Client.Char.Status -= (int)(CharStatus.XPList);
Client.Char.XpListCounter = 0;
Client.Char.XpCounter = 20;
Client.Char.XpList = false;
Client.SendData(CPacket.Status(Client.Char, 1, Client.Char.Status, StatusTypes.StatusEffect));
Client.SendData(CPacket.Status(Client.Char, 1, Client.Char.XpCounter, StatusTypes.XpTimer));
}
else if (Client.Char.XpSkill == 1025)
{
Client.Char.Status -= (int)(CharStatus.XPList);
Client.Char.XpListCounter = 0;
Client.Char.XpCounter += 20;
Client.Char.XpList = false;
Client.SendData(CPacket.Status(Client.Char, 1, Client.Char.Status, StatusTypes.StatusEffect));
Client.SendData(CPacket.Status(Client.Char, 1, Client.Char.XpCounter, StatusTypes.XpTimer));
}
}
if (Skill[0] == 1110 && SpellID == 1110)
{
if (Client.Char.XpSkill == 0)
{
Client.Char.XpSkill = SpellID;
Client.Char.Status += (int)(CharStatus.Cyclone);
Client.Char.Status -= (int)(CharStatus.XPList);
Client.Char.XpListCounter = 0;
Client.Char.XpCounter = 20;
Client.Char.XpList = false;
Client.SendData(CPacket.Status(Client.Char, 1, Client.Char.Status, StatusTypes.StatusEffect));
Client.SendData(CPacket.Status(Client.Char, 1, Client.Char.XpCounter, StatusTypes.XpTimer));
}
else if (Client.Char.XpSkill == 1110)
{
Client.Char.Status -= (int)(CharStatus.XPList);
Client.Char.XpListCounter = 0;
Client.Char.XpCounter += 20;
Client.Char.XpList = false;
Client.SendData(CPacket.Status(Client.Char, 1, Client.Char.Status, StatusTypes.StatusEffect));
Client.SendData(CPacket.Status(Client.Char, 1, Client.Char.XpCounter, StatusTypes.XpTimer));
}
}
Spawn.UpdateLocal(Client, CPacket.Status(Client.Char, 1, Client.Char.Status, StatusTypes.StatusEffect));
}
}
}
else if (TargetID >= 1000000)
{
//Player not self
foreach (int[] Skill in Client.Char.Skills)
{
if (Skill != null)
{
if (Skill[0] == 1000 && SpellID == 1000)
{
switch (Skill[1])
{
case 0:
BaseDmg = 7;
ManaUse = 1;
break;
case 1:
BaseDmg = 16;
ManaUse = 6;
break;
case 2:
BaseDmg = 32;
ManaUse = 10;
break;
case 3:
BaseDmg = 57;
ManaUse = 11;
break;
case 4:
BaseDmg = 86;
ManaUse = 17;
break;
}
Chance = 100;
Targets = new Target[1];
Targets[0] = new Target();
SendAttack(Skill, Client, Target);
RemoveMana(Client, ManaUse);
break;
}
else if (Skill[0] == 1001 && SpellID == 1001)
{
switch (Skill[1])
{
case 0:
BaseDmg = 130;
ManaUse = 21;
break;
case 1:
BaseDmg = 189;
ManaUse = 21;
break;
case 2:
BaseDmg = 275;
ManaUse = 28;
break;
case 3:
BaseDmg = 380;
ManaUse = 32;
break;
}
Chance = 100;
Targets = new Target[1];
Targets[0] = new Target();
SendAttack(Skill, Client, Target);
RemoveMana(Client, ManaUse);
break;
}
else if (Skill[0] == 1002 && SpellID == 1002)
{
switch (Skill[1])
{
case 0:
BaseDmg = 505;
ManaUse = 32;
break;
case 1:
BaseDmg = 666;
ManaUse = 36;
break;
case 2:
BaseDmg = 882;
ManaUse = 50;
break;
case 3:
BaseDmg = 1166;
ManaUse = 64;
break;
}
Chance = 100;
Targets = new Target[1];
Targets[0] = new Target();
SendAttack(Skill, Client, Target);
RemoveMana(Client, ManaUse);
break;
}
else if (Skill[0] == 1045 && SpellID == 1045)
{
switch (Skill[1])
{
case 0:
BaseDmg = 1000;
StamUse = 10;
break;
case 1:
BaseDmg = 1500;
StamUse = 10;
break;
case 2:
BaseDmg = 2000;
StamUse = 10;
break;
case 3:
BaseDmg = 2500;
StamUse = 10;
break;
}
Chance = 100;
Targets = new Target[1];
Targets[0] = new Target();
SendAttack(Skill, Client, Target);
RemoveStamina(Client, StamUse);
break;
}
else if (Skill[0] == 1150 && SpellID == 1150)
{
switch (Skill[1])
{
case 0:
BaseDmg = 378;
ManaUse = 33;
break;
case 1:
BaseDmg = 550;
ManaUse = 33;
break;
case 2:
BaseDmg = 760;
ManaUse = 46;
break;
case 3:
BaseDmg = 1010;
ManaUse = 53;
break;
case 4:
BaseDmg = 1332;
ManaUse = 53;
break;
case 5:
BaseDmg = 1764;
ManaUse = 60;
break;
case 6:
BaseDmg = 2332;
ManaUse = 82;
break;
case 7:
BaseDmg = 2800;
ManaUse = 105;
break;
}
Chance = 80;
Targets = new Target[1];
Targets[0] = new Target();
SendAttack(Skill, Client, Target);
RemoveMana(Client, ManaUse);
break;
}
else if (Skill[0] == 1160 && SpellID == 1160)
{
switch (Skill[1])
{
case 0:
BaseDmg = 855;
ManaUse = 53;
break;
case 1:
BaseDmg = 1498;
ManaUse = 60;
break;
case 2:
BaseDmg = 1985;
ManaUse = 82;
break;
case 3:
BaseDmg = 2623;
ManaUse = 105;
break;
}
Chance = 80;
Targets = new Target[1];
Targets[0] = new Target();
SendAttack(Skill, Client, Target);
RemoveMana(Client, ManaUse);
break;
}
else if (Skill[0] == 1180 && SpellID == 1180)
{
switch (Skill[1])
{
case 0:
BaseDmg = 760;
ManaUse = 62;
Chance = 40;
break;
case 1:
BaseDmg = 1040;
ManaUse = 74;
Chance = 43;
break;
case 2:
BaseDmg = 1250;
ManaUse = 115;
Chance = 50;
break;
case 3:
BaseDmg = 1480;
ManaUse = 130;
Chance = 55;
break;
case 4:
BaseDmg = 1810;
ManaUse = 150;
Chance = 60;
break;
case 5:
BaseDmg = 2210;
ManaUse = 215;
Chance = 65;
break;
case 6:
BaseDmg = 2700;
ManaUse = 285;
Chance = 70;
break;
case 7:
BaseDmg = 3250;
ManaUse = 300;
Chance = 75;
break;
}
Targets = new Target[1];
Targets[0] = new Target();
SendAttack(Skill, Client, Target);
RemoveMana(Client, ManaUse);
break;
}
else
{
Console.WriteLine(CharID + " Is Attacking " + TargetID + " With Skill " + SpellID + " Which Is Level " + SpellLevel);
}
}
}
}
else if (TargetID != 0)
{
//Monster
}
else
{
//AOE
foreach (int[] Skill in Client.Char.Skills)
{
if (Skill != null)
{
if (Skill[0] == 1120 && SpellID == 1120)
{
switch (Skill[1])
{
case 0:
BaseDmg = 540;
ManaUse = 150;
break;
case 1:
BaseDmg = 650;
ManaUse = 170;
break;
case 2:
BaseDmg = 720;
ManaUse = 190;
break;
case 3:
BaseDmg = 770;
ManaUse = 210;
break;
}
Chance = 100;
Targets = new Target[1];
Targets[0] = new Target();
SendAttack(Skill, Client, Target);
RemoveMana(Client, ManaUse);
break;
}
else if (Skill[0] == 1165 && SpellID == 1165)
{
switch (Skill[1])
{
case 0:
BaseDmg = 120;
ManaUse = 180;
break;
case 1:
BaseDmg = 240;
ManaUse = 150;
break;
case 2:
BaseDmg = 310;
ManaUse = 180;
break;
case 3:
BaseDmg = 400;
ManaUse = 210;
break;
}
Chance = 100;
Targets = new Target[1];
Targets[0] = new Target();
SendAttack(Skill, Client, Target);
RemoveMana(Client, ManaUse);
break;
}
else
{
Console.WriteLine(CharID + " Is Attacking " + TargetID + " With Skill " + SpellID + " Which Is Level " + SpellLevel);
}
}
}
}
}
public void RemoveMana(COClient Client, int Mana)
{
Client.Char.CurrentMana -= Mana;
Client.SendData(CPacket.Status(Client.Char, 1, Client.Char.CurrentMana, StatusTypes.Mp));
}
public void RemoveStamina(COClient Client, int Stamina)
{
Client.Char.CurrentStam -= Stamina;
Client.SendData(CPacket.Status(Client.Char, 1, Client.Char.CurrentStam, StatusTypes.Stamina));
}
public void SendAttack(int[] Skill, COClient Client, COClient Target)
{
and how does the server knows which skill ID is what spell...
how does the skill command works cause it seems to do nothing...
but basicly what you are saying is that i need to learn C#...
[edit] i just read a other topic and you said this source was full of bugs etc. so how big is the chance to get this working
|
|
|
03/27/2008, 06:21
|
#626
|
elite*gold: 0
Join Date: Aug 2005
Posts: 9
Received Thanks: 0
|
yotop456 plz rebuild mine... cuz im using C# 2008 and i can't rebuild it...
root
g0odn3ss
conquer_server
thnx in advance!! oww btw thnx to ppl that helps in solving some problems... and tnx leavemealone ^_^
|
|
|
03/28/2008, 02:14
|
#627
|
elite*gold: 0
Join Date: Jan 2007
Posts: 1,034
Received Thanks: 58
|
If u cant REbuild it go to the line thers error And u will see map.revpoint)
And edit it to Cofuture.map.revpoint
Shud rebuild succesfully
|
|
|
03/28/2008, 11:32
|
#628
|
elite*gold: 20
Join Date: Mar 2006
Posts: 6,126
Received Thanks: 2,518
|
right click on the "Map/Maps" error and click refactor, then rename it to GameMap or something to that effect,
seriously if you guys could be bothered to atually read this thread you would see that this has been mentioned before and that the fix has been posted before,
learn to read ffs
|
|
|
03/28/2008, 13:43
|
#629
|
elite*gold: 20
Join Date: Jun 2006
Posts: 3,296
Received Thanks: 925
|
Quote:
Originally Posted by Djago160
doesn't matter is its designed badly as long as it works^^
ok but almost every skill can also be used against monsters...and fastblade uses weapon damage so how would you do that and here is apart of my magicatack.cs:
Code:
using System;
using System.Collections;
using System.Collections.Generic;
using System.Text;
using System.Timers;
using COServer.Network.Packet;
namespace COServer.GamePacketsIncomming
{
public class MagicAttack : GameBasePacket
{
private int SpellID;
private int SpellLevel;
private int TargetID;
private int TimeStamp;
private int CharID;
private int Attack;
private int BaseDmg = 0;
private int Amount = 0;
private double Bless = 1;
private double PlusDef = 0;
private double Defense = 1;
private double FinalDmg = 0;
private int ManaUse = 0;
private int StamUse = 0;
private int Chance = 0;
private COClient Client;
private COClient Target;
private Location TargetLoc;
private Target[] Targets;
private ConquerPacket CPacket = new ConquerPacket();
private Random RND = new Random();
public MagicAttack(byte[] data, COClient _Client)
{
Client = _Client;
TimeStamp = (data[7] << 24) + (data[6] << 16) + (data[5] << 8) + (data[4]);
CharID = (data[11] << 24) + (data[10] << 16) + (data[9] << 8) + (data[8]);
GetSpellID(data[24], data[25]);
GetTargetID(data[12], data[13], data[14], data[15]);
GetTargetLoc(data[16], data[17], data[18], data[19]);
//int PacketType = (data[23] << 24) + (data[22] << 16) + (data[21] << 8) + (data[20]);
GetSpellLevel(data[26], data[27]);
Target = Spawn.LookUpChar(TargetID);
if (Client.Char.IsGhost == true)
{
Client.SendData(CPacket.Chat(Client.MessageID, "SYSTEM", Client.Char.Name, "You are already dead!", ChatType.Top));
return;
}
else if (Target.Char.Invincible == true)
{
return;
}
else if (Target.Char.IsGhost == true)
{
Client.SendData(CPacket.Chat(Client.MessageID, "SYSTEM", Client.Char.Name, "The target is already dead!", ChatType.Top));
return;
}
else if (TargetID == Client.Char.CharID)
{
//Self
foreach (int[] Skill in Client.Char.Skills)
{
if (Skill != null)
{
if (Skill[0] == 1025 && SpellID == 1025)
{
if (Client.Char.XpSkill == 0)
{
Client.Char.XpSkill = SpellID;
Client.Char.Status += (int)(CharStatus.Supermaan);
Client.Char.Status -= (int)(CharStatus.XPList);
Client.Char.XpListCounter = 0;
Client.Char.XpCounter = 20;
Client.Char.XpList = false;
Client.SendData(CPacket.Status(Client.Char, 1, Client.Char.Status, StatusTypes.StatusEffect));
Client.SendData(CPacket.Status(Client.Char, 1, Client.Char.XpCounter, StatusTypes.XpTimer));
}
else if (Client.Char.XpSkill == 1025)
{
Client.Char.Status -= (int)(CharStatus.XPList);
Client.Char.XpListCounter = 0;
Client.Char.XpCounter += 20;
Client.Char.XpList = false;
Client.SendData(CPacket.Status(Client.Char, 1, Client.Char.Status, StatusTypes.StatusEffect));
Client.SendData(CPacket.Status(Client.Char, 1, Client.Char.XpCounter, StatusTypes.XpTimer));
}
}
if (Skill[0] == 1110 && SpellID == 1110)
{
if (Client.Char.XpSkill == 0)
{
Client.Char.XpSkill = SpellID;
Client.Char.Status += (int)(CharStatus.Cyclone);
Client.Char.Status -= (int)(CharStatus.XPList);
Client.Char.XpListCounter = 0;
Client.Char.XpCounter = 20;
Client.Char.XpList = false;
Client.SendData(CPacket.Status(Client.Char, 1, Client.Char.Status, StatusTypes.StatusEffect));
Client.SendData(CPacket.Status(Client.Char, 1, Client.Char.XpCounter, StatusTypes.XpTimer));
}
else if (Client.Char.XpSkill == 1110)
{
Client.Char.Status -= (int)(CharStatus.XPList);
Client.Char.XpListCounter = 0;
Client.Char.XpCounter += 20;
Client.Char.XpList = false;
Client.SendData(CPacket.Status(Client.Char, 1, Client.Char.Status, StatusTypes.StatusEffect));
Client.SendData(CPacket.Status(Client.Char, 1, Client.Char.XpCounter, StatusTypes.XpTimer));
}
}
Spawn.UpdateLocal(Client, CPacket.Status(Client.Char, 1, Client.Char.Status, StatusTypes.StatusEffect));
}
}
}
else if (TargetID >= 1000000)
{
//Player not self
foreach (int[] Skill in Client.Char.Skills)
{
if (Skill != null)
{
if (Skill[0] == 1000 && SpellID == 1000)
{
switch (Skill[1])
{
case 0:
BaseDmg = 7;
ManaUse = 1;
break;
case 1:
BaseDmg = 16;
ManaUse = 6;
break;
case 2:
BaseDmg = 32;
ManaUse = 10;
break;
case 3:
BaseDmg = 57;
ManaUse = 11;
break;
case 4:
BaseDmg = 86;
ManaUse = 17;
break;
}
Chance = 100;
Targets = new Target[1];
Targets[0] = new Target();
SendAttack(Skill, Client, Target);
RemoveMana(Client, ManaUse);
break;
}
else if (Skill[0] == 1001 && SpellID == 1001)
{
switch (Skill[1])
{
case 0:
BaseDmg = 130;
ManaUse = 21;
break;
case 1:
BaseDmg = 189;
ManaUse = 21;
break;
case 2:
BaseDmg = 275;
ManaUse = 28;
break;
case 3:
BaseDmg = 380;
ManaUse = 32;
break;
}
Chance = 100;
Targets = new Target[1];
Targets[0] = new Target();
SendAttack(Skill, Client, Target);
RemoveMana(Client, ManaUse);
break;
}
else if (Skill[0] == 1002 && SpellID == 1002)
{
switch (Skill[1])
{
case 0:
BaseDmg = 505;
ManaUse = 32;
break;
case 1:
BaseDmg = 666;
ManaUse = 36;
break;
case 2:
BaseDmg = 882;
ManaUse = 50;
break;
case 3:
BaseDmg = 1166;
ManaUse = 64;
break;
}
Chance = 100;
Targets = new Target[1];
Targets[0] = new Target();
SendAttack(Skill, Client, Target);
RemoveMana(Client, ManaUse);
break;
}
else if (Skill[0] == 1045 && SpellID == 1045)
{
switch (Skill[1])
{
case 0:
BaseDmg = 1000;
StamUse = 10;
break;
case 1:
BaseDmg = 1500;
StamUse = 10;
break;
case 2:
BaseDmg = 2000;
StamUse = 10;
break;
case 3:
BaseDmg = 2500;
StamUse = 10;
break;
}
Chance = 100;
Targets = new Target[1];
Targets[0] = new Target();
SendAttack(Skill, Client, Target);
RemoveStamina(Client, StamUse);
break;
}
else if (Skill[0] == 1150 && SpellID == 1150)
{
switch (Skill[1])
{
case 0:
BaseDmg = 378;
ManaUse = 33;
break;
case 1:
BaseDmg = 550;
ManaUse = 33;
break;
case 2:
BaseDmg = 760;
ManaUse = 46;
break;
case 3:
BaseDmg = 1010;
ManaUse = 53;
break;
case 4:
BaseDmg = 1332;
ManaUse = 53;
break;
case 5:
BaseDmg = 1764;
ManaUse = 60;
break;
case 6:
BaseDmg = 2332;
ManaUse = 82;
break;
case 7:
BaseDmg = 2800;
ManaUse = 105;
break;
}
Chance = 80;
Targets = new Target[1];
Targets[0] = new Target();
SendAttack(Skill, Client, Target);
RemoveMana(Client, ManaUse);
break;
}
else if (Skill[0] == 1160 && SpellID == 1160)
{
switch (Skill[1])
{
case 0:
BaseDmg = 855;
ManaUse = 53;
break;
case 1:
BaseDmg = 1498;
ManaUse = 60;
break;
case 2:
BaseDmg = 1985;
ManaUse = 82;
break;
case 3:
BaseDmg = 2623;
ManaUse = 105;
break;
}
Chance = 80;
Targets = new Target[1];
Targets[0] = new Target();
SendAttack(Skill, Client, Target);
RemoveMana(Client, ManaUse);
break;
}
else if (Skill[0] == 1180 && SpellID == 1180)
{
switch (Skill[1])
{
case 0:
BaseDmg = 760;
ManaUse = 62;
Chance = 40;
break;
case 1:
BaseDmg = 1040;
ManaUse = 74;
Chance = 43;
break;
case 2:
BaseDmg = 1250;
ManaUse = 115;
Chance = 50;
break;
case 3:
BaseDmg = 1480;
ManaUse = 130;
Chance = 55;
break;
case 4:
BaseDmg = 1810;
ManaUse = 150;
Chance = 60;
break;
case 5:
BaseDmg = 2210;
ManaUse = 215;
Chance = 65;
break;
case 6:
BaseDmg = 2700;
ManaUse = 285;
Chance = 70;
break;
case 7:
BaseDmg = 3250;
ManaUse = 300;
Chance = 75;
break;
}
Targets = new Target[1];
Targets[0] = new Target();
SendAttack(Skill, Client, Target);
RemoveMana(Client, ManaUse);
break;
}
else
{
Console.WriteLine(CharID + " Is Attacking " + TargetID + " With Skill " + SpellID + " Which Is Level " + SpellLevel);
}
}
}
}
else if (TargetID != 0)
{
//Monster
}
else
{
//AOE
foreach (int[] Skill in Client.Char.Skills)
{
if (Skill != null)
{
if (Skill[0] == 1120 && SpellID == 1120)
{
switch (Skill[1])
{
case 0:
BaseDmg = 540;
ManaUse = 150;
break;
case 1:
BaseDmg = 650;
ManaUse = 170;
break;
case 2:
BaseDmg = 720;
ManaUse = 190;
break;
case 3:
BaseDmg = 770;
ManaUse = 210;
break;
}
Chance = 100;
Targets = new Target[1];
Targets[0] = new Target();
SendAttack(Skill, Client, Target);
RemoveMana(Client, ManaUse);
break;
}
else if (Skill[0] == 1165 && SpellID == 1165)
{
switch (Skill[1])
{
case 0:
BaseDmg = 120;
ManaUse = 180;
break;
case 1:
BaseDmg = 240;
ManaUse = 150;
break;
case 2:
BaseDmg = 310;
ManaUse = 180;
break;
case 3:
BaseDmg = 400;
ManaUse = 210;
break;
}
Chance = 100;
Targets = new Target[1];
Targets[0] = new Target();
SendAttack(Skill, Client, Target);
RemoveMana(Client, ManaUse);
break;
}
else
{
Console.WriteLine(CharID + " Is Attacking " + TargetID + " With Skill " + SpellID + " Which Is Level " + SpellLevel);
}
}
}
}
}
public void RemoveMana(COClient Client, int Mana)
{
Client.Char.CurrentMana -= Mana;
Client.SendData(CPacket.Status(Client.Char, 1, Client.Char.CurrentMana, StatusTypes.Mp));
}
public void RemoveStamina(COClient Client, int Stamina)
{
Client.Char.CurrentStam -= Stamina;
Client.SendData(CPacket.Status(Client.Char, 1, Client.Char.CurrentStam, StatusTypes.Stamina));
}
public void SendAttack(int[] Skill, COClient Client, COClient Target)
{
and how does the server knows which skill ID is what spell...
how does the skill command works cause it seems to do nothing...
but basicly what you are saying is that i need to learn C#...
[edit] i just read a other topic and you said this source was full of bugs etc. so how big is the chance to get this working
|
i still need to know how to use the /spell command
|
|
|
03/28/2008, 17:28
|
#630
|
elite*gold: 0
Join Date: Oct 2005
Posts: 31
Received Thanks: 1
|
does any1 know witch is the packet number for monster spawn? like <Type(2030);>????
a help wold be good
P.s. i made a script for avatar npc (not perfect)
if u can inprove it do it and post it :P
in PacketHandler look for "case 142: //Set Avatar"
this is my code:
case 142: //Set Avatar
{
//Client.Char.Money -= 500;
//Client.SendData(CPacket.Status(Client.Char, 1, Client.Char.Money, StatusTypes.InvMoney));
//Database.UpdateCharMoney(Client);
Client.Char.Model = (data[12] * 10000) + 1003;
Client.SendData(CPacket.Status(Client.Char, 1, Client.Char.Model, StatusTypes.Model));
//Database.UpdateClientsCharacter(Client);
Spawn.UpdateLocal(Client, CPacket.SpawnChar(Client.Char));
break;
}
|
|
|
 |
|
Similar Threads
|
[Guide]cofuture source
06/11/2011 - CO2 PServer Guides & Releases - 91 Replies
hi guys am new here and i hope stay here for long time
------------
i make this guide Couz i found alot pll cant work with cofuture source
---------------
Coder source:future <<<Thanks to hime 1st
helping me:haydeZ<<<<Thanks to hime 2nd
---------------------------------------
What we are need?
1:cofuture source>>>Download Here
2:AppServ(MySQL, Apache, and PhpMyAdmin all in one)>>>>AppServNetwork
|
[Request]Conquer Server (CoFuture) Using MySql
06/25/2008 - Conquer Online 2 - 2 Replies
hey I want to get the Conquer Server (CoFuture) Using MySql Source but all links down Can someone add it on rapidshare? or other Site?
thank you if you up it in a site
ps:sorry for my bad english :)
|
Need help Guide/Release: Conquer Server (CoFuture) Using MySql!
05/28/2008 - Conquer Online 2 - 1 Replies
Hello i tryed that Guide/Release: Conquer Server (CoFuture) Using MySql!
But it don't work i can't do that phpmyadmin think anyone can help me the language is german but i wanted to change it to english but idk how.
If anyone got Teamviewer or somethink like that would be nice
greetz
|
All times are GMT +1. The time now is 03:44.
|
|