RunUO Community

This is a sample guest message. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

XmlPoints

ArteGordon

Wanderer
okyzan said:
int x = killed.Location.1338;
int y = killed.Location.1997;
int z = killed.Location.2;
like that isnt it?
no. If you wanted to give actual fixed values, then it would look like

Code:
			int x = 1338;
			int y = 1997;
			int z = 2;

You could also just move them to some location relative to the gauntlet location with

Code:
			int x = this.Location.X + 30;
			int y = this.Location.Y + 30;
			int z = this.Location.Z;
 

okyzan

Wanderer
the 1338,1197,2 is the cords of brit moongate ill tele them to there so here is my code .now is it true?
Code:
 public override void OnPlayerKilled(Mobile killer, Mobile killed)
        {
            if(killed == null) return;

			// move the killed player and their corpse to a location
			// You have to replace x,y,z with some valid coordinates
			// Using the values below, they wont be moved anywhere
int x = 1338;
int y = 1997;
int z = 2;
			Point3D killedloc = new Point3D(x,y,z);

			// do the actual moving
			killed.MoveToWorld(killedloc, killed.Map);
			if(killed.Corpse != null)
				killed.Corpse.MoveToWorld(killedloc, killed.Map);
 

ArteGordon

Wanderer
okyzan said:
the 1338,1197,2 is the cords of brit moongate ill tele them to there so here is my code .now is it true?
Code:
 public override void OnPlayerKilled(Mobile killer, Mobile killed)
        {
            if(killed == null) return;

			// move the killed player and their corpse to a location
			// You have to replace x,y,z with some valid coordinates
			// Using the values below, they wont be moved anywhere
int x = 1338;
int y = 1997;
int z = 2;
			Point3D killedloc = new Point3D(x,y,z);

			// do the actual moving
			killed.MoveToWorld(killedloc, killed.Map);
			if(killed.Corpse != null)
				killed.Corpse.MoveToWorld(killedloc, killed.Map);


as long as they are killed in Felucca, then it will do what you expect. Currently it is using the same map as the one they were killed on. If you wanted to force it to Felucca, you would change the references to 'killed.Map' to 'Map.Felucca'

same thing would apply for Trammel.
 

okyzan

Wanderer
ok now the system is just working perfecty!!thats awesome!!but now for the last changes (teleport) a bug appeared.we cant know how the lms matches takes long.when the players get killed they are now teleported where i want but they still be in the game so if they died in the pvp outside they teleported again where i want to :) when they killed cant we just kick them from the match ? or anything else?
 

ArteGordon

Wanderer
okyzan said:
ok now the system is just working perfecty!!thats awesome!!but now for the last changes (teleport) a bug appeared.we cant know how the lms matches takes long.when the players get killed they are now teleported where i want but they still be in the game so if they died in the pvp outside they teleported again where i want to :) when they killed cant we just kick them from the match ? or anything else?

in xmlpoints.cs, in the OnKilled method, around line 2190 try making this change

change
Code:
			// handle challenge team kills
			if(ChallengeGame != null && !ChallengeGame.Deleted && ChallengeGame.GetParticipant(killer) != null)
			{
				ChallengeGame.OnPlayerKilled(killer, killed);
			}

to this

Code:
			// handle challenge team kills
			if(ChallengeGame != null && !ChallengeGame.Deleted && ChallengeGame.GetParticipant(killer) != null 
[color=red]&& ChallengeGame.GetParticipant(killed) != null[/color])
			{
				ChallengeGame.OnPlayerKilled(killer, killed);
			}
 

okyzan

Wanderer
ArteGordon said:
using the location 1398,3742,-21 the range is 14.

Just go to that location, walk to the walls, do a [where and then do the calculation of the distance.

(edit)

you will know that you have it right if you can go to any location in your arena and try to start a challenge. That arena should be listed in red as already occupied (since you are standing in it).

i dont understand the wall and the calculation part :confused:
 

ArteGordon

Wanderer
okyzan said:
i dont understand the wall and the calculation part :confused:

go to your starting location 1398,3742,-2

then walk to the wall and do a [where and it will give you a coordinate like

1398,3758,-2

if you subtract the y coordinates 3758-3742, you get 16 which is the distance from your starting point to the wall.

You can repeat this for the other walls in both x and y directions and figure out what the maximum distance is from your starting point to the walls and use that as the detection range.
 

okyzan

Wanderer
ArteGordon said:
in xmlpoints.cs, in the OnKilled method, around line 2190 try making this change

change
Code:
			// handle challenge team kills
			if(ChallengeGame != null && !ChallengeGame.Deleted && ChallengeGame.GetParticipant(killer) != null)
			{
				ChallengeGame.OnPlayerKilled(killer, killed);
			}

to this

Code:
			// handle challenge team kills
			if(ChallengeGame != null && !ChallengeGame.Deleted && ChallengeGame.GetParticipant(killer) != null 
[color=red]&& ChallengeGame.GetParticipant(killed) != null[/color])
			{
				ChallengeGame.OnPlayerKilled(killer, killed);
			}

but i think this effects all the games.i want it only for the lmc games.
 

okyzan

Wanderer
if you make this modification only for lmc games ill be very happy.
and a last "must be" modifcation is for my lmc game is when the system teleport them when they killed their mounts stands in the arena.if the mounts they have,teleport with them it will be very good..

i am waiting too see this modifications.if you can done those.the system will be perfect!thanks artegordon ..
 

ArteGordon

Wanderer
okyzan said:
if you make this modification only for lmc games ill be very happy.
and a last "must be" modifcation is for my lmc game is when the system teleport them when they killed their mounts stands in the arena.if the mounts they have,teleport with them it will be very good..

i am waiting too see this modifications.if you can done those.the system will be perfect!thanks artegordon ..

use this mod to teleport the player, his corpse, and any nearby mounts or pets.

Code:
			// move the killed player and their corpse to a location
			// you have to replace x,y,z with some valid coordinates
			int x = this.Location.X + 30;
			int y = this.Location.Y + 30;
			int z = this.Location.Z;
			Point3D killedloc = new Point3D(x, y, z);

			ArrayList petlist = new ArrayList();

			foreach (Mobile m in killed.GetMobilesInRange(16))
			{
				if (m is BaseCreature && ((BaseCreature)m).ControlMaster == killed)
				{
					petlist.Add(m);
				}
			}

			// port the pets
			foreach (Mobile m in petlist)
			{
				m.MoveToWorld(killedloc, killed.Map);
			}

			// move the player and his corpse
			killed.MoveToWorld(killedloc, killed.Map);

			if (killed.Corpse != null)
				killed.Corpse.MoveToWorld(killedloc, killed.Map);
 

okyzan

Wanderer
thanks arte.but i found a new bug.players can cast spell to 1vs1 arenas and can teleport there when there is a challenge in the arena :(
and a very big too:in the deatball game the deatball is insurable :(
 

ArteGordon

Wanderer
okyzan said:
thanks arte.but i found a new bug.players can cast spell to 1vs1 arenas and can teleport there when there is a challenge in the arena :(
and a very big too:in the deatball game the deatball is insurable :(

easiest solution to the deathball problem is to just make it cursed.

in DeathBallGauntlet.cs around line 22

Code:
		[Constructable]
		public DeathBall()
			: base(0x2257)
		{
			Hue = 1289;
			Name = "DeathBall";
			[color=red]LootType = LootType.Cursed;[/color]
		}

casting into and teleporting into arenas would be something you would need to handle in a region definition.
What I would do would be to make a region around the arena that included your public areas, and disable all spell casting there.
You can use the Region in a box script for that.
 

okyzan

Wanderer
Arte is there a restriction to tamers in the deathball game?because they cant use their pets to attack
like "all kill"..
 

ArteGordon

Wanderer
okyzan said:
Arte is there a restriction to tamers in the deathball game?because they cant use their pets to attack
like "all kill"..

In general pets are not supported in pvp activities including games.

You can allow them by modifying the AreChallengers method for any particular game. In deathball you can make this mod. I havent actually tested this but it should work

Code:
        public override bool AreChallengers(Mobile from, Mobile target)
        {
[color=red]
			// allow pets of challengers
			if (from is BaseCreature && (((BaseCreature)from).Controled || ((BaseCreature)from).Summoned))
				from = ((BaseCreature)from).ControlMaster;
			if (target is BaseCreature && (((BaseCreature)target).Controled || ((BaseCreature)target).Summoned))
				target = ((BaseCreature)target).ControlMaster;
[/color]
            // everyone participant is a challenger to everyone other participant, so just being a participant
            // makes you a challenger
            return(AreInGame(from) && AreInGame(target));
        }
 

ArteGordon

Wanderer
okyzan said:
will you update this script arte?are you planning to add more games to system like paintball?
I have been updating the system but havent put out a new release yet. There are no plans to add a paintball game at the moment.
 
Top