item timer / ready to cast

A forum for reporting bugs NOT related to custom plugins.

Moderator: MacroQuest Developers

User avatar
A_Enchanter_00
a snow griffon
a snow griffon
Posts: 473
Joined: Mon Dec 12, 2005 4:37 pm
Location: A server near you

item timer / ready to cast

Post by A_Enchanter_00 » Wed Dec 14, 2005 7:31 pm

I have a small question i dont know where else to put it

${FindItem[Hammer of Delusions].Timer} was changed from time to tick's some time ago, the problem i have is that i can do somthing like this

Code: Select all

		/if ( !${FindItem[Hammer of Delusions].Timer} && ${FindItem[Hammer of Delusions].ID} ) {
			/call Cast "Hammer of Delusions" item 2s
		}  else {
			/call Cast "${UserSpells[2]}" ${UserSpellsGemslot[2]} 2s
		}
because the ${FindItem[Hammer of Delusions].Timer} becomes 0 before it's ready. ( worked when it was a "timer" is there a ${FindItem[Hammer of Delusions].Ready} type member i am unaware off ?

A_Enchanter_00

User avatar
dont_know_at_all
Developer
Developer
Posts: 5450
Joined: Sun Dec 01, 2002 4:15 am
Location: Florida, USA
Contact:

Post by dont_know_at_all » Wed Dec 14, 2005 7:44 pm

Change:

Code: Select all

Dest.DWord=GetItemTimer(pItem)/6;
to

Code: Select all

Dest.DWord=(5+GetItemTimer(pItem))/6;
Shouldn't it be that way anyway? Round up to the tic?

User avatar
A_Enchanter_00
a snow griffon
a snow griffon
Posts: 473
Joined: Mon Dec 12, 2005 4:37 pm
Location: A server near you

Post by A_Enchanter_00 » Wed Dec 14, 2005 9:25 pm

is this somthing i need to change somwhere ? if so where do i do that ?

A_Enchanter_00

SwiftyMUSE
Developer
Developer
Posts: 1205
Joined: Tue Sep 23, 2003 10:52 pm

Post by SwiftyMUSE » Thu Dec 15, 2005 5:13 pm

This has been updated in the zip per the patch notes.

fannoj
decaying skeleton
decaying skeleton
Posts: 5
Joined: Wed Oct 05, 2005 1:03 am

Post by fannoj » Thu Dec 15, 2005 5:36 pm

hmm

i see it's now : Dest.DWord=GetItemTimer(pItem)/6+1;

${FindItem[Hammer of Delusions].Timer} returns 1

should i consider ${FindItem[Hammer of Delusions].Timer} = 1 as item ready ?

/if ( ${FindItem[Hammer of Delusions].Timer} == 1 ) {
.......
}

i can live with that =) just got to change some macro's =)

JJ
a hill giant
a hill giant
Posts: 227
Joined: Thu Nov 11, 2004 5:50 am

Post by JJ » Thu Dec 15, 2005 5:39 pm

The reason for 1 is because 0 would be false while not 0 would be true when you use an if statement. So no need to change anything. You can still use:

Code: Select all

if (${FindItem[Hammer of Delusions].Timer}) DOTHISACTION

User avatar
A_Enchanter_00
a snow griffon
a snow griffon
Posts: 473
Joined: Mon Dec 12, 2005 4:37 pm
Location: A server near you

Post by A_Enchanter_00 » Thu Dec 15, 2005 5:56 pm

the point is .. if ${FindItem[Hammer of Delusions].Timer} is always 1 or more

1 - 20 ( 120 sec recast ) 20 tick..

you will never know when to use the REAL spell and not the item


/if ( !${FindItem[Hammer of Delusions].Timer} && ${FindItem[Hammer of Delusions].ID} ) {
/call Cast "Hammer of Delusions" item 2s
} else {
/call Cast Euphoria gem1 20s
}

unless you do it this way. but that would work if thats thay why it is ment to work.

/if ( ${FindItem[Hammer of Delusions].Timer} == 1 && ${FindItem[Hammer of Delusions].ID} ) {
/call Cast "Hammer of Delusions" item 2s
} else {
/call Cast Euphoria gem1 20s
}

Fixes Item.Timer returning 0 too early tels me that is not the case.
dont_know_at_all wrote:Change:

Code:
Dest.DWord=GetItemTimer(pItem)/6;


to

Code:
Dest.DWord=(5+GetItemTimer(pItem))/6;


Shouldn't it be that way anyway? Round up to the tic?
Dest.DWord=(5+GetItemTimer(pItem))/6; <--- works 0 - 20 ticks
A_Enchanter_00

Author of:
MQ2AdvPath / ISXEQAdvPath
MQ2Cast ( Author also s0rcier )
MQ2CastTimer
MQ2VoiceCommand

[quote]
If you like my work and want to give somthing back, just click [url=https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=aenchanter00%40gmail%2ecom&item_name=A_Enchanter_00&no_shipping=2&no_note=1&tax=0&currency_code=USD&lc=DK&bn=PP%2dDonationsBF&charset=UTF%2d8][color=green]HERE[/color][/url] to use PAYPAL.
[/quote]

SwiftyMUSE
Developer
Developer
Posts: 1205
Joined: Tue Sep 23, 2003 10:52 pm

Post by SwiftyMUSE » Thu Dec 15, 2005 6:09 pm

Try checking for...

Code: Select all

/if ( !${FindItem[Hammer of Delusions].Timer.TotalSeconds} && ${FindItem[Hammer of Delusions].ID} ) {
when it hits 0 totalseconds you can recast... but ill look at adding a TimerReady which will shortcircuit this type of check.

User avatar
dont_know_at_all
Developer
Developer
Posts: 5450
Joined: Sun Dec 01, 2002 4:15 am
Location: Florida, USA
Contact:

Post by dont_know_at_all » Thu Dec 15, 2005 6:46 pm

It will always say 6.

Warauinu
a snow griffon
a snow griffon
Posts: 377
Joined: Fri Apr 15, 2005 9:21 am

Post by Warauinu » Thu Dec 15, 2005 10:54 pm

When it says Item Timer fixed is it saying 0.06 seconds left using this

Code: Select all

 ModRodnotready=3,48,415,255,0,0,${FindItem[rod of mystical transvergance].Timer.TimeHMS}
the intended result now as opposed to the former 0.00?

SwiftyMUSE
Developer
Developer
Posts: 1205
Joined: Tue Sep 23, 2003 10:52 pm

Post by SwiftyMUSE » Thu Dec 15, 2005 10:59 pm

Which zip?

Warauinu
a snow griffon
a snow griffon
Posts: 377
Joined: Fri Apr 15, 2005 9:21 am

Post by Warauinu » Thu Dec 15, 2005 11:12 pm

Todays revision A that said was fixed. Haven't had a chance to compile B yet, but will try that a little later also now.

Warauinu
a snow griffon
a snow griffon
Posts: 377
Joined: Fri Apr 15, 2005 9:21 am

Post by Warauinu » Fri Dec 16, 2005 2:34 am

Ok Compiled revision B for the day and in that zip it is fixed.

Thanks.

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

Re: item timer / ready to cast

Post by xyilla » Fri Jun 27, 2025 3:57 pm


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

Re: item timer / ready to cast

Post by xyilla » Fri Jun 27, 2025 3:58 pm