Cool Effect

01/09/2010 16:21 Hanibal#1
Works now, try it you want it on your server.


Here's the code I added in Characters.cs

Code:
if (Action == 230)//Cool Effect
                {
                    if (Job >= 10 && Job <= 15)//Trojan Cool
                    {
                        MyClient.AddSend(Packets.String(EntityID, 10, "warrior"));
                        Action = 100;
                    }
                    if (Job >= 40 && Job <= 45)//Archer Cool
                    {
                        MyClient.AddSend(Packets.String(EntityID, 10, "archer"));
                        Action = 100;
                    }
                    if (Job >= 20 && Job <= 25)//Warrior Cool
                    {
                        MyClient.AddSend(Packets.String(EntityID, 10, "fighter"));
                        Action = 100;
                    }
                    if (Job >= 132 && Job <= 135)//Water Tao Cool
                    {
                        MyClient.AddSend(Packets.String(EntityID, 10, "taoist"));
                        Action = 100;
                    }
                    if (Job >= 142 && Job <= 145)//Fire Tao Cool
                    {
                        MyClient.AddSend(Packets.String(EntityID, 10, "taoist"));
                        Action = 100;
                    }
                    if (Job == 100 || Job == 101)//Tao Cool
                    {
                        MyClient.AddSend(Packets.String(EntityID, 10, "taoist"));
                        Action = 100;
                    }
                    if (Job >= 10 && Job <= 15)//Trojan Cool
                    {
                        MyClient.AddSend(Packets.String(EntityID, 10, "warrior-s"));
                        Action = 100;
                    }
                    if (Job >= 40 && Job <= 45)//Archer Cool
                    {
                        MyClient.AddSend(Packets.String(EntityID, 10, "archer-s"));
                        Action = 100;
                    }
                    if (Job >= 20 && Job <= 25)//Warrior Cool
                    {
                        MyClient.AddSend(Packets.String(EntityID, 10, "fighter-s"));
                        Action = 100;
                    }
                    if (Job >= 132 && Job <= 135)//Water Tao Cool
                    {
                        MyClient.AddSend(Packets.String(EntityID, 10, "taoist-s"));
                        Action = 100;
                    }
                    if (Job >= 142 && Job <= 145)//Fire Tao Cool
                    {
                        MyClient.AddSend(Packets.String(EntityID, 10, "taoist-s"));
                        Action = 100;
                    }
                    if (Job == 100 || Job == 101)//Tao Cool
                    {
                        MyClient.AddSend(Packets.String(EntityID, 10, "taoist-s"));
                        Action = 100;
                    }
                }
            }
I put it at the bottom above this

Code:
catch (Exception Exc) { Program.WriteLine(Exc); }
It is basically a copy/paste from PazeCo source with some changes.

EDIT: Works now with this code, follow those directions and your all set.
01/09/2010 16:38 ramix#2
great :D bro ;)
01/09/2010 16:40 xBaiLomx#3
nice.. Thx..
01/09/2010 16:59 ImmuneOne#4
Code:
if(Action == 230)
{
 // Cool effects
}
else // There shouldn't be an else.
Simple.
01/09/2010 17:19 killersub#5
Quote:
Originally Posted by ImmuneOne View Post
Code:
if(Action == 230)
{
 // Cool effects
}
else // There shouldn't be an else.
Simple.
lol I got a simple prob that I need help with...when I copy/pasted (i'm a noob i know...) this into the character.cs the last things suddenly got underlined red o.0...any reason why or where should I put it? thnx :)
01/09/2010 17:45 Hanibal#6
Quote:
Originally Posted by ImmuneOne View Post
Code:
if(Action == 230)
{
 // Cool effects
}
else // There shouldn't be an else.
Simple.
Fixed and thanks, now a bit more testing and I'll have it working 100% then onto gem effects.
01/09/2010 18:01 coreymills#7
good work hanibal keep it up
01/09/2010 18:23 -Shunsui-#8
dont u gotah make an if statement checking if ur wearing full super?
01/09/2010 18:28 Hanibal#9
Quote:
Originally Posted by -Shunsui- View Post
dont u gotah make an if statement checking if ur wearing full super?

Most p servers give out free supers so I don't see it being needed and when I tried to add that from the paze source to this one it caused errors I didn't feel like fixing, was just trying to get it to work and well it does, thanks again ImmuneOne for that simple fix.
01/09/2010 18:52 pro4never#10
Quote:
Originally Posted by -Shunsui- View Post
dont u gotah make an if statement checking if ur wearing full super?
Totally what I was thinking lol.

easy enough to do though. I assume lotf has some sort of quality detection calculation for use in upgrades? If so just add a if statement checking equipment slots and it would work just as well.

Ooh, you may also want to add a cooldown... if not wouldn't you end up with people being able to spam super effects by toggling between 2 actions? That could be rather annoying.
01/09/2010 21:05 WHITELIONX#11
THANK YOU!!!
01/10/2010 01:22 ImmuneOne#12
Just check how the cool effects are being done in conqueremu and try to convert it.
01/10/2010 02:04 WHITELIONX#13
if (Equipt != null) I thought maybe this kind of thing should be placed in there somewhere but MEH I added it and it did nothing rofl.

Before anybody starts laughing at me for it for whatever reasons remember I am working blindly without knowing what it means. This kind of thing though still helped me sort the marriage crap lol
01/10/2010 04:26 felipeboladao#14
oeioeie, this is my code, is not complete...

First > Create file Cool Effects.cs and add
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)
        {

            Game.Item I = MyClient.MyChar.Equips.Get(3);
            Game.ItemIDManipulation Q = new NewestCOServer.Game.ItemIDManipulation(I.ID);

            if (Q.Quality == NewestCOServer.Game.Item.ItemQuality.Super)
            {
                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 (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 (MyClient.MyChar.AllSuper == true)
            {
                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, "warrior"));
                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;
        }
    }
}

Need create a variable to check the others position of equips!
01/10/2010 04:29 Arcо#15
Quote:
Originally Posted by felipeboladao View Post
...

Looks like for your code all you need to do now is make a definiton for AllSuper?