Yoko

All sides of Injection
It is currently 2026-01-16 20:12:16

All times are UTC+02:00




Post new topic  Reply to topic  [ 1 post ] 
Author Message
PostPosted: 2004-08-27 00:16:00 
Offline
User avatar

Joined: 2004-08-25 01:28:18
Posts: 49
Я ПК .... А этот скриптик .... Анти Пк .... Сууть моего вопроса в том что при включении все вроде нармально но как только я начинаю капать я реколюсь домои тоесть от себя бегаю .... :-) :-)
Что в скрипте нужно исправить чтоб этот не достаток устрАнить .........
И ЕЩЕ


ПОЧЕМУ то У МЕНЯ ПИШЕТ ЧТО ФАИЛ ПЕРЕДВИЖЕНИЯ .....НЕ СОЗДАН ....
D:\Games\Ultima Online 2D\Инжа\.с1234567890mine_mov.dat И что надо использовать record для записи ....... Но при включении оного НЕ ЧЕГО НЕ ВКЛЮЧАЕТСЯ Тоесть как в скрипте на люмбер там поевляется таргет где кликаеш на дерево ....Или прописываеш сам Координаты ...Тут же не чего подобного нет....
ТОесть тут самому надо создовать и прописывать или как.... И где ??????



Var MiningDir="D:\Games\Ultima Online 2D\Инжа\.с1234567890"# - Путь к скрипту
Var MaxWght="700" # - Максимальный вес
Var HomeRune=1 # - Номер руны в дом
Var MineRune=2 # - Номер руны в шахту
Var LoadContainer="0x4017e963" # - Номер загрузочного контейнера
Var UnLoadContainer="0x40051ba2" # - Номер разгрузочного контейнера
Var MineBook="0x4001d536" # - Номер Runebook
Var HomeX="3274",HomeY="410" # - Координаты появления в доме
Var MineX="4588",MineY="3292" # - Координаты появления в шахте
Var EscpX="3274",EscpY="410" # - Координаты появления в безопасности

############################################################
# Начало копания и контроль за смертью
############################################################
sub Start()
log(0,"","")
wait(500)
UO.Exec("exec Mining")
While not UO.Dead()
wait(1000)
wend
uo.textopen()
uo.textprint("Смерть")
log(4,uo.GetGlobal("name"),"")
wait(500)
UO.Exec("warmode 0")
UO.Exec("terminate all")
end sub

############################################################
# Противостояние Элементалю
############################################################
sub ElemKill()
UO.Exec("terminate Mining")
UO.UseType("0x0F0E","0x0631")
wait(100)
repeat
UO.DeleteJournal()
if UO.Mana<50 then
wait(14000)
UO.UseType("0x0F0E","0x09DF")
endif
UO.WaitMenu("What","Daemon")
UO.Cast("Polymorph")
wait(1000)
while checkmorph()==false
wait(100)
wend
until NOT UO.InJournal("spell fizzles")
UO.FindType("0x0010","0xffff","ground")
UO.GetStatus("finditem")
uo.SetGlobal("name",UO.GetName("finditem"))
uo.textopen()
uo.textprint(UO.GetName("finditem"))
wait(100)
lifeup("healing")
UO.WarMode(1)
wait(100)
UO.DeleteJournal()
UO.Attack("laststatus")
while check("0x0010")==true
gotoxy(UO.GetX("laststatus"),UO.GetY("laststatus"),1)
wait(100)
wend
uo.SetGlobal("timekill",time())
UO.WaitTargetGround("0x19B9")
wait(500)
UO.Grab("all")
UO.WaitTargetGround("0x0EED")
wait(1500)
UO.Grab("all")
wait(100)
UO.Exec("warmode 0")
recall("1")
log(5,uo.GetGlobal("name"),"")
uo.textopen()
uo.textprint("Поимели рудку =)")
UO.Exec("exec Mining")
end sub

############################################################
# Контроль за опасностью
############################################################
sub Visor()
VAR asd
while 1
UO.deletejournal()
while not UO.InJournal(":")
wait(100)
wend
if UO.InJournal("Elemental") then
uo.SetGlobal("timeelem",time())
uo.textopen()
uo.textprint("Будет бой с элементалем")
UO.Exec("exec ElemKill")
UO.Exec("terminate Visor")
endif
if UO.InJournal("attacking you") then
UO.GetStatus("UO.JournalSerial(0)")
uo.SetGlobal("name",UO.GetName(UO.JournalSerial(0)))
log(9,uo.GetGlobal("name"),"")
uo.textopen()
uo.textprint("Эта крыса "+UO.GetName(UO.JournalSerial(0))+" внезапно атаковала!" )
UO.Exec("exec Escape")
UO.Exec("terminate Visor")
endif
asd=UO.GetNotoriety(UO.JournalSerial(0))
if asd==6 then
UO.GetStatus("UO.JournalSerial(0)")
uo.SetGlobal("name",UO.GetName(UO.JournalSerial(0)))
log(6,uo.GetGlobal("name"),"")
uo.textopen()
uo.textprint("В шахте оказался ПК - "+UO.GetName(UO.JournalSerial(0)))
UO.Exec("exec Escape")
UO.Exec("terminate Visor")
endif
if asd==5 then
UO.GetStatus("UO.JournalSerial(0)")
uo.SetGlobal("name",UO.GetName(UO.JournalSerial(0)))
log(8,uo.GetGlobal("name"),"")
uo.textopen()
uo.textprint("В шахте вражеский гильдмэн - "+UO.GetName(UO.JournalSerial(0)))
UO.Exec("exec Escape")
UO.Exec("terminate Visor")
endif
if asd==4 then
UO.GetStatus("UO.JournalSerial(0)")
uo.SetGlobal("name",UO.GetName(UO.JournalSerial(0)))
log(7,uo.GetGlobal("name"),"")
uo.textopen()
uo.textprint("В шахте оказался криминал - "+UO.GetName(UO.JournalSerial(0)))
UO.Exec("exec Escape")
UO.Exec("terminate Visor")
endif
wend
end sub

############################################################
# Побег
############################################################
sub Escape()
UO.Exec("terminate Mining")
uo.textopen()
uo.textprint("Попытка к бегству")
UO.UseType("0x0F0E","0x0631")
wait(100)
recall("3")
repeat
UO.DeleteJournal()
UO.WaitTargetType(0x1F14)
UO.Cast("Mark")
wait(8000)
until NOT UO.InJournal("spell fizzles")
recall("1")
log(10,uo.GetGlobal("name"),"")
uo.textopen()
uo.textprint("Успешно скрылся")
wait(300000)
UO.Exec("exec Mining")
end sub

############################################################
# Пополнение жизни
############################################################
sub lifeup(mode)
if mode=="healing" then
while UO.Life<UO.Str
UO.Exec("bandageself")
wait(300)
UO.UseType("0x1B76")
wait(4000)
wend
endif
if mode=="bottle" then
if UO.Life<UO.Str then
UO.UseType("0x0F0E","0x09BB")
wait(100)
endif
endif
end sub

############################################################
# Пополнение маны
############################################################
sub manaup(mode)
if mode=="meditation" then
while UO.Mana<UO.Int
UO.Exec("useskill Meditation")
wait(4000)
wend
endif
if mode=="bottle" then
if UO.Mana<UO.Int then
UO.UseType("0x0F0E","0x09DF")
wait(100)
endif
endif
end sub

############################################################
# Проверка на превращение в демона
############################################################
sub checkmorph()
if UO.Mana<50 then
return true
endif
if UO.Str>300 then
return true
else
return false
end sub

############################################################
# Проверка на координаты
############################################################
sub checkxy(CheckX,CheckY)
if UO.Injournal("spell fizzles") then
return true
endif
if UO.GetX()==val(CheckX) and UO.GetY()==val(CheckY) then
return true
else
return false
end sub

############################################################
# Проверка на тип
############################################################
sub check(type)
uo.FindType(type, "-1", "ground")
if uo.findcount()>0 then
return true
else
return false
endif
end sub

############################################################
# Проверка на лаги
############################################################
sub checklag()
repeat
UO.Click("self")
wait(500)
until UO.InJournal(UO.GetName("self"))
end sub

############################################################
# Рекалл
############################################################
sub recall(type)
if type=="1" then
repeat
UO.DeleteJournal()
UO.Recall(MineBook,str(HomeRune+1))
wait(4000)
while checkxy(HomeX,HomeY)==false
wait(100)
wend
UO.Exec("terminate Visor")
until NOT UO.InJournal("spell fizzles")
endif
if type=="2" then
repeat
UO.DeleteJournal()
UO.Recall(MineBook,str(MineRune+1))
wait(4000)
while checkxy(MineX,MineY)==false
wait(100)
wend
UO.Exec("terminate Visor")
until NOT UO.InJournal("spell fizzles")
endif
if type=="3" then
repeat
UO.WaitTargetType(0x1F14)
UO.Cast("Recal")
wait(2000)
while checkxy(EscpX,EscpY)==false
wait(100)
wend
UO.Exec("terminate Visor")
until NOT UO.InJournal("spell fizzles")
endif
end sub

############################################################
# Разгрузка и пополнение
############################################################
sub Mining()
wait(1000)
var cnt,itm
log(1,"","")
wait(500)
UO.UseObject(LoadContainer)
wait(500)
UO.UseObject(UnLoadContainer)
wait(500)
UO.WarMode(0)
lifeup("healing")
UO.Exec("useskill Meditation")
UO.FindType("0x1F4C","0x0000",LoadContainer)
UO.Grab("5","finditem")
wait(1000)
UO.Recall(MineBook,"1")
wait(500)
if UO.Count("0x0E20")>0 then
UO.WaitTargetType("0x1008")
UO.UseType("0x0E20")
wait(1500)
endif
UO.Exec("bandageself")
wait(1500)
DIM Item[13]
Var i
var Exit
Item[1]=0x19B9 ; >3 ore
Item[2]=0x19B7 ; 1 ore
Item[3]=0x19BA ; 2 ore
Item[4]=0x19B8 ; 3 ore
Item[5]=0x0F11 ; saphires
Item[6]=0x0F16 ; amethysts
Item[7]=0x0F18 ; tourmalines
Item[8]=0x0F15 ; citrines
Item[9]=0x0F10 ; emeralds
Item[10]=0x0F0F ; star sapphires
Item[11]=0x0F26 ; diamonds
Item[12]=0x1F4C ; recall scrolls
Item[13]=0x0EED ; gold

UO.SetReceivingContainer(UnLoadContainer) ; storecontainer
wait(500)
For i=1 to 13
Exit=0
repeat
UO.FindType(Item[i])
if UO.GetQuantity("finditem")>0 then
cnt=UO.GetQuantity("finditem")
itm=UO.GetColor("finditem")
if UO.GetGraphic("finditem")=="0x19B9" or UO.GetGraphic("finditem")=="0x19B7" or UO.GetGraphic("finditem")=="0x19BA" or UO.GetGraphic("finditem")=="0x19B8" then
log(2,itm,str(cnt))
endif
if UO.GetGraphic("finditem")=="0x0EED" then
log(2,"gold",str(cnt))
endif
if UO.GetGraphic("finditem")=="0x0F11" then
log(2,"saphires",str(cnt))
endif
if UO.GetGraphic("finditem")=="0x0F16" then
log(2,"amethysts",str(cnt))
endif
if UO.GetGraphic("finditem")=="0x0F18" then
log(2,"tourmalines",str(cnt))
endif
if UO.GetGraphic("finditem")=="0x0F15" then
log(2,"citrines",str(cnt))
endif
if UO.GetGraphic("finditem")=="0x0F10" then
log(2,"emeralds",str(cnt))
endif
if UO.GetGraphic("finditem")=="0x0F0F" then
log(2,"star sapphires",str(cnt))
endif
if UO.GetGraphic("finditem")=="0x0F26" then
log(2,"diamonds",str(cnt))
endif
UO.Grab("0","finditem")
wait(1500)
Else
Exit=1
endif
until Exit==1
Next
UO.UnSetReceivingContainer()
UO.Exec("warmode 0")
wait(100)
UO.WaitTargetType("0x1008")
UO.UseType("0x0E20")
wait(100)
if UO.Count("0x0E21") <= 10 then
UO.FindType("0x0E21","0x0000",LoadContainer)
UO.Grab("10","finditem")
wait(1500)
endif
if UO.Count("0x0F0E","0x09DF") <= 2 then
UO.FindType("0x0F0E","0x09DF",LoadContainer)
UO.Grab("5","finditem")
wait(1500)
endif
if UO.Count("0x0F0E","0x0631") < 1 then
UO.FindType("0x0F0E","0x0631",LoadContainer)
UO.Grab("1","finditem")
wait(1500)
endif
if UO.BM<20 then
UO.FindType("0x0F7B","0x0000",LoadContainer)
UO.Grab("20","finditem")
wait(1500)
endif
if UO.SS<10 then
UO.FindType("0x0F8D","0x0000",LoadContainer)
UO.Grab("10","finditem")
wait(1500)
endif
if UO.MR<20 then
UO.FindType("0x0F86","0x0000",LoadContainer)
UO.Grab("20","finditem")
wait(1500)
endif
if UO.BP<20 then
UO.FindType("0x0F7A","0x0000",LoadContainer)
UO.Grab("20","finditem")
wait(500)
endif
endif
log(3,"","")
wait(500)
if UO.Count(0x0e86)<1 then
if UO.Count(0x0e85)<1 then
UO.Exec("terminate all")
endif
endif
manaup("meditation")
recall("2")
UO.Exec("exec Visor")
move()
end sub

############################################################
# Функция передвижения
############################################################
sub Move()
var cycle=0
var path=""
var test=0
var i=0
var j
var f=file(MiningDir+"mine_mov.dat")
If NOT f.Open() Then
Messagebox("Файл передвижения " +MiningDir +"mine_mov.dat не создан, Используйте record для записи")
return
EndIf
path = f.ReadString()
f.close()
UO.DeleteJournal()
While i<LEN(path)
if VAL(path[i]) then
j=VAL(path[i])
i=i+1
else
j=1
endif
Repeat
if test<>1 then
UO.DeleteJournal()
mine_spot()
end if
;UO.Print("Новая клетка")
if not make_step(path[i]) then
endif
j=j-1
Until j==0
i = i + 1
if cycle && i==LEN(path) then
i=0
endif
Wend
recall("1")
Mining()
UO.Exec("terminate Visor")
end sub

############################################################
# Функция копания
############################################################
sub mine_spot()
var maxMineTime=8000
var times=0
var timeout=0
hide()
While UO.InJournal("There is no")==0
UO.DeleteJournal()
UO.WaitTargetTile("1339",STR(UO.GetX()),STR(UO.GetY()),"0")
if getpickaxe("0x0e86","0x0e85")==1 then
else
recall("1")
Mining()
UO.Exec("terminate Visor")
endif
timeout=0
times = times +1
if times>15 then
wait(maxMineTime)
times = 0
endif
Repeat
timeout=timeout+200
Wait(200)
Until UO.InJournal("You put") OR UO.InJournal("There is no") OR timeout>maxMineTime
if UO.weight>val(MaxWght) then
recall("1")
Mining()
UO.Exec("terminate Visor")
endif
if ignoretile()==1 then
return
endif
Wend
return 0
end sub

############################################################
# Запись пути в файл
############################################################
sub record()
var x
var y
var path=""
UO.DeleteJournal()
Repeat
x=UO.GetX()
y=UO.GetY()
if waitNewPos(x,y) then
path=path+extract_dir(x,y,UO.GetX(),UO.GetY())
endif
Until UO.InJournal("stop")
path = compressPath(path)
var f=file(MiningDir +"mine_mov.dat")
If NOT f.Open() Then
f.Create()
Messagebox("Файл передвижения " +MiningDir +"mine_mov.dat создан")
endif
f.Writeln(path)
f.close()
;Messagebox("Файл передвижения " +MiningDir +"mine_mov.dat переписан")
end sub

############################################################
# Функции кодирования и декодирования пути
############################################################
sub send_step(keycode,dir)
var x = UO.GetX()
var y = UO.GetY()
var timeout = 0
if UO.GetDir()<>dir then
UO.Press(keycode)
Repeat
wait(50)
Until UO.GetDir()==dir
endif
UO.Press(keycode)
Repeat
timeout=timeout+50
wait(50)
Until x<>UO.GetX() || y<>UO.GetY() || timeout>2000
if timeout>2000 then
return 0
endif
return 1
end sub

sub waitNewPos(x,y)
while x==UO.GetX() && y==UO.GetY()
if UO.InJournal("stop") then
return 0
endif
wend
return 1
end sub

sub compressPath(path)
Var i=0
Var j=0
Var newPath=""
while i<LEN(path)
j=1
while path[i]==path[i+1] AND j<9
i=i+1
j=j+1
wend
if j==1 then
newPath=newPath+path[i]
else
newPath=newPath+STR(j)+path[i]
endif
i=i+1
wend
return newPath
end sub

sub extract_dir(x,y,a,b)
if x>a then
if y==b then
return "i"
else
if y>b then
return "n"
else
return "w"
endif
endif
else
if x<a then
if y==b then
return "l"
else
if y>b then
return "e"
else
return "s"
endif
endif
else
if y>b then
return "o"
else
return "k"
endif
endif
endif
end sub

sub make_step(dir)
if dir=="e" then
send_step(39,1)
return 1
endif
if dir=="l" then
send_step(34,2)
return 1
endif
if dir=="s" then
send_step(40,3)
return 1
endif
if dir=="k" then
send_step(35,4)
return 1
endif
if dir=="w" then
send_step(37,5)
return 1
endif
if dir=="i" then
send_step(36,6)
return 1
endif
if dir=="n" then
send_step(38,7)
return 1
endif
if dir=="o" then
send_step(33,0)
return 1
endif
return 0
end sub

############################################################
# Взятие кирки
############################################################
sub getpickaxe(apa,bpa)
if UO.Count(apa)>0 then
UO.UseType(apa)
return 1
else
if UO.Count(bpa)>0 then
UO.UseType(bpa)
return 1
else
Messagebox("Нет кирки")
return 0
endif
endif
end sub

############################################################
# Хайдинг
############################################################
sub hide()
while NOT UO.Hidden()
UO.UseSkill('Hiding')
wait(3000)
wend
end sub

############################################################
# Клетки с такими сообщениями будут пропускаться
############################################################
sub ignoretile()
if UO.InJournal("Try") then
return 1
endif
if UO.InJournal("Iron") then
return 1
endif
if UO.InJournal("Rusty") then
return 1
endif
if UO.InJournal("Old Copper") then
return 1
endif
if UO.InJournal("Copper") then
return 1
endif
if UO.InJournal("Dull Copper") then
return 1
endif
if UO.InJournal("Bronze") then
return 1
endif
if UO.InJournal("Silver") then
return 1
endif
if UO.InJournal("Shadow") then
return 1
endif
if UO.InJournal("Gold") then
return 1
endif
if UO.InJournal("Rose") then
return 1
endif
if UO.InJournal("Agapite") then
return 1
endif
if UO.InJournal("emerald") then
return 1
endif
if UO.InJournal("sapphire") then
return 1
endif
if UO.InJournal("diamond") then
return 1
endif
if UO.InJournal("star sapphire") then
return 1
endif
if UO.InJournal("amethyst") then
return 1
endif
if UO.InJournal("citrine") then
return 1
endif
if UO.InJournal("tourmaline") then
return 1
endif
return 0
end sub

############################################################
# Определение названия руды по цвету
############################################################
sub colortostring(color)
if color=="0x0455" then
return "<font color=#0000ff>Black Rock Ore</font>"
endif
if color=="0x0028" then
return "<font color=#0000ff>Obsidian Ore</font>"
endif
if color=="0x008F" then
return "<font color=#ff0000><B>Sand Rock Ore</B></font>"
endif
if color=="0x010F" then
return "<font color=#ff0000><B>Krynite Ore</B></font>"
endif
if color=="0x09A4" then
return "<font color=#ff0000><B>Crystaline Ore</B></font>"
endif
if color=="0x09B9" then
return "<font color=#ff0000><B>Acid Ore</B></font>"
endif
if color=="0x09F0" then
return "<font color=#ff0000><B>Gorgan Ore</B></font>"
endif
if color=="0x09E6" then
return "<font color=#ff0000><B>Elvin Ore</B></font>"
endif
if color=="0x0085" then
return "<font color=#ff0000><B>Dragon Ore</B></font>"
endif
if color=="0x0BA7" then
return "<font color=#ff0000><B>Eldar Ore</B></font>"
endif
if color=="0x09D3" then
return "<font color=#ff0000><B>Steel Ore</B></font>"
endif
if color=="0x08AF" then
return "<font color=#ff0000><B>Plutonium Ore</B></font>"
endif
if color=="0x09DA" then
return "<font color=#ff0000><B>Vulcan Ore</B></font>"
endif
if color=="0x0060" then
return "<font color=#ff0000><B>Aqua Ore</B></font>"
endif
if color=="0x09EC" then
return "<font color=#ff0000><B>BloodCrest Ore</B></font>"
endif
if color=="0x0482" then
return "Silver Ore"
endif
if color=="0x052D" then
return "<font color=#0000ff>Mytheril Ore</font>"
endif
if color=="0x0032" then
return "Gold Ore"
endif
if color=="0x0488" then
return "Bronze Ore"
endif
if color=="0x04C2" then
return "<font color=#0000ff>Bloodrock Ore</font>"
endif
if color=="0x096B" then
return "Shadow Ore"
endif
if color=="0x0014" then
return "Rose Ore"
endif
if color=="0x07D5" then
return "<font color=#0000ff>Verite Ore</font>"
endif
if color=="0x0193" then
return "<font color=#0000ff>Agapite Ore</font>"
endif
if color=="0x00CE" then
return "<font color=#0000ff>Valorite Ore</font>"
endif
if color=="0x0750" then
return "Rusty Ore"
endif
if color=="0x060A" then
return "Dull Copper Ore"
endif
if color=="0x0590" then
return "Old Copper Ore"
endif
if color=="0x0088" then
return "Copper Ore"
endif
if color=="0x0000" then
return "Iron Ore"
endif
if color=="gold" then
return "<font color=#000000><B> Золотых монет</B></font>"
endif
if color=="sapphires" then
return "<font color=#00FF00><B> Saphires</B></font>"
endif
if color=="amethysts" then
return "<font color=#00FF00><B> Amethysts</B></font>"
endif
if color=="tourmalines" then
return "<font color=#00FF00><B> Tourmalines</B></font>"
endif
if color=="citrines" then
return "<font color=#00FF00><B> Citrines</B></font>"
endif
if color=="emeralds" then
return "<font color=#00FF00><B> Emeralds</B></font>"
endif
if color=="star saphires" then
return "<font color=#00FF00><B> Star saphires</B></font>"
endif
if color=="diamonds" then
return "<font color=#00FF00><B> Diamonds</B></font>"
endif

end sub

############################################################
# Лог
############################################################
sub log(what,name,count)
var f=file(MiningDir+date()+".html")

if what==0 then
if not f.open() then
f.create()
f.writeln("<title>"+"Результаты копания "+date()+"</title><body text=#000000 bgcolor=#ffffff background=img/bg.jpg>")
f.writeln("<p align=center><font size=+1><b>Начало копания "+time()+"</b></font></p><Hr size=4>")
else
repeat
safecall f.readln()
until f.eof() or fatal error
f.writeln("<p align=center><font size=+1><b>Начало копания "+time()+"</b></font></p><Hr size=4>")
endif
f.close()
endif
############################################################
if what==1 then
f.open()
repeat
safecall f.readln()
until f.eof() or fatal error
f.writeln("<p align=center><b>Сложил в сундук "+time()+"</b></p>")
f.close()
endif
############################################################
if what==2 then
f.open()
repeat
safecall f.readln()
until f.eof() or fatal error
f.writeln(count+" "+colortostring(name)+"<BR>")
f.close()
endif
############################################################
if what==3 then
f.open()
repeat
safecall f.readln()
until f.eof() or fatal error
f.writeln("<Hr size=1>")
f.close()
endif
############################################################
if what==4 then
f.open()
repeat
safecall f.readln()
until f.eof() or fatal error
f.writeln("<p align=center><font size=+1><b>Смерть</b></font></p><p align=justify><img align=left src=img/ghost.gif>Скончался в "+time()+"<br>Скорее всего убийцей был <font color=#ff0000>"+name+"</font><br>&nbsp</p><Hr size=4>")
f.close()
endif
############################################################
if what==5 then
f.open()
repeat
safecall f.readln()
until f.eof() or fatal error
f.writeln('<p align=center><font color=#ff0000><b>'+name+'</b></font></p><p align=justify><img align=left src="img/'+name+'.gif" width=80 height=80>Был выкопан в '+uo.GetGlobal("timeelem")+'<br>Был убит в '+uo.GetGlobal("timekill")+'<br>&nbsp<br>&nbsp</p><Hr size=1>')
f.close()
endif
############################################################
if what==6 then
f.open()
repeat
safecall f.readln()
until f.eof() or fatal error
f.writeln('<p align=center><font color=#ff0000><b>'+name+'</b></font></p><p align=justify><img align=left src=img/killer.gif>Приходил в '+time()+'<br>')
f.close()
endif
############################################################
if what==7 then
f.open()
repeat
safecall f.readln()
until f.eof() or fatal error
f.writeln('<p align=center><font color=#7f7f7f><b>'+name+'</b></font></p><p align=justify><img align=left src=img/criminal.gif>Приходил в '+time()+'<br>')
f.close()
endif
############################################################
if what==8 then
f.open()
repeat
safecall f.readln()
until f.eof() or fatal error
f.writeln('<p align=center><font color=#7f7f7f><b>'+name+'</b></font></p><p align=justify><img align=left src=img/criminal.gif>Приходил в '+time()+'<br>')
f.close()
endif
############################################################
if what==9 then
f.open()
repeat
safecall f.readln()
until f.eof() or fatal error
f.writeln('<p align=center><font color=#0000ff><b><font color=#ff0000>Нападение </font>'+name+'</b></font></p><p align=justify><img align=left src=img/killer.gif>Внезапно атаковал '+time()+'<br>')
f.close()
endif
############################################################
if what==10 then
f.open()
repeat
safecall f.readln()
until f.eof() or fatal error
f.writeln('Успешно скрылся<br>&nbsp</p><Hr size=1>')
f.close()
endif
############################################################
if what==11 then
f.open()
repeat
safecall f.readln()
until f.eof() or fatal error
f.writeln("<Hr size=4>")
f.close()
endif

end sub

############################################################
# Функция возвращения форматированной даты
############################################################
sub date()
var d=str(UO.Date()),month,day,ymd,ms
ymd=left(d,len(d)-2)
month=right(ymd,len(ymd)-1)
day=right(d,len(d)-3)
if month=="01" then
ms="Января"
endif
if month=="02" then
ms="Февраля"
endif
if month=="03" then
ms="Марта"
endif
if month=="04" then
ms="Апреля"
endif
if month=="05" then
ms="Мая"
endif
if month=="06" then
ms="Июня"
endif
if month=="07" then
ms="Июля"
endif
if month=="08" then
ms="Августа"
endif
if month=="09" then
ms="Сентября"
endif
if month=="10" then
ms="Октября"
endif
if month=="11" then
ms="Ноября"
endif
if month=="12" then
ms="Декабря"
endif
return day+" "+ms
end sub

############################################################
# Функция возвращения форматированного времени
############################################################
sub time()
var hh,mm,ss,hms,t=str(UO.Time())
if len(t)<=2 then
hh="0"
mm="0"
ss=t
endif
if len(t)==3 then
hh="0"
mm=left(t,len(t)-2)
ss=right(t,len(t)-1)
endif
if len(t)==4 then
hh="0"
mm=left(t,len(t)-2)
ss=right(t,len(t)-2)
endif
if len(t)==5 then
hh=left(t,len(t)-4)
hms=left(t,len(t)-2)
mm=right(hms,len(hms)-1)
ss=right(t,len(t)-3)
endif
if len(t)==6 then
hh=left(t,len(t)-4)
hms=left(t,len(t)-2)
mm=right(hms,len(hms)-2)
ss=right(t,len(t)-4)
endif
return hh+":"+mm+":"+ss
end sub

############################################################
# Хождение
############################################################
sub gotoxy(x,y,prec)
var ld=0,ldc=0
var dx,dy
var mx,my
var ox,oy,mk,k
#uo.print(">")
#uo.track("1",str(x),str(y))
start:
mx=UO.GetX()
my=UO.GetY()
dx=mx-x
if dx<0 then
dx=0-dx
endif
dy=my-y
if dy<0 then
dy=0-dy
endif
if dy>dx then
dx=dy
end if
if dx<=prec then
return
end if
if not ldc then
#uo.print(STR(dx))
end if
if dx<3 then
mk=70
else
mk=15
end if

ox=mx
oy=my
for k=1 to mk
mx=UO.GetX()
my=UO.GetY()
if mx<>ox or my<>oy then
goto sdidapl
end if
wait(10)
next
sdidapl:

mx=UO.GetX()
my=UO.GetY()
dx=mx-x
if dx<0 then
dx=0-dx
endif
dy=my-y
if dy<0 then
dy=0-dy
endif
if dy>dx then
dx=dy
end if

if dx<=prec then
return
end if
if ld==dx then
ldc=ldc+1
if ldc>100 then
uo.print("Can not reach location!")
return
end if
else
ld=dx
end if

if mx==x then
if my==y then
return
endif
if my>y then
#UO.Print("UR")
UO.Press(33)
goto start
endif
#UO.Print("DL")
UO.Press(35)
goto start
end if
if mx<x then
if my>y then
#UO.Print("R")
UO.Press(39)
goto start
endif
if my==y then
#UO.Print("DR")
UO.Press(34)
goto start
endif
#UO.Print("D")
UO.Press(40)
goto start
end if
if my<y then
#UO.Print("L")
UO.Press(37)
goto start
endif
if my==y then
#UO.Print("LU")
UO.Press(36)
goto start
endif
#UO.Print("U")
UO.Press(38)
goto start
end sub

############################################################
# Остановка скрипта
############################################################
sub Stop()
log(11,"","")
wait(500)
UO.Exec("terminate all")
end sub

############################################################
# Конец скрипта
############################################################




ЕСЛИ НЕ СЛОЖНО ПОДСКАЖИТЕ ..


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 1 post ] 

All times are UTC+02:00


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Limited