登录 注册
当前位置:主页 > 资源下载 > 50 > CnKore for CRO下载

CnKore for CRO下载

  • 更新:2024-10-15 11:11:08
  • 大小:24.1MB
  • 推荐:★★★★★
  • 来源:网友上传分享
  • 类别:Perl - 后端
  • 格式:ZIP

资源介绍

基于OpenKore开发的一款客户端 use strict; use Time::HiRes qw(time); use base qw/Actor::Slave/; use Globals; use Log qw/message warning error debug/; use Utils; use Misc; use Translation; use AI::Slave::Homunculus; use AI::Slave::Mercenary; # homunculus commands/skills can only be used # if the homunculus is within this range use constant MAX_DISTANCE => 17; sub checkSkillOwnership {} sub action { my $slave = shift; my $i = (defined $_[0] ? $_[0] : 0); return $slave->{slave_ai_seq}[$i]; } sub args { my $slave = shift; my $i = (defined $_[0] ? $_[0] : 0); return \%{$slave->{slave_ai_seq_args}[$i]}; } sub dequeue { my $slave = shift; shift @{$slave->{slave_ai_seq}}; shift @{$slave->{slave_ai_seq_args}}; } sub queue { my $slave = shift; unshift @{$slave->{slave_ai_seq}}, shift; my $args = shift; unshift @{$slave->{slave_ai_seq_args}}, ((defined $args) ? $args : {}); } sub clear { my $slave = shift; if (@_) { my $changed; for (my $i = 0; $i < @{$slave->{slave_ai_seq}}; $i++) { if (defined binFind(\@_, $slave->{slave_ai_seq}[$i])) { delete $slave->{slave_ai_seq}[$i]; delete $slave->{slave_ai_seq_args}[$i]; $changed = 1; } } if ($changed) { my (@new_seq, @new_args); for (my $i = 0; $i < @{$slave->{slave_ai_seq}}; $i++) { if (defined $slave->{slave_ai_seq}[$i]) { push @new_seq, $slave->{slave_ai_seq}[$i]; push @new_args, $slave->{slave_ai_seq_args}[$i]; } } @{$slave->{slave_ai_seq}} = @new_seq; @{$slave->{slave_ai_seq_args}} = @new_args; } } else { undef @{$slave->{slave_ai_seq}}; undef @{$slave->{slave_ai_seq_args}}; } } sub suspend { my $slave = shift; my $i = (defined $_[0] ? $_[0] : 0); $slave->{slave_ai_seq_args}[$i]{suspended} = time if $i < @{$slave->{slave_ai_seq_args}}; } sub mapChanged { my $slave = shift; my $i = (defined $_[0] ? $_[0] : 0); $slave->{slave_ai_seq_args}[$i]{mapChanged} = time if $i < @{$slave->{slave_ai_seq_args}}; }