Last active
November 8, 2017 02:35
-
-
Save cydh/1c75691ff88ba01506840b8d341a3f3a to your computer and use it in GitHub Desktop.
OpenKore's automacro to cast Full Chemical Protection (FCP) to player in certain guild only | (c) Cydh/PServeRO
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Automacro to cast Full Chemical Protection (FCP) on chat | |
automacro fcp { | |
pubm "fcp",2 | |
call { | |
if (@eval(checkPlayerGuild("$.lastpub")) == 1) { | |
do sp CR_FULLPROTECTION "$.lastpub" | |
} else { | |
do e ?? | |
} | |
} | |
timeout 1 | |
} | |
# usage must be near the player | |
# @eval(checkPlayerGuild("playername")) | |
sub checkPlayerGuild { | |
my ($name) = @_; | |
foreach my $_player (@{$::playersList->getItems()}) { | |
next if $_player->{'name'} eq ""; | |
next if $_player->{'actorType'} ne "Player"; | |
if ($_player->{'name'} eq "$name" && $_player->{'guild'}) { | |
# Add guild name here | |
return 1 if ($_player->{'guild'}{'name'} eq "Anjal.Saber"); | |
return 1 if ($_player->{'guild'}{'name'} eq "R18 Doujin"); | |
return 1 if ($_player->{'guild'}{'name'} eq "-= Skizofrenia =-"); | |
} | |
} | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
Good macro script anyway, may I know if I change this to priest buff like this
Do I really need this?
foreach my $_player (@{$::playersList->getItems()})
Sorry for bothering you, I'm not really expert on macro.
Thanks