Go Back   RunUO - Ultima Online Emulation > RunUO > New Join Forum

New Join Forum So your new to RunUO and looking to work with people that are new, this is the place.

Reply
 
Thread Tools Display Modes
Old 06-28-2005, 07:59 PM   #1 (permalink)
Forum Expert
 
Join Date: Feb 2005
Location: Fife,Scotland
Age: 40
Posts: 258
Default a little pointer please

i am trying to make it so players dont have to carry gold on them, just be able to have the correct amount of gold in bankbox when buying things, i know this is possible but not sure how to go about it

i have looked in the documentation and cant seem to find what im looking for
can someone give me a pointer please?
orgis is offline   Reply With Quote
Old 06-28-2005, 08:06 PM   #2 (permalink)
Account Terminated
 
Join Date: Sep 2002
Age: 26
Posts: 3,846
Send a message via ICQ to Phantom Send a message via AIM to Phantom Send a message via MSN to Phantom
Default

Quote:
Originally Posted by orgis
i am trying to make it so players dont have to carry gold on them, just be able to have the correct amount of gold in bankbox when buying things, i know this is possible but not sure how to go about it

i have looked in the documentation and cant seem to find what im looking for
can someone give me a pointer please?
Sure post the code you have tried then we can talk.
Phantom is offline   Reply With Quote
Old 06-28-2005, 08:16 PM   #3 (permalink)
Forum Expert
 
Join Date: Feb 2005
Location: Fife,Scotland
Age: 40
Posts: 258
Default

Quote:
Originally Posted by Phantom
Sure post the code you have tried then we can talk.
i was aking if its possible to edit a current script?im not sure wich one to look at i have looked at a few

would it be in BaseVendor.cs?and i maybe cant see what it is?
orgis is offline   Reply With Quote
Old 06-28-2005, 08:24 PM   #4 (permalink)
Forum Expert
 
Join Date: Feb 2003
Location: East Coast USA
Posts: 1,359
Default

This is the relevant code in BaseVendor.cs:

Code:
			cont = buyer.Backpack;
			if ( !bought && cont != null )
			{
		    	if ( cont.ConsumeTotal( typeof( Gold ), totalCost ) )
					bought = true;
				else if ( totalCost < 2000 )
		    		SayTo( buyer, 500192 );//Begging thy pardon, but thou casnt afford that.
			}

			if ( !bought && totalCost >= 2000 )
			{
				cont = buyer.BankBox;
		    	if ( cont != null && cont.ConsumeTotal( typeof( Gold ), totalCost ) )
				{
					bought = true;
					fromBank = true;
				}
				else
				{
		    		SayTo( buyer, 500191 ); //Begging thy pardon, but thy bank account lacks these funds.
				}
			}
What you can do is change the 2000 to some other number, like 1, and it will then deduct the gold from the player's bankbox if they don't have enough on hand to afford the item.
__________________
the-retelling.org : scripts and tech demo
Alari is offline   Reply With Quote
Old 06-28-2005, 08:26 PM   #5 (permalink)
Forum Expert
 
Join Date: Feb 2005
Location: Fife,Scotland
Age: 40
Posts: 258
Default

Quote:
Originally Posted by Alari
This is the relevant code in BaseVendor.cs:


What you can do is change the 2000 to some other number, like 1, and it will then deduct the gold from the player's bankbox if they don't have enough on hand to afford the item.
Thanks mate my eyes were going together looking at it

so i can change that 2000 to any number i like really and after that amount it will deduct from bank account ?
orgis is offline   Reply With Quote
Old 06-28-2005, 08:32 PM   #6 (permalink)
Forum Expert
 
Join Date: Feb 2003
Location: East Coast USA
Posts: 1,359
Default

Quote:
Originally Posted by orgis
so i can change that 2000 to any number i like really and after that amount it will deduct from bank account ?
How it works is that if the total sale is more than that (default:2000) it will try and deduct the gold from the player's bankbox. If the total sale is less, it won't even try deducting it from their bankbox.

It will *always* try and deduct the gold from whatever amount the player has in their backpack first tho.


And remember there are two "2000"s that you need to change. :>
__________________
the-retelling.org : scripts and tech demo
Alari 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