Openkore.com

OpenKore Forums
It is currently 19 Nov 2018, 19:59

All times are UTC - 5 hours [ DST ]





Post new topic Reply to topic  [ 22 posts ]  Go to page Previous  1, 2, 3  Next
Author Message
 Post subject: Re: [guide/help] Macro usefulls
PostPosted: 06 Dec 2013, 16:15 
Offline
Human
Human

Joined: 16 Apr 2008, 02:46
Posts: 20
Mortimal wrote:
1. Not, inside the regexp
Code:
/(?!<not this>)<but this>/

Example:
Code:
console /^(?!You finalized)(.+) finalized the Deal/

Line: "You finalized the deal" - not triggering!
Line: "Player Somebody finalized the deal" - triggering!


This should be
Code:
console /^(?!You)(.+) finalized the Deal/


Top
 Profile  
 
 Post subject: Re: [guide/help] Macro usefulls
PostPosted: 09 Jan 2014, 16:17 
Offline
Moderators
Moderators
User avatar

Joined: 01 Feb 2010, 17:37
Posts: 211
Location: Brazil - MG
jbauson wrote:
Mortimal wrote:
1. Not, inside the regexp
Code:
/(?!<not this>)<but this>/

Example:
Code:
console /^(?!You finalized)(.+) finalized the Deal/

Line: "You finalized the deal" - not triggering!
Line: "Player Somebody finalized the deal" - triggering!


This should be
Code:
console /^(?!You)(.+) finalized the Deal/

or:
console /^(You|Player .{1,25}) finalized the deal/

_________________
Brazilian Community: http://openkore-brasil.com
BetaKore: https://code.google.com/p/betakore/


Top
 Profile  
 
 Post subject: Re: [guide/help] Macro usefulls
PostPosted: 21 Jan 2014, 16:24 
Offline
Human
Human

Joined: 16 Apr 2008, 02:46
Posts: 20
6. Get Char Stat
Code:
$i = $::char->{<str/agi/dex/int/luc>}



This is working to retrieve the char stat, but any idea how you could get the total Char stat?
Normally you will have something this:

Code:
Agi: 1  +38  #2  Matk: 250~0   Mdef: 1
Vit: 1  +48  #2  Hit:  477     Flee: 2
Int: 25 +70  #4  Critical: 56  Aspd: 1
Dex: 99 +49  #0  Status Points: 3
Luk: 99 +68  #0  Guild: None


Using the above code:
Code:
$i = $::char->{dex}

You will only get 99, how can I retrieve the other +49 dex?

tia


Top
 Profile  
 
 Post subject: Re: [guide/help] Macro usefulls
PostPosted: 21 Jan 2014, 19:56 
Offline
Moderators
Moderators
User avatar

Joined: 16 Dec 2011, 02:53
Posts: 1212
Location: Brazil
jbauson wrote:
6. Get Char Stat
Code:
$i = $::char->{<str/agi/dex/int/luc>}



This is working to retrieve the char stat, but any idea how you could get the total Char stat?
Normally you will have something this:

Code:
Agi: 1  +38  #2  Matk: 250~0   Mdef: 1
Vit: 1  +48  #2  Hit:  477     Flee: 2
Int: 25 +70  #4  Critical: 56  Aspd: 1
Dex: 99 +49  #0  Status Points: 3
Luk: 99 +68  #0  Guild: None


Using the above code:
Code:
$i = $::char->{dex}

You will only get 99, how can I retrieve the other +49 dex?

tia


$dex = $::char->{dex}
$dexbonus = $::char->{dex_bonus}
$pointsdex = $::char->{points_dex}
$total = @eval($dex + $dexbonus)

_________________
"'There are three things all wise men fear: the sea in storm, a night with no moon, and the anger of a gentle man.'" :P

viewtopic.php?f=10&t=16117

Thanks for this Eternal! =D <3<3


Top
 Profile  
 
 Post subject: Re: [guide/help] Macro usefulls
PostPosted: 27 Mar 2014, 09:11 
Offline
Human
Human

Joined: 14 Dec 2008, 06:07
Posts: 23
what code am i going to use if i want to get info in NOTEPAD

my goals are,
1. i want to register names and save it in NOTEPAD
2. recog or eval if the name is in the list

_________________
Image


Top
 Profile  
 
 Post subject: Re: [guide/help] Macro usefulls
PostPosted: 28 Mar 2014, 02:08 
Offline
Developers
Developers
User avatar

Joined: 30 Apr 2008, 14:17
Posts: 621
Location: Moskow (Russia)
what condition you want to check?

_________________
All my posts are made by machine translator!
¤ Manual ¤ Anti BotKiller ¤ Packet Extractor v3 ¤
Image
Image


Top
 Profile  
 
 Post subject: Re: [guide/help] Macro usefulls
PostPosted: 05 Apr 2014, 02:09 
Offline
Plain Yogurt
Plain Yogurt

Joined: 17 Sep 2012, 13:54
Posts: 61
Location: Sa Puso Mo
How can I add 'coma' to an integer value? And what is the integer limit value of macro?
Code:
$num1 = 1000000000
$num2 = 1000
$num3 = @eval ($num1/$num2)

The value of $num3 = 1000000
What I want to have as an output is: 1,000,000
How can I do that?


Top
 Profile  
 
 Post subject: Re: [guide/help] Macro usefulls
PostPosted: 21 Jul 2015, 15:28 
Offline
Plain Yogurt
Plain Yogurt

Joined: 20 May 2013, 02:00
Posts: 63
How can I check if:
- you are not dead
- you are wearing a specific item in specific equipment slot (headgear/weapon/etc)
- you are a target of specific skill or in range of specific skill
using macro's @eval(), not automacro conditions?



And for checking if HP is below 80% or not. Is it correct to use like this:
Code:
      if (@eval($.hp / @eval($::char->{hp_max}) * 100) < 80) {
         log HP is lower than 80%.
      }

Is it a bad practice to use @eval inside @eval?

Thank !


Top
 Profile  
 
 Post subject: Re: [guide/help] Macro usefulls
PostPosted: 23 Jul 2015, 03:29 
Offline
Plain Yogurt
Plain Yogurt

Joined: 19 Apr 2011, 23:26
Posts: 63
gelo2012 wrote:
How can I add 'coma' to an integer value? And what is the integer limit value of macro?
Code:
$num1 = 1000000000
$num2 = 1000
$num3 = @eval ($num1/$num2)

The value of $num3 = 1000000
What I want to have as an output is: 1,000,000
How can I do that?


$num3 =~ /(\d\d\d)?(\d\d\d)?(\d\d\d)?(\d\d\d)?(\d\d\d)?(\d\d\d)?(\d\d\d)?(\d\d\d)$/,$1,$2,$3,$4,$5,$6,$7,$8/
$num3 =~ /,+/,/

messy but it works


Top
 Profile  
 
 Post subject: Re: [guide/help] Macro usefulls
PostPosted: 31 Jul 2015, 07:29 
Offline
Plain Yogurt
Plain Yogurt

Joined: 20 May 2013, 02:00
Posts: 63
How to check if a cell is not occupied by a player? So I can cast warp portal on that cell.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 22 posts ]  Go to page Previous  1, 2, 3  Next

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:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group