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!

How do I add things to Bankbox without Test Center on

Packer898

Knight
Ajantis said:
I have AOS enabled.............where do I add it? Thanks.

Dude, please for the love of god read post #35. If you cant figure it out then you dont need to be using a computer... I showed you exactly were to put it!
 

sirbum69

Wanderer
ok well i looked in a MOTD script that i had and i did what was in there...but still its giving me errors...

this is what i have for the total script.....Oh and im adding this to the bankbox not the backpack....

so im doing all this in the event_sink for charcreated...
Code:
if ( young && newChar.BankBox != null )
			{
				BankCheck check = new BankCheck( 10000 );
				newChar.BankBox.DropItem( check );
				
				//SmallBrickHouseDeed mydeed = new SmallBrickHouseDeed();
				//newChar.BankBox.DropItem( mydeed );
			}
			SmallBrickHouseDeed mydeed = new SmallBrickHouseDeed();
			Mobile m = args.Mobile;
			Account acct=(Account)m.Account;
			
			bool ItemName = Convert.ToBoolean( acct.GetTag(mydeed) );
			
			if ( mydeed ) //account tag check to see if item has been received yet
			{
			}
			else//if it doesnt exist
			{
				//Do stuff here
				
				newChar.BankBox.DropItem( mydeed );
				acct.SetTag( mydeed, true );
			}
 

Packer898

Knight
sirbum69 said:
this is what i have for the total script.....Oh and im adding this to the bankbox not the backpack....

Well I dont know for a fact you can simply add the Account acct to the other methods. I know for a fact you CAN add it to the AddBackpack one... You will need to check the docs and see if it is possible to add it there. But for the record why not add it where i showed you? We know it will work there and if your doing it on character creation then it doesnt really matter...
 

sirbum69

Wanderer
Packer898 said:
Well I dont know for a fact you can simply add the Account acct to the other methods. I know for a fact you CAN add it to the AddBackpack one... You will need to check the docs and see if it is possible to add it there. But for the record why not add it where i showed you? We know it will work there and if your doing it on character creation then it doesnt really matter...

ok well thanks for the help Packer...im off to bed im tired...LoL
I tried it where you said in the addpackback but it still gave me errors...

So ill try again when im not so tired....
 

Packer898

Knight
lol..
Code:
		private static void AddBackpack( Mobile m, [COLOR="Red"]Account acct[/COLOR] )

Now since you added the new referance you will need to also change how and what is used to call this method when it is used in that file. That means you will also need to add the change like so..
Code:
		private static void EventSink_CharacterCreated( CharacterCreatedEventArgs args )
		{
misc...

			SetName( newChar, args.Name );
			
			[COLOR="Red"]AddBackpack( newChar, (Account)newChar.Account );[/COLOR]
			SetStats( newChar, args.Str, args.Dex, args.Int );
			SetSkills( newChar, args.Skills, args.Profession );
 

Packer898

Knight
Ajantis said:
Is this stuff somehow related to what I asked before about adding to the Bankbox?

Not really. You have your answers. You have been given exactly what you need to add and exactly where to add it. This was just a tangent we broke off on. It should have been in a new thread though. *Shrugs* =)-
 

sirbum69

Wanderer
Yeh thats true im sorry, just that it actully had to do with adding things in char creations and figured why waste space with a new topic...

But i see what i didnt do right, i didnt add the account acct inside of the brackets like that....Now that im more awake im gonna give it some more trys...


Edit: Ok i figured it out finnaly....Funny cause i found out how to do it with a post that you started packer youself back when you had no Idea yourself how to do acct tags....

Lol i just followed that post and figured out what i was doing wrong...
 

Ajantis

Wanderer
ERROR:
Scripts: Compiling C# scripts...failed (2 errors, 0 warnings)
- Error: Scripts\Misc\CharacterCreation.cs: CS1519: (line 613, column 46) Inval
id token '(' in class, struct, or interface member declaration
- Error: Scripts\Misc\CharacterCreation.cs: CS1519: (line 613, column 53) Inval
id token ')' in class, struct, or interface member declaration
Scripts: One or more scripts failed to compile or no script files were found.
- Press return to exit, or R to try again.

Why did this happen? Thanks.
 

sirbum69

Wanderer
its telling you that you have a ")" in the wrong space....

hence the invalid Token...then it shows the token ")"

so you either have too many or not enough closing in some code
 
Top