[Solved]Send Alert when item in inventory is out of stock

All about the macro plugin can be found in this forum. This forum is intended for the macro plugin only.

Moderator: Moderators

Message
Author
hynospt
Noob
Noob
Posts: 4
Joined: 16 May 2017, 13:41
Noob?: Yes

[Solved]Send Alert when item in inventory is out of stock

#1 Post by hynospt »

Hello everybody, i want to make some tiny macro which has some alert when my some of inventory which is Awakening Potion is out of stock

Here is my line of stuff in my macro. txt

Code: Select all

macro restockAlert {
  $itemName = Awakening Potion
  $amount = @invamount ($itemName)
  if ($amount < 1) do eval Utils::Win32::playSound ('C:\sounds\Please_Do_Restock_Your_AwakeningPotion.wav')
}
I'm using macro plugin version 2.0.3-svn
macro.pl 6744
Macro::Automacro 6760
Macro::Script 6782
Macro::Parser 6759
Macro::Utilities 6812
Macro::Data 6753

No Errors from the debugger viewer , but i assumed the conditional is not work with the play sound syntax
Because if i change to the 'Chat in game' with syntax do c something, it work

Here is my reference : http://openkore.com/index.php/Macro_plugin

And if this case is resolved , i want to make this to be auto macro so i hope some one could help me :D
I will be happy if somebody provide the automacro too :P

Thank You ! :D:D

Mortimal
Developers
Developers
Posts: 389
Joined: 01 Nov 2008, 15:31
Noob?: No

Re: Send Alert when some of inventory is out of stock

#2 Post by Mortimal »

just

Code: Select all

@eval()
man... eval is not a command
Please use pin function for uploading your file contents!

hynospt
Noob
Noob
Posts: 4
Joined: 16 May 2017, 13:41
Noob?: Yes

Re: Send Alert when some of inventory is out of stock

#3 Post by hynospt »

oowww i see , so what should i do to make better script ?
if i use the previous script of mine , my macro is always triggered so in any conditions my openkore is always giving alert.

and i don't know why its triggered ..

Mortimal
Developers
Developers
Posts: 389
Joined: 01 Nov 2008, 15:31
Noob?: No

Re: Send Alert when some of inventory is out of stock

#4 Post by Mortimal »

run-once in automacro...
Please use pin function for uploading your file contents!

Post Reply