Добавлено: Вс июн 03, 2007 11:56 pm
памоуму там совсем не мили секунды а нормальные обычные секунды
(с)char_recreate.pl / пересоздание чара при логине
char_recreate.plВобщем это плагин для пересоздания чара при логине,у меня есть такая проблема мне надо поставить паузы так чтобы при заходе на мап сервер коннект у меня не обрывался,помогите плиз ктонить кто знает как сделать.Код: Выделить всё
#Плагин к Openkore для пересоздания новиса #Author: F[i]ghter #mailto: night.fighter.2005<SOBAKA>gmail.com package char_recreate; use strict; use Utils; use Plugins; use Globals; use Log qw(message warning error debug); use Misc; use Network; use Network::Send; Plugins::register('char_recreate', 'Char Recreate Bot', \&onUnload); my $hooks = Plugins::addHooks(['charSelectScreen', \&delChar, undef]); sub onUnload { Plugins::delHooks($hooks); } sub delChar { sleep 5 ; my (undef, $args) = @_; Plugins::delHooks($hooks); $hooks = Plugins::addHooks(['charSelectScreen', \&createChar, undef]); # Удаляем чара в 0-ом слоте sendCharDelete($net,$chars[0]{ID}, $config{email}); $timeout{'charlogin'}{'time'} = time; $args->{return} = 2; } sub createChar { sleep 2000; my (undef, $args) = @_; sleep 5; Plugins::delHooks($hooks); $hooks = Plugins::addHooks(['charSelectScreen', \&loginChar, undef]); # Создаём чара в 0ом слоте со случайным именем и случайным цветом волос. sendCharCreate($net,$chars[0], vocalString(int(3)+5), 5, 5, 5, 5, 5, 5, 5, int(rand(15))+5); $timeout{'charlogin'}{'time'} = time; $args->{return} = 2; sleep 5; } sub loginChar { sleep 5 ; my (undef, $args) = @_; sleep 2; #Логинимся чаром в 0ом слоте sendCharLogin($net,$chars[0]); sleep 2; $timeout{'charlogin'}{'time'} = time; $args->{return} = 1; sleep 2; Plugins::delHooks($hooks); $hooks = Plugins::addHooks(['charSelectScreen', \&delChar, undef]); }
Код: Выделить всё
sendCharCreate($net,$chars[0], vocalString(int(3)+5), 5, 5, 5, 5, 5, 5, 5, int(rand(15))+5);
Код: Выделить всё
sendCharCreate($net,$chars[0], ucfirst(vocalString(int(rand(5))+5)), 5, 5, 5, 5, 5, 5, 5, int(rand(15))+5);
Код: Выделить всё
macro s {
$kafraloc = 156 97
$kafratalksteps = c r1 n
:begin
do move 156 97
do talknpc $kafraloc $kafratalksteps
pause 1
$wingi1 = @storamount (Fly Wing)
$wingi0 = @storamount (Butterfly Wing)
$Axe = @storamount (Battle Axe [3])
$Rp = @storamount (Red Potion)
$Yp = @storamount (Yellow potion)
$Gp = @storamount (Green Potion)
$Mag = @storamount (Magnifier)
$Ph = @storamount (Phracon)
$Kak = @storamount (Powder of Butterfly)
if ($wingi0 > 0) goto wingi0
if ($wingi1 > 0) goto wingi1
if ($Axe > 0) goto Axe
if ($Rp > 0) goto Rp
if ($Yp > 0) goto Yp
if ($Gp > 0) goto Gp
if ($Mag > 0) goto Mag
if ($Ph > 0) goto Ph
if ($Kak > 0) goto Kak
if ($Kak = 0) goto end
:Kak
do storage get Powder of Butterfly 100
goto sell
:wingi0
do storage get Butterfly Wing 100
goto sell
:Mag
do storage get Magnifier 250
goto sell
:Gp
do storage get Green Potion 200
goto sell
:Rp
do storage get Red Potion 100
goto sell
:Yp
do storage get Yellow potion 100
goto sell
:wingi1
do storage get Fly Wing 300
goto sell
:Axe
do storage get Battle Axe [3]
do storage get Battle Axe [3]
do storage get Battle Axe [3]
do storage get Battle Axe [3]
do storage get Battle Axe [3]
do storage get Battle Axe [3]
do storage get Battle Axe [3]
do storage get Battle Axe [3]
do storage get Battle Axe [3]
do storage get Battle Axe [3]
do storage get Battle Axe [3]
goto sell
:Ph
do storage get Phracon 100
goto sell
:sell
do storage close
do autosell
pause 1
goto begin
:end
do quit
}
Код: Выделить всё
[RusRo]
ip 85.17.154.34
port 6999
master_version 2
version 24
pauseCharServer 2
pauseMapServer 2
serverType 9
charBlockSize 108
private 1
serverEncoding Russian