Go Back   RunUO - Ultima Online Emulation > RunUO > Script Support

Script Support Get support for modifying RunUO Scripts, or writing your own!

Reply
 
Thread Tools Display Modes
Old 08-06-2007, 05:57 PM   #1 (permalink)
Lurker
 
Count_Duckula's Avatar
 
Join Date: Aug 2007
Age: 32
Posts: 4
Default Npc skill trainers

Righty,
Is it possible to edit a single vendor trainer to teach say only one skill to a very high level? Or do I need to create individual npc scripts?
See, this is my idea, I want to create wandering "Grandmaster Trainers" that will be difficult to find but each of these trainers will be able to train one specific skill all the way to skillcap - at a price off course
I might even want these npc's to appear only when a char has accomplished something like with the Wind city.
Btw, I kinda suck at scripting - although I can at least edit existing scripts, well with a lot of trial and error, so I can use all the help I can get
Count_Duckula is offline   Reply With Quote
Old 08-06-2007, 07:27 PM   #2 (permalink)
Forum Master
 
Lord_Greywolf's Avatar
 
Join Date: Dec 2005
Posts: 6,753
Send a message via Yahoo to Lord_Greywolf
Default

2 ways to do it:

1) make new npc's that will train fro gold being dropped on them (like 1 for each skill or dupping normal ones scripts and modifying as below)

or

2) there is a skill train cap and % to train to in the vendors
i believe the default is 1/3 and 33 (might be 30)
so at 100 skill will train to 1/3 (33.3) but capped at 33
or 120 skill - 1/3 is 40 but capped at 33 to 33 max again

since the vendors normaly do not have skill above 100 (can check their scripts) if you raise the 33 cap up - should have no problem
just give your "super trainers" 300 skill and can train to 100 is cap is set to 100
but they still only charge 1 gold per 1/10 skill trained

but that can be adjusted also in the same script

i believe it is all in base vendor
__________________
http://www.AoAUO.com

:) ..... Come for the Customs, Play for the Fun. Return to see your new Friends ..... :)
Lord_Greywolf is online now   Reply With Quote
Old 08-07-2007, 04:14 PM   #3 (permalink)
Lurker
 
Count_Duckula's Avatar
 
Join Date: Aug 2007
Age: 32
Posts: 4
Default

Taw Lord_Greywolf
Count_Duckula is offline   Reply With Quote
Old 08-27-2008, 02:49 AM   #4 (permalink)
Newbie
 
warduke's Avatar
 
Join Date: Apr 2004
Age: 34
Posts: 77
Default Cant seem to find it in BaseVendor.cs

Hello,

I have tried befor to set thier skills to 300 allowing them to teach a play to 100 skill for 1000 gold. When I have set thier skill to 300 it still will only allow a 420gold skill gain for 42 points. Anyone know whats up or a way around this?


Thanks
__________________
0==[WARDUKE>
warduke is offline   Reply With Quote
Old 08-27-2008, 02:47 PM   #5 (permalink)
Forum Master
 
Lord_Greywolf's Avatar
 
Join Date: Dec 2005
Posts: 6,753
Send a message via Yahoo to Lord_Greywolf
Default

look at the capping for it like i said - also look in basevendor ondragdrom method for it also
__________________
http://www.AoAUO.com

:) ..... Come for the Customs, Play for the Fun. Return to see your new Friends ..... :)
Lord_Greywolf is online now   Reply With Quote
Old 08-28-2008, 01:47 AM   #6 (permalink)
Newbie
 
warduke's Avatar
 
Join Date: Apr 2004
Age: 34
Posts: 77
Default stumped

Ive gone thru line by line the basevendor.cs and cant find it. I see vales for respawns, BoD and such but no skill training cap. Thanks for the help Ill keep surching.
__________________
0==[WARDUKE>
warduke is offline   Reply With Quote
Old 08-28-2008, 02:38 AM   #7 (permalink)
Newbie
 
Join Date: Aug 2005
Location: Texas
Age: 19
Posts: 19
Send a message via AIM to Wednesday 13
Default

I can be of partial help maybe.

I made my vendors sell the skills up to 80.0 but at a cheap price (800 gold -_-)
Go into Scripts\Engines\AI\Creature\BaseCreature.cs

Find:
Code:
int baseToSet = ourSkill.BaseFixedPoint / 3;

			if ( baseToSet > 420 )
				baseToSet = 420;
			else if ( baseToSet < 200 )
				return TeachResult.Failure;

			if ( baseToSet > theirSkill.CapFixedPoint )
				baseToSet = theirSkill.CapFixedPoint;

			pointsToLearn = baseToSet - theirSkill.BaseFixedPoint;
Change to:
Code:
int baseToSet = ourSkill.BaseFixedPoint / 3;
/*
			if ( baseToSet > 420 )
				baseToSet = 420;
			else if ( baseToSet < 200 )
				return TeachResult.Failure;
*/
			if ( baseToSet > theirSkill.CapFixedPoint )
				baseToSet = theirSkill.CapFixedPoint;

			pointsToLearn = baseToSet - theirSkill.BaseFixedPoint;
For the next part I couldn't find a easier way to do this, but I went into every NPC file in Scripts\Mobiles\Vendors\NPC and changed thier skills to 240 ( 240 / 3 = 80.0 ).

Example:
Code:
[Constructable]
		public Alchemist() : base( "the alchemist" )
		{
			SetSkill( SkillName.Alchemy,240.0 );
			SetSkill( SkillName.TasteID, 240.0 );
		}
Hope this helps someone

EDIT:

It could be...
Code:
int baseToSet = ourSkill.BaseFixedPoint / 3;
/*
			if ( baseToSet > 420 )
				baseToSet = 420;
			else if ( baseToSet < 200 )
				return TeachResult.Failure;

			if ( baseToSet > theirSkill.CapFixedPoint )
				baseToSet = theirSkill.CapFixedPoint;
*/
			pointsToLearn = baseToSet - theirSkill.BaseFixedPoint;
I'm not sure I don't have it set like this anymore, but one of the two ways will work

Last edited by Wednesday 13; 08-28-2008 at 02:40 AM.
Wednesday 13 is offline   Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0 RC5