Register for your free account! | Forgot your password?

You last visited: Today at 06:57

  • Please register to post and access all features, it's quick, easy and FREE!


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 PServer - Discussions / Questions category.

Reply
 
Old   #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 ^^



glover is offline  
Thanks
18 Users
Old 01/28/2010, 16:51   #2
 
elite*gold: 0
Join Date: Jan 2010
Posts: 116
Received Thanks: 33
good job


Jedex is offline  
Old 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 ?
WOOWOO is offline  
Old 01/28/2010, 18:20   #4
 
elite*gold: 0
Join Date: Mar 2006
Posts: 61
Received Thanks: 88
Quote:
Originally Posted by WOOWOO View Post
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.


glover is offline  
Thanks
2 Users
Old 01/28/2010, 18:43   #5
 
elite*gold: 0
Join Date: Jul 2007
Posts: 72
Received Thanks: 27
nice work
keep it up :P
Olodady is offline  
Old 01/28/2010, 18:59   #6
 
elite*gold: 0
Join Date: Feb 2009
Posts: 700
Received Thanks: 79
what effects exactly?
copz1337 is offline  
Old 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
ramix is offline  
Thanks
1 User
Old 01/28/2010, 21:00   #8
 
elite*gold: 0
Join Date: Jul 2007
Posts: 254
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;
            }
        }
    }
}
felipeboladao is offline  
Thanks
2 Users
Old 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
ramix is offline  
Old 01/28/2010, 22:34   #10
 
elite*gold: 0
Join Date: Mar 2006
Posts: 61
Received Thanks: 88
Quote:
Originally Posted by felipeboladao View Post
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 .
glover is offline  
Old 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
gulpi_de_gulat is offline  
Old 01/28/2010, 23:28   #12
 
elite*gold: 0
Join Date: Aug 2008
Posts: 272
Received Thanks: 61
that is my problem too xD
ramix is offline  
Old 01/29/2010, 00:54   #13
 
elite*gold: 0
Join Date: Jul 2007
Posts: 254
Received Thanks: 273
simple add in character .cs
public DateTime LastAction = DateTime.Now;
felipeboladao is offline  
Old 01/29/2010, 04:11   #14
 
elite*gold: 0
Join Date: Oct 2006
Posts: 52
Received Thanks: 8
Quote:
Originally Posted by felipeboladao View Post
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?
ASSN9NE is offline  
Old 01/29/2010, 04:31   #15
 
elite*gold: 21
Join Date: Jul 2005
Posts: 9,193
Received Thanks: 5,346
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.


pro4never is offline  
Reply


Similar Threads
[HELLP] anyone can give me cool code(cool off super or full super only)5165
01/22/2010 - CO2 PServer - Discussions / Questions - 6 Replies
I really need it!5165:confused::confused::confused:
Release: Cool effects.Everyone see them.
05/06/2009 - CO2 PServer Guides & Releases - 34 Replies
Well...because a lot of ppl...was waiting for it..and because i stopped coding....im gonna post it. here it comes: In character.cs at line 100 add public bool AllSuper = false; in the "void TimerElapsed(object source, ElapsedEventArgs e)" you should find something like if (Action == 250)
[Coding] Cool Effects
04/18/2009 - CO2 PServer - Discussions / Questions - 40 Replies
Completed.
Taoist Cool Move Effects
10/20/2006 - Conquer Online 2 - 27 Replies
open folder conquer/c3/effects then paste overwrite



All times are GMT +2. The time now is 06:57.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.

BTC: 3KeUpz52VCbhmLwuwydqxu6U1xsgbT8YT5
ETH: 0xc6ec801B7563A4376751F33b0573308aDa611E05

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2019 elitepvpers All Rights Reserved.