Author Topic: A little help needed  (Read 2754 times)

0 Members and 1 Guest are viewing this topic.

Offline NoobieTopic starter

  • Sr. Member
  • *
  • Posts: 262
  • Activity:
    0%
  • Reputation Power: 1
  • Noobie has no influence.
  • Gender: Male
  • Respect: +13
  • Referrals: 1
    • View Profile
A little help needed
« on: March 30, 2011, 02:28:35 PM »
0
Can someone help me understand what would cause this code to fail sometimes?


Code: [Select]
sub recallhome
finditem %home_book C_ , #BACKPACKID
wait 20
set #LTARGETID #findid
event macro 15 31
wait 1s
target 3s
event macro 22 0

Offline Paulonius

  • 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: A little help needed
« Reply #1 on: March 30, 2011, 02:38:15 PM »
0
As I read it you are attempting to recall off of your rune book, but you don't have any mechanism to wait until you have the spell cast.  I would build in a wait that resolves when you have a target cursor up.

I don't believe that you need the wait after the finditem.
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 NoobieTopic starter

  • Sr. Member
  • *
  • Posts: 262
  • Activity:
    0%
  • Reputation Power: 1
  • Noobie has no influence.
  • Gender: Male
  • Respect: +13
  • Referrals: 1
    • View Profile
Re: A little help needed
« Reply #2 on: March 30, 2011, 02:42:45 PM »
0
I was under the impression that the

target 3s

would wait until the courser was up or time out ( 3s here) then target.
Is that not very reliable?

Offline Paulonius

  • 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: A little help needed
« Reply #3 on: March 30, 2011, 02:59:43 PM »
0
I spewed ignorance in my previous post. Its late in the day I guess.  That should work, but I don't use it, so I was not as familiar with it.  Maybe you have a slow caster that is taking more than 3S to cast recall and is missing the window.  That would cause a failure.  

You might use the #targcurs value under "Extended Info" in the EUO window as an alternative, but its not as pretty as your code.  This would still fail if your toon takes longer than 3s to cast

Set #TargCurs 0
Set #CastTimeout #Scnt + 3
Event macro 15 31
Repeat
Wait 1
Until #TargCurs = 1 || #CastTimeout <= #Scnt

If we knew what the absolute longest you can take to cast recall is you might use that instead of 3

Presumably the target command is based on the #targcurs value and it should be just as reliable. 


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: A little help needed
« Reply #4 on: March 30, 2011, 08:12:30 PM »
0
set #ltargetkind  1    

1 is probably the right value without looking it up...   (But you should probably check the wiki for what this command does ...)
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."

Scrripty

  • Guest
Re: A little help needed
« Reply #5 on: March 30, 2011, 10:52:04 PM »
0
set #ltargetkind  1    

1 is probably the right value without looking it up...   (But you should probably check the wiki for what this command does ...)

1 is correct for objects.  Paul's way allows for more error checking.  This is just another way to do it.  After doing it this way, you can check for a change of physical location after a certain amount of time, plus the journal for spell fizzling, or failing to cast or whatever, then loop back around and recast if you fail or timeout also.

Code: [Select]
sub recallhome
finditem %home_book C_ , #BACKPACKID
if #findcnt > 0
{
  event macro 15 31
  target 3s
  set #LTARGETID #findid
  set #ltargetkind 1
  event macro 22 0
}
else
  display ok YOU HAVE NO BOOK! Set the var!

Tags: