Openkore.com

OpenKore Forums
It is currently 22 Nov 2019, 06:06

All times are UTC - 5 hours [ DST ]





Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Send Alert when some of inventory is out of stock
PostPosted: 21 May 2017, 00:58 
Offline
Noob
Noob

Joined: 16 May 2017, 13:41
Posts: 4
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:
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


Top
 Profile  
 
 Post subject: Re: Send Alert when some of inventory is out of stock
PostPosted: 23 May 2017, 11:12 
Offline
Developers
Developers

Joined: 01 Nov 2008, 15:31
Posts: 385
just
Code:
@eval()

man... eval is not a command

_________________
Please use pin function for uploading your file contents!


Top
 Profile  
 
 Post subject: Re: Send Alert when some of inventory is out of stock
PostPosted: 30 May 2017, 03:12 
Offline
Noob
Noob

Joined: 16 May 2017, 13:41
Posts: 4
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 ..


Top
 Profile  
 
 Post subject: Re: Send Alert when some of inventory is out of stock
PostPosted: 31 May 2017, 11:10 
Offline
Developers
Developers

Joined: 01 Nov 2008, 15:31
Posts: 385
run-once in automacro...

_________________
Please use pin function for uploading your file contents!


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC - 5 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group