|
You last visited: Today at 10:24
Advertisement
[Release]My source...
Discussion on [Release]My source... within the CO2 PServer Guides & Releases forum part of the CO2 Private Server category.
05/24/2010, 00:09
|
#136
|
elite*gold: 21
Join Date: Jul 2005
Posts: 9,193
Received Thanks: 5,377
|
Quote:
Originally Posted by ElectricZebra
How do we add mobs and guards?
#edit
item.Plus = Math.Min(Data[9], 9); is not in the source, I have searched, all I have found close to that is newItem.Plus = Math.Min((byte)9, plus);
|
From what little I looked into adding monsters you will need to create a new structure to hold monster info, create a database to hold that info (or use flatfile, up to you), create a new dictionary to hold that information in the source, load it into the source using a database function and then worry about the actual FUNCTION of mobs as well as the spawning (from what I understand you can use the entity spawn packet to spawn the monsters.. there was an enum I spotted in the entity code to switch between player and monster)
You will then need to write all the monster movement, attacking, being attacked and dying/removal system (including any threading you wish to do to make it more efficient) The most likely way to do that would be create a monster handler thread and have it do a monster check function every like 20 ms or something checking for local players/attacking/etc.
Again... use another source as a guide line but keep in mind that most of those sources are very poorly written.
CoEmu is a rather nice example (BASE one, not the messed up edited versions).
Same basic idea with guards but you will wanna link it to a player, deal with exp awarding and all that other good stuff.
Personally I'm working on a new companion/bot system but I may come back to this source after I get that working.
|
|
|
05/24/2010, 00:49
|
#137
|
elite*gold: 0
Join Date: Apr 2010
Posts: 116
Received Thanks: 12
|
Look just search
Code:
[B]newItem.Plus = Math.Min((byte)9, plus);[/B]
I just changed the 9 to a 12 ;O
Gonna test it now lol
#Edit
Yeah just changing it to a 12 made it work i can make +12 gears now ^^
|
|
|
05/24/2010, 08:07
|
#138
|
elite*gold: 0
Join Date: Apr 2010
Posts: 116
Received Thanks: 12
|
Quote:
Originally Posted by ElectricZebra
Does anyone got mobs yet?
|
Well you can always go find a different source and convert there mobs to work with this source
|
|
|
05/24/2010, 17:13
|
#139
|
elite*gold: 0
Join Date: May 2010
Posts: 298
Received Thanks: 57
|
Decker,
Quote:
Originally Posted by ElectricZebra
Does anyone got mobs yet?
|
'Decker' Simply add about 5 enums for it ex: Hunt Players and guards haaa xd and make a new cs IMob.cs you should know what to put it in then make a new .cs called Mob.cs and code them all in I would personally do a seprate .cs for guards but thats just me
|
|
|
05/26/2010, 00:50
|
#140
|
elite*gold: 0
Join Date: Jun 2009
Posts: 372
Received Thanks: 53
|
would some1 b nice and make a guide on how 2 creat npc coz id really like 2 learn how 2 work this source
|
|
|
05/26/2010, 01:39
|
#141
|
elite*gold: 0
Join Date: Oct 2009
Posts: 8,765
Received Thanks: 5,291
|
Take a look at the released npcs.
|
|
|
05/26/2010, 22:18
|
#142
|
elite*gold: 0
Join Date: May 2010
Posts: 298
Received Thanks: 57
|
Hello
I have this code
Code:
public void DuelistTest()
{
Game.Entity duelist = new Game.Entity(Game.EntityFlag.Bot);
duelist.MapObjType = Game.MapObjectType.Bot;
this.BotOwner = Entity;
BotOwner = Entity;
duelist.Name = Entity.Name + "[BOT]";
duelist.X = Entity.X += 1;
duelist.Y = Entity.Y += 1;
duelist.Dodge = Entity.Dodge *= 2;
duelist.Defence = Entity.Defence *= 2;
duelist.MapID = Entity.MapID;
duelist.Body = Entity.Body;
duelist.Hitpoints = Entity.MaxHitpoints;
duelist.Level = Entity.Level;
duelist.Stamina = 250;
duelist.Face = Entity.Face;
duelist.Facing = Entity.Facing;
duelist.HairColor = Entity.HairColor;
duelist.HairStyle = Entity.HairStyle;
duelist.Strength = 750;
duelist.Agility = 750;
duelist.Spirit = 750;
duelist.Vitality = 750;
duelist.Spouse = "TheServer";
duelist.MinAttack = 500;
duelist.MaxAttack = 3000;
duelist.BaseMinAttack = 500;
duelist.BaseMaxAttack = 3000;
duelist.BaseMagicDefence = 300;
duelist.BaseMagicAttack = 5000;
duelist.Class = Entity.Class;
duelist.ItemBless = Entity.ItemBless;
duelist.ItemHP = Entity.ItemHP;
duelist.ItemMP = Entity.ItemMP;
duelist.PKMode = Game.Enums.PKMode.PK;
// entity.UID = 400001;
duelist.UID = (uint)ServerBase.Kernel.Random.Next(400000, 500000);
ServerBase.Kernel.Bots.Add(duelist.UID, this);
duelist.SendSpawn(this);
}
What should I be adding to that to make it ahve my equiment ?
|
|
|
05/26/2010, 22:24
|
#143
|
elite*gold: 0
Join Date: Oct 2009
Posts: 8,765
Received Thanks: 5,291
|
I know in 5165, its GC.MyChar.Equips.RightHand.ID = WeaponID;
Just change the 'RightHand' to whatever equip placement.
Idk about impulse's source though.
|
|
|
05/26/2010, 22:40
|
#144
|
elite*gold: 0
Join Date: Oct 2009
Posts: 768
Received Thanks: 550
|
You should copy the spawn buffer of your entity (Entity.SpawnPacket) to your bot and then only change the name and UID(it will close the client if you do not change the UID).
duelist.SpawnPacket = new byte[Entity.SpawnPacket.Length];
Entity.SpawnPacket.CopyTo(duelist.SpawnPacket, 0);
Also, I've seen
duelist.Dodge = Entity.Dodge *= 2;
duelist.Defence = Entity.Defence *= 2;
Code:
Entity.Dodge = 5;
Entity.Defence = 10;
duelist.Dodge = Entity.Dodge *= 2;
duelist.Defence = Entity.Defence *= 2;
Beat me if Entity.Dodge won't be 10 and Entity.Defence won't be 20
|
|
|
05/26/2010, 22:43
|
#145
|
elite*gold: 0
Join Date: May 2010
Posts: 298
Received Thanks: 57
|
Quote:
Originally Posted by -impulse-
You should copy the spawn buffer of your entity (Entity.SpawnPacket) to your bot and then only change the name and UID(it will close the client if you do not change the UID).
duelist.SpawnPacket = new byte[Entity.SpawnPacket.Length];
Entity.SpawnPacket.CopyTo(duelist.SpawnPacket, 0);
Also, I've seen
duelist.Dodge = Entity.Dodge *= 2;
duelist.Defence = Entity.Defence *= 2;
Code:
Entity.Dodge = 5;
Entity.Defence = 10;
duelist.Dodge = Entity.Dodge *= 2;
duelist.Defence = Entity.Defence *= 2;
Beat me if Entity.Dodge won't be 10 and Entity.Defence won't be 20
|
Thanks but whats wrong with dodge and defence being 10 and 20 ?
|
|
|
05/27/2010, 08:04
|
#146
|
elite*gold: 0
Join Date: Oct 2009
Posts: 768
Received Thanks: 550
|
Next time you do that the Entity.Dodge will 20 and Entity.Defence will 40
*You modify Entity.Dodge and Entity.Defence that's the problem.
|
|
|
05/27/2010, 08:35
|
#147
|
elite*gold: 21
Join Date: Jul 2005
Posts: 9,193
Received Thanks: 5,377
|
@bot equipment. Simple way is to loop through the client eq and add it to bot eq.
So something like (coemu'ish example)
Foreach(keyvaluepair<int, iteminfo> item in client.equipment)
bot.equipment.add(item.id, item)
Not a perfect example but do that before spawning and it should work properly to clone your items onto the bot (redo item uid though or it may cause a problem)
|
|
|
05/27/2010, 09:46
|
#148
|
elite*gold: 0
Join Date: Oct 2009
Posts: 768
Received Thanks: 550
|
Quote:
Originally Posted by pro4never
@bot equipment. Simple way is to loop through the client eq and add it to bot eq.
So something like (coemu'ish example)
Foreach(keyvaluepair<int, iteminfo> item in client.equipment)
bot.equipment.add(item.id, item)
Not a perfect example but do that before spawning and it should work properly to clone your items onto the bot (redo item uid though or it may cause a problem)
|
The gear that gets spawned on the entity is part of the entity spawn packet, as I said, just copy the entity.spawnpacket into bot.spawnpacket and you have all stats there(except attack, def, etc), but mainly you have like a copy of your entity. Change it's uid and send and a minion looking just like you should appear without headaches.
|
|
|
05/27/2010, 18:15
|
#149
|
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.UID = (uint)ServerBase.Kernel.Random.Next(4000000, 5000000);
lock(ServerBase.Kernel.Bots)
ServerBase.Kernel.Bots.Add(duelist.UID, this);
duelist.Name = Entity.Name + "[BOT]";
duelist.Body = Entity.Body;
for(int counter = 12; counter < 130; counter++)
duelist.SpawnPacket[counter] = Entity.SpawnPacket[counter];
duelist.X = Entity.X += 1;
duelist.Y = Entity.Y += 1;
duelist.SendSpawn(this);
}
|
|
|
05/27/2010, 18:26
|
#150
|
elite*gold: 0
Join Date: May 2010
Posts: 298
Received Thanks: 57
|
Again it spawns but no equips
|
|
|
|
|
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 +2. The time now is 10:24.
|
|