[Question] Effects at Coordinates

04/06/2010 10:31 -NewDawn-#1
Hey Everyone!
I'm trying to set off this effect on the roof at a coordinate only for the person doing the quest:

[Only registered and activated users can see links. Click Here To Register...]

I'm having a hard time with it however since the code I'm trying to use doesn't work with it. Anyone have an idea?
04/06/2010 10:35 Arcо#2
Well tell us this, what code are you using for it?
04/06/2010 10:41 -NewDawn-#3
Quote:
Originally Posted by .Arco View Post
Well tell us this, what code are you using for it?
Well, the code i'm using it for is so that when a certain NPC (the KunFuBoy) ends the conversation, it triggers the effect (which I have down so far):
Code:
if (Control == 2)
                                    {
                                        GC.AddSend(Packets.NPCSay("It seems that you have mastered this skill. Good. My sister, Kungfu Girl, has stolen my Jade Glyph and has hidden it on the roof behind me. Can you go and fetch it for me?"));
                                        GC.AddSend(Packets.NPCLink("No problem!", 3));
                                        GC.AddSend(Packets.NPCSetFace(N.Avatar));
                                        GC.AddSend(Packets.NPCFinish());
                                            GC.MyChar.MyClient.AddSend(Packets.String(GC.MyChar.MyClient.MyChar.EntityID, 10, "angelwing"));
                                            GC.MyChar.Experience = 100;
                                            GC.LocalMessage(2000, "You've received an EXP reward.");
                                            //hidden from Elitepvpers for now.
                                        
                                        
                                    }
Code:
if (Control == 3)
                                    {
                                        // /effect clewarbignor
                                        
                                        GC.AddSend(Packets.NPCSay("Press CTRL and left click with your mouse to jump to the roof and find KungfuGirl."));
                                        GC.AddSend(Packets.NPCFinish());
                                        
                                    }
and the base code I'm trying to use to set the coords is by editing this code:
Code:
GC.MyChar.MyClient.AddSend(Packets.String(GC.MyChar.MyClient.MyChar.EntityID, 10, "effectname"));
which.. isn't working.

#edit: going to sleep- night all!
04/06/2010 14:59 Korvacs#4
I told you previously, this was brought in, in later editions of the client so they probably have a much simpler way of doing it (by sending effects with cordinates).

At the moment using that client the only way i can think of doing it (Since you cant send effect packets to cordinates directly) would be to spawn an invisible monster and to cast the effect on them. But this would most likely crash the client since you cannot spawn something without a mesh and thus an appearence.
04/06/2010 15:45 PeTe Ninja#5
...why did you make two threads for two simliar questions?
04/06/2010 20:21 -NewDawn-#6
Quote:
Originally Posted by PeTe Ninja View Post
...why did you make two threads for two simliar questions?
They're not Pete. One is finding out an effect name and another one is how to make an effect at a coord (which I think is important for people to be able to search for).
04/06/2010 22:13 PeTe Ninja#7
Quote:
Originally Posted by -NewDawn- View Post
They're not Pete. One is finding out an effect name and another one is how to make an effect at a coord (which I think is important for people to be able to search for).
create a new "npc type thingy" like a non playable anything or movable.. make its coords that and make its visible part the effect...
04/07/2010 01:57 -NewDawn-#8
Quote:
Originally Posted by PeTe Ninja View Post
create a new "npc type thingy" like a non playable anything or movable.. make its coords that and make its visible part the effect...
that's for if you want to make something like a flower...
I'm talking about actually setting off on effect as a result of an action. I don't want to have the arrow be there 24/7 if you know what i mean.

So far I've been looking at the packets but I haven't came up with much of anything...

So far I have this:
Code:
GC.MyChar.MyClient.AddSend(Packets.Effect(407, 327, 10, "clewarbignor"));
and this:
Code:
public static COPacket Effect(ushort X, ushort Y, byte Type, string str) // Note1
        {
            byte[] Packet = new byte[8 + 11 + str.Length];
            COPacket P = new COPacket(Packet);

            P.WriteInt16((ushort)(Packet.Length - 8));
            P.WriteInt16((ushort)0x3f7);
            P.WriteInt16(X);
            P.WriteInt16(Y);
            P.WriteByte(Type); // Type 10 = effect
            P.WriteByte(1);
            P.WriteByte((byte)str.Length);
            P.WriteString(str);
            
            return P;
        }
doesn't work at all. rofl. Without uint UID, there is no target and the effect cannot be seen... but with UID, the target is set to you along with your coords. Help? =\
04/07/2010 02:05 Arcо#9
Wait you're trying to create your own packet?
04/07/2010 08:16 -NewDawn-#10
Quote:
Originally Posted by .Arco View Post
Wait you're trying to create your own packet?
Kinda =\ Yah...
Not working. lol
04/07/2010 09:35 teroareboss1#11
try
Code:
                        if (Cmd[0] == "/test1")
                        {
                            GC.MyChar.MyClient.AddSend(Packets.String(GC.MyChar.EntityID, 10, "cantask"));
                        }
04/07/2010 10:03 Arcо#12
Well a command for effects is already coded so he can just do /effect cantask
04/07/2010 16:09 -impulse-#13
I have something on my mind. I'll test then I'll post the results.

And it actually works!!!

[Only registered and activated users can see links. Click Here To Register...]

Nasty! LOL


Beg for it and you'll have it.
04/07/2010 17:36 _Emme_#14
@Impulse

It's funny that most of the post you do is bragging of what you can do/have. Get real, you brag too much, seriously.
04/07/2010 17:59 PeTe Ninja#15
Quote:
Originally Posted by EmmeTheCoder View Post
@Impulse

It's funny that most of the post you do is bragging of what you can do/have. Get real, you brag too much, seriously.
i like his bragging. it enlightens me. all you do is whine and cry.