OpenKore / openkore

A free/open source client and automation tool for Ragnarok Online
http://openkore.com
Other
1.28k stars 1.04k forks source link

[eventMacro] undocumented keyword `&listitem` #3254

Closed ya4ept closed 3 years ago

ya4ept commented 4 years ago

"returns given argument from a comma separated list" Why do we need keyword &listitem? We can accomplish the same with the keyword &arg Example:

 macro listitem {
   [
    $list = a,b,c
    log listitem: &listitem (2, $list)
    log arg: &arg ("$list", 3)
   ]
 }

Console:

em listitem
[eventmacro message] listitem: c
[eventmacro message] arg: c

i suggest to remove the keyword &listitem

Nipodemos commented 4 years ago

just read the code, &listitem seems better to be honest with you

&arg looks like @Henrybk grabbed from old macro plugin, but it works... also &arg is more used because of that fact

&listitem i think almost no one even know that exists, so it is safer to remove, i agree with you

ya4ept commented 4 years ago

@Henrybk, let's remove the &listitem keyword?

ya4ept commented 4 years ago

@Henrybk ?