Register for your free account! | Forgot your password?

Go Back   elitepvpers > Conquer Online 2 > CO2 PServer - Discussions / Questions
You last visited: Today at 04:33

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


[Question] Accessing Client Side Files

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Mar 2010
Posts: 126
Received Thanks: 14
[Question] Accessing Client Side Files

My objective by asking this question is to be able to access a sound from the client folder so that when a firework goes off (for example) it makes the sound. Ultimately, I want to be able to play sounds for NPCs such as the starter quest's slashing sounds and such. How do I access sound files from the client folder?



-Spirits- is offline  
Old 04/24/2010, 21:36   #2
 
elite*gold: 0
Join Date: Oct 2009
Posts: 128
Received Thanks: 50

A quick search would have found your answer.


s.bat is offline  
Old 04/24/2010, 21:51   #3
 
elite*gold: 0
Join Date: Feb 2010
Posts: 492
Received Thanks: 222
Yeah,

Code:
GuildName = 0x3,
Spouse = 0x6,
Effect = 0xA,
GuildList = 0xB,
ViewEquipSpouse = 0x10,
[COLOR=Red][B]Sound = 0x14,[/B][/COLOR]
GuildEnemies = 0x15,
GuildAllies = 0x16,
Paralyzer[GM] is offline  
Old 04/25/2010, 00:34   #4
 
elite*gold: 0
Join Date: Mar 2010
Posts: 126
Received Thanks: 14
So wait, what am I supposed to do with that because I think I'm doing it wrong...

CC.MyClient.AddSend(Packets.String(CC.EntityID, 14, "music.mp3"));

I've tried it a lot of different ways too. rofl

CC.MyClient.AddSend(Packets.String(CC.EntityID, 14, "music"));
CC.MyClient.AddSend(Packets.String(CC.EntityID, 0x14, "music.mp3"));
CC.MyClient.AddSend(Packets.String(CC.EntityID, 0x14, "music"));

Help =s


-Spirits- is offline  
Old 04/25/2010, 04:00   #5
 
elite*gold: 0
Join Date: Oct 2009
Posts: 128
Received Thanks: 50
Quote:
Originally Posted by -Spirits- View Post
So wait, what am I supposed to do with that because I think I'm doing it wrong...

CC.MyClient.AddSend(Packets.String(CC.EntityID, 14, "music.mp3"));

I've tried it a lot of different ways too. rofl

CC.MyClient.AddSend(Packets.String(CC.EntityID, 14, "music"));
CC.MyClient.AddSend(Packets.String(CC.EntityID, 0x14, "music.mp3"));
CC.MyClient.AddSend(Packets.String(CC.EntityID, 0x14, "music"));

Help =s
Dec 14 is not the same as Hex 14. Use either 20 or 0x14. Make sure the name of the sound you are sending is located in the client's sound folder.
s.bat is offline  
Old 04/25/2010, 06:20   #6
 
elite*gold: 0
Join Date: Mar 2010
Posts: 126
Received Thanks: 14
Quote:
Originally Posted by s.bat View Post
Dec 14 is not the same as Hex 14. Use either 20 or 0x14. Make sure the name of the sound you are sending is located in the client's sound folder.
I tried this code using 20 and 0x14...
Code:
if (Cmd[0] == "/sound")
                    {
                        Game.Character C = GC.MyChar;
                        foreach (Game.Character CC in Game.World.H_Chars.Values)
                        {
                            if (CC.Loc.Map == C.Loc.Map && MyMath.InBox(C.Loc.X, C.Loc.Y, CC.Loc.X, CC.Loc.Y, 20))
                                CC.MyClient.AddSend(Packets.String(CC.EntityID, 0x14, Cmd[1]));
                        }
                    }
and it's still not working. I'm not sure what I'm doing wrong.
-Spirits- is offline  
Old 04/25/2010, 11:54   #7
 
elite*gold: 20
Join Date: Mar 2006
Posts: 6,124
Received Thanks: 2,503
The string packet needs to send 2 strings for music:

Code:
Strings[0] = "sound/" + Client.Char.Map + ".mp3";
Strings[1] = "1";
Ive forgotten what the 1 does, but it wont work without it. To stop playing an existing track send something like this:

Code:
Strings[0] = "sound/" + " " + ".mp3";
Strings[1] = "1";
Korvacs is offline  
Old 04/25/2010, 13:50   #8
 
elite*gold: 1142
Join Date: Aug 2006
Posts: 2,464
Received Thanks: 1,159
I think the 1 is for if it's on or off. Try sending Strings[1] = "0" when you want to stop a sound, although I'm not really sure.
_Emme_ is offline  
Old 04/25/2010, 17:42   #9
 
elite*gold: 0
Join Date: Mar 2010
Posts: 126
Received Thanks: 14
What about for the 5165 source though?
Now I'm coming up with something like this:
Code:
public static COPacket Sound(uint UID, 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.WriteInt32(UID); // Target
            P.WriteByte(Type); // Type 20 = sound
            P.WriteByte(1);
            P.WriteByte((byte)str.Length);
            P.WriteString("sound/" + str + ".mp3");
            P.WriteByte(1);

            return P;
        }
Code:
if (Cmd[0] == "/sound")
                    {
                        Game.Character C = GC.MyChar;
                        foreach (Game.Character CC in Game.World.H_Chars.Values)
                        {
                            if (CC.Loc.Map == C.Loc.Map && MyMath.InBox(C.Loc.X, C.Loc.Y, CC.Loc.X, CC.Loc.Y, 20))
                                CC.MyClient.AddSend(Packets.Sound(CC.EntityID, 20, Cmd[1]));
                        }
                    }


-Spirits- is offline  
Reply



« XP Skill Activation | Frozen Grotto and Eternity »

Similar Threads
Question concerning client side itemtype.dat modifications
08/09/2010 - Eudemons Online - 0 Replies
Hello, I got one of the itemtype.dat editors working. I got the itemtype.dat to show me the names of white eggs (Woo!), I was just wondering if it was possible to find the addresses for unidentified equipment, and modify those addresses to show me the quality of the unidents. Is this possible? If it is, how would I go about finding the addresses for unidents?
[QUESTION] About adding new skill (Client Side)
04/30/2010 - CO2 PServer - Discussions / Questions - 11 Replies
Hi, I've being working in new Bless skill with new effct and i've done it server side but im stuck in client side . can some one explain this line to me please ? This line is for bless skill got it from MagicType.dat i've just copied it and paste it and i've changed the name but how can i change the effect if i already have the dds/c3 files for the new bless. there is no effect name in that line as i see? thanks
[Question]Is it have a guide to adding eudemon in client side?
12/06/2009 - EO PServer Hosting - 4 Replies
i have search for this guide for 48 hours in this forum..is it have a guide adding eudemon in client side..? i dont think so..they just give the information what file to add the with no info,pic etc etc..those file have a thousand of text there..then how people can understand just give a information like this..?? EXAMPLE: here is a list of ini and ani files u need to put the new eudemon 3dsimpleRole.ini 3Dsimpleobj.ini 3dmotion.ini
[hmm? question] removing item lock, client side.
07/21/2009 - CO2 PServer - Discussions / Questions - 10 Replies
any idea where i'd have to do this? and also how? I hate this, it mainly takes all fun out of pking anymore.. TQ was stupid to implement it. I wanna revert to many older features.. beginning with this :D anyone gotsa idea on this?



All times are GMT +1. The time now is 04:33.


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

Support | Contact Us | FAQ | Advertising | Privacy Policy | Abuse
Copyright ©2018 elitepvpers All Rights Reserved.