Register for your free account! | Forgot your password?

You last visited: Today at 04:52

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

Advertisement



[Release]My source...

Discussion on [Release]My source... within the CO2 PServer Guides & Releases forum part of the CO2 Private Server category.

Reply
 
Old 05/27/2010, 18:57   #151
 
elite*gold: 0
Join Date: Oct 2009
Posts: 768
Received Thanks: 550
public void DuelistTest()
{
Game.Entity duelist = new Game.Entity(Game.EntityFlag.Bot);
duelist.MapObjType = Game.MapObjectType.Bot;
this.BotOwner = Entity.Owner;
duelist.Name = Entity.Name + "[BOT]";
for (int counter = 4; counter < 130; counter++)
duelist.SpawnPacket[counter] = Entity.SpawnPacket[counter];
duelist.UID = (uint)ServerBase.Kernel.Random.Next(1000000, 2000000);
lock (ServerBase.Kernel.Bots)
ServerBase.Kernel.Bots.Add(duelist.UID, this);
duelist.X = (ushort)(Entity.X + 1);
duelist.Y = (ushort)(Entity.Y + 1);
duelist.SendSpawn(this, false);
}

Tested and working.
-impulse- is offline  
Thanks
2 Users
Old 05/27/2010, 20:26   #152
 
elite*gold: 0
Join Date: May 2010
Posts: 298
Received Thanks: 57
+K, but howcome it will dissapear on ANY movment I make ???

P.S: Item commands wont work can somone give me an example ? I am trying
@item BuriedBlade Super 12 7 255 13 13 but no luck ?
MonstersAbroad is offline  
Old 05/27/2010, 21:30   #153
 
elite*gold: 0
Join Date: Oct 2009
Posts: 768
Received Thanks: 550
1st: That's because you didn't add anything in Screen.cs to be spawned from ServerBase.Kernel.Bots dictionary.

2nd: Use what VC#(VS actually) gives. Besides that you need a brain.

Some thing that might help ya a bit: 'breakpoints'
-impulse- is offline  
Old 05/27/2010, 22:18   #154
 
elite*gold: 21
Join Date: Jul 2005
Posts: 9,193
Received Thanks: 5,380
Quote:
Originally Posted by MonstersAbroad View Post
+K, but howcome it will dissapear on ANY movment I make ???

P.S: Item commands wont work can somone give me an example ? I am trying
@item BuriedBlade Super 12 7 255 13 13 but no luck ?
because on movement it checks for things to spawn... if you don't change that spawn code to include a dictionary of bots loaded on the server then it won't show them.

Think about it like this..

Sending the spawn packet to show the client the bot works... but that doesn't mean there is actually a bot on the server. It just means the client gets told "hey, there's something that looks like this on your screen!" and so it displays it. For any sort of permanence you need a dictionary to hold the entity on the server and then whenever you are updating the clients surroundings (mobs, players, npcs, items and whatever else) you will need to run through the local bots and spawn those as well.

Same with bot actions. You need to send the action to the client to display the change.

The bot itself needs no packets sent because there is no client to be updated. Packets are ONLY used to A: Update client from server and B: Update server from client.

Bots are all Server-Server meaning no packets are needed. You just change the bot variables and everything is perfect. it's the clients that need to be updated.

Again: Sorry if I got anything a bit off but that's the way I think about it. The actual method of going about it is most likely different in this source as I've done very little mucking about in the finer aspects of it as of yet.
pro4never is offline  
Old 05/29/2010, 19:04   #155
 
kid2nice's Avatar
 
elite*gold: 0
Join Date: Nov 2009
Posts: 44
Received Thanks: 8
i got it too work too and i cant w8 till yah have completed this project because i want to make a quest where you have to fight your [DARK] self in order 2 unlock skills i am not a very good coder but i am trying really hard to learn
kid2nice is offline  
Thanks
1 User
Old 05/29/2010, 21:31   #156
 
elite*gold: 0
Join Date: May 2010
Posts: 298
Received Thanks: 57
Ok to make it all abit neater I removed the code and remade it in Game->Features->Bot->Bot.cs and inside the .cs is
Code:
using System;
using Conquer_Online_Server.Network.GamePackets;
using System.Collections;
using System.Collections.Generic;
using System.Text;
using System.Threading;

namespace Conquer_Online_Server.Game.Features.Bot
{
    class Bot
    {
        public static void Spawn(Client.GameState client)
        {
            Game.Entity duelist = new Game.Entity(Game.EntityFlag.Duelist);
            duelist.MapObjType = Game.MapObjectType.Duelist;
            duelist.BotOwner = client.Entity.Owner;
            duelist.Name = client.Entity.Name + "[Bot]";
            for (int counter = 4; counter < 130; counter++)
                duelist.SpawnPacket[counter] = client.Entity.SpawnPacket[counter];
            duelist.UID = (uint)ServerBase.Kernel.Random.Next(1000000, 2000000);
            lock (ServerBase.Kernel.Duelists)
                ServerBase.Kernel.Duelists.Add(duelist.UID, true);
            duelist.X = (ushort)(client.Entity.X + 1);
            duelist.Y = (ushort)(client.Entity.Y + 1);
            [B][COLOR="Red"]duelist.SendSpawn(duelist, true);[/COLOR][/B]
        }
    }
}
Error marked in red is as follows
Code:
The best overload method match for 'Conquer_Online_Server.Entity.SendSpawn(Conquer_Online_Server.Client.GameState, bool)' has some invalid arguments
Any idea how to fix that becuase thats the code to actually spawn it ???
MonstersAbroad is offline  
Old 05/29/2010, 23:04   #157
 
elite*gold: 0
Join Date: Oct 2009
Posts: 768
Received Thanks: 550
Quote:
Originally Posted by MonstersAbroad View Post
Ok to make it all abit neater I removed the code and remade it in Game->Features->Bot->Bot.cs and inside the .cs is
Code:
using System;
using Conquer_Online_Server.Network.GamePackets;
using System.Collections;
using System.Collections.Generic;
using System.Text;
using System.Threading;

namespace Conquer_Online_Server.Game.Features.Bot
{
    class Bot
    {
        public static void Spawn(Client.GameState client)
        {
            Game.Entity duelist = new Game.Entity(Game.EntityFlag.Duelist);
            duelist.MapObjType = Game.MapObjectType.Duelist;
            duelist.BotOwner = client.Entity.Owner;
            duelist.Name = client.Entity.Name + "[Bot]";
            for (int counter = 4; counter < 130; counter++)
                duelist.SpawnPacket[counter] = client.Entity.SpawnPacket[counter];
            duelist.UID = (uint)ServerBase.Kernel.Random.Next(1000000, 2000000);
            lock (ServerBase.Kernel.Duelists)
                ServerBase.Kernel.Duelists.Add(duelist.UID, true);
            duelist.X = (ushort)(client.Entity.X + 1);
            duelist.Y = (ushort)(client.Entity.Y + 1);
            [B][COLOR="Red"]duelist.SendSpawn(duelist, true);[/COLOR][/B]
        }
    }
}
Error marked in red is as follows
Code:
The best overload method match for 'Conquer_Online_Server.Entity.SendSpawn(Conquer_Online_Server.Client.GameState, bool)' has some invalid arguments
Any idea how to fix that becuase thats the code to actually spawn it ???
Change it into duelist.SendSpawn(client, true);
-impulse- is offline  
Old 05/29/2010, 23:32   #158
 
elite*gold: 0
Join Date: May 2010
Posts: 298
Received Thanks: 57
Brings an extra error
Here a pic:


If you cant see it .
MonstersAbroad is offline  
Old 05/30/2010, 10:35   #159
 
elite*gold: 0
Join Date: May 2010
Posts: 298
Received Thanks: 57
Well excuse me! #Reported for calling me an idiot, I am dumb that's all.
MonstersAbroad is offline  
Old 05/30/2010, 16:45   #160
 
elite*gold: 0
Join Date: Oct 2009
Posts: 768
Received Thanks: 550
Quote:
Originally Posted by MonstersAbroad View Post
Well excuse me! #Reported for calling me an idiot, I am dumb that's all.
Ah, well, probably I'm the one who should apologize because meh, lately if you don't read the errors which are VERY, VERY CLEAR you would be cooler.

Ah, and I'm pretty sure that you once said that someone should just read the errors before posting.

So, more likely I was just right.
-impulse- is offline  
Thanks
6 Users
Old 05/31/2010, 05:37   #161
 
kid2nice's Avatar
 
elite*gold: 0
Join Date: Nov 2009
Posts: 44
Received Thanks: 8
Quote:
Originally Posted by MonstersAbroad View Post
Ok to make it all abit neater I removed the code and remade it in Game->Features->Bot->Bot.cs and inside the .cs is
Code:
using System;
using Conquer_Online_Server.Network.GamePackets;
using System.Collections;
using System.Collections.Generic;
using System.Text;
using System.Threading;

namespace Conquer_Online_Server.Game.Features.Bot
{
    class Bot
    {
        public static void Spawn(Client.GameState client)
        {
            Game.Entity duelist = new Game.Entity(Game.EntityFlag.Duelist);
            duelist.MapObjType = Game.MapObjectType.Duelist;
            duelist.BotOwner = client.Entity.Owner;
            duelist.Name = client.Entity.Name + "[Bot]";
            for (int counter = 4; counter < 130; counter++)
                duelist.SpawnPacket[counter] = client.Entity.SpawnPacket[counter];
            duelist.UID = (uint)ServerBase.Kernel.Random.Next(1000000, 2000000);
            lock (ServerBase.Kernel.Duelists)
                ServerBase.Kernel.Duelists.Add(duelist.UID, true);
            duelist.X = (ushort)(client.Entity.X + 1);
            duelist.Y = (ushort)(client.Entity.Y + 1);
            [B][COLOR="Red"]duelist.SendSpawn(duelist, true);[/COLOR][/B]
        }
    }
}
Error marked in red is as follows
Code:
The best overload method match for 'Conquer_Online_Server.Entity.SendSpawn(Conquer_Online_Server.Client.GameState, bool)' has some invalid arguments
Any idea how to fix that becuase thats the code to actually spawn it ???
are you gonnah release how u made it neater or how u fixed the bot ?
because i really cant w8 for this bot its gonna be really cool
kid2nice is offline  
Old 05/31/2010, 10:45   #162
 
elite*gold: 0
Join Date: May 2010
Posts: 298
Received Thanks: 57
Meh, I have cleaned the whole thing up so there a bot.cs walking/jumping.cs skill.cs and thats it I don't know weather I'm gonna release it yet tho
MonstersAbroad is offline  
Old 05/31/2010, 16:10   #163
 
kid2nice's Avatar
 
elite*gold: 0
Join Date: Nov 2009
Posts: 44
Received Thanks: 8
Quote:
Originally Posted by MonstersAbroad View Post
Meh, I have cleaned the whole thing up so there a bot.cs walking/jumping.cs skill.cs and thats it I don't know weather I'm gonna release it yet tho
ahh man. oh well
kid2nice is offline  
Old 05/31/2010, 21:27   #164
 
elite*gold: 0
Join Date: May 2010
Posts: 298
Received Thanks: 57
I said im not sure
MonstersAbroad is offline  
Old 06/01/2010, 00:27   #165
 
chickmagnet's Avatar
 
elite*gold: 0
Join Date: Jun 2009
Posts: 372
Received Thanks: 53
Quote:
Originally Posted by MonstersAbroad View Post
I said im not sure
lol maybe u should
chickmagnet is offline  
Reply


Similar Threads Similar Threads
[RELEASE] [OPEN SOURCE] CE 5.5 Pointer to AutoIt Source-Code
02/13/2011 - AutoIt - 6 Replies
Habe heute erst gemerkt, dass es hier eine AutoIt Sektion gibt xD also poste ich mal mein Programm mit rein. Funktionsweise: 1. in CE Rechtsklick auf den Pointer und auf "Copy" klicken 2. in meinem Programm auf "Code generieren" klicken 3. In euer Scite gehen und einfügen Hier ist der Source Code vom Programm:
[Release]How To Make Tq Source Work + Working Source + Server ByBass + Commands
12/08/2008 - CO2 PServer Guides & Releases - 15 Replies
1: How To Make The Server Work In fact, before other people did not just let ACC now with hi EACC Columbia landing on the settlement of the issue, and the rest is our own how to improve the content of those interested can improve the next. MY MY set and the same. INI MAP INI files and MAP with the client-to-date coverage of the account. server.dat ! And then as long as the client will be able to modify server.dat! 127.0.0.1 192.168.0.1 192.168.1.1 IP。 Please do generally use...



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


Powered by vBulletin®
Copyright ©2000 - 2026, 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 ©2026 elitepvpers All Rights Reserved.