Project-Throwback Revival. Classic Based CO server

06/01/2013 04:15 pro4never#61
Quote:
Originally Posted by _DreadNought_ View Post
API*

Also, I bet you ultimation's tournamentAPI whoops all of yours. :p

Also pro4never, did you ever notice AcidCOV3 implemented man vs machine? (The idea you were on about where you literally fight bots. ;))
I've done a number of duelist bots in both private and public sources.

Tournament bots that have more AI than basic fighting are a bit more advance but have been done by multiple people. I know someone (sorry cannot think of forum username) had complete AI bots that you could hire to do just about anything you can think of; hunt players, participate in full pvp events/guild war and more.
06/01/2013 04:49 InfamousNoone#62
Making the bots isn't hard, making them seem "realistic" but not retarded is hard.
06/01/2013 09:10 _DreadNought_#63
Quote:
Originally Posted by pro4never View Post
I've done a number of duelist bots in both private and public sources.

Tournament bots that have more AI than basic fighting are a bit more advance but have been done by multiple people. I know someone (sorry cannot think of forum username) had complete AI bots that you could hire to do just about anything you can think of; hunt players, participate in full pvp events/guild war and more.
After all the stuff you said about how cool it would be in previous posts I expected to get a "OMGWTFBBQ" response.

Guess not.

[Only registered and activated users can see links. Click Here To Register...]
06/01/2013 09:52 Battousai-sama#64
Server was pretty chill back then just a dick head owner.
Server is chill now with a better head owner.

As for the ddos claims and such, i haven't seen once my shiit laggin out and resources being used elsewhere.

All these false claims with no proof, don't just argue with what Skipunk did with his shit just because the name is "PTB-Revival" yall just being ignorant as fuck...
And like 12k said this server doesn't have a fucking client yet. so how can we get infected with such "Client"...

Accusing of stuff that doesnt even exist in current PTB-Revival server.
get your shiit str8 haters.
06/01/2013 11:26 Super Aids#65
Quote:
Originally Posted by _DreadNought_ View Post
API*

Also, I bet you ultimation's tournamentAPI whoops all of yours. :p

Also pro4never, did you ever notice AcidCOV3 implemented man vs machine? (The idea you were on about where you literally fight bots. ;))
I already have the 2nd lmao (I assume you just meant duelbots). Will also be including it in the tournaments, where bots joins tournaments if there isn't enough players aye.

And yeah sorry for forgetting the P :( Hahahaha

This is basically mine: (Recently changing it to scripting as well, so rebuilding the server is not necessary.)
Code:
public abstract class TournamentBase
	{
		public TournamentBase()
		{

		}

		public abstract int MeasureEndTime();
		public abstract void Start();
		public abstract void Send();
		public abstract void End();
		public abstract bool SignUp(Entities.GameClient client, out bool AlreadySigned);
		
		public void SendMessage(string Message)
		{
			using (var msg = Packets.Message.MessageCore.CreateCenter(Message))
			{
				Packets.Message.MessageCore.SendGlobalMessage(msg);
			}
		}
		public void SendMessageBC(string Message)
		{
			using (var msg = Packets.Message.MessageCore.CreateBroadcast("SYSTEM", Message))
			{
				Packets.Message.MessageCore.SendGlobalMessage(msg);
			}
		}
		
		public void SendMessage(Entities.GameClient client, string Message)
		{
			using (var msg = Packets.Message.MessageCore.CreateCenter(Message))
			{
				client.Send(msg);
			}
		}
		
		public abstract void UpdateBroadcast();
	}
Code:
public abstract class BattleClass
	{
		public abstract bool HandleBeginAttack(Entities.GameClient Attacker);
		public abstract bool HandleAttack(Entities.GameClient Attacker, Entities.GameClient Attacked, ref uint damage);
		public abstract bool HandleBeginHit_Physical(Entities.GameClient Attacker);
		public abstract bool HandleBeginHit_Ranged(Entities.GameClient Attacker);
		public abstract bool HandleBeginHit_Magic(Entities.GameClient Attacker, Packets.UseSpellPacket usespell);
		public abstract bool HandleDeath(Entities.GameClient Attacker, Entities.GameClient Attacked);
	}
The battle class is used in other things such as arena as well. Let's me control the attack-handler dynamically.

Example for LastManStanding:
Code:
public class LastManStandingBattleClass : Data.BattleClass
		{
			public LastManStanding LastManStanding;
			
			public override bool HandleBeginAttack(ProjectX_V3_Game.Entities.GameClient Attacker)
			{
				return (DateTime.Now >= LastManStanding.TournamentStartTime);
			}
			public override bool HandleBeginHit_Physical(ProjectX_V3_Game.Entities.GameClient Attacker)
			{
				return false;
			}
			public override bool HandleBeginHit_Ranged(ProjectX_V3_Game.Entities.GameClient Attacker)
			{
				return false;
			}
			public override bool HandleBeginHit_Magic(ProjectX_V3_Game.Entities.GameClient Attacker, Packets.UseSpellPacket usespell)
			{
				if (usespell.SpellID != 1045 && usespell.SpellID != 1046)
					return false;
				return true;
			}
			public override bool HandleAttack(ProjectX_V3_Game.Entities.GameClient Attacker, ProjectX_V3_Game.Entities.GameClient Attacked, ref uint damage)
			{
				damage = 1;
				
				Attacked.TournamentScore.CurrentHP -= 1;
				LastManStanding.SendMessage(Attacked, string.Format(LastManStanding.HEALTH, Attacked.TournamentScore.CurrentHP));
				
				if (Attacked.TournamentScore.CurrentHP <= 0)
				{
					Attacker.TournamentScore.CurrentScore += 1;
					Attacker.TournamentInfo.TotalKills += 1;
					
					Entities.GameClient rClient;
					LastManStanding.Players.TryRemove(Attacked.EntityUID, out rClient);
					
					Attacked.Battle = null;
					Attacked.Equipments.ClearMask();
					if (Attacked.TournamentScore.CurrentScore >= 5)
						Attacked.TournamentInfo.TournamentPoints += LastManStanding.EXTRA_SCORE;
					
					Attacked.TournamentInfo.TotalDeaths -= 1;
					
					Attacked.Teleport(Attacked.LastMapID, Attacked.LastMapX, Attacked.LastMapY);
					
					LastManStanding.UpdateBroadcast();
					LastManStanding.CheckForWin();
				}

				return false;
			}
			public override bool HandleDeath(ProjectX_V3_Game.Entities.GameClient Attacker, ProjectX_V3_Game.Entities.GameClient Attacked)
			{
				return false;
			}
		}
Still not finished though.

inb4gettingofftopic
06/01/2013 16:04 12k#66
I haven't got to the point of adding the player bots for person vs bot yet, but I did already have the idea of using them for cinematics/quests, which i do have finished, just need to add in the quests for them. Always thought of it as a good idea. But yeah, not hard at all, basically a mob with a different uid. Agree with infamous tho on the AI.
06/01/2013 18:33 Super Aids#67
Quote:
Originally Posted by 12k View Post
I haven't got to the point of adding the player bots for person vs bot yet, but I did already have the idea of using them for cinematics/quests, which i do have finished, just need to add in the quests for them. Always thought of it as a good idea. But yeah, not hard at all, basically a mob with a different uid. Agree with infamous tho on the AI.
If you think a duelbot is just a mob with a different UID then you're sadly mistaken. It's more like a player and you have to make it realistic looking which is what's hard. Calculating players position compared to the bot, the distance, the angle it should jump, when it should uses skills and normal physical attacks, sit and do other stuff, perhaps walk-routes and finding targets is hard when it has to be combined almost perfect together.
06/01/2013 21:58 _DreadNought_#68
Quote:
Originally Posted by Super Aids View Post
I already have the 2nd lmao (I assume you just meant duelbots). Will also be including it in the tournaments, where bots joins tournaments if there isn't enough players aye.

And yeah sorry for forgetting the P :( Hahahaha

This is basically mine: (Recently changing it to scripting as well, so rebuilding the server is not necessary.)
Code:
public abstract class TournamentBase
	{
		public TournamentBase()
		{

		}

		public abstract int MeasureEndTime();
		public abstract void Start();
		public abstract void Send();
		public abstract void End();
		public abstract bool SignUp(Entities.GameClient client, out bool AlreadySigned);
		
		public void SendMessage(string Message)
		{
			using (var msg = Packets.Message.MessageCore.CreateCenter(Message))
			{
				Packets.Message.MessageCore.SendGlobalMessage(msg);
			}
		}
		public void SendMessageBC(string Message)
		{
			using (var msg = Packets.Message.MessageCore.CreateBroadcast("SYSTEM", Message))
			{
				Packets.Message.MessageCore.SendGlobalMessage(msg);
			}
		}
		
		public void SendMessage(Entities.GameClient client, string Message)
		{
			using (var msg = Packets.Message.MessageCore.CreateCenter(Message))
			{
				client.Send(msg);
			}
		}
		
		public abstract void UpdateBroadcast();
	}
Code:
public abstract class BattleClass
	{
		public abstract bool HandleBeginAttack(Entities.GameClient Attacker);
		public abstract bool HandleAttack(Entities.GameClient Attacker, Entities.GameClient Attacked, ref uint damage);
		public abstract bool HandleBeginHit_Physical(Entities.GameClient Attacker);
		public abstract bool HandleBeginHit_Ranged(Entities.GameClient Attacker);
		public abstract bool HandleBeginHit_Magic(Entities.GameClient Attacker, Packets.UseSpellPacket usespell);
		public abstract bool HandleDeath(Entities.GameClient Attacker, Entities.GameClient Attacked);
	}
The battle class is used in other things such as arena as well. Let's me control the attack-handler dynamically.

Example for LastManStanding:
Code:
public class LastManStandingBattleClass : Data.BattleClass
		{
			public LastManStanding LastManStanding;
			
			public override bool HandleBeginAttack(ProjectX_V3_Game.Entities.GameClient Attacker)
			{
				return (DateTime.Now >= LastManStanding.TournamentStartTime);
			}
			public override bool HandleBeginHit_Physical(ProjectX_V3_Game.Entities.GameClient Attacker)
			{
				return false;
			}
			public override bool HandleBeginHit_Ranged(ProjectX_V3_Game.Entities.GameClient Attacker)
			{
				return false;
			}
			public override bool HandleBeginHit_Magic(ProjectX_V3_Game.Entities.GameClient Attacker, Packets.UseSpellPacket usespell)
			{
				if (usespell.SpellID != 1045 && usespell.SpellID != 1046)
					return false;
				return true;
			}
			public override bool HandleAttack(ProjectX_V3_Game.Entities.GameClient Attacker, ProjectX_V3_Game.Entities.GameClient Attacked, ref uint damage)
			{
				damage = 1;
				
				Attacked.TournamentScore.CurrentHP -= 1;
				LastManStanding.SendMessage(Attacked, string.Format(LastManStanding.HEALTH, Attacked.TournamentScore.CurrentHP));
				
				if (Attacked.TournamentScore.CurrentHP <= 0)
				{
					Attacker.TournamentScore.CurrentScore += 1;
					Attacker.TournamentInfo.TotalKills += 1;
					
					Entities.GameClient rClient;
					LastManStanding.Players.TryRemove(Attacked.EntityUID, out rClient);
					
					Attacked.Battle = null;
					Attacked.Equipments.ClearMask();
					if (Attacked.TournamentScore.CurrentScore >= 5)
						Attacked.TournamentInfo.TournamentPoints += LastManStanding.EXTRA_SCORE;
					
					Attacked.TournamentInfo.TotalDeaths -= 1;
					
					Attacked.Teleport(Attacked.LastMapID, Attacked.LastMapX, Attacked.LastMapY);
					
					LastManStanding.UpdateBroadcast();
					LastManStanding.CheckForWin();
				}

				return false;
			}
			public override bool HandleDeath(ProjectX_V3_Game.Entities.GameClient Attacker, ProjectX_V3_Game.Entities.GameClient Attacked)
			{
				return false;
			}
		}
Still not finished though.

inb4gettingofftopic
Not really a fan, why not have a base class which pretty much does all those return falses and shit and then just override methods you want to change? Less code. :O
06/01/2013 22:16 Super Aids#69
Because I don't need to change anything. I just need to check for certain data being valid and do certain stuff.

You might understand if you actually knew how I made combat xD

The reason why the tournament is over 2 classes is because the BattleClass is associated to each client, since they have a variable for which battle they are in and can't join another battle if it's not null ex. Arena or another tournament.

But yeah the tournaments inherit the TournamentBase class and the tournament contains the BattleClass within itself.
06/02/2013 13:27 12k#70
Quote:
Originally Posted by Super Aids View Post
If you think a duelbot is just a mob with a different UID then you're sadly mistaken. It's more like a player and you have to make it realistic looking which is what's hard. Calculating players position compared to the bot, the distance, the angle it should jump, when it should uses skills and normal physical attacks, sit and do other stuff, perhaps walk-routes and finding targets is hard when it has to be combined almost perfect together.
Please read before you decide to comment. I said I agree with infamous. Meaning that the AI and making it realistic is the hard part. As far as just making basic movements and making it look like a player etc, that part is what makes it practically a mob as far as programming.