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!

Advanced Sailboat Transport System

H

hudel

Guest
In SailGump.cs you can find the following code:

Code:
		public InternalSailGump ( Mobile from, int cost, Point3D sendTo, Point3D sailTo) : base ( 20, 30 )
		{
			m_cost = cost;
			m_sendTo = sendTo;
			m_SailTo = sailTo;
			
			AddPage ( 0 );
			AddBackground( 0, 0, 410, 107, 5054 );

			AddImageTiled( 10, 10, 390, 23, 0x52 );
			AddImageTiled( 11, 11, 388, 21, 0xBBC );

			AddLabel( 100, 11, 0, "Sailing this far will cost you "+ m_cost/4 + " Gold"  );

			AddButton( 11, 35, 0x15E3, 0x15E7, 1, GumpButtonType.Reply, 1 );
			AddLabel( 30, 34, 0, "Pay it" );
			AddButton( 11, 57, 0x15E3, 0x15E7, 2, GumpButtonType.Reply, 1 );
			AddLabel( 30, 56, 0, "Show Sailboat Membershipcard" );
			AddButton( 11, 79, 0x15E3, 0x15E7, 3, GumpButtonType.Reply, 1 );
			AddLabel( 30, 78, 0, "Uhm, no thank you" );

		}

I think the two numbers "20, 30" have something to do with the price. You can find it out by testing. You can also change the formula. I think this is an easier way ... ;)
 

Braun

Wanderer
Anvil said:
Well, another idea would be to purchase a ticket from a NPC or stone at the doc based upon the location to where the player wants to go. Say, to Trinsic from Britain is 300gp where from Trinsic to Ice Isle is 500gp. But when a ticket is purchased, then a ticket is issued to the players backback. A boat spawns at the doc and is unlocked (hold is locked), and player or "players", get on the boat. Player who has ticket gives ticket to tillerman. Any open planks close, and then the boat sets sail to it's destination. Once it reaches, and all members reach the shore and noone is left on the ship, all planks close, and the ship is removed.

Any ideas?

Sounds good, but you must take into consideration that anything can get in the way and stop the boat, so there would have to be some type of method to make the boat continue or navigate around the object or item that has caused it to stop..
 
S

Supremeone

Guest
this "idea" wont work unless you program it as if it were a creature...(going to a waypoint)
 

Pyro-Tech

Knight
up the z axis to make it just apper to be in water....but it will follow the path and go over the boats


makes sense to me


just lose a little when it suddenly goes over a boat
 
Thanks for a really great script! This totally changed the way my shard will operate.. Hands down the most shard-changing script I have come across thus far! :)

Now I am working on trying to get it to send you to back to tram from ishlenar.. Hehehe..
 

jrocks

Wanderer
Wayland Archer said:
Now I am working on trying to get it to send you to back to tram from ishlenar.. Hehehe..

No offense but doesn't that defeat the point of the script, bearing in mind it is boat travel, and you can't sail between different worlds
 

Kyrama

Wanderer
I must say, this script is great!

My players love it, its easy to install, couldn't be any better.

Thanks a lot!
 
Yea, I can see your point jrocks, and yes, it is not very realistic in a logical sense that a ship can bring you from ish to trammel.

The reason why I wanted the sailboat to take people from Ishlenar to Trammel is because I removed all the trammel and felucca destinations from the public moongates, and disabled all the recall/gate spells in order to encourage more foot travel in and around the continent.. I left the public moongate portals to ishlenar so people can go there and play. I needed a way for them to get back. I figure most people will begin exploring my world on the continent, and eventually find a moongate.. they will see ish locations.. and they may be brave and go.. once there they can not get back via the moongate.. this would encourage them to find a way home (an adventure).. hopefully they find the ship on the docks.. and then they learn the mode of transport around my shard.. If not... I hope they like Ish.. Muhahahaha
 

stormwolff

Knight
Revolution said:
how can i add other keywords like "sail" to make ppl, errr... sail!
Add, not change

In the sailmaster.cs find this part

if (e.Speech == "sail")
{
e.Mobile.SendGump(new Gumps.SailGump(e.Mobile, this.Location));
}

and add something like this after it

else if (e.Speech == "taco")
{
e.Mobile.SendGump(new Gumps.SailGump(e.Mobile, this.Location));
}
 

Revolution

Wanderer
Wayland Archer said:
Yea, I can see your point jrocks, and yes, it is not very realistic in a logical sense that a ship can bring you from ish to trammel.

The reason why I wanted the sailboat to take people from Ishlenar to Trammel is because I removed all the trammel and felucca destinations from the public moongates, and disabled all the recall/gate spells in order to encourage more foot travel in and around the continent.. I left the public moongate portals to ishlenar so people can go there and play. I needed a way for them to get back. I figure most people will begin exploring my world on the continent, and eventually find a moongate.. they will see ish locations.. and they may be brave and go.. once there they can not get back via the moongate.. this would encourage them to find a way home (an adventure).. hopefully they find the ship on the docks.. and then they learn the mode of transport around my shard.. If not... I hope they like Ish.. Muhahahaha

maybe you can create an airship, like the Final Fansasies ones, that works based on mist or coal on an recent industrial world. This can be nice and will make sense in groin grom ish to trammel
for this u would need a multi or static it

oh, and thanks for awnsering my question so fast :)
 

ultimaIX

Wanderer
Snuk the Great said:
Wow! This is great! :)


On my Ultima: Britannia shard I added to the SailMaster a bit of text when someone approaches it to let them know that the keyword is Sail. If anyone can use it great!

In the SailMaster.cs I added the code before the "public override void Serialize( GenericWriter writer ) " section

Code:
		private static bool m_Talked;	   
 
		public override void OnMovement(Mobile m, Point3D oldLocation) 
		{   
		  if( m_Talked == false ) 
			{ 
			   if ( m.InRange( this, 1 ) ) 
			   {				
			  m_Talked = true;
			   this.Say("Hail and well met. When thee are ready to Sail, just say 'Sail' and we will get going...");
			   this.Move( GetDirectionTo( m.Location ) ); 
			   SpamTimer t = new SpamTimer(); 
				t.Start();
				m_Talked = false;
				}
			 }
		  }
 
		private class SpamTimer : Timer   
		{
			public SpamTimer() : base( TimeSpan.FromSeconds( 15 ) )  
			{ 
			  Priority = TimerPriority.OneSecond; 
			} 
		 }

Yrenwick Dragon
 
H

hudel

Guest
@ Yrenwick:
I'm just a noob in scripting but I think the sailmaster just talks when he is walking (-->OnMovement). The Sailmaster doesn't move, therefore he won't speak. Right?
 

FLuXx()

Sorceror
OnMovement detects someone moving around the NPC, not the NPC moving. (Maybe it goes both ways i dun know for sure)
 

ultimaIX

Wanderer
Right FLuXx(), OnMovement looks for other people/animals moving close to the SailMaster.

Once the SailMaster detects someone close to him, he will then turn to the person and say his greeting. (him/he could be her/she)

I hope this helps!

Yrenwick Dragon
 
First off. I haven't been online for a week and i didn't make any adjustments yet cause my parents are a bit winy (hey, and that for a 18yr old guy) and cause i got some other stuff to do ass well. But don't worry. I got lots off ideas and i will not be leaving you all yet.

Second. I found out that some people got on the sailboat to pk people that were traveling. Dont realy know how they did it but i think with the recall spell. So I just made a custom area with the region in a box and added a guardzone and I disabled some spells there. Just for u people that are having the same prob. I first tried to make a guardzone within every boat, butt that di'dn't turn out that well. So if anyone could help me a bit?

And here for some comments about some posts:

Revolution said:
I noticed a bug on the sailmaster. Not a bug itselft, but kind of an odditie.
In trammel, to sail to Haven, the sailboat will stop at the harbor on Lake Haven, what is impossible! Does the boat flies???
Take a look at this map from UO Stratics: http://uo.stratics.com/content/atla...xdegree=154&xminute=53&x_type=E&submit=+Go+!+

For Felucca, it's correct, the boat can pass because there is a small passage to Lake Occlo

Ehm, hèhè. I kind a asumed that any place with a harbor would be accesable from sea, why would it have a harbor if it did'nt. So yes this is abit of a bug. I can remove it but i dont think people are bothered by this. I think that people would like it more if it is kept this way :p.

ultimaIX said:
Wow! This is great! :)

On my Ultima: Britannia shard I added to the SailMaster a bit of text when someone approaches it to let them know that the keyword is Sail. If anyone can use it great!

Yrenwick Dragon

I will add these lines to the script myself, cause i like it :D. I will update it in here ass well. And I fixed the spamtimer, cause it wasn't complete, so it did not work.
I also made the sailmaster look at you when you say "sail".
 

Ravenal

Knight
Hello,

Snuk the Great, It is up to you to msn me or email me, I have some free time right now and I could (Help you or attcually do this offical ship movement from Docks to docks, It would take some time, but I know I could be a good help, it is up to you, i am just offering you my help, otherwise i'll be like a rat trying to find it's tail, which to none of you it might make no sense, but if you know what i mean, When a rat is so smart and intelliegnce that sometimes they can forget things, well So basically what i mean is i'll be looking and stareing at other scripts, because I have been trying to develop new cool plans for a cool spell or system like the one your making, msn is [email protected] and its the same as for email.

-awakenlands-

btw i took a glance at some of your work good job :)
 
Top