|
||
|
|||||||
| Script Support Get support for modifying RunUO Scripts, or writing your own! |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 (permalink) |
|
Newbie
Join Date: Feb 2004
Posts: 88
|
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("...");
}
}
}
|
|
|
|
|
|
#2 (permalink) |
|
Newbie
Join Date: Feb 2004
Posts: 88
|
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("...");
}
}
}
|
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|