Author Topic: Event Macro 22 0 Issues  (Read 5957 times)

0 Members and 1 Guest are viewing this topic.

Offline PauloniusTopic starter

  • Elite
  • *
  • *
  • Posts: 2040
  • Activity:
    0%
  • Reputation Power: 29
  • Paulonius is on the verge of being accepted.Paulonius is on the verge of being accepted.Paulonius is on the verge of being accepted.Paulonius is on the verge of being accepted.Paulonius is on the verge of being accepted.
  • Respect: +162
  • Referrals: 1
    • View Profile
Event Macro 22 0 Issues
« on: April 25, 2011, 01:31:58 PM »
0
I am playing with a lumberjack script and having issues getting event macro 22 to work consistently.  I have the script cutting logs into boards by assigning the log ID to #LTargetID and using event macro 22 0.  I can confirm that the value of #LtargetID is correctly assigned, but it still fails.  For some reason #LtargetID is retaining the tree targe and will try to cut the last tree I hit.  If I manually target something other than the tree, then it will accept #LtargetID assignments.  I am at a loss for what I am doing wrong.


Here is an example of the code I am having trouble with.  It works fine if I manually target something after I am done cutting trees, but otherwise never cuts the logs despite having the right IDs:


Code: [Select]
;==========================================================
Sub Cut_Logs
event sysmessage In Cut Logs
Finditem %Hatchet C_ , #CharID
   If #FindCnt < 1
      Finditem %Hatchet C_ , #BackpackID
   If #FindCnt < 1
      Return
Set %Cutwith #FindID
Finditem ZLK C_ , #BackpackID
event sysmessage Hatchet is %CutWith Logs are #Findtype #findid LtargetID is #LtargetID
For %LogCount 1 #FindCnt
   {
   Set #Findindex %LogCount
   Set #LobjectID %CutWith
   Event Macro 17 0
   target 20
   Set #LtargetID #FindID
   event sysmessage Findindex is #Findindex  TargetID is #LtargetID
   Event Macro 22 0
   Wait 20
   }
Wait 20
Return
« Last Edit: April 25, 2011, 01:38:05 PM by Paulonius »
This coin declares Caesar is "Dictator for Life." He did serve as Dictator for the remainder of his life, but his life would end only a few weeks after this issue. For Caesar to put his image on coins and essentially declare himself king was too much for Brutus and his republican allies.

"If everything seems under control, you're not going fast enough'
-Mario Andretti

"If everyone is thinking alike, someone isn't thinking."
- General George Patton Jr

Offline UOMaddog

  • Maddog
  • Elite
  • *
  • *
  • Posts: 1625
  • Activity:
    0%
  • Reputation Power: 22
  • UOMaddog might someday be someone...UOMaddog might someday be someone...UOMaddog might someday be someone...UOMaddog might someday be someone...
  • Gender: Male
  • Biggest B@D@$$ of the Universe
  • Respect: +165
  • Referrals: 8
    • View Profile
    • Insane UO
Re: Event Macro 22 0 Issues
« Reply #1 on: April 25, 2011, 01:46:06 PM »
0
don't forget to set #ltargetkind !!!!! Look it up on EUO Documentation (http://wiki.easyuo.com/index.php/Documentation) so that you set it to the correct thing (tree, object, person, whatever)
There are 10 kinds of people in this world: those that understand binary and those that don't!

Windows:  A 64-bit tweak of a 32-bit extension to a 16-bit user interface for an 8-bit operating system based on a 4-bit architecture from a 2-bit company that can't stand 1 bit of competition!

Offline PauloniusTopic starter

  • Elite
  • *
  • *
  • Posts: 2040
  • Activity:
    0%
  • Reputation Power: 29
  • Paulonius is on the verge of being accepted.Paulonius is on the verge of being accepted.Paulonius is on the verge of being accepted.Paulonius is on the verge of being accepted.Paulonius is on the verge of being accepted.
  • Respect: +162
  • Referrals: 1
    • View Profile
Re: Event Macro 22 0 Issues
« Reply #2 on: April 25, 2011, 01:59:58 PM »
0
I have never used #findkind other than with targeting tiles and never run into this issue. 

I inserted an assignement for #findkind to #ltargetkind and it didn't do anything.
This coin declares Caesar is "Dictator for Life." He did serve as Dictator for the remainder of his life, but his life would end only a few weeks after this issue. For Caesar to put his image on coins and essentially declare himself king was too much for Brutus and his republican allies.

"If everything seems under control, you're not going fast enough'
-Mario Andretti

"If everyone is thinking alike, someone isn't thinking."
- General George Patton Jr

Offline _C2_

  • 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: Event Macro 22 0 Issues
« Reply #3 on: April 25, 2011, 02:12:33 PM »
0
yeppers... that will cause code not to find targets at times.  it will make a  script really random in targeting

Offline PauloniusTopic starter

  • Elite
  • *
  • *
  • Posts: 2040
  • Activity:
    0%
  • Reputation Power: 29
  • Paulonius is on the verge of being accepted.Paulonius is on the verge of being accepted.Paulonius is on the verge of being accepted.Paulonius is on the verge of being accepted.Paulonius is on the verge of being accepted.
  • Respect: +162
  • Referrals: 1
    • View Profile
Re: Event Macro 22 0 Issues
« Reply #4 on: April 25, 2011, 02:14:06 PM »
0
So how do I eliminate it?  Should I be assigning #LtargetX, #LtargetY, etc?
This coin declares Caesar is "Dictator for Life." He did serve as Dictator for the remainder of his life, but his life would end only a few weeks after this issue. For Caesar to put his image on coins and essentially declare himself king was too much for Brutus and his republican allies.

"If everything seems under control, you're not going fast enough'
-Mario Andretti

"If everyone is thinking alike, someone isn't thinking."
- General George Patton Jr

Offline PauloniusTopic starter

  • Elite
  • *
  • *
  • Posts: 2040
  • Activity:
    0%
  • Reputation Power: 29
  • Paulonius is on the verge of being accepted.Paulonius is on the verge of being accepted.Paulonius is on the verge of being accepted.Paulonius is on the verge of being accepted.Paulonius is on the verge of being accepted.
  • Respect: +162
  • Referrals: 1
    • View Profile
Re: Event Macro 22 0 Issues
« Reply #5 on: April 25, 2011, 02:30:39 PM »
0
Uhg, I am at a loss to figure this one out.
This coin declares Caesar is "Dictator for Life." He did serve as Dictator for the remainder of his life, but his life would end only a few weeks after this issue. For Caesar to put his image on coins and essentially declare himself king was too much for Brutus and his republican allies.

"If everything seems under control, you're not going fast enough'
-Mario Andretti

"If everyone is thinking alike, someone isn't thinking."
- General George Patton Jr

Offline PauloniusTopic starter

  • Elite
  • *
  • *
  • Posts: 2040
  • Activity:
    0%
  • Reputation Power: 29
  • Paulonius is on the verge of being accepted.Paulonius is on the verge of being accepted.Paulonius is on the verge of being accepted.Paulonius is on the verge of being accepted.Paulonius is on the verge of being accepted.
  • Respect: +162
  • Referrals: 1
    • View Profile
Re: Event Macro 22 0 Issues
« Reply #6 on: April 25, 2011, 03:00:15 PM »
0
Seem to have solved it.  Finditem was giving me a kind of 0 (zero) for the logs and is subsituted 1 and it worked.
This coin declares Caesar is "Dictator for Life." He did serve as Dictator for the remainder of his life, but his life would end only a few weeks after this issue. For Caesar to put his image on coins and essentially declare himself king was too much for Brutus and his republican allies.

"If everything seems under control, you're not going fast enough'
-Mario Andretti

"If everyone is thinking alike, someone isn't thinking."
- General George Patton Jr

Offline 12TimesOver

  • Another Day, Another Vendetta
  • Global Moderator
  • *
  • *
  • Posts: 3694
  • Activity:
    0%
  • Reputation Power: 41
  • 12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.
  • Gender: Male
  • Respect: +321
  • Referrals: 2
    • View Profile
Re: Event Macro 22 0 Issues
« Reply #7 on: April 25, 2011, 03:12:05 PM »
0
What they meant is that you need to manually set your #ltargetkind to 1 before targeting:

Code: [Select]
For %LogCount 1 #FindCnt
   {
   Set #Findindex %LogCount
   Set #LobjectID %CutWith
   set #ltargetkind 1     <--------------------------------
   Event Macro 17 0
   target 20
   Set #LtargetID #FindID
   Event Macro 22 0
   Wait 20
   }
When they come for me I'll be sitting at my desk
     with a gun in my hand wearing a bulletproof vest
My, my, my how the time does fly
     when you know you're gonna die by the end of the night

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: Event Macro 22 0 Issues
« Reply #8 on: April 25, 2011, 04:34:22 PM »
0
you should always set the targetkind before targetting... 70% of the time you can get away with not doing it (as you manually set via a click target before opening script).. but if you dont do it you will never figure out why a bit of code is not working like above.

IMPORTANT targetkind is not the same as findkind
targetkind <> findkind <> curskind <> contkind

findkind results are
-1    No objects found.
0    Object is in a container.
1    Object is on the ground.

Targetkind
1    Object
2    Ground,Mountains,Caves
3    Resource: Tree,Water
« Last Edit: April 25, 2011, 04:36:09 PM by Endless Night »
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 NObama

  • Everything I need to know, I learned from Miffy's Item Finder.
  • Elite
  • *
  • *
  • Posts: 3454
  • Activity:
    0%
  • Reputation Power: 43
  • NObama is a force to reckon with.NObama is a force to reckon with.NObama is a force to reckon with.NObama is a force to reckon with.NObama is a force to reckon with.NObama is a force to reckon with.NObama is a force to reckon with.NObama is a force to reckon with.
  • Respect: +161
  • Referrals: 2
    • View Profile
Re: Event Macro 22 0 Issues
« Reply #9 on: April 25, 2011, 06:54:12 PM »
0
My goodness, EN.  That is a very handy little table.  Sheds new light on all SORTS of issues I've had over the years...

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: Event Macro 22 0 Issues
« Reply #10 on: April 25, 2011, 08:11:55 PM »
0
My goodness, EN.  That is a very handy little table.  Sheds new light on all SORTS of issues I've had over the years...

LOL its blatently ripped from the EUO wiki over at easyuo.  I probably read every page of that wiki when i was working on my EUO to OpenEUO translator.
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 PauloniusTopic starter

  • Elite
  • *
  • *
  • Posts: 2040
  • Activity:
    0%
  • Reputation Power: 29
  • Paulonius is on the verge of being accepted.Paulonius is on the verge of being accepted.Paulonius is on the verge of being accepted.Paulonius is on the verge of being accepted.Paulonius is on the verge of being accepted.
  • Respect: +162
  • Referrals: 1
    • View Profile
Re: Event Macro 22 0 Issues
« Reply #11 on: April 26, 2011, 06:57:34 AM »
0
Yeah, that was an interesting lesson for me.  All of the scripting I have done in the past has been item based crafting stuff, so I have never used kind and gotten away with it.  Threw me for a loop yesterday.
This coin declares Caesar is "Dictator for Life." He did serve as Dictator for the remainder of his life, but his life would end only a few weeks after this issue. For Caesar to put his image on coins and essentially declare himself king was too much for Brutus and his republican allies.

"If everything seems under control, you're not going fast enough'
-Mario Andretti

"If everyone is thinking alike, someone isn't thinking."
- General George Patton Jr

Offline UOMaddog

  • Maddog
  • Elite
  • *
  • *
  • Posts: 1625
  • Activity:
    0%
  • Reputation Power: 22
  • UOMaddog might someday be someone...UOMaddog might someday be someone...UOMaddog might someday be someone...UOMaddog might someday be someone...
  • Gender: Male
  • Biggest B@D@$$ of the Universe
  • Respect: +165
  • Referrals: 8
    • View Profile
    • Insane UO
Re: Event Macro 22 0 Issues
« Reply #12 on: April 26, 2011, 08:55:07 AM »
0
98% of the time, it's not an issue if you're doing a repetitive script, however that 2% will drive you nuts! I went back through all my scripts and set #ltargetkind everywhere I used em22. A nice little Find/Replace works great to make sure you have it every time!
There are 10 kinds of people in this world: those that understand binary and those that don't!

Windows:  A 64-bit tweak of a 32-bit extension to a 16-bit user interface for an 8-bit operating system based on a 4-bit architecture from a 2-bit company that can't stand 1 bit of competition!

Offline PauloniusTopic starter

  • Elite
  • *
  • *
  • Posts: 2040
  • Activity:
    0%
  • Reputation Power: 29
  • Paulonius is on the verge of being accepted.Paulonius is on the verge of being accepted.Paulonius is on the verge of being accepted.Paulonius is on the verge of being accepted.Paulonius is on the verge of being accepted.
  • Respect: +162
  • Referrals: 1
    • View Profile
Re: Event Macro 22 0 Issues
« Reply #13 on: April 26, 2011, 09:02:33 AM »
0
No kidding, its definitely a best practices to use it.  Was knocking my head on my desk for a bit there.

Thanks for the help guys!
This coin declares Caesar is "Dictator for Life." He did serve as Dictator for the remainder of his life, but his life would end only a few weeks after this issue. For Caesar to put his image on coins and essentially declare himself king was too much for Brutus and his republican allies.

"If everything seems under control, you're not going fast enough'
-Mario Andretti

"If everyone is thinking alike, someone isn't thinking."
- General George Patton Jr

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: Event Macro 22 0 Issues
« Reply #14 on: April 26, 2011, 11:50:39 AM »
0
No kidding, its definitely a best practices to use it.  Was knocking my head on my desk for a bit there.

Thanks for the help guys!

Welcome to the club.. we all must have done that at least once... ... i encountered it the first time in my mining script... when i added autocrafting of tools...
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."

Tags: