N>Macro For Private Server

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

Moderator: Moderators

ajdee
Human
Human
Posts: 28
Joined: 22 May 2013, 07:42
Noob?: Yes

N>Macro For Private Server

#1 Post by ajdee »

I have 2 Macros Before but it doesnt work now

first is this one flag macro fcp

automacro keyword {
console /\[dist=(.*)\] (.*) \((\d+)\): (.*)(spirit|kaupe|kaite|kaahi|Flag)(.*)$/
call spiritin
priority 0
}
macro spiritin {
$di = $.lastMatch1
$n = $.lastMatch2
$b = $.lastMatch3
$skill = $.lastMatch5
$job = @eval ($::players{$::playersID[$b]}->{jobID})
$guild = @eval (exists $::players{$::playersID[$b]}->{guild} ? $::players{$::playersID[$b]}->{guild}{name} : 'null')

if ($name = "Diabolic") goto skill
:skill
do sp 479 "$n"
goto finish

if ($name = "Chloe Sullivan") goto skill
:skill
do sp 479 "$n"
goto finish

if ($name = "Sam Witwer") goto skill
:skill
do sp 479 "$n"
goto finish

if ($name = "October 9, 1996") goto skill
:skill
do sp 479 "$n"
goto finish

if ($name = "GB") goto skill
:skill
do sp 479 "$n"
goto finish

if ($name = "Lifetime") goto skill
:skill
do sp 479 "$n"
goto finish
if ($name = "Ares") goto skill
:skill
do sp 479 "$n"
goto finish


:finish
release spiritin2
stop

}

( its not working anymore )

then second farming macro auto gstorage

automacro alootid {
console /allowed/i
call {
do c @alootid 12033 1
do c @alootid 12020 2
do c @alootid 12030 3
release alootid
}
}

automacro storage {
console /GM/i
call {
do c @storage
do storage add Box Of Sunlight
do storage add Cursed Water
do storage add Box of Resentment
do storage close
release storage
}
}

automacro bot {
console /Helper/i,
call {
do c d po ako bot
release bot
}
}
ptcarino
Plain Yogurt
Plain Yogurt
Posts: 62
Joined: 17 Jul 2010, 00:48
Noob?: No
Location: pRO Valkyrie

Re: N>Macro For Private Server

#2 Post by ptcarino »

on your fcp macro, the variable for player names is "$n". but on your IF statements, you were using "$name" and not "$n"
ajdee wrote:$di = $.lastMatch1
$n = $.lastMatch2
$b = $.lastMatch3
$skill = $.lastMatch5
$job = @eval ($::players{$::playersID[$b]}->{jobID})
$guild = @eval (exists $::players{$::playersID[$b]}->{guild} ? $::players{$::playersID[$b]}->{guild}{name} : 'null')
ajdee wrote: if ($name = "Diabolic") goto skill
:skill
do sp 479 "$n"
goto finish

if ($name = "Chloe Sullivan") goto skill
:skill
do sp 479 "$n"
goto finish

if ($name = "Sam Witwer") goto skill
:skill
do sp 479 "$n"
goto finish

if ($name = "October 9, 1996") goto skill
:skill
do sp 479 "$n"
goto finish

if ($name = "GB") goto skill
:skill
do sp 479 "$n"
goto finish

if ($name = "Lifetime") goto skill
:skill
do sp 479 "$n"
goto finish
if ($name = "Ares") goto skill
:skill
do sp 479 "$n"
goto finish


:finish
release spiritin2
stop

}
it may have worked before because there is no "goto finish" below your IF statements. based on my experience, if the IF statement fails, it will continue down to your code until it reaches "stop". try this one instead:

Code: Select all

if ($n = "Diabolic") goto skill
if ($n = "Chloe Sullivan") goto skill
if ($n = "Sam Witwer") goto skill
if ($n = "October 9, 1996") goto skill
if ($n = "GB") goto skill
if ($n = "Lifetime") goto skill
if ($n = "Ares") goto skill
goto finish

:skill
do sp 479 "$n"
goto finish
Note: i also shortened the code for you.



as for your gstorage macro, i can't say for sure why it isn't working because you're using a console trigger. console events may differ from server to server and your console trigger is not very specific.
but one thing is sure though, those "release" macro instructions in your macro are kind of useless without "run-once" or "lock" since they have nothing to release.
Image
ajdee
Human
Human
Posts: 28
Joined: 22 May 2013, 07:42
Noob?: Yes

Re: N>Macro For Private Server

#3 Post by ajdee »

what should i erase ?
ajdee
Human
Human
Posts: 28
Joined: 22 May 2013, 07:42
Noob?: Yes

Re: N>Macro For Private Server

#4 Post by ajdee »

this is my config.text btw

Code: Select all

partySkill Full Chemical Protection {
	lvl 5
	maxCastTime 1
	minCastTime 0
	hp
	sp > 100
	homunculus_hp
	homunculus_sp
	homunculus_dead
	onAction
	whenStatusActive
	whenStatusInactive
	whenFollowing
	spirit
	aggressives
	monsters
	notMonsters
	stopWhenHit 0
	inLockOnly 0
	notWhileSitting 0
	notInTown 0
	timeout 0
	disabled 0
	manualAI 0
	target Ares
	target_hp
	target_isJob
	target_isNotJob
	target_whenStatusActive
	target_whenStatusInactive Full Chemical Protection
	target_aggressives
	target_monsters
	target_timeout 0
	target_deltaHp
	target_dead 0
	inInventory
	isSelfSkill 0
	notPartyOnly 1
}
ptcarino
Plain Yogurt
Plain Yogurt
Posts: 62
Joined: 17 Jul 2010, 00:48
Noob?: No
Location: pRO Valkyrie

Re: N>Macro For Private Server

#5 Post by ptcarino »

ajdee wrote:what should i erase ?
instead of doing this

Code: Select all

if ($name = "Diabolic") goto skill
:skill
do sp 479 "$n"
goto finish

if ($name = "Chloe Sullivan") goto skill
:skill
do sp 479 "$n"
goto finish

if ($name = "Sam Witwer") goto skill
:skill
do sp 479 "$n"
goto finish

if ($name = "October 9, 1996") goto skill
:skill
do sp 479 "$n"
goto finish

if ($name = "GB") goto skill
:skill
do sp 479 "$n"
goto finish

if ($name = "Lifetime") goto skill
:skill
do sp 479 "$n"
goto finish
if ($name = "Ares") goto skill
:skill
do sp 479 "$n"
goto finish
change it to this

Code: Select all

if ($n = "Diabolic") goto skill
if ($n = "Chloe Sullivan") goto skill
if ($n = "Sam Witwer") goto skill
if ($n = "October 9, 1996") goto skill
if ($n = "GB") goto skill
if ($n = "Lifetime") goto skill
if ($n = "Ares") goto skill
goto finish

:skill
do sp 479 "$n"
goto finish
and like i said on my previous post, $name should be $n since that's the variable set for player names in your macro. $name variable is non existent in your macro so it won't work.

by the way, you don't need to set it on your config. if you were to setup partySkill, you need to put there ALL the names your bot's gonna buff. not ideal if you buff lots of players (like a guild buffer).
Image