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-07-2008, 05:12 AM   #1 (permalink)
Newbie
 
Join Date: Feb 2004
Posts: 88
Default Double skill check trouble

Hi! I want to do a double skill check to give to a player an item but when I use the operator OR it give me the item only if i have both the two skill above that certain value. That's the code part...


Code:
        public override void OnSpeech(SpeechEventArgs e)
        {
            if (!e.Handled && e.Mobile.InRange(this.Location,3))
            {
                if (e.Speech == "...")
                {
                    if (((PlayerMobile)e.Mobile).Skills[SkillName.Stealth].Base < 49 | ((PlayerMobile)e.Mobile).Skills[SkillName.Lockpicking].Base < 49 | ((PlayerMobile)e.Mobile).Skills[SkillName.Hiding].Base < 99)
                    {
                        this.Say("...");
                    }
                    else
                    {
                        e.Mobile.AddToBackpack(new CustomItem());
                        this.Say("...");
                    }
                }

            }
Zaihur is online now   Reply With Quote
Old 08-07-2008, 05:32 AM   #2 (permalink)
Newbie
 
Join Date: Feb 2004
Posts: 88
Default

Ok I'm a noob, I fixed it changing the logical thing. Probably there is a way to do with the last code part bt this works well:

Code:
        public override void OnSpeech(SpeechEventArgs e)
        {
            if (!e.Handled && e.Mobile.InRange(this.Location,3))
            {
                if (e.Speech == "...")
                {
                    if (((PlayerMobile)e.Mobile).Skills[SkillName.Stealth].Base > 49 | ((PlayerMobile)e.Mobile).Skills[SkillName.Lockpicking].Base > 49 | ((PlayerMobile)e.Mobile).Skills[SkillName.Hiding].Base > 99)
                    {
                        e.Mobile.AddToBackpack(new CustomItem());
                        this.Say("...");
                    }
                    else
                    {
                        this.Say("...");
                    }
                }

            }
Zaihur is online now   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