All about the macro plugin can be found in this forum. This forum is intended for the macro plugin only.
Moderator: Moderators
jbauson
Human
Posts: 20 Joined: 16 Apr 2008, 02:46
#11
Post
by jbauson » 06 Dec 2013, 16:15
Mortimal wrote:
1. Not , inside the regexp
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
Posts: 208 Joined: 01 Feb 2010, 17:37
Noob?: No
Location: Brazil - MG
#12
Post
by iMikeLance » 09 Jan 2014, 16:17
jbauson wrote: Mortimal wrote:
1. Not , inside the regexp
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
Posts: 20 Joined: 16 Apr 2008, 02:46
#13
Post
by jbauson » 21 Jan 2014, 16:24
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:
You will only get 99, how can I retrieve the other +49 dex?
tia
SkylorD
Moderators
Posts: 1196 Joined: 16 Dec 2011, 02:53
Noob?: No
Location: Brazil
#14
Post
by SkylorD » 21 Jan 2014, 19:56
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:
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
Posts: 19 Joined: 14 Dec 2008, 06:07
Noob?: Yes
#15
Post
by deeh16 » 27 Mar 2014, 09:11
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
4epT
Developers
Posts: 627 Joined: 30 Apr 2008, 14:17
Noob?: No
Discord: ya4ept#8494
Location: Moskow (Russia)
#16
Post
by 4epT » 28 Mar 2014, 02:08
what condition you want to check?
gelo2012
Plain Yogurt
Posts: 58 Joined: 17 Sep 2012, 13:54
Noob?: Yes
Location: Sa Puso Mo
#17
Post
by gelo2012 » 05 Apr 2014, 02:09
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
Posts: 59 Joined: 20 May 2013, 02:00
Noob?: No
#18
Post
by Liposo » 21 Jul 2015, 15:28
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
Posts: 61 Joined: 19 Apr 2011, 23:26
Noob?: No
#19
Post
by vitriol » 23 Jul 2015, 03:29
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
Posts: 59 Joined: 20 May 2013, 02:00
Noob?: No
#20
Post
by Liposo » 31 Jul 2015, 07:29
How to check if a cell is not occupied by a player? So I can cast warp portal on that cell.