Yoko

All sides of Injection
It is currently 2025-12-03 06:46:00

All times are UTC+02:00




Post new topic  Reply to topic  [ 6 posts ] 
Author Message
PostPosted: 2005-04-28 21:12:40 
Offline
Junior Expert
User avatar

Joined: 2004-06-24 22:08:56
Posts: 3220
[table2start]Русский Вариант
Ну, русский я знаю неплохо, в отличие от Англиского. Вот:
В общем решил начать выкладывать свои скрипты, в один топик (знаю, идею содрал у Askaneli, но совесть меня не мучает). Собственно буду клеить все в первый топик (чтобы не надо было искать среди гор флейма), о новых скриптах - ессно в конец буду сообщать.
Все скрипты писались для шарда Dominaria.

Так же рекомендую посетить топик с моими скриптами на прокачку персонажа[table2middle]English Variant
I am sorry, for my bad English.
Generally I decided to start posting the scripts in single thread (I know that idea was filched from Askaneli, but I'm not ashamed for that). I'll actually post all scripts in first thread (to eliminate the necessity of searching among plenty of flame).
The information about new scripts will be posted in the end of the thread.
All scripts were written for Dominaria shard.

I also recomend you to visit my crafting, battle and other skills improvement scripts.[table2finish]

[table2start]#Лесоповал 1.0
Code:
#Сначала вы указывает топор, потом нужное дерево и скрипт его вырубает до конца.
#Когда он его вырубит, он предложит указать вам следущее дерево для вырубки.
#Переменные:
#success - рубка прошла успешно
#failure - рубка не удалась
#key - код клавиши на которую установлено: LastObject -> WaitForTarg -> LastTarget
[table2middle]Lumberjacking 1.0
Code:
#At first you point the axe, then the tree and script lumbers it completely
#When it'll finish with the tree, it'll prompt you to choose another
#Variables:
#success - successfull lumberjacking message
#failure - lumberjacking failure message
#key - code of key, which is binded with: LastObject -> WaitForTarg -> LastTarget
[table2finish]
Code:
sub LumberJacking()
var success = 'in your pack'
var failure = 'You hack'
var key = 123
uo.AddObject('Hatchet')
while uo.targeting()
wait(500)
wend
uo.AddObject('LastTree')
while uo.targeting()
wait(500)
wend
uo.deletejournal()
uo.useobject('Hatchet')
repeat
uo.deletejournal()
uo.press(key)
repeat
wait(500)
if uo.injournal('is nothing') then
uo.AddObject('LastTree')
while uo.targeting()
wait(500)
wend
uo.deletejournal()
uo.press(key)
endif
until uo.injournal(failure) || uo.injournal(success)
until uo.dead()
endsub


[table2start]#Ковка фулов, версия 1.1
Code:
##Скрипт берет с пола инги и кует фулы, собственно переменные:
##startitem - с какого предмета начинать ковать
##message - сообщение о том, что предмет удачно скован
##failmsg - сообщение о том, что предмет не удалось сковать
##ingotTypes - тип инготов из которых куем фулл
##ingotColor - цвет инготов из которых куем фулл
##cikled - если true, то кует фулы, пока не треснет
##itemsCount - общее число предметов фула
##item[num] - пути waitmenu к крафту предмета
##ings[num] - количество ингов на соответствующий предмет
##Надо запускать функцию KovkaFulov()
[table2middle]#Create fulls, version 1.1
Code:
##The Script takes ingots from the floor and forges full armor
##Variables:
##startitem - first item to forge
##message - the successfull forging message
##failmsg - forging faliure message
##ingotTypes - the type of ingots, full armor will be forged with
##ingotColor - the color of ingots, full armor will be forged with
##cikled - if true, the script will forge over and over again
##itemsCount - the number of items in full armor set
##item[num] - waitmenu paths to item forging
##ings[num] - the number of ingots, required for certain item
##KovkaFulov() function is required to be started
[table2finish]
Code:
sub KovkaFulov()
var staritem = 1
var message = 'in your pack'
var failmsg = 'fail'
var ingotTypes = '0x1BF2'
var ingotColor = '0x0580'
var cikled = true
var itemsCount = 6
DIM item[val(str(itemsCount))]
item[1] = "'Blacksmithing' 'Armor' 'Armor' 'Plate Mail' 'Plate Mail' 'platemail'"
item[2] = "'Blacksmithing' 'Armor' 'Armor' 'Plate Mail' 'Plate Mail' 'legs'"
item[3] = "'Blacksmithing' 'Armor' 'Armor' 'Plate Mail' 'Plate Mail' 'arms'"
item[4] = "'Blacksmithing' 'Armor' 'Armor' 'Helmets' 'Helmets' 'close helmet'"
item[5] = "'Blacksmithing' 'Armor' 'Armor' 'Plate Mail' 'Plate Mail' 'gloves'"
item[6] = "'Blacksmithing' 'Armor' 'Armor' 'Plate Mail' 'Plate Mail' 'gorget'"
DIM ings[val(str(itemsCount))]
ings[1] = 25
ings[2] = 20
ings[3] = 18
ings[4] = 15
ings[5] = 12
ings[6] = 10
###
var i = staritem
restart:
for i=i to itemsCount
dropIngots(ingotTypes,ingotColor)
getIngots(ingotTypes,ingotColor,ings[i])
kovka(ingotTypes,ingotColor,item[i],ings[i],message,failmsg)
next
if cikled == true then
i=1
goto restart
endif
endsub

sub kovka(item,color,path,ings,msg,bad)
uo.exec('waitmenu '+path)
uo.findtype(item,color)
uo.useobject('finditem')
uo.deletejournal()
repeat
if uo.injournal(bad) then
KovkaFulov()
uo.exec('terminate KovkaFulov')
endif
wait(300)
until uo.injournal(msg)
endsub

sub getIngots(item,color,icount)
uo.findtype(item,color,'ground')
uo.grab(icount,'finditem')
repeat
uo.findtype(item,color)
wait(300)
until uo.findcount()>0
endsub

sub dropIngots(item,color)
uo.ignorereset()
repeat
uo.findtype(item,color)
if uo.findcount()>0 then
uo.moveitem('finditem',0,'ground')
wait(300)
endif
until uo.findcount()==0
end:
endsub


[table2start]#Вендор 1.0
Code:
#Скрипт предназначен для быстрой и удобной переброске вещей к веднору, задание описания для предмета, задание цены.
#Чтобы скрипт работал - необходимо чтобы в прямо в рюкзаке вендора находилась сумка в которую будем складывать.
#Уточним переменные:
#RecCont - приемный контейнер, куда все скидывать
#EmtCont - контейнер откуда перебрасывать вещи
#PriceIt - тип предмета
#Delay - задержка на переброс вещей
#Destruction - описание предмена
#Price - цена предмета
[table2middle]#Vendor 1.0
Code:
#The script is made for fast and comfortable moving items to vendor. Description and price assighnments are available.
#To make the script run properly vendor is supposed to have the bag, in which we'll put the items.
#Variables:
#RecCont - Destanation container
#EmtCont - Source container
#PriceIt - Item type
#Delay - Movement delay
#Destruction - Description of the item
#Price - Price of the item
[table2finish]
Code:
sub Pricer()
var RecCont = '0x40021703'
var EmtCont = 'backpack'
var PriceIt = '0x0F09'
var Delay = 515
var Description = ''
var Price = '2000'
uo.recall(RecCont,0)
repeat
uo.findtype(PriceIt,-1,EmtCont)
if uo.findcount()>0 then
uo.moveitem('finditem',0,RecCont)
wait(Delay)
endif
until uo.findcount()==0
uo.ignorereset()
repeat
uo.findtype(PriceIt,-1,RecCont)
if uo.findcount()>0 then
uo.waittargetobject('finditem')
uo.say('desc')
checklag()
wait(100)
uo.say(Description)
checklag()
wait(100)
uo.ignore('finditem')
uo.recall(uo.ContainerOf(RecCont),0)
checklag()
uo.recall(RecCont,0)
endif
until uo.findcount()==0
uo.ignorereset()
repeat
uo.findtype(PriceIt,-1,RecCont)
if uo.findcount()>0 then
uo.waittargetobject('finditem')
uo.say('price')
checklag()
wait(100)
uo.say(Price)
checklag()
wait(100)
uo.ignore('finditem')
uo.recall(uo.ContainerOf(RecCont),0)
checklag()
uo.recall(RecCont,0)
endif
until uo.findcount()==0
endsub


[table2start]Хождение по координатам 1.0
Code:
#Скрипт берет координаты - x,y и отправляется в ним, без учета препятствий. В поставку скрипта входит несколько функций дл редактирования скрипта и его отладки.
#Сам скрипт хранит направление каждого шага в виде соответствующих цифр на правой клавиатуре, где NUM.
#Собсно описание функций:
#hodilka() - основной модуль скрипта
#Read(строка,число) - считывает из строки определнный символ.
#Write(строка,строка,число) - дописывает после определнного символа новый.
#ReWrite(строка,строка,число) - Заменяет символ в строке по номеру.
#getDirX(строка) - сообщает о изменениях на оси X при хождении в указанном направлении.
#getDirY(строка) - аналогично для оси Y
#setDir(число,число) - исходя из чисел изменения координат по X и Y в результате шага, говорит направление в котором необходимо шагать. Можно указывать конечно изменение, тогда будет выдаваться только первый шаг.
#Все функции возвращают значения - т.е. могут быть испльзованы как var new = function()
[table2middle]Coordinate movement
Code:
#The script takes the coordinates x and y and moves a char to them with no obstacle overcoming. 
#Some functions are included to debug and edit the script.
#The dcript itself stores the direction of every step in form of appropriate digits(in accordance to on numpad)
#Function description:
#hodilka() - General unit of the script
#Read(string,number) - reads the appropriate symbol from the string
#Write(string,string,number) - writes a new symbol after the symbol defined.
#ReWrite(string,string,number) - Replaces the symbol by nomber in string
#getDirX(string) - Alerts of X axis changes while moving the direction defined
#getDirY(string) - The same for Y axis
#setDir(number,number) - According to X and Y coordinates changes (as the result of movement) sends the direction, supposed to move. 
#All the functions return values i.e. they could be used as var new = function().
[table2finish]
Code:
sub hodilka()
var x,y,step=''
x = 1622
y = 2722
x = -(uo.getx() - x)
y = -(uo.gety() - y)
repeat
step=step+setDir(x,y)
x=x-getDirX(Read(step,strlen(step)))
y=y-getDirY(Read(step,strlen(step)))
until (x==0 && y==0) || (x==-0 && y==-0)
if step<>'' then
uo.addstep(step)
endif
endsub

sub Read(string,num)
return MID(string,num-1,1)
endsub

sub Write(string,addString,num)
string = MID(string,0,num) + addString + MID (string,num,strlen(string))
return string
endsub

sub ReWrite(string,ReString,num)
string = MID(string,0,num-1) + ReString + MID(string,num,strlen(string))
return string
endsub

sub getDirX(dir)
var ret
if dir=='0' then
ret = 0
endif
if dir=='1' then
ret = 0
endif
if dir=='2' then
ret = 1
endif
if dir=='3' then
ret = 1
endif
if dir=='4' then
ret = -1
endif
if dir=='5' then
ret = 0
endif
if dir=='6' then
ret = 1
endif
if dir=='7' then
ret = -1
endif
if dir=='8' then
ret = -1
endif
if dir=='9' then
ret = 0
endif
return ret
endsub

sub getDirY(dir)
var ret
if dir=='0' then
ret = 0
endif
if dir=='1' then
ret = 1
endif
if dir=='2' then
ret = 1
endif
if dir=='3' then
ret = 0
endif
if dir=='4' then
ret = 1
endif
if dir=='5' then
ret = 0
endif
if dir=='6' then
ret = -1
endif
if dir=='7' then
ret = 0
endif
if dir=='8' then
ret = -1
endif
if dir=='9' then
ret = -1
endif
return ret
endsub

sub setDir(x,y)
var ret,cx=x,cy=y
if x == -0 then
x = 0
endif
if y == -0 then
y = 0
endif
if cx < 0 then
cx=-cx
endif
if cy < 0 then
cy=-cy
endif
if x>0 && y>0 && x==y  then
ret = 2
endif
if x>0 && cx>cy then
ret = 3
endif
if x>0 && y<0 && cx==cy then
ret = 6
endif
if y<0 && cy>cx then
ret = 9
endif
if x<0 && y<0 && x==y then
ret = 8
endif
if x<0 && cx>cy then
ret = 7
endif
if x<0 && y>0 && cx==cy then
ret = 4
endif
if y>0 && cy>cx then
ret = 1
endif
if x==0 && y==0 then
ret = 0
endif
return str(ret)
endsub

_________________
YokoInjection CodeSweeper
Function not found?
Possession of mathematics at the level of art - a gift that is only available for election.
Sorry for my clumsy English.
Skype: d119060


Last edited by Destruction on 2005-05-05 13:51:41, edited 15 times in total.

Top
   
 Post subject:
PostPosted: 2005-04-28 21:41:35 
Offline
Expert!
User avatar

Joined: 2004-10-15 22:38:04
Posts: 1396
Location: Moscow City.
Былоб круто еслиб ковал еще определенное число фулов и закладывал их по мешочкам :lol:


Top
   
 Post subject:
PostPosted: 2005-04-29 05:05:24 
Offline
Junior Expert
User avatar

Joined: 2004-06-24 22:08:56
Posts: 3220
I'm wrote:
Былоб круто еслиб ковал еще определенное число фулов и закладывал их по мешочкам :lol:

Та погоди ты, наешь как я замучался этот скрипт писать? Я сначало хотел делать поиск по типу и имени, но замучался..

_________________
YokoInjection CodeSweeper
Function not found?
Possession of mathematics at the level of art - a gift that is only available for election.
Sorry for my clumsy English.
Skype: d119060


Last edited by Destruction on 2005-05-04 01:41:28, edited 1 time in total.

Top
   
 Post subject:
PostPosted: 2005-04-30 05:58:37 
Offline
Junior Expert
User avatar

Joined: 2004-06-24 22:08:56
Posts: 3220
[table2start]Добавлен скрипт на управление вендором.[table2middle]Added vendor control script.[table2finish]

_________________
YokoInjection CodeSweeper
Function not found?
Possession of mathematics at the level of art - a gift that is only available for election.
Sorry for my clumsy English.
Skype: d119060


Last edited by Destruction on 2005-05-04 01:38:48, edited 1 time in total.

Top
   
 Post subject:
PostPosted: 2005-05-04 00:27:13 
Offline
Junior Expert
User avatar

Joined: 2004-06-24 22:08:56
Posts: 3220
[table2start]Добавлен скрипт на хождение по координатам[table2middle]Coordinate movement script added[table2finish]

_________________
YokoInjection CodeSweeper
Function not found?
Possession of mathematics at the level of art - a gift that is only available for election.
Sorry for my clumsy English.
Skype: d119060


Top
   
 Post subject:
PostPosted: 2005-05-05 13:43:20 
Offline
Junior Expert
User avatar

Joined: 2004-06-24 22:08:56
Posts: 3220
[table2start]Добавлен скрипт на лесоповал[table2middle]Lumberjacking script added[table2finish]

_________________
YokoInjection CodeSweeper
Function not found?
Possession of mathematics at the level of art - a gift that is only available for election.
Sorry for my clumsy English.
Skype: d119060


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

All times are UTC+02:00


Who is online

Users browsing this forum: No registered users and 1 guest


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