|
You last visited: Today at 15:33
Advertisement
[Release] VIP Level (CoEmu v2)
Discussion on [Release] VIP Level (CoEmu v2) within the CO2 PServer Guides & Releases forum part of the CO2 Private Server category.
12/06/2009, 20:03
|
#1
|
elite*gold: 0
Join Date: Apr 2009
Posts: 782
Received Thanks: 458
|
[Release] VIP Level (CoEmu v2)
hi hi!!
i was doing it... very easy but let's release it : D
first add this at Character.cs:
Code:
public byte VipLevel = 0;
then go into Sctrucs, and open StatusType.cs and add this:
now create a new class named VipLevel.cs:
Code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using CoEmu_v2_GameServer.Entities;
using CoEmu_v2_GameServer.Connections;
using CoEmu_v2_GameServer.Structs;
using CoEmu_v2_GameServer.Packets;
using System.Timers;
namespace CoEmu_v2_GameServer.Handlers
{
public partial class Handler
{
public static byte VipLevel2(byte viplevel, ClientSocket CSocket)
{
try
{
CSocket.Send(ConquerPacket.Status(CSocket.Client.ID, 2, viplevel, Struct.StatusTypes.VIPLevel));
}
catch { }
return viplevel;
}
}
}
now go into packet processor and find case 1052: (login packet)
and find this:
Code:
CSocket.Send(ConquerPacket.CharacterInfo(CSocket));
after it add:
Code:
Handler.VipLevel2(CSocket.Client.VipLevel, CSocket);
and now for the vip warehouse add this at NpcTalk.cs:
Code:
#region VIP Warehouse
case 12:
{
if (LinkBack == 0 || LinkBack == 1)
{
CSocket.Send(ConquerPacket.General(CSocket.Client.ID, 341, 0, 0, 0, 0, (Struct.DataType)0x7e));
}
break;
}
#endregion
// EDIT FORGOT ONE THING :X
add this at GetCharacter:
Code:
Client.VipLevel = Convert.ToByte(DR["VIP"]);
and make a new field for VIP:
Code:
Field: VIP
Lenght: 2
Type: int
Default: 0
//
this will save your VIP Level... so just add it on Database.cs
Code:
public static void UpdateVIP(ClientSocket CSocket)
{
lock (DatabaseConnection.Connection)
{
MySqlCommand Cmd = new MySqlCommand("UPDATE `characters` SET `VIP` = " + CSocket.Client.VipLevel + " WHERE `CharID` = " + CSocket.Client.ID + "", DatabaseConnection.Connection);
Cmd.ExecuteNonQuery();
}
}
now i've maked a simple npc to just upgrade your vip level....
Code:
#region VIP-Upgrader
case 20345:
{
if (LinkBack == 0)
{
Text("Hello, I can upgrade your vip for 5000 cps. Do you want?", CSocket);
Link("Yes.", 1, CSocket);
Link("No thanks.", 255, CSocket);
Face(30, CSocket);
End(CSocket);
}
else if (LinkBack == 1)
{
if (CSocket.Client.CPs >= 5000)
{
CSocket.Client.VipLevel++;
Database.Database.UpdateVIP(CSocket);
CSocket.Send(ConquerPacket.Status(CSocket.Client.ID, 2, CSocket.Client.VipLevel, Struct.StatusTypes.VIPLevel));
Text("Congratulations! Your vip has been upgraded!", CSocket);
Link("Thanks.", 255, CSocket);
Face(30, CSocket);
End(CSocket);
}
else { ErrorMsg("Sorry, you don't have 5000 cps!", CSocket); }
}
break;
}
#endregion
//For the remote composition you've to add the Composition stove first....
//And for Remote Repair u must have the repair system... and then u can add this at packet processor in case 1009(Item/Ping Packet):
Code:
case 15:
//Send the repair here...
break;
if u got any problem please post it here... (and don't flame!)
|
|
|
12/06/2009, 20:27
|
#2
|
elite*gold: 0
Join Date: Sep 2008
Posts: 1,683
Received Thanks: 506
|
Well, you should have told them this is not complete, far from complete tbh.
However, thanks for contributing!
|
|
|
12/06/2009, 20:42
|
#3
|
elite*gold: 0
Join Date: Apr 2009
Posts: 782
Received Thanks: 458
|
//Edit
nothing is missing... only the features to be added like compose and item repair : D
|
|
|
12/06/2009, 20:48
|
#4
|
elite*gold: 111
Join Date: Feb 2008
Posts: 2,161
Received Thanks: 646
|
I've noticed that in all of Tanel's sources GMs have remote WH (by pressing enter), so you should look into a LOTF source or something.
|
|
|
12/06/2009, 20:53
|
#5
|
elite*gold: 0
Join Date: Dec 2009
Posts: 116
Received Thanks: 42
|
Nice release
|
|
|
12/06/2009, 22:24
|
#6
|
elite*gold: 0
Join Date: Jan 2007
Posts: 1,034
Received Thanks: 58
|
Quote:
Originally Posted by BERGHUIS1
I've noticed that in all of Tanel's sources GMs have remote WH (by pressing enter), so you should look into a LOTF source or something.
|
Isn't that a client?lol cause I guess its just a client edit.
|
|
|
12/07/2009, 02:18
|
#7
|
elite*gold: 0
Join Date: Apr 2008
Posts: 124
Received Thanks: 16
|
Sorry for double post it was by accident
|
|
|
12/07/2009, 02:18
|
#8
|
elite*gold: 0
Join Date: Apr 2008
Posts: 124
Received Thanks: 16
|
I don't get where to add this piece of code :P
Quote:
|
Client.VipLevel = Convert.ToByte(DR["VIP"]);
|
|
|
|
12/07/2009, 02:29
|
#9
|
elite*gold: 0
Join Date: Dec 2009
Posts: 116
Received Thanks: 42
|
Quote:
Originally Posted by shadow8994
I don't get where to add this piece of code :P
|
Dont double post edit the old one
|
|
|
12/07/2009, 20:14
|
#10
|
elite*gold: 0
Join Date: Sep 2008
Posts: 1,683
Received Thanks: 506
|
Quote:
Originally Posted by shadow8994
I don't get where to add this piece of code :P
|
Where it loads characters, I guess.
Quote:
Originally Posted by 12tails
//Edit
nothing is missing... only the features to be added like compose and item repair : D
|
Ehm, becoming VIP, a progress which will change your vip status, saving your new VIP statu, the features (as you said), and some other things.
|
|
|
12/07/2009, 20:28
|
#11
|
elite*gold: 0
Join Date: Nov 2009
Posts: 754
Received Thanks: 544
|
As bas said, this is far from completed.
I'm missing calculations for the vip levels, coded functions and extra things that are added for a vip.
I'll be happy to work a completed vip system out and release it in a while. I'll be all doing it on sunday if someone had some more requests please say it through a priviate message.
|
|
|
12/07/2009, 20:31
|
#12
|
elite*gold: 0
Join Date: Sep 2008
Posts: 1,683
Received Thanks: 506
|
Quote:
Originally Posted by ImmuneOne
As bas said, this is far from completed.
I'm missing calculations for the vip levels, coded functions and extra things that are added for a vip.
I'll be happy to work a completed vip system out and release it in a while. I'll be all doing it on sunday if someone had some more requests please say it through a priviate message.
|
W00t.
I got Immune's support on this one =)
|
|
|
12/08/2009, 00:43
|
#13
|
elite*gold: 0
Join Date: Dec 2009
Posts: 116
Received Thanks: 42
|
When its fully functional i will love that rofl
|
|
|
12/08/2009, 09:39
|
#14
|
elite*gold: 0
Join Date: Apr 2009
Posts: 782
Received Thanks: 458
|
ehhh sorry i wasn't at home : P
added some things to the first post : D
|
|
|
10/03/2010, 22:49
|
#15
|
elite*gold: 0
Join Date: Apr 2009
Posts: 9
Received Thanks: 0
|
Quote:
Originally Posted by 12tails
hi hi!!
i was doing it... very easy but let's release it : D
first add this at Character.cs:
Code:
public byte VipLevel = 0;
then go into Sctrucs, and open StatusType.cs and add this:
now create a new class named VipLevel.cs:
Code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using CoEmu_v2_GameServer.Entities;
using CoEmu_v2_GameServer.Connections;
using CoEmu_v2_GameServer.Structs;
using CoEmu_v2_GameServer.Packets;
using System.Timers;
namespace CoEmu_v2_GameServer.Handlers
{
public partial class Handler
{
public static byte VipLevel2(byte viplevel, ClientSocket CSocket)
{
try
{
CSocket.Send(ConquerPacket.Status(CSocket.Client.ID, 2, viplevel, Struct.StatusTypes.VIPLevel));
}
catch { }
return viplevel;
}
}
}
now go into packet processor and find case 1052: (login packet)
and find this:
Code:
CSocket.Send(ConquerPacket.CharacterInfo(CSocket));
after it add:
Code:
Handler.VipLevel2(CSocket.Client.VipLevel, CSocket);
and now for the vip warehouse add this at NpcTalk.cs:
Code:
#region VIP Warehouse
case 12:
{
if (LinkBack == 0 || LinkBack == 1)
{
CSocket.Send(ConquerPacket.General(CSocket.Client.ID, 341, 0, 0, 0, 0, (Struct.DataType)0x7e));
}
break;
}
#endregion
// EDIT FORGOT ONE THING :X
add this at GetCharacter:
Code:
Client.VipLevel = Convert.ToByte(DR["VIP"]);
and make a new field for VIP:
Code:
Field: VIP
Lenght: 2
Type: int
Default: 0
//
this will save your VIP Level... so just add it on Database.cs
Code:
public static void UpdateVIP(ClientSocket CSocket)
{
lock (DatabaseConnection.Connection)
{
MySqlCommand Cmd = new MySqlCommand("UPDATE `characters` SET `VIP` = " + CSocket.Client.VipLevel + " WHERE `CharID` = " + CSocket.Client.ID + "", DatabaseConnection.Connection);
Cmd.ExecuteNonQuery();
}
}
now i've maked a simple npc to just upgrade your vip level....
Code:
#region VIP-Upgrader
case 20345:
{
if (LinkBack == 0)
{
Text("Hello, I can upgrade your vip for 5000 cps. Do you want?", CSocket);
Link("Yes.", 1, CSocket);
Link("No thanks.", 255, CSocket);
Face(30, CSocket);
End(CSocket);
}
else if (LinkBack == 1)
{
if (CSocket.Client.CPs >= 5000)
{
CSocket.Client.VipLevel++;
Database.Database.UpdateVIP(CSocket);
CSocket.Send(ConquerPacket.Status(CSocket.Client.ID, 2, CSocket.Client.VipLevel, Struct.StatusTypes.VIPLevel));
Text("Congratulations! Your vip has been upgraded!", CSocket);
Link("Thanks.", 255, CSocket);
Face(30, CSocket);
End(CSocket);
}
else { ErrorMsg("Sorry, you don't have 5000 cps!", CSocket); }
}
break;
}
#endregion
//For the remote composition you've to add the Composition stove first....
//And for Remote Repair u must have the repair system... and then u can add this at packet processor in case 1009(Item/Ping Packet):
Code:
case 15:
//Send the repair here...
break;
if u got any problem please post it here... (and don't flame!)
|
hi guys could some of this code be used to make a char on creation vip level 6 without having the Npc for it iam trying to make it so when the char gets created it automaticly gets vip 6 rather than have the client click the npc to get the VipLevel  any pointers please
|
|
|
 |
|
Similar Threads
|
[HELP] PLEASE Coemu release 180
09/08/2010 - CO2 Private Server - 2 Replies
Hello everyone good morning everyone!
Well folks I'm trying to use the Coemu but the recent release that came out good I downloaded the source code and compiled it, if I did not know but was sure: D lol but one detail appeared very npcs are with the dialogues as if I was not wrong.
Can someone give me a Help please or copille me if I did something wrong! ss follows below!
http://img822.imageshack.us/img822/9706/1942037.t h.jpg
Uploaded with ImageShack.us
|
[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
|
Item Level CoEmu
08/20/2009 - CO2 Private Server - 0 Replies
My MagicArtisan level's gear higher then you are... what is it i have to change... something is this region.. correct?
if (CSocket.Client.Level <= Calculation.NextEquipLevel(itm.ItemID))
{
itm.ItemID = Calculation.NextEquipLevel(itm.ItemID);
}
else
...
|
[RELEASE] Increasing MAX level(CoEmu)
06/19/2009 - CO2 PServer Guides & Releases - 3 Replies
Well i had just figured this out and i thought it would be a good thing to show people who don't know how...
First
Go in your database(Appserv, navicat, w/e)
Open up conqueremu database.
open the table "levelexp"
|
[Help/Request] CoEmu 2 FB exp level
06/17/2009 - CO2 Private Server - 3 Replies
anyone can start with on how to level the exp of FB...
it'll be a reference to some of the skills exp coding...
thanks
|
All times are GMT +1. The time now is 15:34.
|
|