Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Conquer Online 2 > CO2 Private Server
You last visited: Today at 01:53

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

Advertisement



request/help with a code

Discussion on request/help with a code within the CO2 Private Server forum part of the Conquer Online 2 category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Jan 2007
Posts: 220
Received Thanks: 63
request/help with a code

well i kinda need a lil bit of help on how to start a code that will check if i'm the only one who's on the map O.O thx
BlooD-BoY is offline  
Old 10/24/2008, 04:08   #2
 
elite*gold: 0
Join Date: Feb 2008
Posts: 1,590
Received Thanks: 154
Code:
[Color="Blue"]if [/color](Splitter[0] == "/mapcheck")
{
[Color="Blue"]    byte[/color] Count = 0; [Color="Green"]//I don't think any of these owners will have 255++ people on their server, let alone ONE map.[/color]
    [Color="Blue"]foreach[/color][color="black"] ([/color][color="MediumTurquoise"]DictionaryEntry[/color] DE [color="Blue"] in [/color][color="MediumTurquoise"]World[/color].AllChars)
    {
[Color="MediumTurquoise"]        Character[/color] Charr = ([Color="MediumTurquoise"]Character[/color])DE.Value;
[Color="Blue"]        if [/color](Charr.LocMap == MyChar.LocMap && Charr.Name != MyChar.Name)
        {
            Count++;
        }
    }
    [Color="Blue"]if [/color](Count != 0)
    {
        SendPacket([Color="MediumTurquoise"]General[/color].MyPackets.SendMsg(MessageId,  [Color="DarkRed"]"SYSTEM"[/color], MyChar.Name, [Color="DarkRed"]"There are "[/Color] + Count + [Color="DarkRed"]" characters on your map."[/color], 2000));
    }
    [Color="Blue"]else[/color]
    {
        SendPacket([Color="MediumTurquoise"]General[/color].MyPackets.SendMsg(MessageId,  [Color="DarkRed"]"SYSTEM"[/color], MyChar.Name, [Color="DarkRed"]"There are no characters on your map."[/color], 2000));
    }
}
Coded and colored by hand(right here on the post, so I haven't checked it...) by yours truly.



Edit:: Since ntl3fty told me it was inefficient >_>

Code:
[Color="Blue"]if [/color](Splitter[0] == "/mapcheck")
{
[Color="Blue"]    bool[/color] found = [Color="Blue"]false[/color]; [Color="Green"]//There..[/color]
    [Color="Blue"]foreach[/color][color="black"] ([/color][color="MediumTurquoise"]DictionaryEntry[/color] DE [color="Blue"] in [/color][color="MediumTurquoise"]World[/color].AllChars)
    {
[Color="MediumTurquoise"]        Character[/color] Charr = ([Color="MediumTurquoise"]Character[/color])DE.Value;
[Color="Blue"]        if [/color](Charr.LocMap == MyChar.LocMap && Charr.Name != MyChar.Name)
        {
            found = true;
            [Color="Blue"]break[/color];[Color="Green"]//Edit- forgot to make that break blue, oh noes![/color]
        }
    }
    [Color="Blue"]if [/color](found)
    {
        SendPacket([Color="MediumTurquoise"]General[/color].MyPackets.SendMsg(MessageId,  [Color="DarkRed"]"SYSTEM"[/color], MyChar.Name, [Color="DarkRed"]"There is a character on your map."[/Color], 2000));
    }
    [Color="Blue"]else[/color]
    {
        SendPacket([Color="MediumTurquoise"]General[/color].MyPackets.SendMsg(MessageId,  [Color="DarkRed"]"SYSTEM"[/color], MyChar.Name, [Color="DarkRed"]"There are no characters on your map."[/color], 2000));
    }
}
tao4229 is offline  
Reply


Similar Threads Similar Threads
request-Dungon no DC vac code
12/13/2009 - Dekaron - 2 Replies
i need dungen no dc vac code i have the scripet from here: http://www.elitepvpers.com/forum/2moons-exploits-h acks-bots-tools-macros/393748-dungon-no-dc-vac.htm l but i need the new code for 5.3.8 thats work good with the game with out crash!
[Request] code
10/26/2009 - AutoIt - 5 Replies
can someone help me with a code..for silkroad i want to be a keypresser 1~5 very faster...but just for SRO ( controlsend funciton) i dont know how to make it..please help me !
[Request] need code
08/07/2009 - CO2 Private Server - 1 Replies
Can someone make a code for an automatic restart of the server every 2 hours.. Please.and Thanks. i work in lotf source
[Request]Pharmacist Items Code So I Code Buy the Scroll
05/30/2009 - CO2 Private Server - 1 Replies
could you please teach me how to code Pharmacist Items so i could buy them all especially the scrolls.
[Request]C++ Bot Source Code/Example Code
07/19/2008 - Silkroad Online - 2 Replies
Please someone direct me to anywhere that might have any sort of information and resources on the construction of a bot, preferably in C++. Looking for any Reverse engineering information(finding the Base addr for say player) and locating the offsets ptrs for Cur health etc. I would also love to see a simple example source in C++ of putting those addresses and offsets into action. I'm sure I have the basic idea down on how to do this but I'm not 100% sure how to get it setup correctly. ...



All times are GMT +2. The time now is 01:53.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

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