Page 2 of 3

Re: [guide/help] Macro usefulls

Posted: 06 Dec 2013, 16:15
by jbauson
Mortimal wrote: 1. Not, inside the regexp

Code: Select all

/(?!<not this>)<but this>/
Example:

Code: Select all

console /^(?!You finalized)(.+) finalized the Deal/
Line: "You finalized the deal" - not triggering!
Line: "Player Somebody finalized the deal" - triggering!
This should be

Code: Select all

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

Re: [guide/help] Macro usefulls

Posted: 09 Jan 2014, 16:17
by iMikeLance
jbauson wrote:
Mortimal wrote: 1. Not, inside the regexp

Code: Select all

/(?!<not this>)<but this>/
Example:

Code: Select all

console /^(?!You finalized)(.+) finalized the Deal/
Line: "You finalized the deal" - not triggering!
Line: "Player Somebody finalized the deal" - triggering!
This should be

Code: Select all

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

Re: [guide/help] Macro usefulls

Posted: 21 Jan 2014, 16:24
by jbauson
6. Get Char Stat

Code: Select all

$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: Select all

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: Select all

$i = $::char->{dex}
You will only get 99, how can I retrieve the other +49 dex?

tia

Re: [guide/help] Macro usefulls

Posted: 21 Jan 2014, 19:56
by SkylorD
jbauson wrote:6. Get Char Stat

Code: Select all

$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: Select all

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: Select all

$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)

Re: [guide/help] Macro usefulls

Posted: 27 Mar 2014, 09:11
by deeh16
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

Re: [guide/help] Macro usefulls

Posted: 28 Mar 2014, 02:08
by 4epT
what condition you want to check?

Re: [guide/help] Macro usefulls

Posted: 05 Apr 2014, 02:09
by gelo2012
How can I add 'coma' to an integer value? And what is the integer limit value of macro?

Code: Select all

$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?

Re: [guide/help] Macro usefulls

Posted: 21 Jul 2015, 15:28
by Liposo
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: Select all

		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 !

Re: [guide/help] Macro usefulls

Posted: 23 Jul 2015, 03:29
by vitriol
gelo2012 wrote:How can I add 'coma' to an integer value? And what is the integer limit value of macro?

Code: Select all

$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

Re: [guide/help] Macro usefulls

Posted: 31 Jul 2015, 07:29
by Liposo
How to check if a cell is not occupied by a player? So I can cast warp portal on that cell.