NiTRO106 wrote:thanks guys! i can now move my character using a plugin. i want to ask again on how to integrate a plugin to a config block on config.txt?
You do not
integrate anything into config. You just check config for your options, as all other features do. There is no centralized API for working with blocks (except Misc::checkSelfCondition etc), but there's plenty of examples of how it's done in AI::CoreLogic.
NiTRO106 wrote:is there a way to run the subroutine once? if i call the subroutine unload, it will call the moveChar once but it will not respond to it, thus resuming to the normal AI sequence.
There's legacy AI queue with both legacy AI logic and tasks; there's task manager with tasks too. You should to look into how AI logic and tasks done. Also examples of what you're trying there is exactly why we have macro plugin, which makes seemingly trivial things like these trivial to do.
You don't use strict and warnings. It's kind of the first thing ever explained in all Perl materials (including "Learn Perl in about 2 hours 30 minutes" you claim to have partially read) and there's generally no need to go with no strict, you will only get a ton of problems if you don't know Perl well.
ai_route($field->{name} eq "payon"
So you will move either to field named "1" or to field named "".
"$_[1]", "$_[2]"
No need for quotes.
"160", "96"
Same there.
$moveChar;
What's this? Just use strict already.