|
You last visited: Today at 05:14
Advertisement
[HELP]CelestialTao - Just one poblem for release it.
Discussion on [HELP]CelestialTao - Just one poblem for release it. within the CO2 PServer Guides & Releases forum part of the CO2 Private Server category.
08/11/2009, 16:17
|
#1
|
elite*gold: 0
Join Date: Mar 2008
Posts: 27
Received Thanks: 16
|
[HELP]CelestialTao - Just one poblem for release it.
Hi...
Here's the code:
Code:
case 350050:// Reallot Stats
{
if (LinkBack == 0)
{
Text("Reborn players who are level 70 or higher can redistribute their attribute points at the cost of a Dragonball.", CSocket);
Link("I will reallot my points.", 1, CSocket);
Link("Let me think it over.", 225, CSocket);
End(CSocket);
}
else if (LinkBack == 1)
{
if (CSocket.Client.Level >= 70)
{
if (CSocket.Client.Reborn >= 1)
{
int uid = 0;
bool cont = false;
uint Points = 0;
foreach (Struct.ItemInfo Item in CSocket.Client.Inventory.Values)
{
if (Item.ItemID == 1088000)
{
uid = Item.UID;
cont = true;
break;
}
}
if (cont)
{
CSocket.Client.Inventory.Remove(uid);
CSocket.Send(ConquerPacket.ItemUsage(uid, 255, Struct.ItemUsage.RemoveItem));
Database.Database.DeleteItem(uid);
while (!CSocket.Send(ConquerPacket.ItemUsage(uid, 255, Struct.ItemUsage.RemoveItem)))
{
CSocket.Client.Inventory.Remove(uid);
CSocket.Send(ConquerPacket.ItemUsage(uid, 255, Struct.ItemUsage.RemoveItem));
Database.Database.DeleteItem(uid);
}
Points += CSocket.Client.Str;
Points += CSocket.Client.Spi;
Points += CSocket.Client.Dex;
Points += CSocket.Client.Vit;
CSocket.Client.StatPoints += (ushort)Points;
CSocket.Client.Strength = 0;
CSocket.Client.Dexterity = 0;
CSocket.Client.Vitality = 0;
CSocket.Client.Spirit = 0;
CSocket.Send(ConquerPacket.Status(CSocket, 2, CSocket.Client.Dexterity, Struct.StatusTypes.DexterityStatPoints));
CSocket.Send(ConquerPacket.Status(CSocket, 2, CSocket.Client.Spirit, Struct.StatusTypes.ManaStatPoints));
CSocket.Send(ConquerPacket.Status(CSocket, 2, CSocket.Client.Vitality, Struct.StatusTypes.VitalityStatPoints));
CSocket.Send(ConquerPacket.Status(CSocket, 2, CSocket.Client.Strength, Struct.StatusTypes.StrengthStatPoints));
}
else
{
Text("You do not have a DragonBall.", CSocket);
Link("I see.", 225, CSocket);
End(CSocket);
}
}
else
{
Text("You cannot reallot your attribute points if you aren't reborn.", CSocket);
Link("I see.", 225, CSocket);
End(CSocket);
}
}
else
{
Text("You do not have the level.", CSocket);
Link("I see.", 225, CSocket);
End(CSocket);
}
}
break;
}
This code works to a certain part. It redistributes the points, but not add the points redistributed to StatPoints, to be distributed again.
Someone could help?
|
|
|
08/11/2009, 16:49
|
#2
|
elite*gold: 0
Join Date: Jun 2009
Posts: 787
Received Thanks: 314
|
you need to send the status update for stat points as well.
|
|
|
08/11/2009, 17:58
|
#3
|
elite*gold: 0
Join Date: Mar 2008
Posts: 27
Received Thanks: 16
|
Only that does not help.
Putz! I need a help a little more explanatory.
Here he takes all the points and add to variable "Points".
Code:
Points += CSocket.Client.Str;
Points += CSocket.Client.Spi;
Points += CSocket.Client.Dex;
Points += CSocket.Client.Vit;
And here he adds "Points" to "StatPoints" ...
Code:
CSocket.Client.StatPoints += (ushort)Points;
If not ask for much, the help of someone to finish this code
BUT If you do not want help, do not respond.
|
|
|
08/12/2009, 01:56
|
#4
|
elite*gold: 0
Join Date: Apr 2009
Posts: 773
Received Thanks: 441
|
loll... i already post a working realloter... only copy and paste this -.-''
Code:
case 350050:// Reallot Stats
{
if (LinkBack == 0)
{
Text("Reborn players who are level 70 or higher can redistribute their attribute points at the cost of a Dragonball.", CSocket);
Link("I will reallot my points.", 1, CSocket);
Link("Let me think it over.", 225, CSocket);
End(CSocket);
}
else if (LinkBack == 1)
{
if (CSocket.Client.Level >= 70)
{
if (CSocket.Client.Reborn >= 1)
{
int uid = 0;
bool cont = false;
foreach (Struct.ItemInfo Item in CSocket.Client.Inventory.Values)
{
if (Item.ItemID == 1088000)
{
uid = Item.UID;
cont = true;
break;
}
}
if (cont)
{
CSocket.Client.Inventory.Remove(uid);
CSocket.Send(ConquerPacket.ItemUsage(uid, 255, Struct.ItemUsage.RemoveItem));
Database.Database.DeleteItem(uid);
while (!CSocket.Send(ConquerPacket.ItemUsage(uid, 255, Struct.ItemUsage.RemoveItem)))
{
CSocket.Client.Inventory.Remove(uid);
CSocket.Send(ConquerPacket.ItemUsage(uid, 255, Struct.ItemUsage.RemoveItem));
Database.Database.DeleteItem(uid);
}
CSocket.Client.StatPoints += CSocket.Client.Strength;
CSocket.Client.StatPoints += CSocket.Client.Spirit;
CSocket.Client.StatPoints += CSocket.Client.Dexterity;
CSocket.Client.StatPoints += CSocket.Client.Vitality;
CSocket.Client.Strength = 0;
CSocket.Client.Dexterity = 0;
CSocket.Client.Vitality = 0;
CSocket.Client.Spirit = 0;
CSocket.Send(ConquerPacket.Status(CSocket, 2, CSocket.Client.Dexterity, Struct.StatusTypes.DexterityStatPoints));
CSocket.Send(ConquerPacket.Status(CSocket, 2, CSocket.Client.Spirit, Struct.StatusTypes.ManaStatPoints));
CSocket.Send(ConquerPacket.Status(CSocket, 2, CSocket.Client.Vitality, Struct.StatusTypes.VitalityStatPoints));
CSocket.Send(ConquerPacket.Status(CSocket, 2, CSocket.Client.Strength, Struct.StatusTypes.StrengthStatPoints));
CSocket.Disconnect();
}
else
{
Text("You do not have a DragonBall.", CSocket);
Link("I see.", 225, CSocket);
End(CSocket);
}
}
else
{
Text("You cannot reallot your attribute points if you aren't reborn.", CSocket);
Link("I see.", 225, CSocket);
End(CSocket);
}
}
else
{
Text("You do not have the level.", CSocket);
Link("I see.", 225, CSocket);
End(CSocket);
}
}
break;
}
|
|
|
08/12/2009, 03:27
|
#5
|
elite*gold: 0
Join Date: Jan 2007
Posts: 1,034
Received Thanks: 58
|
Quote:
Originally Posted by 12tails
loll... i already post a working realloter... only copy and paste this -.-''
Code:
case 350050:// Reallot Stats
{
if (LinkBack == 0)
{
Text("Reborn players who are level 70 or higher can redistribute their attribute points at the cost of a Dragonball.", CSocket);
Link("I will reallot my points.", 1, CSocket);
Link("Let me think it over.", 225, CSocket);
End(CSocket);
}
else if (LinkBack == 1)
{
if (CSocket.Client.Level >= 70)
{
if (CSocket.Client.Reborn >= 1)
{
int uid = 0;
bool cont = false;
foreach (Struct.ItemInfo Item in CSocket.Client.Inventory.Values)
{
if (Item.ItemID == 1088000)
{
uid = Item.UID;
cont = true;
break;
}
}
if (cont)
{
CSocket.Client.Inventory.Remove(uid);
CSocket.Send(ConquerPacket.ItemUsage(uid, 255, Struct.ItemUsage.RemoveItem));
Database.Database.DeleteItem(uid);
while (!CSocket.Send(ConquerPacket.ItemUsage(uid, 255, Struct.ItemUsage.RemoveItem)))
{
CSocket.Client.Inventory.Remove(uid);
CSocket.Send(ConquerPacket.ItemUsage(uid, 255, Struct.ItemUsage.RemoveItem));
Database.Database.DeleteItem(uid);
}
CSocket.Client.StatPoints += CSocket.Client.Strength;
CSocket.Client.StatPoints += CSocket.Client.Spirit;
CSocket.Client.StatPoints += CSocket.Client.Dexterity;
CSocket.Client.StatPoints += CSocket.Client.Vitality;
CSocket.Client.Strength = 0;
CSocket.Client.Dexterity = 0;
CSocket.Client.Vitality = 0;
CSocket.Client.Spirit = 0;
CSocket.Send(ConquerPacket.Status(CSocket, 2, CSocket.Client.Dexterity, Struct.StatusTypes.DexterityStatPoints));
CSocket.Send(ConquerPacket.Status(CSocket, 2, CSocket.Client.Spirit, Struct.StatusTypes.ManaStatPoints));
CSocket.Send(ConquerPacket.Status(CSocket, 2, CSocket.Client.Vitality, Struct.StatusTypes.VitalityStatPoints));
CSocket.Send(ConquerPacket.Status(CSocket, 2, CSocket.Client.Strength, Struct.StatusTypes.StrengthStatPoints));
CSocket.Disconnect();
}
else
{
Text("You do not have a DragonBall.", CSocket);
Link("I see.", 225, CSocket);
End(CSocket);
}
}
else
{
Text("You cannot reallot your attribute points if you aren't reborn.", CSocket);
Link("I see.", 225, CSocket);
End(CSocket);
}
}
else
{
Text("You do not have the level.", CSocket);
Link("I see.", 225, CSocket);
End(CSocket);
}
}
break;
}
|
Why would you disconnect after realottin?Is there a point? You can just send statpoints packet instead of that...
|
|
|
08/12/2009, 04:37
|
#6
|
elite*gold: 0
Join Date: Apr 2009
Posts: 773
Received Thanks: 441
|
haha... sorry.. forgot to change it.. was only to test if i reallot cause server froze xD my bad!
|
|
|
08/12/2009, 15:19
|
#7
|
elite*gold: 0
Join Date: Mar 2008
Posts: 27
Received Thanks: 16
|
Thanks;
Got my code finished, I sent a packet and operated correctly.
I will release it... And otter code (Fix Stamina) << I got the water skill fixed, but i want now in revive mode normal. :Ð
|
|
|
|
Similar Threads
|
Swsro poblem help plz
07/05/2010 - SRO Private Server - 5 Replies
help with my lvl 70 + blader skill anyone knows how to fix bug
bug attack skill bicheon T_t
plz
|
Ecsro Poblem help
01/22/2010 - SRO Private Server - 3 Replies
I have a problem can one help me
http://www.bilder-hochladen.net/files/thumbs/bda4 -8.png
|
[Navicat Poblem]
10/31/2009 - Metin2 Private Server - 12 Replies
haii ich will auf meinem eigenen p server einen acc erstellen mit hilfe von Navicat
als erstes drücke ich auf Verbindung dann kommt ein 2tes Fenster da wo Hostname/Ip Adresse steht schreibe ich meine Ip adresse rein dannach drücke ich auf OK dann geh ich auf Verbindung öffnen dann kommt das
2003 - can´t connect to MySQL server on´Meine Ip´ (10061)
was mache ich falsch?
Kann mir einer bitte helfen??
|
Poblem beim Patchen
08/20/2009 - S4 League - 4 Replies
Ich habe mein S4 heute gepatched!
Alles lief gut bis folgende Fehlermeldung kam =(
http://img1.myimg.de/Unbenannt3923f_thumb.jpg
Aber da war auch im Frame mit der Werbung nix (also Error 503 Server nich erreichbar) klang logisch dass dann auch das Update für den Reporter nich erreichbar is!
Aber auf dem Foto sieht man, bei einem neuen Versuch bei dem ich die Verbindung hatte hats auch nich geklappt =(
Ich frage mich ob er mir Copy Copy vom Server oder aus Directory mein, dann kann es ja...
|
[Release] ReallotPoints / CelestialTao [CoEmu]
08/12/2009 - CO2 PServer Guides & Releases - 1 Replies
Thanks to everyone who helped me.
It's for COEMU
Place this code in NPCTalk.cs
case 350050:// Reallot Stats
{
if (LinkBack == 0)
{
Text("Reborn players who are level 70 or higher can redistribute their attribute points at the cost of a Dragonball.", CSocket);
|
All times are GMT +2. The time now is 05:14.
|
|