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!

Flying Gryphon RUNUO 2.0 SVN 156

madron

Wanderer
Flying Gryphon RUNUO 2.0 SVN 156

Flying Gryphon, all compiles and no bugs found as yet. Please let me know if you find any; but know I am still learning to script.

My first submission to the community, Credit goes to the one who made the flying pet script, which I do not know your name, my apologies.
And to Admin Vile for the Flying Chimera Script which inspired me. I modified this for RUNUO 2.0 SVN 156.

This is NOT my script, I take no credit other than I modified it to work with RUNUO 2, and gave it a new name for my shard.
This is a modified script of the Flying Chimera script by Admin Vile.

I hope you enjoy it.
Directions for modifying PlayerMobile are included in script

Things I am working on: I am still trying to perfect the flying, to make look smoother in flight.

Credit to GoldDraco13 for the flying Script, Thank you Hellrazor.
 

Attachments

  • FlyingGryphon.zip
    5.3 KB · Views: 1,025

Tru

Knight
xxx007xxx;691099 said:
You can fly everywhere! also into dungeon.

I havent looked at this version (actually havent looked at any version in awhile) but if it uses the Checkmap method then this should help:

Code:
public static bool checkmap( Mobile m )
		{
      
                	if ( m.Map == Map.Trammel && m.Z >= 100 || m.X <= 1 || m.Y <= 1 || m.X >= 5090 || m.Y >= 4085)
			return true;


			return false;
		}
Of course that entry is only for Tram,copy it and change the name for Fel and the other maps you would have to get the coords and do likewise (now this would make it so you fly anywhere outside except the Lost Lands).
 

xxx007xxx

Sorceror
Crowley62;691128 said:
hmm i cant seem to make it leave the ground. What do you do when you are on it and do you need svn 156?

Look how you can get the gump. It allow you to raise your z value
You need 100 taming

Code:
if ( from.InRange( this, 1 ) )
		   	{
			   	if( ((Mobile)from).Skills[SkillName.AnimalTaming].Value >= 100.0 )
			   	{
				   	from.SendGump(new Gryphongump( from , 0) );
			   	}
				if ( ( Controlled && ControlMaster == from ) || ( Summoned && SummonMaster == from) || from.AccessLevel >= AccessLevel.GameMaster )
			   	{
				  	Rider = from;
			   	}



Thx Tru
There is no check for x and y location.
 

xxx007xxx

Sorceror
Tru;691149 said:
You shouldnt even be able to mount it if you dont have enough taming.

Code:
	if ( from.InRange( this, 1 ) )
		   	{
		if ( (from.Skills[SkillName.AnimalTaming].Value >= 100.0) &&( Controlled && ControlMaster == from ) || from.AccessLevel >= AccessLevel.GameMaster )
			   	{
					Rider = from;
						from.SendGump(new Gryphongump( from , 0) );
						}
				else if ( !Controlled && !Summoned )
			   	{
				   	from.SendLocalizedMessage( 501263 ); // That mount does not look broken! You would have to tame it to ride it.
			   	}
			   	else
			   	{
				   	from.SendLocalizedMessage( 501264 ); // This isn't your mount; it refuses to let you ride.
			   	}
		   	}
right?
---------------------------------

z should raise faster.
 

Crowley62

Sorceror
Funny thing was somehow i mounted it without taming it but then i tamed it and still couldn't figure it out i will play with it a little more thx
 

Tru

Knight
xxx007xxx;691152 said:
Code:
	if ( from.InRange( this, 1 ) )
		   	{
		if ( (from.Skills[SkillName.AnimalTaming].Value >= 100.0) &&( Controlled && ControlMaster == from ) || from.AccessLevel >= AccessLevel.GameMaster )
			   	{
					Rider = from;
						from.SendGump(new Gryphongump( from , 0) );
						}
				else if ( !Controlled && !Summoned )
			   	{
				   	from.SendLocalizedMessage( 501263 ); // That mount does not look broken! You would have to tame it to ride it.
			   	}
			   	else
			   	{
				   	from.SendLocalizedMessage( 501264 ); // This isn't your mount; it refuses to let you ride.
			   	}
		   	}
right?
---------------------------------

z should raise faster.

That looks right as for raising faster you could go in and make it raise 2 z at a time rather than 1 (or whatever for your desired effect)
 

xxx007xxx

Sorceror
timer sequence 9 or 10
9: raise 10: lower
new Flyingtimer( pm, 9 );
public Flyingtimer( PlayerMobile m, int seq ) : base( TimeSpan.FromSeconds( 0.2 ) )
so into OnTick d = seq;
raise faster
Code:
                		else if ( d == 9) 
                		{
                      			Tile[] tiles = m_Mobile.Map.Tiles.GetStaticTiles( ( m_Mobile.X ), ( m_Mobile.Y ), true );
		      			Tile landTile = m_Mobile.Map.Tiles.GetLandTile( m_Mobile.X, m_Mobile.Y );

					for ( int i = 0; i < tiles.Length; ++i )
		           		{
		           			Tile tile = tiles[i];
                           			if ( tile.Z >= ( m_Mobile.Z +5 ) )
                           			location1 = true;
                           		}
                             
                           		if ( landTile.Z >= ( m_Mobile.Z +5 )  )
                           		location1 = true;

					if ( location1 || checkmap( m_Mobile ) )
		             		{
                            			m_Mobile.CloseGump( typeof( Gryphongump ) );
                             			m_Mobile.SendGump(new Gryphongump( m_Mobile , 0) ); 
                             			Start();
                             		}
                             		else
		             		{
						if ( anim <= 0)
                				{
                					animateflying(m_Mobile);
                					anim = 2;
                				}
                				else
                				{
                				anim -= 1;
                				}	
		
						m_Mobile.Direction |= Direction.Running;
						[COLOR="Red"]m_Mobile.Z += 2;[/COLOR]
                             			Start(); 
                             		}
                		}
the same to lower faster
find : else if ( d == 10)
and change
m_Mobile.Z -= 2;


so every all .2sec it raise or lower by 2
 

HellRazor

Knight
madron;690858 said:
My first submission to the community, Credit goes to the one who made the flying pet script, which I do not know your name, my apologies.

That would be GoldDraco13.
 

madron

Wanderer
HellRazor;691170 said:
That would be GoldDraco13.

Thank you so much Hellrazor. I could not find this name, and I searched for hours!

@XXX I have the Gryphon at 100 taming, to give a special treat on my shard, as taming is the most difficult to raise. I have also adjusted the script so that it cannot go into dungeons while in flight, but I hit an error and had to stop yesterday.

Making it raise and lower faster, is a great idea, thank you everyone for helping with this!!! I am still playing and testing and learning thanks to you guys! I will test it again and upload a new script once I finish.

You guys are great! Thanks :D
 

madron

Wanderer
Crowley62;691153 said:
Funny thing was somehow i mounted it without taming it but then i tamed it and still couldn't figure it out i will play with it a little more thx

If you were on your staff character then yes you can mount it, but NOT fly. You must tame the creature in order to fly.
 

Crowley62

Sorceror
whatever was the problem it is gone when i added it to my server. The test server is not the same as real server.Thx players love this
 

madron

Wanderer
Crowley62;691367 said:
whatever was the problem it is gone when i added it to my server. The test server is not the same as real server.Thx players love this


Just some advice. I am glad you got it working. Always backup your work. I take a fresh copy of the server scripts when I am testing a new script. I am assured that when I install it to the server it will compile and run just as it did when testing. But whatever you do, always BACKUP your scripts first.
 

Fixxxer

Sorceror
Flying everywhere

Is there a fix to being able to flying everywhere, is there a way where if it is certain tiles you can not fly over them? I want to add this but with a player having free roam to go anywhere they want, then i couldnt add this. Any suggestions on what I would need to work on to get this to work would be great. Thanks..
 

Tru

Knight
Fixxxer;691481 said:
Is there a fix to being able to flying everywhere, is there a way where if it is certain tiles you can not fly over them? I want to add this but with a player having free roam to go anywhere they want, then i couldnt add this. Any suggestions on what I would need to work on to get this to work would be great. Thanks..

Tru;691138 said:
Code:
public static bool checkmap( Mobile m )
		{
      
                	if ( m.Map == Map.Trammel && m.Z >= 100 || m.X <= 1 || m.Y <= 1 || m.X >= 5090 || m.Y >= 4085)
			return true;


			return false;
		}
Of course that entry is only for Tram,copy it and change the name for Fel and the other maps you would have to get the coords and do likewise (now this would make it so you fly anywhere outside except the Lost Lands).

Try this......
 

madron

Wanderer
Tru;691482 said:
Try this......


This works, but I did change the Z from 100 to 60. It stops players from going over a certain mountain area that I don't want accessed yet. But Tru's solution will prevent them from going into dungeons.

changing the Z depends on the map your using, so be careful. i took the lowest point of the map I was using, (custom so I know its 0) and added 60 to it. In Islehanar I know its a negative number.

I hope you get it to work.

@XXX
I did not like the way the raising and lowering worked after I tried your fix. so I am still working on a smoother landing and take off for this. It just seemed more choppy to me.
 

Fixxxer

Sorceror
Tru;691482 said:
Try this......

That worked good for the dungeons, so thats not a worry now, however if you are flying already and you continue to move off the map you will continue to move without animation or restictions, is there a way that it would work like a boat and just stop if its moving or not. Also if you stop moving in an area outside of the difined area then you are stuck so that part is work outside the area.

What about certain tiles, if there are certain tiles then they wouldnt be able to move across it? There are some areas that I dont want players to be able to get to in the map area, if i could put some tiles or no draw whatever around those areas then could that be scripted in somewhat easily lol.
 

madron

Wanderer
Fixxxer;691488 said:
That worked good for the dungeons, so thats not a worry now, however if you are flying already and you continue to move off the map you will continue to move without animation or restictions, is there a way that it would work like a boat and just stop if its moving or not. Also if you stop moving in an area outside of the difined area then you are stuck so that part is work outside the area.

What about certain tiles, if there are certain tiles then they wouldnt be able to move across it? There are some areas that I dont want players to be able to get to in the map area, if i could put some tiles or no draw whatever around those areas then could that be scripted in somewhat easily lol.

Simplest solution is to lower the Z value from 100 to just below what your lowest mountain terrain is, just a thought :).

I am still working on this.
 
Top