Author Topic: notin #property issue  (Read 5875 times)

0 Members and 1 Guest are viewing this topic.

Offline NeoTopic starter

  • Prime Program
  • Elite
  • *
  • *
  • Posts: 821
  • Activity:
    0%
  • Reputation Power: 13
  • Neo barely matters.Neo barely matters.
  • Respect: +155
  • Referrals: 3
    • View Profile
notin #property issue
« on: August 13, 2011, 03:24:08 PM »
0
Hey guys, I'm working on releasing the new version of my crafter, and I just came across this issue. If i set an option to save Elemental Slayer, it's saving anything with elemental slayer in the property, even though I set a check for other elementals notin #property... Am I doing sth wrong? I really can't find a way out of this... If anyone can help, I'd greatly appreciate it... Thank you!


Code: [Select]
if ( %prop . %checkindex = Elemental , #spc , Slayer && Elemental , #spc , Slayer in #property )
           {
           event property #findid
           wait 5
           if ( air notin #property && blood notin #property && earth notin #property && fire , #spc , elemental notin #property && poison , #spc , elemental notin #property && snow notin #property && water notin #property )
              {
              menu Font Color Black
              menu Font BGColor Window
              menu list add savedlist %prop . %checkindex
              set %totalcnt %totalcnt + 1
              menu delete EUOLabel11
              menu Text EUOLabel11 280 204 Weapons Saved: %totalcnt
              gosub keep %currentweapon
              ignoreitem #findid
              return
              }
           }
« Last Edit: August 14, 2011, 12:21:21 PM by frneo »
Never refuse an invitation.
Never resist the unfamiliar.
Never fail to be polite.
And never outstay your welcome.

Offline TrailMyx

  • Officially retired from UO
  • Administrator
  • *
  • *
  • Posts: 13303
  • Activity:
    0.4%
  • Reputation Power: 154
  • TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!
  • Gender: Male
  • Viper!
  • Respect: +1349
  • Referrals: 33
    • View Profile
    • ScriptUO
Re: notin #property issue
« Reply #1 on: August 13, 2011, 03:27:58 PM »
0
Post a little snippet of code.  I'll bet I know what the problem is.  Remember there are differences between #SPC and "_" from #PROPERTY and journal scans.
Please read the ScriptUO site RULES
Come play RIFT with me!

Offline NeoTopic starter

  • Prime Program
  • Elite
  • *
  • *
  • Posts: 821
  • Activity:
    0%
  • Reputation Power: 13
  • Neo barely matters.Neo barely matters.
  • Respect: +155
  • Referrals: 3
    • View Profile
Re: notin #property issue
« Reply #2 on: August 13, 2011, 03:32:27 PM »
0
I've also tried like this:

Code: [Select]
if ( %prop . %checkindex = Elemental , #spc , Slayer && Elemental , #spc , Slayer in #property && Air notin #property && Blood notin #property && Earth notin #property && Fire , #spc , Elemental notin #property && Poison , #spc , Elemental notin #property && Snow notin #property && Water notin #property )
           {
           menu Font BGColor Window
           menu list add savedlist %prop . %checkindex
           menu Font Color Black
           menu delete EUOLabel11
           menu Text EUOLabel11 280 204 Weapons Saved: %totalcnt
           set %totalcnt %totalcnt + 1
           gosub keep %currentweapon
           ignoreitem #findid
           return
           }

and this:

Code: [Select]
if ( %prop . %checkindex = Elemental , #spc , Slayer && $Elemental , #spc , Slayer in #property)
           {
           menu Font BGColor Window
           menu list add savedlist %prop . %checkindex
           menu Font Color Black
           menu delete EUOLabel11
           menu Text EUOLabel11 280 204 Weapons Saved: %totalcnt
           set %totalcnt %totalcnt + 1
           gosub keep %currentweapon
           ignoreitem #findid
           return
           }
using $elemental, thinking about the line break using $ in the property...

None of these is working still...

Anyone have any ideas?
« Last Edit: August 13, 2011, 03:47:59 PM by frneo »
Never refuse an invitation.
Never resist the unfamiliar.
Never fail to be polite.
And never outstay your welcome.

Offline NeoTopic starter

  • Prime Program
  • Elite
  • *
  • *
  • Posts: 821
  • Activity:
    0%
  • Reputation Power: 13
  • Neo barely matters.Neo barely matters.
  • Respect: +155
  • Referrals: 3
    • View Profile
Re: notin #property issue
« Reply #3 on: August 13, 2011, 03:49:08 PM »
0
What I meant is that I posted the wrong code here... All these codes are the ones I tried, and none of these are working... If anyone can see where I'm doing things wrong, please help me...

Cheers!
Never refuse an invitation.
Never resist the unfamiliar.
Never fail to be polite.
And never outstay your welcome.

Offline JustAnotherFace

  • Hero Member
  • *
  • Posts: 530
  • Activity:
    0%
  • Reputation Power: 8
  • JustAnotherFace has no influence.
  • Gender: Male
  • My new toy....
  • Respect: +24
  • Referrals: 4
    • View Profile
Re: notin #property issue
« Reply #4 on: August 13, 2011, 03:53:28 PM »
0
Hey guys, I'm working on releasing the new version of my crafter, and I just came across this issue. If i set an option to save Elemental Slayer, it's saving anything with elemental slayer in the property, even though I set a check for other elementals notin #property... Am I doing sth wrong? I really can't find a way out of this... If anyone can help, I'd greatly appreciate it... Thank you!


Code: [Select]
if ( %prop . %checkindex = Elemental , #spc , Slayer && Elemental , #spc , Slayer in #property )
           {
           event property #findid
           wait 5
           if ( air notin #property && blood notin #property && earth notin #property && fire , #spc , elemental notin #property && poison , #spc , elemental notin #property && snow notin #property && water notin #property
              {
              menu Font Color Black
              menu Font BGColor Window
              menu list add savedlist %prop . %checkindex
              set %totalcnt %totalcnt + 1
              menu delete EUOLabel11
              menu Text EUOLabel11 280 204 Weapons Saved: %totalcnt
              gosub keep %currentweapon
              ignoreitem #findid
              return
              }
           }


Code: [Select]
if ( air notin #property && blood notin #property && earth notin #property && fire , #spc , elemental notin #property && && poison , #spc , elemental notin #property && snow notin #property && water notin #property
You did not close your bracket after water notin #property

JaF
All that tyranny needs to gain a foothold is for people of good conscience to remain silent.
Thomas Jefferson

Offline NeoTopic starter

  • Prime Program
  • Elite
  • *
  • *
  • Posts: 821
  • Activity:
    0%
  • Reputation Power: 13
  • Neo barely matters.Neo barely matters.
  • Respect: +155
  • Referrals: 3
    • View Profile
Re: notin #property issue
« Reply #5 on: August 13, 2011, 03:56:50 PM »
0
Hi JaF, thx for the reply!

I copied it wrong here, I do have the bracket in the code, and it's still not working!

Any other ideas?

Thank you for helping me out!

Cheers!

Tm was here to help too, but I guess he misunderstood my post, and thought I had already solved it...

Thanks for helping me out guys!

« Last Edit: August 13, 2011, 04:00:59 PM by frneo »
Never refuse an invitation.
Never resist the unfamiliar.
Never fail to be polite.
And never outstay your welcome.

Offline JustAnotherFace

  • Hero Member
  • *
  • Posts: 530
  • Activity:
    0%
  • Reputation Power: 8
  • JustAnotherFace has no influence.
  • Gender: Male
  • My new toy....
  • Respect: +24
  • Referrals: 4
    • View Profile
Re: notin #property issue
« Reply #6 on: August 13, 2011, 04:01:38 PM »
0
oh, also...

your code is evaluating like this:

If air notin #property and blood notin #property and earth notin #property.... etc

So what it is doing is checking the #property and saying ok I have an elemental slayer book... BUT it does not have AIR and Blood and Earth and etc... all lumped into the property. In other words, it is not an AIR Ele, Blood Ele, Earth Ele combined slayer.


Try the OR statment instead....

Code: [Select]
if ( air notin #property || blood notin #property || earth notin #property || fire , #spc , elemental notin #property || poison , #spc , elemental notin #property || snow notin #property || water notin #property )
JaF
All that tyranny needs to gain a foothold is for people of good conscience to remain silent.
Thomas Jefferson

Offline NeoTopic starter

  • Prime Program
  • Elite
  • *
  • *
  • Posts: 821
  • Activity:
    0%
  • Reputation Power: 13
  • Neo barely matters.Neo barely matters.
  • Respect: +155
  • Referrals: 3
    • View Profile
Re: notin #property issue
« Reply #7 on: August 13, 2011, 04:07:38 PM »
0
But if I use OR, if one of the elemental types isn't in the property, it will already think it's ok to save, won't it?

Thx JaF
Never refuse an invitation.
Never resist the unfamiliar.
Never fail to be polite.
And never outstay your welcome.

Offline NeoTopic starter

  • Prime Program
  • Elite
  • *
  • *
  • Posts: 821
  • Activity:
    0%
  • Reputation Power: 13
  • Neo barely matters.Neo barely matters.
  • Respect: +155
  • Referrals: 3
    • View Profile
Re: notin #property issue
« Reply #8 on: August 13, 2011, 04:15:32 PM »
0
Tried with or, it isn't working either...
:(
Never refuse an invitation.
Never resist the unfamiliar.
Never fail to be polite.
And never outstay your welcome.

Offline NeoTopic starter

  • Prime Program
  • Elite
  • *
  • *
  • Posts: 821
  • Activity:
    0%
  • Reputation Power: 13
  • Neo barely matters.Neo barely matters.
  • Respect: +155
  • Referrals: 3
    • View Profile
Re: notin #property issue
« Reply #9 on: August 13, 2011, 04:26:15 PM »
0
Ok, I found a workaround for this... But still, using notin #property is not working for me! Tried every way using notin property, with no success...

My workaround was this:

Code: [Select]
if ( %prop . %checkindex = Elemental , #spc , Slayer && Elemental , #spc , Slayer in #property )
           {
           if ( air in #property || blood in #property || earth in #property || fire , #spc , elemental in #property || poison , #spc , elemental in #property || snow in #property || water in #property )
              {
              continue
              }
           else
              {
              menu Font Color Black
              menu Font BGColor Window
              menu list add savedlist %prop . %checkindex
              set %totalcnt %totalcnt + 1
              menu delete EUOLabel11
              menu Text EUOLabel11 280 204 Weapons Saved: %totalcnt
              gosub keep %currentweapon
              ignoreitem #findid
              return
              }
           }

I put the continue there to jump outta there in case any other elemental was found in the property!

Never refuse an invitation.
Never resist the unfamiliar.
Never fail to be polite.
And never outstay your welcome.

Offline JustAnotherFace

  • Hero Member
  • *
  • Posts: 530
  • Activity:
    0%
  • Reputation Power: 8
  • JustAnotherFace has no influence.
  • Gender: Male
  • My new toy....
  • Respect: +24
  • Referrals: 4
    • View Profile
Re: notin #property issue
« Reply #10 on: August 13, 2011, 04:27:34 PM »
0
But if I use OR, if one of the elemental types isn't in the property, it will already think it's ok to save, won't it?

Thx JaF

Looking back over my own scripts... I think I need to correct myself. Looks like && is correct after all.

Try it without it being inside ( ) brackets

Example:

Code: [Select]
if elemental in #property  &&  blood notin #property  && air notin #property && earth notin #property
  {
   do whatever
  }

JaF
All that tyranny needs to gain a foothold is for people of good conscience to remain silent.
Thomas Jefferson

Offline NeoTopic starter

  • Prime Program
  • Elite
  • *
  • *
  • Posts: 821
  • Activity:
    0%
  • Reputation Power: 13
  • Neo barely matters.Neo barely matters.
  • Respect: +155
  • Referrals: 3
    • View Profile
Re: notin #property issue
« Reply #11 on: August 13, 2011, 04:29:44 PM »
0
But if I use OR, if one of the elemental types isn't in the property, it will already think it's ok to save, won't it?

Thx JaF

Looking back over my own scripts... I think I need to correct myself. Looks like && is correct after all.

Try it without it being inside ( ) brackets

Example:

Code: [Select]
if elemental in #property  &&  blood notin #property  && air notin #property && earth notin #property
  {
   do whatever
  }

JaF
Yes, I tried without brackets too. No luck!

I have no idea why this is happening... I'm not using "notin #property" again, until I can figure this one out!

Cheers JaF!
Never refuse an invitation.
Never resist the unfamiliar.
Never fail to be polite.
And never outstay your welcome.

Offline JustAnotherFace

  • Hero Member
  • *
  • Posts: 530
  • Activity:
    0%
  • Reputation Power: 8
  • JustAnotherFace has no influence.
  • Gender: Male
  • My new toy....
  • Respect: +24
  • Referrals: 4
    • View Profile
Re: notin #property issue
« Reply #12 on: August 13, 2011, 04:41:14 PM »
0
Quote
Logical Operators

%a && %b

And

If both values evaluate as true, the expression is true.



%a || %b

Or

If either one of the values evaluates as true, the expression is true.



! %a

Not

Gives the logical inverse of the evaluation. True will exaluate to false, and false to true.
All that tyranny needs to gain a foothold is for people of good conscience to remain silent.
Thomas Jefferson

Offline JustAnotherFace

  • Hero Member
  • *
  • Posts: 530
  • Activity:
    0%
  • Reputation Power: 8
  • JustAnotherFace has no influence.
  • Gender: Male
  • My new toy....
  • Respect: +24
  • Referrals: 4
    • View Profile
Re: notin #property issue
« Reply #13 on: August 13, 2011, 04:50:17 PM »
0
Unfortunately, EUO is down for us EA Mythic players so I can not test any code at the moment.  When it gets fixed I will give it a shot.  Sorry I couldnt help more.

JaF
All that tyranny needs to gain a foothold is for people of good conscience to remain silent.
Thomas Jefferson

Offline NeoTopic starter

  • Prime Program
  • Elite
  • *
  • *
  • Posts: 821
  • Activity:
    0%
  • Reputation Power: 13
  • Neo barely matters.Neo barely matters.
  • Respect: +155
  • Referrals: 3
    • View Profile
Re: notin #property issue
« Reply #14 on: August 13, 2011, 04:56:04 PM »
0
I really appreciate the help JaF!

Cheers!
Never refuse an invitation.
Never resist the unfamiliar.
Never fail to be polite.
And never outstay your welcome.

Tags: