austin1415
3rd October 2005, 12:19
pls help i keep on disconnecting when using autocart, i've searched it in this forum
about the cart bug fix chinito have posted, my only question is where will i put this
##### AUTO-CART #####
if ($chars[$config{'char'}]{'cart'} && timeOut(\%{$timeout{'ai_cartAuto'}})) {
foreach my $key (keys %cart_control) {
my $invIndex = findIndexString_lc(\@{$chars[$config{'char'}]{'inventory'}}, "name", $key);
next if ($invIndex eq "" && !$cart_control{$key}{'getAuto'} && !$cart_control{$key}{'keep'});
my $cartIndex = findIndexString_lc(\@{$cart{'inventory'}}, "name", $key);
if ($cartIndex ne "") {
my $amount;
if ($invIndex ne "" && $chars[$config{'char'}]{'inventory'}[$invIndex]{'amount'} < $cart_control{$key}{'keep'}) {
$amount = $cart_control{$key}{'keep'} - $chars[$config{'char'}]{'inventory'}[$invIndex]{'amount'};
}elsif ($invIndex eq ""){
$amount = $cart_control{$key}{'keep'};
}
if ($amount > $cart{'inventory'}[$cartIndex]{'amount'}) {
$amount = $cart{'inventory'}[$cartIndex]{'amount'};
}
sendCartGetToInv(\$remote_socket, $cartIndex, $amount);
}
}
$timeout{'ai_cartAuto'}{'time'} = time;
}
Then change the red code's into this:
Quote:
f ($amount > 0) {
sendCartGetToInv(\$remote_socket, $cartIndex, $amount);
}
thx in advance, sorry for posting anoter thread because i'm really confused..
sorry for the bad english
about the cart bug fix chinito have posted, my only question is where will i put this
##### AUTO-CART #####
if ($chars[$config{'char'}]{'cart'} && timeOut(\%{$timeout{'ai_cartAuto'}})) {
foreach my $key (keys %cart_control) {
my $invIndex = findIndexString_lc(\@{$chars[$config{'char'}]{'inventory'}}, "name", $key);
next if ($invIndex eq "" && !$cart_control{$key}{'getAuto'} && !$cart_control{$key}{'keep'});
my $cartIndex = findIndexString_lc(\@{$cart{'inventory'}}, "name", $key);
if ($cartIndex ne "") {
my $amount;
if ($invIndex ne "" && $chars[$config{'char'}]{'inventory'}[$invIndex]{'amount'} < $cart_control{$key}{'keep'}) {
$amount = $cart_control{$key}{'keep'} - $chars[$config{'char'}]{'inventory'}[$invIndex]{'amount'};
}elsif ($invIndex eq ""){
$amount = $cart_control{$key}{'keep'};
}
if ($amount > $cart{'inventory'}[$cartIndex]{'amount'}) {
$amount = $cart{'inventory'}[$cartIndex]{'amount'};
}
sendCartGetToInv(\$remote_socket, $cartIndex, $amount);
}
}
$timeout{'ai_cartAuto'}{'time'} = time;
}
Then change the red code's into this:
Quote:
f ($amount > 0) {
sendCartGetToInv(\$remote_socket, $cartIndex, $amount);
}
thx in advance, sorry for posting anoter thread because i'm really confused..
sorry for the bad english