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!

Post Office Stone

Darkness_PR

Wanderer
Little TINY Problem

Yeah im having a little problem setting LogInStats.cs adding


MailBox mailbox = m.BankBox.FindItemByType( typeof( MailBox ) ) as MailBox;
if ( mailbox != null )
{
if ( mailbox.NewMail == "true" )
m.SendGump( new NewMailGump( m, mailbox ) );
}



cant seem to fidn where to add it into the script :rolleyes:
 

raisor

Wanderer
Darkness_PR said:
Yeah im having a little problem setting LogInStats.cs adding


MailBox mailbox = m.BankBox.FindItemByType( typeof( MailBox ) ) as MailBox;
if ( mailbox != null )
{
if ( mailbox.NewMail == "true" )
m.SendGump( new NewMailGump( m, mailbox ) );
}



cant seem to fidn where to add it into the script :rolleyes:
You can add it anywhere really, I just placed it after the last line but before the }'s in the script.
 

Darkness_PR

Wanderer
Errors and more erros

you might think im kinda stupid but i have ebing playing with this script and allwas get the same error dunno why.....the error is this

Code:
  - Error: Scripts\Misc\LoginStats.cs: CS0246: (line 21, column 22) The type or n
amespace name 'm' could not be found (are you missing a using directive or an as
sembly reference?)
 - Error: Scripts\Misc\LoginStats.cs: CS0029: (line 24, column 9) Cannot implici
tly convert type 'string' to 'bool'
 - Error: Scripts\Misc\LoginStats.cs: CS0246: (line 25, column 34) The type or n
amespace name 'm' could not be found (are you missing a using directive or an as
sembly reference?)
 - Error: Scripts\Misc\LoginStats.cs: CS0246: (line 25, column 5) The type or na
mespace name 'm' could not be found (are you missing a using directive or an ass
embly reference?)
please help me! :(
 
W

walmart

Guest
Darkness_PR said:
you might think im kinda stupid but i have ebing playing with this script and allwas get the same error dunno why.....the error is this

Code:
  - Error: Scripts\Misc\LoginStats.cs: CS0246: (line 21, column 22) The type or n
amespace name 'm' could not be found (are you missing a using directive or an as
sembly reference?)
 - Error: Scripts\Misc\LoginStats.cs: CS0029: (line 24, column 9) Cannot implici
tly convert type 'string' to 'bool'
 - Error: Scripts\Misc\LoginStats.cs: CS0246: (line 25, column 34) The type or n
amespace name 'm' could not be found (are you missing a using directive or an as
sembly reference?)
 - Error: Scripts\Misc\LoginStats.cs: CS0246: (line 25, column 5) The type or na
mespace name 'm' could not be found (are you missing a using directive or an ass
embly reference?)
please help me! :(
show me your LoginStats.cs: script if you show it i can help you out
 

Reggie

Wanderer
nice script but a problem is i had a character named reggie and a char named reggie noble on the shard and the letter was sent to the wrong one

any idea to fix that?

i just wrote the lette and clicked done
i dont know if there anything else to do with it
 

raisor

Wanderer
Darkness_PR said:
you might think im kinda stupid but i have ebing playing with this script and allwas get the same error dunno why.....the error is this

Code:
 - Error: Scripts\Misc\LoginStats.cs: CS0246: (line 21, column 22) The type or n
amespace name 'm' could not be found (are you missing a using directive or an as
sembly reference?)
- Error: Scripts\Misc\LoginStats.cs: CS0029: (line 24, column 9) Cannot implici
tly convert type 'string' to 'bool'
- Error: Scripts\Misc\LoginStats.cs: CS0246: (line 25, column 34) The type or n
amespace name 'm' could not be found (are you missing a using directive or an as
sembly reference?)
- Error: Scripts\Misc\LoginStats.cs: CS0246: (line 25, column 5) The type or na
mespace name 'm' could not be found (are you missing a using directive or an ass
embly reference?)
please help me! :(
Please post your LoginStats.cs and I will see what is wrong with it.

Reggie said:
nice script but a problem is i had a character named reggie and a char named reggie noble on the shard and the letter was sent to the wrong one

any idea to fix that?

i just wrote the lette and clicked done
i dont know if there anything else to do with it
I will see what I can figure out. Probably has to do with the space in the name but I shall figure it out and post a fix. Thanks for pointing it out. :)
 

raisor

Wanderer
akrondar said:
anyone el se having problems with letters....? mine are erased when i closed them.. :(
And you are positive that you are using the most current version? I did just make an update to fix another bug but in v2.4 the problem you mention should have been fixed.
 

monnie

Wanderer
ok same deal here with me as Hudel lol! Looks like he posted the scripts unmodded cause I think he wants you to add the code in correctly. Anyway, I don't write scripts but I do some editing here and there so I know I messed this up since I keep getting errors every way I edit it. So I will post my scripts as I inserted the code. If you could please take a look at it and show me my mistake so I can see and learn from it, I would be grateful. :)

LoginStats

Code:
using System;
using Server.Network;
using Server.Gumps;
using Server.Items;

namespace Server.Misc
{
	public class LoginStats
	{
		public static void Initialize()
		{
			// Register our event handler
			EventSink.Login += new LoginEventHandler( EventSink_Login );
		}


                MailBox mailbox = m.BankBox.FindItemByType( typeof( MailBox ) ) as MailBox;
                if ( mailbox != null )

                {
                if ( mailbox.NewMail == "true" )
                m.SendGump( new NewMailGump( m, mailbox ) );
                }



		private static void EventSink_Login( LoginEventArgs args )
		{


CharacterCreation

Code:
using System;
using Server;
using Server.Items;
using Server.Mobiles;
using Server.Network;
using Server.Accounting;

namespace Server.Misc
{
	public class CharacterCreation
	{
		public static void Initialize()
		{
			// Register our event handler
			EventSink.CharacterCreated += new CharacterCreatedEventHandler( EventSink_CharacterCreated );
		}

                {

                        newChar.BankBox.DropItem( new MailBox() );
                }

		private static void AddBackpack( Mobile m )
		{
			Container pack = m.Backpack;

			if ( pack == null )
			{
				pack = new Backpack();
				pack.Movable = false;

				m.AddItem( pack );
			}
 

sirbum69

Wanderer
why would the letters show up in the mail box empty. i placed this script in last night and when i sent the letter to a char they recieved the letter but when they opened it, it was empty.

this really would be a nice thing to have.

Edit****

ok i just tried to do this step by step as you had said and still it sends the message to the player but when the player opened it from the mailbox its just blank.

when i sent it it said a message from Dragonwalker but when they got it it was completly blank. at no time did i right click it and i hit done.

as for the script i got it from your site so i assume that is the latest
 

sirbum69

Wanderer
ok after further testing of this i have found out what is wrong. if the player pulls the letter from the mail box to there backpack with out reading it first then it will show up blank.

if they dbl click it while its in the mailbox first then it will show the message like it should and from then on it will stay in there backpack and can be read.

could someone tell me how this could be fixed.
 
sirbum69 said:
ok after further testing of this i have found out what is wrong. if the player pulls the letter from the mail box to there backpack with out reading it first then it will show up blank.

if they dbl click it while its in the mailbox first then it will show the message like it should and from then on it will stay in there backpack and can be read.

could someone tell me how this could be fixed.

I am having same problem on my test system. However, my letters are blank if read in the mail box and in the backpack. I followed the correct send procedures as well... Maybe an update issue with 1.0?
 

stormwolff

Knight
Shard Admin Adam said:
I am having same problem on my test system. However, my letters are blank if read in the mail box and in the backpack. I followed the correct send procedures as well... Maybe an update issue with 1.0?

Not a new issue, I had it with 1.0, and still have it with 1.0.0 I just took the letters out and left package sending in. Players can send books instead of letters if needed.
 

corbin77x2

Wanderer
Is this code supported in 1.0.0? because that dates look a little old for the newer version of runuo, and i didn't see any recent updates. maybe i missed something.
 

stormwolff

Knight
corbin77x2 said:
Is this code supported in 1.0.0? because that dates look a little old for the newer version of runuo, and i didn't see any recent updates. maybe i missed something.

Havnt seen anyone supporting it. It is an older script. It partially worked under 1.0 and still works just as well as that in 1.0.0
 
Top