|
You last visited: Today at 19:09
Advertisement
Better Cool and Super Cool Effects for 5165 source
Discussion on Better Cool and Super Cool Effects for 5165 source within the CO2 PServer Guides & Releases forum part of the CO2 Private Server category.
01/28/2010, 16:48
|
#1
|
elite*gold: 0
Join Date: Mar 2006
Posts: 61
Received Thanks: 88
|
Better Cool and Super Cool Effects for 5165 source
Hello all.
Here is my code for better procedure for Cool Effects for 5165 source.
it's work good like 90pct same at global CQ.
For perfectly working we need add some checks for all class 1h-2hweapons handled.
Open Characters.cs file and find:
Code:
if (Vigor < MaxVigor)
Vigor += 6;
if (!GettingLuckyTime)
insert it before the under code
Code:
if (Action == 230)
{
PacketHandling.CoolEffect.ActiveCool(MyClient);
}
At last step make a new code.cs in your NewestCoServer project in PacketHangling:
Code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace NewestCOServer.PacketHandling
{
class CoolEffect
{
public static void ActiveCool(Main.GameClient MyClient)
{
byte counter = 0;
for (byte i = 1; i < 9; i++)
{
if (i == 7) i++;
Game.Item I = MyClient.MyChar.Equips.Get(i);
if (I.ID != 0)
{
Game.ItemIDManipulation Q = new NewestCOServer.Game.ItemIDManipulation(I.ID);
if (Q.Quality == Game.Item.ItemQuality.Super)
counter += 1;
}
}
if (MyClient.MyChar.Job >= 100)
if (counter == 6)
counter = 7;
if (MyClient.MyChar.Job >= 40 && MyClient.MyChar.Job <= 45)
if (counter == 6)
{
Game.Item I = MyClient.MyChar.Equips.Get(5);
I.ID = MyClient.MyChar.Equips.LeftHand.ID;
if (I.ID == 0)
counter = 7;
}
if (counter == 7)
{
if (MyClient.MyChar.Job >= 10 && MyClient.MyChar.Job <= 15)
MyClient.AddSend(Packets.String(MyClient.MyChar.EntityID, 10, "warrior"));
else if (MyClient.MyChar.Job >= 20 && MyClient.MyChar.Job <= 25)
MyClient.AddSend(Packets.String(MyClient.MyChar.EntityID, 10, "fighter"));
else if (MyClient.MyChar.Job >= 100)
MyClient.AddSend(Packets.String(MyClient.MyChar.EntityID, 10, "taoist"));
else if (MyClient.MyChar.Job >= 39 && MyClient.MyChar.Job <= 46)
MyClient.AddSend(Packets.String(MyClient.MyChar.EntityID, 10, "archer"));
}
else
{
if (MyClient.MyChar.Job >= 10 && MyClient.MyChar.Job <= 15)
MyClient.AddSend(Packets.String(MyClient.MyChar.EntityID, 10, "warrior-s"));
else if (MyClient.MyChar.Job >= 20 && MyClient.MyChar.Job <= 25)
MyClient.AddSend(Packets.String(MyClient.MyChar.EntityID, 10, "fighter-s"));
else if (MyClient.MyChar.Job >= 100)
MyClient.AddSend(Packets.String(MyClient.MyChar.EntityID, 10, "taoist-s"));
else if (MyClient.MyChar.Job >= 39 && MyClient.MyChar.Job <= 46)
MyClient.AddSend(Packets.String(MyClient.MyChar.EntityID, 10, "archer-s"));
}
MyClient.MyChar.Action = 100;
}
}
}
Ty ramix ^^
|
|
|
01/28/2010, 16:51
|
#2
|
elite*gold: 0
Join Date: Jan 2010
Posts: 116
Received Thanks: 33
|
good job
|
|
|
01/28/2010, 17:22
|
#3
|
elite*gold: 0
Join Date: Mar 2008
Posts: 1
Received Thanks: 0
|
How 2 Create a new code.cs using C# ?
is it code.cs or Code.cs ?
|
|
|
01/28/2010, 18:20
|
#4
|
elite*gold: 0
Join Date: Mar 2006
Posts: 61
Received Thanks: 88
|
Quote:
Originally Posted by WOOWOO
How 2 Create a new code.cs using C# ?
is it code.cs or Code.cs ?
|
try to click on right mouse button at PacketHandling folder > add > new item > and click on "Code File" change name as you like to add. At last you need to click on Add button.
That's all.
|
|
|
01/28/2010, 18:43
|
#5
|
elite*gold: 0
Join Date: Jul 2007
Posts: 73
Received Thanks: 27
|
nice work 
keep it up :P
|
|
|
01/28/2010, 18:59
|
#6
|
elite*gold: 0
Join Date: Feb 2009
Posts: 700
Received Thanks: 79
|
what effects exactly?
|
|
|
01/28/2010, 20:42
|
#7
|
elite*gold: 0
Join Date: Aug 2008
Posts: 272
Received Thanks: 61
|
Quote:
if (counter == 7)
{
if (MyClient.MyChar.Job >= 10 && MyClient.MyChar.Job <= 15)
MyClient.AddSend(Packets.String(MyClient.MyChar.En tityID, 10, "warrior"));
else if (MyClient.MyChar.Job >= 20 && MyClient.MyChar.Job <= 25)
MyClient.AddSend(Packets.String(MyClient.MyChar.En tityID, 10, "fighter"));
else if (MyClient.MyChar.Job >= 100)
MyClient.AddSend(Packets.String(MyClient.MyChar.En tityID, 10, "taoist"));
else if (MyClient.MyChar.Job >= 39 && MyClient.MyChar.Job <= 46)
MyClient.AddSend(Packets.String(MyClient.MyChar.En tityID, 10, "archer"));
|
bro you do a little mistake  is in red  i chanced that good release bro
but have a little problem only i can see the effect if other player do effect cool i cant see why? :S
|
|
|
01/28/2010, 21:00
|
#8
|
elite*gold: 0
Join Date: Jul 2007
Posts: 255
Received Thanks: 273
|
this is my code , is very simple, free working hoho *---------*
Code:
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
namespace NewestCOServer.Features
{
class CoolEffect
{
public static void ActiveCool(Main.GameClient MyClient)
{
int Quality = 0;
if (DateTime.Now > MyClient.MyChar.LastAction.AddSeconds(2))
{
MyClient.MyChar.LastAction = DateTime.Now;
Game.Item Item = MyClient.MyChar.Equips.Get(3);
Game.ItemIDManipulation Idem = new NewestCOServer.Game.ItemIDManipulation(Item.ID);
if (Idem.Quality == NewestCOServer.Game.Item.ItemQuality.Super) { Quality = 9; }
else { Quality = 8; }
}
if (Quality == 9)
{
byte TotalQuality = 0;
for (byte i = 1; i < 10; i++)
if (i != 7)
{
Game.Item I = MyClient.MyChar.Equips.Get(i);
if (I.ID != 0)
{
Game.ItemIDManipulation IDM = new NewestCOServer.Game.ItemIDManipulation(I.ID);
if (IDM.Quality == NewestCOServer.Game.Item.ItemQuality.Super) { TotalQuality++; }
}
}
if (MyClient.MyChar.Job >= 10 && MyClient.MyChar.Job <= 25)
{
if (TotalQuality < 7)
{
if (MyClient.MyChar.Job >= 10 && MyClient.MyChar.Job <= 15)
MyClient.AddSend(Packets.String(MyClient.MyChar.EntityID, 10, "warrior-s"));
if (MyClient.MyChar.Job >= 20 && MyClient.MyChar.Job <= 25)
MyClient.AddSend(Packets.String(MyClient.MyChar.EntityID, 10, "fighter-s"));
}
if (TotalQuality >= 7)
{
if (MyClient.MyChar.Job >= 10 && MyClient.MyChar.Job <= 15)
MyClient.AddSend(Packets.String(MyClient.MyChar.EntityID, 10, "warrior"));
if (MyClient.MyChar.Job >= 20 && MyClient.MyChar.Job <= 25)
MyClient.AddSend(Packets.String(MyClient.MyChar.EntityID, 10, "fighter"));
}
}
else
{
if (TotalQuality < 6)
{
if (MyClient.MyChar.Job >= 100)
MyClient.AddSend(Packets.String(MyClient.MyChar.EntityID, 10, "taoist-s"));
if (MyClient.MyChar.Job >= 39 && MyClient.MyChar.Job <= 46)
MyClient.AddSend(Packets.String(MyClient.MyChar.EntityID, 10, "archer-s"));
}
if (TotalQuality >= 6)
{
if (MyClient.MyChar.Job >= 100)
MyClient.AddSend(Packets.String(MyClient.MyChar.EntityID, 10, "taoist"));
if (MyClient.MyChar.Job >= 39 && MyClient.MyChar.Job <= 46)
MyClient.AddSend(Packets.String(MyClient.MyChar.EntityID, 10, "archer"));
}
}
MyClient.MyChar.Action = 100;
}
}
}
}
|
|
|
01/28/2010, 22:03
|
#9
|
elite*gold: 0
Join Date: Aug 2008
Posts: 272
Received Thanks: 61
|
why if i use cool effect only me can see?? :S
|
|
|
01/28/2010, 22:34
|
#10
|
elite*gold: 0
Join Date: Mar 2006
Posts: 61
Received Thanks: 88
|
Quote:
Originally Posted by felipeboladao
this is my code , is very simple, free working hoho *---------*
Code:
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
namespace NewestCOServer.Features
{
class CoolEffect
{
public static void ActiveCool(Main.GameClient MyClient)
{
int Quality = 0;
if (DateTime.Now > MyClient.MyChar.LastAction.AddSeconds(2))
{
MyClient.MyChar.LastAction = DateTime.Now;
Game.Item Item = MyClient.MyChar.Equips.Get(3);
Game.ItemIDManipulation Idem = new NewestCOServer.Game.ItemIDManipulation(Item.ID);
if (Idem.Quality == NewestCOServer.Game.Item.ItemQuality.Super) { Quality = 9; }
else { Quality = 8; }
}
if (Quality == 9)
{
byte TotalQuality = 0;
for (byte i = 1; i < 10; i++)
if (i != 7)
{
Game.Item I = MyClient.MyChar.Equips.Get(i);
if (I.ID != 0)
{
Game.ItemIDManipulation IDM = new NewestCOServer.Game.ItemIDManipulation(I.ID);
if (IDM.Quality == NewestCOServer.Game.Item.ItemQuality.Super) { TotalQuality++; }
}
}
if (MyClient.MyChar.Job >= 10 && MyClient.MyChar.Job <= 25)
{
if (TotalQuality < 7)
{
if (MyClient.MyChar.Job >= 10 && MyClient.MyChar.Job <= 15)
MyClient.AddSend(Packets.String(MyClient.MyChar.EntityID, 10, "warrior-s"));
if (MyClient.MyChar.Job >= 20 && MyClient.MyChar.Job <= 25)
MyClient.AddSend(Packets.String(MyClient.MyChar.EntityID, 10, "fighter-s"));
}
if (TotalQuality >= 7)
{
if (MyClient.MyChar.Job >= 10 && MyClient.MyChar.Job <= 15)
MyClient.AddSend(Packets.String(MyClient.MyChar.EntityID, 10, "warrior"));
if (MyClient.MyChar.Job >= 20 && MyClient.MyChar.Job <= 25)
MyClient.AddSend(Packets.String(MyClient.MyChar.EntityID, 10, "fighter"));
}
}
else
{
if (TotalQuality < 6)
{
if (MyClient.MyChar.Job >= 100)
MyClient.AddSend(Packets.String(MyClient.MyChar.EntityID, 10, "taoist-s"));
if (MyClient.MyChar.Job >= 39 && MyClient.MyChar.Job <= 46)
MyClient.AddSend(Packets.String(MyClient.MyChar.EntityID, 10, "archer-s"));
}
if (TotalQuality >= 6)
{
if (MyClient.MyChar.Job >= 100)
MyClient.AddSend(Packets.String(MyClient.MyChar.EntityID, 10, "taoist"));
if (MyClient.MyChar.Job >= 39 && MyClient.MyChar.Job <= 46)
MyClient.AddSend(Packets.String(MyClient.MyChar.EntityID, 10, "archer"));
}
}
MyClient.MyChar.Action = 100;
}
}
}
}
|
Your simple source code do not work on my 5165 source and i dont have declaration "LastAction"
if (DateTime.Now > MyClient.MyChar. LastAction.AddSeconds(2))
You don't need use loop up to 10 "for (byte i = 1; i < 10; i++)" pos 9 is a garment equip  .
|
|
|
01/28/2010, 23:21
|
#11
|
elite*gold: 0
Join Date: Mar 2009
Posts: 71
Received Thanks: 40
|
nice bro but only me can see the effect no other char
|
|
|
01/28/2010, 23:28
|
#12
|
elite*gold: 0
Join Date: Aug 2008
Posts: 272
Received Thanks: 61
|
that is my problem too xD
|
|
|
01/29/2010, 00:54
|
#13
|
elite*gold: 0
Join Date: Jul 2007
Posts: 255
Received Thanks: 273
|
simple add in character .cs
public DateTime LastAction = DateTime.Now;
|
|
|
01/29/2010, 04:11
|
#14
|
elite*gold: 0
Join Date: Oct 2006
Posts: 52
Received Thanks: 8
|
Quote:
Originally Posted by felipeboladao
simple add in character .cs
public DateTime LastAction = DateTime.Now;
|
ok and where r we supposed 2 insert this and once we do will every1 see the effects of super cool from host and player?
|
|
|
01/29/2010, 04:31
|
#15
|
elite*gold: 21
Join Date: Jul 2005
Posts: 9,193
Received Thanks: 5,379
|
No, LastAction is reseting a timer. he is suggesting a way to make it so people cant spam the effect.
As for other people seeing the effect, you will need to do i think (I'm not good at effect stuff so shoot me if I'm wrong) a foreach loop for all clients who can see the player displaying the effect at the characters x/y. (I know in most sources such as coEmu there is a calculation already built in to see if someone can see something... that would work nicely for the for the check.
|
|
|
All times are GMT +1. The time now is 19:10.
|
|