Author Topic: so i want to see if this is correct to shorten a line  (Read 1858 times)

0 Members and 1 Guest are viewing this topic.

Offline _C2_Topic starter

  • AFK FtW
  • Global Moderator
  • *
  • *
  • Posts: 4077
  • Activity:
    0%
  • Reputation Power: 48
  • _C2_ has great potential!_C2_ has great potential!_C2_ has great potential!_C2_ has great potential!_C2_ has great potential!_C2_ has great potential!_C2_ has great potential!_C2_ has great potential!_C2_ has great potential!
  • RIP Pen Trick
  • Respect: +254
  • Referrals: 4
    • View Profile
so i want to see if this is correct to shorten a line
« on: April 13, 2009, 06:22:33 PM »
0
I discovered that you can only trap chests when they are facing a certain direction.  To amximize the spped of the script the script now notices if the chest is in a trappable position or not and re drops it until it gets it in a trappable position.

now I want to make it handle all the chests so i basically want to make sure this will distribute the argument correctly.

this works for the small crate perfectly:
if #findtype = ZTD
   do redrop stuff

so lets pretend the other crate positions that require redrop are xx1 xx2 xx3 and xx4
can i do this?

if #findtype = ( ZTD || xx1 || xx2 || xx3 || xx4 )

I think that works just been thinking but not had a chance to try it

Offline TrailMyx

  • Officially retired from UO
  • Administrator
  • *
  • *
  • Posts: 13302
  • Activity:
    0.2%
  • 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: so i want to see if this is correct to shorten a line
« Reply #1 on: April 13, 2009, 06:42:54 PM »
0
Unfortunately that won't work.  You are actually trying to do boolean logic on items that aren't boolean, so you will be evaluating ( ZTD || xx1 || xx2 || xx3 || xx4 ) first before you compare that to #findtype.  And since ZTD, xx1-4 aren't booleans, this will always be false.  The better way to do it would be:

Code: [Select]
if #findtype in ZTD_xx1_xx2_xx3_xx4
Please read the ScriptUO site RULES
Come play RIFT with me!

Offline _C2_Topic starter

  • AFK FtW
  • Global Moderator
  • *
  • *
  • Posts: 4077
  • Activity:
    0%
  • Reputation Power: 48
  • _C2_ has great potential!_C2_ has great potential!_C2_ has great potential!_C2_ has great potential!_C2_ has great potential!_C2_ has great potential!_C2_ has great potential!_C2_ has great potential!_C2_ has great potential!
  • RIP Pen Trick
  • Respect: +254
  • Referrals: 4
    • View Profile
Re: so i want to see if this is correct to shorten a line
« Reply #2 on: April 13, 2009, 07:25:46 PM »
0
sweet!  I tried it and it was not working before i chceked back here.  I knew ther ewas a better way; i just never used it!   THx TM

Tags: