[guide/help] Macro usefulls

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

Moderator: Moderators

Message
Author
jbauson
Human
Human
Posts: 20
Joined: 16 Apr 2008, 02:46

Re: [guide/help] Macro usefulls

#11 Post 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/

iMikeLance
Moderators
Moderators
Posts: 208
Joined: 01 Feb 2010, 17:37
Noob?: No
Location: Brazil - MG
Contact:

Re: [guide/help] Macro usefulls

#12 Post 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/

jbauson
Human
Human
Posts: 20
Joined: 16 Apr 2008, 02:46

Re: [guide/help] Macro usefulls

#13 Post 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

User avatar
SkylorD
Moderators
Moderators
Posts: 1167
Joined: 16 Dec 2011, 02:53
Noob?: No
Location: Brazil
Contact:

Re: [guide/help] Macro usefulls

#14 Post 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)
Learn rules

deeh16
Noob
Noob
Posts: 19
Joined: 14 Dec 2008, 06:07
Noob?: Yes

Re: [guide/help] Macro usefulls

#15 Post 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
Image

User avatar
4epT
Developers
Developers
Posts: 617
Joined: 30 Apr 2008, 14:17
Noob?: No
Location: Moskow (Russia)
Contact:

Re: [guide/help] Macro usefulls

#16 Post by 4epT »

what condition you want to check?
All my posts are made by machine translator!
¤ Manual ¤ Anti BotKiller ¤ Packet Extractor v3 ¤
Image
Image

gelo2012
Plain Yogurt
Plain Yogurt
Posts: 58
Joined: 17 Sep 2012, 13:54
Noob?: Yes
Location: Sa Puso Mo

Re: [guide/help] Macro usefulls

#17 Post 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?

Liposo
Plain Yogurt
Plain Yogurt
Posts: 59
Joined: 20 May 2013, 02:00
Noob?: No

Re: [guide/help] Macro usefulls

#18 Post 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 !

vitriol
Plain Yogurt
Plain Yogurt
Posts: 61
Joined: 19 Apr 2011, 23:26
Noob?: No

Re: [guide/help] Macro usefulls

#19 Post 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

Liposo
Plain Yogurt
Plain Yogurt
Posts: 59
Joined: 20 May 2013, 02:00
Noob?: No

Re: [guide/help] Macro usefulls

#20 Post by Liposo »

How to check if a cell is not occupied by a player? So I can cast warp portal on that cell.

Post Reply