Author Topic: Tell me what is wrong here...  (Read 8158 times)

0 Members and 1 Guest are viewing this topic.

Offline CoraginTopic starter

  • Wacko in Pajama's
  • Elite
  • *
  • *
  • Posts: 1641
  • Activity:
    0%
  • Reputation Power: 23
  • Coragin might someday be someone...Coragin might someday be someone...Coragin might someday be someone...Coragin might someday be someone...
  • Gender: Male
  • It Is What It Is.
  • Respect: +57
  • Referrals: 1
    • View Profile
Tell me what is wrong here...
« on: November 02, 2009, 11:51:30 PM »
0
Okay I got it to keep slayers, but I cannot get 100% elemental damage to work.  It is saving everything now with this syntax.  I cant figure this out, you can see which ones I commented out that were working to make sure it was all correct.  But when I try to make it ONLY save 100% Fire, Cold, Energy or Poison weapons it saves ALL weapons no matter what.  I am thinking I might just have to have it unravel anything with physical damage in it then sift through what is left.

Its supposed to make buktos and look for 100% elemental dmg and if it has it, will store the weapon.

Someone please help.

Code: [Select]
Event Macro 8 7
Display Ok Select the Resource Container.
  set #targcurs 1
      while #targcurs = 1
         wait 1
         set %ResourceBag #ltargetID
      set #lobjectID #ltargetID
      set #nextcposx 200
      set #nextcposy 0
      event macro 17
      wait 10
Display Ok Select your storage Bag in Resource Container.
  set #targcurs 1
      while #targcurs = 1
         wait 1
      set %StorageBag #ltargetID
      set #lobjectID #ltargetID
      set #nextcposx 400
      set #nextcposy 0
      event macro 17
      wait 20


set %residue TKR_WKR
set %weapon KDP
set %Wood TLK
set %elemental Poison_Fire_Cold_Energy
set %percent 100%
set %runic ZFG_
set %slayer Elemental_Reptile_Undead_Arachnid_Demon_Slayer
set #nextcposx 0
set #nextcposy 0
set %imain 520_250           ; Imbuing Main menu size
set %isec 520_440            ; Imbuing secondary menus for properties and value
set %cwin 530_507            ; Crafting window size
set %gumpwait 5 ; Increase number to slow down clicks on menus.  20 = 1 second.

MainLoop:
Gosub GetTools
Gosub MakeWeapon
Gosub CheckWeapon1
Goto MainLoop

sub GetTools
    finditem %runic C_ , #backpackid
      if #findcnt < 1
         {
         finditem %runic C_ , %ResourceBag
         if #findkind = -1
            {
            display You are out of runics.
            halt
            }
         exevent drag #findid 1
         wait 10
         exevent dropc #backpackid
         wait 20
         }
    finditem %Wood C_ , #backpackid
         if #findstack < 200
         {
         set %quantityinpack 200 - #findstack
         finditem %Wood C_ , %ResourceBag
         if #findstack < %quantityinpack
            {
            display You need more wood.
            halt
            }
         else
            {
            exevent drag #findid %quantityinpack
            wait 10
            exevent dropc #backpackid
            wait 20
            }
         }
         Return

Sub MakeWeapon
    finditem %Weapon C_ , #BackPackid
    If #findcnt = 1
       {
       set %MadeWeapon #findid
       gosub CheckWeapon1
       Return
       }
    finditem %runic C_ , #BackPackid
    set #lobjectid #findid
    event macro 17
    gosub waitforgump %cwin
    Click 335 500 f    ;Make Last
    gosub waitforgump %cwin
    Click 77 505 f    ;exit
    wait 20
    finditem %Weapon C_ , #BackPackID
    set %MadeWeapon #findid
Return

sub CheckWeapon1
         finditem %MadeWeapon C_ , #backpackid
         if #findcnt 1
            {
            event property #findid
            if %elemental in #Property && Damage in #property && %percent in #property
            ;if Slayer in #property
            ;if Physical_Damage_100% in #property || %slayer in #property || Energy_Damage_100% in #property || Fire_Damage_100% in #property || Cold_Damage_100% in #property || Slayer in #property
               {
               gosub StoreWeapon
               Return
               }
            Gosub Unravel
Return

Sub StoreWeapon
    finditem %Weapon C_ , #backpackid
    exevent drag #findid #findstack
    wait 10
    exevent dropc %StorageBag
    wait 20
    finditem %MadeWeapon C_ , #backpackid
    exevent drag #findid #findstack
    wait 10
    exevent dropc %StorageBag
    wait 20
Return

Sub StoreResidue
    finditem %Residue C_ , #backpackid
    if #findcnt < 1
              return
    exevent drag #findid #findstack
    wait 10
    exevent dropc %ResourceBag
    wait 20
Return

Sub Unravel
Repeat
    finditem %MadeWeapon C_ , #BackPackid
    If #findcnt = -1
       {
       Return
       }
    Event Macro 13 56
    gosub waitforgump %imain
          if ! #result
          {
          display ok Problems opening the imbue menu.  Dble Click fletcher tool and click play
          pause
          }
    Click 228 248 f
    wait 30
    set #ltargetID %MadeWeapon
    event macro 22 0
    ;gosub waitforgump %imain
          if ! #result
          {
          display ok Problems with imbue unravel menu.  Dble Click fletcher tool and click play
          pause
          }
    Click 50 250 f
    wait 30
    gosub StoreResidue
Return

;================== Wait for gump ======================

sub waitforgump
set %timeout #scnt + 30
while #contsize <> %1
      {
      wait 1
      if #scnt > %timeout
         {
          return #false
         }
      }
wait %gumpwait
return #true

sub CheckWeapon1
         finditem %MadeWeapon C_ , #backpackid
         if #findcnt 1
            {
            event property #findid
            if %elemental in #Property && Damage in #property && %percent in #property
            ;if Slayer in #property
            ;if Physical_Damage_100% in #property || %slayer in #property || Energy_Damage_100% in #property || Fire_Damage_100% in #property || Cold_Damage_100% in #property || Slayer in #property
               {
               gosub StoreWeapon
               Return
               }
            Gosub Unravel
Return
« Last Edit: November 03, 2009, 01:21:19 AM by Coragin »
Coragin

My Facebook
And now I'm better at doing what ever it is Wolverine does!

Offline Alpha

  • Hero Member
  • *
  • Posts: 583
  • Activity:
    0%
  • Reputation Power: 10
  • Alpha barely matters.Alpha barely matters.
  • Respect: +44
  • Referrals: 0
    • View Profile
Re: Tell me what is wrong here...
« Reply #1 on: November 03, 2009, 01:22:33 AM »
0
OK  a couple of things...

The underscore your using in setting your string variables isn't the same thing as a space...  You'd need to do something like this...

Code: [Select]
set %slayer Elemental , #spc , Demon , #spc , Repond , #spc , Undead , #spc , Reptile
Also you can't search to see if your %Slayer string is in your #property variable bc the WHOLE string would have to be in there for it to return True...

If you use concantenation and #spc you can make strings for search through #property..

Lastly... you'll have to search for a single super slayer being in the #property but include an extra check for all the various crap elementals etc..


Code: [Select]
Sub Check_for_slayer

If Demon in #property || Repond in #property || Undead in #property || Reptile in #property
  {
     Gosub Save_Item
  }
If Elemental in #property && Water notin #property && Earth notin #property && Fire notin #property && Air notin #property && Blood notin #property
  {
    Gosub Save_Item
  }

Return

Anyway hope that helps a bit

Offline CoraginTopic starter

  • Wacko in Pajama's
  • Elite
  • *
  • *
  • Posts: 1641
  • Activity:
    0%
  • Reputation Power: 23
  • Coragin might someday be someone...Coragin might someday be someone...Coragin might someday be someone...Coragin might someday be someone...
  • Gender: Male
  • It Is What It Is.
  • Respect: +57
  • Referrals: 1
    • View Profile
Re: Tell me what is wrong here...
« Reply #2 on: November 03, 2009, 01:28:26 AM »
0
Thank you that did teach me a bit, but the problem I am having is getting it to save 100% Damage Weapons... i.e. Poison Damage 100%, Fire Damage 100%, Cold Damage 100%, Energy Damage 100%.  I dont know what Im doing wrong.
Coragin

My Facebook
And now I'm better at doing what ever it is Wolverine does!

Offline CoraginTopic starter

  • Wacko in Pajama's
  • Elite
  • *
  • *
  • Posts: 1641
  • Activity:
    0%
  • Reputation Power: 23
  • Coragin might someday be someone...Coragin might someday be someone...Coragin might someday be someone...Coragin might someday be someone...
  • Gender: Male
  • It Is What It Is.
  • Respect: +57
  • Referrals: 1
    • View Profile
Re: Tell me what is wrong here...
« Reply #3 on: November 03, 2009, 01:36:38 AM »
0
Wait I think I got it...

Code: [Select]
set %elemental Fire , #spc , Poison , #spc , Cold , #spc , Fire
set %percent 100%

Sub Check_for_dmg

If %elemental in #property && Damage in #property && %percent in #property
  {
     Gosub Save_Item
  }
If %elemental in #property && Damage in #property && Physical notin #property
  {
    Gosub Save_Item
  }

Return

Effectively the first part of the check sub is checking for %elemental i.e. Fire, Cold, Poison, Energy and making sure there is also 100% and Damage.

While the second part is looking for fire, cold, poison, energy AND damage, but making sure Physical is NOT in it.  I guess getting the 100% part is the tricky part.
Coragin

My Facebook
And now I'm better at doing what ever it is Wolverine does!

Scrripty

  • Guest
Re: Tell me what is wrong here...
« Reply #4 on: November 03, 2009, 03:08:34 AM »
0
I believe that would be Fire , Poison, Cold, Energy... just sayin. :)

Offline Endless Night

  • Global Moderator
  • *
  • *
  • Posts: 5467
  • Activity:
    0%
  • Reputation Power: 62
  • Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!Endless Night is awe-inspiring!
  • Respect: +393
  • Referrals: 1
    • View Profile
Re: Tell me what is wrong here...
« Reply #5 on: November 03, 2009, 06:56:52 AM »
0
that wont work...  you are asking if the string "Fire  Poison  Cold  Fire" is in the items property. And the answer will always be no.  Those word may exist but not as specifically written.  what you need to do is

Code: [Select]
if Damage in #property && 100 in #property &&
 (  fire in #property || poison in #property  ||  cold in #property )
Outlaw Josey Wales - "Manwink, A Long Gone Scripty, and Endless are always teasing us with their private sections lol. What there realy saying is scripters rule and users drool."
Briza - "Your a living breathing vortex of usefulness."

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: Tell me what is wrong here...
« Reply #6 on: November 03, 2009, 09:16:50 AM »
0
that wont work...  you are asking if the string "Fire  Poison  Cold  Fire" is in the items property. And the answer will always be no.  Those word may exist but not as specifically written.  what you need to do is

Code: [Select]
if Damage in #property && 100 in #property &&
 (  fire in #property || poison in #property  ||  cold in #property )

Word.
Please read the ScriptUO site RULES
Come play RIFT with me!

Offline CoraginTopic starter

  • Wacko in Pajama's
  • Elite
  • *
  • *
  • Posts: 1641
  • Activity:
    0%
  • Reputation Power: 23
  • Coragin might someday be someone...Coragin might someday be someone...Coragin might someday be someone...Coragin might someday be someone...
  • Gender: Male
  • It Is What It Is.
  • Respect: +57
  • Referrals: 1
    • View Profile
Re: Tell me what is wrong here...
« Reply #7 on: November 03, 2009, 05:08:55 PM »
0
Parenthesis! 
Coragin

My Facebook
And now I'm better at doing what ever it is Wolverine does!

Offline CoraginTopic starter

  • Wacko in Pajama's
  • Elite
  • *
  • *
  • Posts: 1641
  • Activity:
    0%
  • Reputation Power: 23
  • Coragin might someday be someone...Coragin might someday be someone...Coragin might someday be someone...Coragin might someday be someone...
  • Gender: Male
  • It Is What It Is.
  • Respect: +57
  • Referrals: 1
    • View Profile
Re: Tell me what is wrong here...
« Reply #8 on: November 06, 2009, 10:48:52 AM »
0
that wont work...  you are asking if the string "Fire  Poison  Cold  Fire" is in the items property. And the answer will always be no.  Those word may exist but not as specifically written.  what you need to do is

Code: [Select]
if Damage in #property && 100 in #property &&
 (  fire in #property || poison in #property  ||  cold in #property )

Word.

Been talking in PM's to En about this.  The above code will work so long as it dont have...

Poison Resist %
Fire Resist %
Cold Resist %
Energy Resist %

Hit X Area

Ect....

So it could be a Physical Damage 100% but if it has Poison Resist 7% it will pick it up as a 100% Poison Damage Weapon.

Is there a way to check if Poison, Fire, Cold, Energy are on the Same LINE as DAMAGE and 100%? 

I know aClaw lite can pick it up perfect.  So I am sure TM can give me the simple answer/solution to this problem, I tried easyuo.com, cant find anything on this.

I made the following script to test things.  And commented on what it does and does not pick up and if it picks up the wrong item.

This was tested using a 100% Cold Damage Weapon and a 100% Physical Damage weapon with Hit Cold Area 2%, swapping them in and out.

Code: [Select]

set %energy Cold Damage 100% ;=====not right
set %poison Cold_Damage_100%  ;=====not right
set %cold Cold Damage 100
set %fire Cold_Damage_100

set %Weapon XFR

Mainloop:
gosub CheckWeapon1
goto mainloop

sub CheckWeapon1
   gosub CheckEnergy100
   gosub CheckPoison100
   gosub CheckCold100
   gosub CheckFire100
   gosub CheckManual
   gosub FoundNothing
Return

Sub CheckEnergy100    ;===================================Finds Cold Damage in a weapon 100% Physical with hit cold area
         finditem %Weapon C_ , #BackpackID
         if #findcnt >= 1
            {
            event property #findid
            if %energy in #property
               {
               wait 5
               set %weapon %storeweapon
               display Ok Recognize Cold Sub 1
               Halt
               }
            }
Return

Sub CheckPoison100       ;===============================Dont pickup anything
         finditem %Weapon C_ , #BackpackID
         if #findcnt >= 1
            {
            event property #findid
            if %poison in #property
               {
               wait 5
               display Ok Recognize Cold Sub 2
               Halt
               }
            }
Return

Sub CheckCold100   ;===================================Finds Cold Damage in a weapon 100% Physical with hit cold area
         finditem %Weapon C_ , #BackpackID
         if #findcnt >= 1
            {
            event property #findid
            if %cold in #property
               {
               wait 5
               display Ok Recognize Cold Sub 3
               Halt
               }
            }
Return

Sub CheckFire100     ;===============================Dont pickup anything
         finditem %Weapon C_ , #BackpackID
         if #findcnt >= 1
            {
            event property #findid
            if %fire in #property
               {
               wait 5
               display Ok Recognize Cold Sub 4
               Halt
               }
            }
Return

Sub CheckManual       ;=======================Finds 100 Physical w/2% HCA as 100% Cold Damage
         finditem %Weapon C_ , #BackpackID
         if #findcnt >= 1
            {
            event property #findid
            if Damage in #property && 100 in #property && Cold in #property
               {
               wait 5
               display Ok Recognize Cold Sub Manual
               Halt
               }
            }
Return

Sub FoundNothing
  Display Ok Didnt find it.
  Halt[/cold]
Coragin

My Facebook
And now I'm better at doing what ever it is Wolverine does!

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: Tell me what is wrong here...
« Reply #9 on: November 06, 2009, 11:05:23 AM »
0
Unfortunately, I do things a bit differently in the CLAw, so there's not a real way to compare.  I'm not sure what you are trying to do, so it's kinda hard to add anything at the moment.  Are you just trying to find weapons with 100% elemental damage?
Please read the ScriptUO site RULES
Come play RIFT with me!

Offline CoraginTopic starter

  • Wacko in Pajama's
  • Elite
  • *
  • *
  • Posts: 1641
  • Activity:
    0%
  • Reputation Power: 23
  • Coragin might someday be someone...Coragin might someday be someone...Coragin might someday be someone...Coragin might someday be someone...
  • Gender: Male
  • It Is What It Is.
  • Respect: +57
  • Referrals: 1
    • View Profile
Re: Tell me what is wrong here...
« Reply #10 on: November 06, 2009, 11:22:57 AM »
0
Unfortunately, I do things a bit differently in the CLAw, so there's not a real way to compare.  I'm not sure what you are trying to do, so it's kinda hard to add anything at the moment.  Are you just trying to find weapons with 100% elemental damage?

Yes in my own script.  And well the rest is explained above.  If its 100% Physical but has "Hit Fire, Cold ect Area" it will also pick that out as being 100% Elemental.  The only work around is if I include

%Physical notin #property && Resist notin %property && Area notin #property

Problem with that is, it could be a 100% elemental damage weapon but if it has Resist, Physical, Area in the property it will destroy it.
Coragin

My Facebook
And now I'm better at doing what ever it is Wolverine does!

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: Tell me what is wrong here...
« Reply #11 on: November 06, 2009, 11:36:07 AM »
0
So I guess one of the problems is you are calling out a very generic "100" and looking for that in the #PROPERTY.  If it finds a 100 ANYWHERE in the #PROPERTY value, it'll return true (could find in durability, another elemental value, etc).  So you'll need to specifically look for the full strings like "Physical_Damage_100%", etc.

The CLAw actually looks for the attribute name and also computes the intensity values (the percentages% and the +pluses).  But that's a bit more complex.
Please read the ScriptUO site RULES
Come play RIFT with me!

Offline CoraginTopic starter

  • Wacko in Pajama's
  • Elite
  • *
  • *
  • Posts: 1641
  • Activity:
    0%
  • Reputation Power: 23
  • Coragin might someday be someone...Coragin might someday be someone...Coragin might someday be someone...Coragin might someday be someone...
  • Gender: Male
  • It Is What It Is.
  • Respect: +57
  • Referrals: 1
    • View Profile
Re: Tell me what is wrong here...
« Reply #12 on: November 06, 2009, 11:39:57 AM »
0
TM if you look in the script I wrote to test, it has

set %energy Cold Damage 100% ;=====not right
set %poison Cold_Damage_100%  ;=====not right
set %cold Cold Damage 100
set %fire Cold_Damage_100

So none of those are being picked up, the ones that are (not right) pick up the words no matter where they appear.
Coragin

My Facebook
And now I'm better at doing what ever it is Wolverine does!

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: Tell me what is wrong here...
« Reply #13 on: November 06, 2009, 12:02:17 PM »
0
Well you have to remember that the #PROPERTY variable uses "spaces" instead of undeerscores.  So you really need to be looking for this:

Code: [Select]
set %cold Cold , #SPC , Damage , #SPC , 100

Property works reverse from the journal which uses "_" as spaces.
Please read the ScriptUO site RULES
Come play RIFT with me!

Scrripty

  • Guest
Re: Tell me what is wrong here...
« Reply #14 on: November 06, 2009, 12:04:59 PM »
0
Well you have to remember that the #PROPERTY variable uses "spaces" instead of undeerscores.  So you really need to be looking for this:

Code: [Select]
set %cold Cold , #SPC , Damage , #SPC , 100

Property works reverse from the journal which uses "_" as spaces.

Just explained a couple things to me I didn't quite understand correctly too.  Now I'm going to beef up my powerscroll stealer! :)

Tags: