Logical Operations for /if

A forum for feature requests/discussions and user submitted patches that improve MQ2

Moderator: MacroQuest Developers

ashplayah
decaying skeleton
decaying skeleton
Posts: 8
Joined: Tue Dec 10, 2002 5:55 pm

Logical Operations for /if

Post by ashplayah » Fri Dec 13, 2002 9:39 pm

Added logical && and || for the /if command

syntax is:
/if <comparison> <command>
where <comparison> is in the form:
[n] <a>==<b> or
(<comparison> && <comparison>)

Note: you need to have the parens and spaces correct...

I've posted the delta to a MSN's free webhosting service (you need to sign in with a passport):
http://groups.msn.com/AshPlayah/Documents/MQDelta2.zip

Sample Code:

Code: Select all

/if ($char(hp,pct)<60 && $char(mana,pct)>80) /call HealSelf
Ashplayah

User avatar
rizwank
Huggle Police
Huggle Police
Posts: 524
Joined: Tue Jul 23, 2002 12:07 am
Contact:

Post by rizwank » Mon Dec 30, 2002 1:46 am

can you update this cpp to work with IRC latest 12-01 with the addition of
BOOL IfCompare(PCHAR szCond, BOOL CompareNumeric)
{

et al? I was trying to merge it today and I couldnt....
#macroquest op
Macroquest Official Documentarion
Macroquest Board Moderator
All around cool guy

[img]http://medicomuerte.users.btopenworld.com/images/fairy_bounce08.gif[/img]




xyilla
naggy
naggy
Posts: 33673
Joined: Sun Feb 23, 2025 5:36 am

Re: Logical Operations for /if

Post by xyilla » Sun Jan 11, 2026 8:22 pm