Begging

Help section from before the user variable changes that broke all macros

Moderator: MacroQuest Developers

Iceassassin
a lesser mummy
a lesser mummy
Posts: 49
Joined: Tue Nov 05, 2002 11:40 am

Begging

Post by Iceassassin » Sun Dec 22, 2002 5:29 pm

Check it out... Its like this.

I have seen the way to get from attack off to attack on...
How do I go from attack on to attack off...

Ex: I want to beg in a battle.. But it won't let me if my attack is on... Help me with this plz

User avatar
Fippy
a snow griffon
a snow griffon
Posts: 499
Joined: Tue Jul 16, 2002 10:42 am

Post by Fippy » Sun Dec 22, 2002 7:19 pm

Code: Select all

      /if $char(ability,"Begging")>0 {
         /attack off
         /doability "Begging"
         /attack on
      }

Of course if you actually get something it may screw up your macro cause you will have some coins on your cursor. Its never happened to me though lol.
Fippy

This is my girl. But Rizwank had her first :-)
[img]http://www.btinternet.com/~artanor/images/fairy_bounce09.gif[/img]

Iceassassin
a lesser mummy
a lesser mummy
Posts: 49
Joined: Tue Nov 05, 2002 11:40 am

WOWOWOW

Post by Iceassassin » Sun Dec 22, 2002 9:59 pm

WOW! Fippy is wrong for once! lol...

Or maybe i'm just stupid and can't phrase question right.

I wanna have like an if statement..

if attack = on
{
attack off
/doability beg
attack on
}

if attack = off
{
/doability beg
}
goto:loop

unfortunately macro quest doesn't understand my inability to write macros
:D

User avatar
L124RD
Site Admin
Site Admin
Posts: 1343
Joined: Fri Jun 14, 2002 12:15 am
Location: Cyberspace
Contact:

Post by L124RD » Mon Dec 23, 2002 12:51 am

Salutations,
He wasn't wrong, he just misunderstood your question... I think...

Code: Select all

/if n $char(ability,"beg")>0 {
   /if $combat==TRUE {
    /attack off
    /doability "beg"
    /attack on
  } else {
   /doability "beg"
  }
}
that should work...

User avatar
Fippy
a snow griffon
a snow griffon
Posts: 499
Joined: Tue Jul 16, 2002 10:42 am

Post by Fippy » Mon Dec 23, 2002 4:58 am

Well I took what you wanted to achive and wrote the code for it. YOu said you wanted to beg in battle. My code snippet does just that. It does it without you having to worry about if you are attacking or not since it turns attacking off and on for you.

I assumed that what ya wanted. Always the bane of the coder. Making assumptions about what the client wants :-)
Fippy

This is my girl. But Rizwank had her first :-)
[img]http://www.btinternet.com/~artanor/images/fairy_bounce09.gif[/img]

Iceassassin
a lesser mummy
a lesser mummy
Posts: 49
Joined: Tue Nov 05, 2002 11:40 am

Take me for the devil!

Post by Iceassassin » Mon Dec 23, 2002 10:17 am

Woah there! It was merely a joke. You guys are both very very very good macro programs. You are taken me for the devil! :twisted: LoL. Sry about stupid comment.

User avatar
L124RD
Site Admin
Site Admin
Posts: 1343
Joined: Fri Jun 14, 2002 12:15 am
Location: Cyberspace
Contact:

Post by L124RD » Mon Dec 23, 2002 11:27 am

Salutations,
as an assassin, your movements need to be noticable and final, not capable of being misinterpreted. me, I cannot do this, but you, proclaiming yourself as a... this is going nowhere...

User avatar
Fippy
a snow griffon
a snow griffon
Posts: 499
Joined: Tue Jul 16, 2002 10:42 am

Post by Fippy » Mon Dec 23, 2002 11:40 am

No sweat Ice. (Thats sounds kinda wrong). I was actually having a dig at myself too. :-)
Fippy

This is my girl. But Rizwank had her first :-)
[img]http://www.btinternet.com/~artanor/images/fairy_bounce09.gif[/img]

lifewolf
a ghoul
a ghoul
Posts: 143
Joined: Fri Oct 18, 2002 6:29 pm

Post by lifewolf » Mon Dec 23, 2002 9:02 pm

bah.. iv got a 180 something skill in it and the most iv ever made before getting attacked is 2 silver..

Begging = nothing but a useless number =/

BTW in EQSTR.txt it has 4 lines stating "You recieve %d <copper/silver/gold/platinum> from begging", so assumingly you can get nothing but coin from it which is what iv found, and also it auto-adds the coin you get from begging into your in inventory coin collector number thing..

And in 3 years i'v never begged a coin while attacking.

User avatar
Fippy
a snow griffon
a snow griffon
Posts: 499
Joined: Tue Jul 16, 2002 10:42 am

Post by Fippy » Tue Dec 24, 2002 9:01 am

Begging is a good taunt. If your Taunt, Beg, and Disarm it really helps.
Fippy

This is my girl. But Rizwank had her first :-)
[img]http://www.btinternet.com/~artanor/images/fairy_bounce09.gif[/img]

Iceassassin
a lesser mummy
a lesser mummy
Posts: 49
Joined: Tue Nov 05, 2002 11:40 am

Post by Iceassassin » Wed Dec 25, 2002 12:31 pm

| - Waiting.mac -
| - Written by Iceassassin -
| - Needs to be updated.

#event hit "hits YOU"

Sub Main
:loop
/doability 4
/doability 1
/doability 3
/doability 6
/call Beg
/call Forage
/goto :loop
/return

/if n $char(ability,"beg")>0
{
| Checks to see if attack is on. If so, then it shuts attack off, and then
| begs, and then attacks again.
/if $combat==TRUE
{
/attack off
/doability beg
/attack on
} else{
/doability beg
}
/return
}

Sub Forage
:Forage
/if n $char(ability,"Forage")>0 /doability Forage
/delay 20
/if "$cursor()"=="TRUE" /goto :AutoDrop
/goto :loop
/return

Sub Drop
:AutoDrop
/click left auto
/goto :loop
/return

Sub hit
/echo Ahhh!
/return


:Done
/sendkey up ctrl
/click left enviro done

/return 0

BAH! It says i'm misusing /if statements. If someone could tell me what is wrong.. I woudl greatly appreciate it.[/code][/code]

User avatar
Fippy
a snow griffon
a snow griffon
Posts: 499
Joined: Tue Jul 16, 2002 10:42 am

Post by Fippy » Wed Dec 25, 2002 3:50 pm

You have nested ifs near the top. Unfortunately MQ doesnt support them.
Fippy

This is my girl. But Rizwank had her first :-)
[img]http://www.btinternet.com/~artanor/images/fairy_bounce09.gif[/img]

User avatar
L124RD
Site Admin
Site Admin
Posts: 1343
Joined: Fri Jun 14, 2002 12:15 am
Location: Cyberspace
Contact:

Post by L124RD » Wed Dec 25, 2002 6:42 pm

Salutations,
GAH fippy! Did you read that in the readme or did you try it?!? Here we go, Jhono's lesson on what it means by nested ifs.... THis works:

Code: Select all

/if $v0==$v1 {
  /if $v1==$v2 {
    /echo yeah!
  }
}
This DOESN'T work...

Code: Select all

/if $v0==$v1 /if $v1==$v2 {
 /echo yeah!
}
this will ALWAYS echo '[macroquest] yeah'

User avatar
Fippy
a snow griffon
a snow griffon
Posts: 499
Joined: Tue Jul 16, 2002 10:42 am

Post by Fippy » Wed Dec 25, 2002 6:55 pm

Read it in the readme so never bothered to try it.

So you mean it really does work?

If so RIZ change the readme.

I gotta go rethink my logic on a few scripts now if nested ifs work.

heres the line from the readme

Command can be { which will run everything up to the next }
} can be followed by else and a command.
WARNING: Nested {}s are not handled as of yet
Fippy

This is my girl. But Rizwank had her first :-)
[img]http://www.btinternet.com/~artanor/images/fairy_bounce09.gif[/img]

User avatar
L124RD
Site Admin
Site Admin
Posts: 1343
Joined: Fri Jun 14, 2002 12:15 am
Location: Cyberspace
Contact:

Post by L124RD » Wed Dec 25, 2002 7:33 pm

Salutations,
yeah I know it says that, but this is what has worked for me so... *shruggles*