VAR MINING = 0;
VAR MAXSPELL = 10;
VAR MSpell = 4;
var kINDEX = 0;
sub test123()
var time = 0;
var type = '0x0DD6'
WHILE true
uo.useskill('Detect Hidden');
uo.print(str(time));
#if time == 10500 then
# time = 0;
#end if
wait(10000);
time = time+10000;
wend
end sub
sub grab_ireon()
var type = '0x19B9';
var exit = 0;
while exit <> 1
uo.findtype(type, -1, 'ground')
if uo.findcount() == 0 then
exit = 1
else
#uo.click('finditem')
uo.moveitem('finditem', 1000);
endif
#wait(2000)
wend
end sub
sub parserJornal2(friend, sizeFreands)
var i = 0;
var i2 = 0;
var n = 0;
var ignor_n = 0;
var j = 0;
var null = '0x00000000'
var type;
var str;
var current_object;
DIM object[500];
var curent_ignor;
DIM ignor_object[500];
i = 0;
uo.textopen();
WHILE i <> 20
current_object = uo.JournalSerial(i);
if current_object <> '0x00000000' and current_object <> '0x01010101' then
str = uo.Journal(i);
if 1 == filterJornal(i, friend, sizeFreands) then
if 0 == find_ignor(current_object, ignor_object, ignor_n) then
#uo.textprint("++++++++++")
#uo.textprint(current_object[0])
#uo.textprint(current_object[1])
#uo.textprint(current_object[2])
#uo.textprint(current_object[3])
#uo.textprint(uo.GetGraphic(current_object))
#uo.textprint(str)
#uo.textprint(">>>>>>>>>>>>")
object[n] = current_object;
n = n + 1;
endif
else
#uo.textprint("-------")
#uo.textprint(current_object)
#uo.textprint(uo.GetGraphic(current_object))
#uo.textprint(str)
#uo.textprint(">>>>>>>>>>>>")
for j = 0 to n
if current_object == object[j] then
object[j] = '0x00000000';
endif
next
ignor_object[ignor_n] = current_object;
ignor_n = ignor_n + 1;
endif
endif
i = i + 1;
wend
WHILE i2 < n
current_object = object[i2];
if current_object <> '0x00000000' then
#uo.click(current_object);
#uo.click(current_object);
#uo.click(current_object);
#uo.print("=====================");
#uo.print("Информацио о цели");
#uo.print("Имя : "+uo.getname(current_object));
#uo.print("Расстояние : "+str(uo.GetDistance(current_object)));
#uo.print("Хинтпоинты : "+str(uo.GetHP(current_object)/10));
#uo.print("=====================");
#uo.getstatus(current_object);
addTarget(current_object);
return
endif
i2 = i2+1;
wend
end sub
sub find_ignor(current_object, ignor_object, ignor_n)
var j;
for j = 0 to ignor_n
if current_object == ignor_object[j] then
return 1
endif
next
return 0
end sub
sub filterJornal(i, friend, sizeFreands)
var n;
var i2 = 0;
var current;
DIM filter[100];
filter[0] = '[invulnerable]'
filter[1] = 'Arranodd'
filter[2] = "a llama";
filter[3] = "a lapwing"
filter[4] = "a tern"
filter[5] = "a finch"
filter[6] = "a sparrow"
filter[7] = "Hildisvini"
filter[8] = "a sheep"
filter[9] = "a deer"
filter[10] = "a lapwing"
filter[11] = "a hawk"
filter[12] = "a brown bear"
filter[13] = "a chickadee"
filter[14] = "a nightingale"
filter[15] = "a wolf"
filter[16] = "a woodpecker"
filter[17] = "a dire wolf"
filter[18] = "a gazer"
filter[19] = "a nightingale"
filter[20] = "a wisp"
filter[21] = "a horse"
filter[22] = "a desert ostard"
filter[23] = "a giant scorpion"
filter[24] = "a nuthatch"
filter[25] = "a flaming skeleton"
filter[26] = "a hell hound"
filter[27] = "an earth elemental"
filter[28] = "a wren"
filter[29] = "a skylark"
filter[30] = "a reaper"
filter[31] = "a towhee"
filter[32] = "a grizzly bear"
filter[33] = "a thrush"
filter[34] = "a kingfisher"
filter[35] = "a black bear"
filter[36] = "a starling"
# В них может привращаться друид ...
# если их фильтровать то на него не наведемся
#"a bird"
#"a rabbit"
#"an eagle"
#"a cat"
#"a dog"
n = 36;
var str = uo.Journal(i);
var serial = uo.JournalSerial(i);
#if serial[2] == '0' and serial[3] == '0' then
# return 0;
#endif
WHILE i2 < n
current = filter[i2];
#uo.textprint(str(i2))
#uo.textprint(current)
if uo.InJournal(current) == i+1 then
#uo.msg("work")
uo.SetJournalLine(i, '');
#if i2 == 0 then
# addObject(serial)
#endif
return 0
endif
i2 = i2+1;
wend
if 1 == filter(serial, friend, sizeFreands) then
return 0
endif
return 1
end sub
sub saveObjectFilter(friend, n)
var f = file("D:\client\inject\data\filter.data"), s = 0, i =0;
#DIM friend[150];
#friend[0] = '0x0044AD59';
#friend[1] = '0x0044AD5B';
#friend[2] = '0x014708FC'; #tiomans
#friend[3] = '0x019A8592'; #Riky
#friend[4] = '0x005D0599'; #Charizma
#friend[5] = '0x0021D19C'; #XENAPO
#friend[6] = '0x0048CF8C'
#friend[7] = '0x004D8D56'
#friend[8] = '0x0179C86E';
#friend[9] = '0x014DC3DA';
#friend[10] = '0x005E080D';
f.create();
s=safe call f.writeln(n)
for i = 0 to n
s=safe call f.writeln(friend[i])
next
f.close();
end sub
sub addObject(object)
var f = file("D:\client\inject\data\filter.data"), n = 0, s = 0, i =0;
DIM friend[500];
#uo.textopen();
f.open();
n=safe call f.ReadNumber();
#uo.textprint(str(n))
#uo.textprint("------------------")
for i = 0 to n
friend[i] = safe call f.readString()
#uo.textprint(friend[i])
next
f.close();
for i = 0 to n
if object == friend[i] then
uo.Print('Объект уже существует')
return
endif
next
friend[n+1] = object;
saveObjectFilter(friend, n+1);
end sub
sub addObjectFilter()
var current;
uo.Print('Кого добавить?: ')
uo.Exec('addobject newFilter')
while uo.Targeting()
wait(100)
wend
current = uo.GetSerial('laststatus');
addObject(current);
end sub
sub filter(obj, friend, n)
VAR i = 0;
for i = 0 to n
if friend[i] == obj then
RETURN 1;
endif
next
RETURN 0;
end sub
sub mod()
Var mode
mode = uo.getGlobal('mod');
if mode <> 'War' then
uo.concolor('0x04B9');
uo.print("War");
uo.concolor('0x0000');
uo.SetGlobal('mod','War');
else
uo.print("Text");
uo.SetGlobal('mod','Text');
endif
end sub
sub tack()
uo.WarMode(1);
uo.attack('lasttarget')
wait(300);
uo.WarMode(0);
end sub
sub Catack2()
UO.Set('lasttarget','laststatus')
uo.click('lasttarget')
uo.click('lasttarget')
end sub
sub Catack()
#UO.Set('lasttarget','laststatus')
#uo.click('lasttarget')
#uo.click('lasttarget')
#var z = uo.GetZ('lasttarget');
#uo.track(1, uo.GetX('lasttarget')-(z/9)-1, uo.getY('lasttarget')-((z/9)-1));
#uo.print("x = " + str(uo.GetX('lasttarget')));
#uo.print("y = " + str(uo.GetY('lasttarget')));
#uo.print("z = " + str(z));
#printSELL();
var count = val(uo.getGlobal('TargetsCount'));
var current, min, i;
if count == 1 then
return
endif
if count == 2 then
min = uo.GetSerial(uo.getGlobal('Target_1'));
else
min = uo.GetSerial(uo.getGlobal('Target_1'));
i = 2;
WHILE i < count
current = uo.GetSerial(uo.getGlobal('Target_'+str(i)))
if uo.GetDistance(current) < uo.GetDistance(min) or uo.GetSerial(current) <> uo.GetSerial('lasttarget') then
min = current;
endif
i = i + 1;
wend
endif
UO.Set('lasttarget', min)
uo.click('lasttarget')
uo.click('lasttarget')
end sub
sub Patack()
uo.WarMode(1);
uo.attack('lasttarget')
wait(400);
por();
uo.WarMode(0);
end sub
sub printSELL()
uo.concolor('0x04B9');
uo.click('lasttarget')
uo.click('lasttarget')
#uo.click('lasttarget')
uo.print("=====================");
uo.print("Информацио о цели");
uo.print("Имя : "+uo.getname('sel'));
uo.print("Расстояние : "+str(uo.GetDistance('lasttarget')));
uo.print("Хинтпоинты : "+str(uo.GetHP('lasttarget')/10));
uo.print("=====================");
uo.concolor('0x0000');
end sub
sub magic(friend, sizeFreands, useSkill_Timer, UseSkill)
VAR n = VAL(uo.getGlobal('SpelCount'));
VAR time = VAL(uo.getGlobal('currentTime'));
var curentSpel = uo.getGlobal('currentJornal');
Var maxTime = VAL(uo.getGlobal('currentMaxTime'));
time = time + 200;
uo.setGlobal('currentTime', str(time));
DIM messages[10];
Var size = 4, i = 0, flags = 0;
messages[0] = 'The spell fizzles';
messages[1] = 'You loose your concentration';
messages[2] = 'Insufficient reagents';
messages[3] = 'Insufficient mana';
messages[4] = 'You are already casting spells';
if curentSpel <> 'nil' and time < maxTime then
for i = 0 to size
if uo.InJournal(messages[i]) <> 0 then
flags = 1;
endif
next
if flags == 0 then
return
endif
endif
if val(uo.getGlobal(useSkill_Timer)) == 0 then
if UO.Mana < (UO.INT - 10) then
uo.useskill('Meditation');
endif
uo.setGlobal(useSkill_Timer, UseSkill);
endif
if uo.InJournal('damage') <> 0 then
uo.concolor('0x068F');
uo.print("Хинтпоинты (lasttarget): "+str(uo.GetHP('lasttarget')/10)+"%");
uo.concolor('0x0000');
endif
parserJornal2(friend, sizeFreands);
uo.DeleteJournal();
uo.setGlobal('currentJornal', 'nil');
uo.setGlobal('currentTime', 'nil');
uo.setGlobal('currentMaxTime', 'nil');
if n > 0 then
Var castingSpel = uo.getGlobal('spel1');
castNext();
endif
end sub
sub test()
print_Spell()
end sub
sub arm()
var c = uo.getGlobal('currentarm');
if c == 'one' then
uo.arm ('2')
uo.setGlobal('currentarm', 'two');
else
uo.arm ('1')
uo.setGlobal('currentarm', 'one');
endif
end sub
sub dress()
var c = uo.getGlobal('currentdress');
if c == 'one' then
uo.dress ('2')
uo.setGlobal('currentdress', 'two');
else
if c == 'two' then
uo.dress ('3')
uo.setGlobal('currentdress', 'free');
else
uo.dress ('1')
uo.setGlobal('currentdress', 'one');
endif
endif
end sub
sub main()
VAR i = 0;
VAR skill;
VAR castHeal = 0;
VAR heal = 0;
VAR GH = 0, str;
VAr GH_Type = '0x0F0E';
var GH_Color = '0x0690';
var bandage_type = '0x0E21';
var HealRiba = '0x0DD6';
var HealRibaColor = '0x0009';
uo.setGlobal('DELAY_JORNAL', 'nill');
DIM friend[500];
Var sizeFreands = 0;
var f = file("D:\client\inject\data\filter.data"), s = 0;
var nps_filter = true;
f.open();
sizeFreands =safe call f.ReadNumber();
for i = 0 to sizeFreands
friend[i] = safe call f.readString()
next
f.close();
uo.fontcolor('0x03af');
initMagari();
initTimers();
initTargets();
var bandageTime = 5000;
var bandageTimer = createTimer(bandageTime);
var test_d = 0;
var GH_Time = 25000;
var GH_Timer = createTimer(GH_Time);
var HealRiba_Time = 15000;
var HealRiba_Timer = createTimer(HealRiba_Time);
var UseSkill = 10000;
var useSkill_Timer = createTimer(UseSkill);
var GM_Time = 25000;
var GM_timer = createTimer(GM_Time);
var GM_Type = '0x0F0E', GM_Color = '0x0697';
uo.SetGlobal(0, 'Detect Hidden');
WHILE true
if uo.Hidden('self') == 0 then
if UO.life < UO.STR then
uo.findtype(bandage_type);
if val(uo.getGlobal(bandageTimer)) == 0 and uo.FindCount() > 0 then
uo.print("BANDAGE SELF!!!")
UO.msg(".bandage self");
test_d = UO.STR - UO.life;
if test_d < 55 then
uo.setGlobal(bandageTimer, '500')
else
if test_d < 70 then
uo.setGlobal(bandageTimer, '2000')
else
uo.setGlobal(bandageTimer, bandageTime)
endif
endif
endif
uo.findtype(GH_Type, GH_Color);
if UO.life < uo.str - 60 and val(uo.getGlobal(GH_Timer)) == 0 and uo.FindCount() > 0 then
UO.print("Пью GH");
UO.msg(".drink GreaterHealPotion");
uo.setGlobal(GH_Timer, GH_Time)
else
if UO.life < uo.str - 60 then
uo.findtype(HealRiba, HealRibaColor);
if val(uo.getGlobal(HealRiba_Timer)) == 0 and uo.FindCount() > 0 then
UO.print("Ем рыбу");
uo.useobject('finditem');
uo.setGlobal(HealRiba_Timer, HealRiba_Time)
endif
endif
endif
endif
if val(uo.getGlobal(useSkill_Timer)) == 0 and uo.getGlobal('currentJornal') == 'nil' then
if UO.Mana < (UO.INT - 10) then
uo.useskill('Meditation');
endif
skill = uo.GetGlobal(0);
str = "Использую умение " + skill;
UO.print(str);
uo.useskill(skill);
uo.SetGlobal(0, 'Detect Hidden');
uo.setGlobal(useSkill_Timer, UseSkill);
endif
uo.findtype(GM_Type, GM_Color);
if val(uo.getGlobal(GM_timer)) == 0 and Uo.Mana < 20 and uo.FindCount() > 0 and uo.getGlobal('currentJornal') == 'nil' then
UO.print("Пью GM");
UO.msg(".drink GreaterManaPotion");
uo.setGlobal(GM_timer, GM_Time);
endif
magic(friend, sizeFreands, useSkill_Timer, UseSkill);
cleanseTargets();
endif
WAIT_(200);
WEND
UO.Print("Hello from function MAIN")
end sub
sub printTargets()
var count = val(uo.getGlobal('TargetsCount'));
Var i = 1;
var current;
WHILE i < count
current = uo.GetSerial(uo.getGlobal('Target_'+str(i)))
uo.print(current+" "+uo.getName(current)+" "+str(uo.GetDistance(current)));
#uo.print(current+" "+uo.getName(current)+" "+uo.GetDistance(current));
i = i + 1;
wend
end sub
sub cleanseTargets()
var count = val(uo.getGlobal('TargetsCount'));
Var i = 1;
var j = 1;
Dim objects[150]
var current;
WHILE i < count
current = uo.GetSerial(uo.getGlobal('Target_'+str(i)))
if uo.GetDistance(current) < 20 and uo.GetDistance(current) <> 0 then
objects[j] = current;
j = j + 1;
endif
i = i + 1;
wend
count = j;
i = 1;
WHILE i < count
uo.setGlobal('Target_'+str(i), objects[i]);
i = i + 1;
wend
uo.setGlobal('TargetsCount', str(i))
#uo.print(str(count));
end sub
sub f1()
uo.useskill('Detect Hidden');
uo.SetGlobal(0, 'Detect Hidden');
end sub
sub grab()
UO.msg(".grab");
end sub
sub f2()
uo.warmode(0)
uo.useskill('Hiding');
uo.SetGlobal(0, 'Hiding');
end sub
sub f3()
uo.useskill('Meditation');
uo.SetGlobal(0, 'Meditation');
end sub
sub f9()
uo.useobject('dag');
end sub
sub recall()
maska();
uo.cast('Recall', 'recallbook');
wait(100);
maska();
end sub
sub Invisibility()
push_back('Invisibility', 'self', 'total damage', '3730')
end sub
sub Teleport3()
Tele(20)
end sub
sub Teleport2()
Tele(15)
end sub
sub Tele(delta)
var n = 2000;
uo.cast('Teleport');
wait(n);
var d = uo.getDir('self');
uo.print(str(d))
if d == 3 then
uo.waittargettile(0, uo.getX('self')+delta, uo.getY('self')+delta , uo.getZ('self'));
return
endif
if d == 2 then
uo.waittargettile(0, uo.getX('self')+delta, uo.getY('self'), uo.getZ('self'));
return
endif
if d == 4 then
uo.waittargettile(0, uo.getX('self'), uo.getY('self')+delta, uo.getZ('self'));
return
endif
if d == 5 then
uo.waittargettile(0, uo.getX('self')-delta, uo.getY('self')+delta, uo.getZ('self'));
return
endif
if d == 6 then
uo.waittargettile(0, uo.getX('self')-delta, uo.getY('self'), uo.getZ('self'));
return
endif
if d == 7 then
uo.waittargettile(0, uo.getX('self')-delta , uo.getY('self')-delta , uo.getZ('self'));
return
endif
if d == 0 then
uo.waittargettile(0, uo.getX('self'), uo.getY('self')-delta, uo.getZ('self'));
return
endif
if d == 1 then
uo.waittargettile(0, uo.getX('self')+delta, uo.getY('self')-delta, uo.getZ('self'));
return
endif
end sub
sub Teleport()
canceltarget();
uo.cast('Teleport');
wait(100)
maska();
end sub
sub Polymorph()
maska();
uo.cast('Polymorph');
uo.waitmenu('Select','a gray drake');
wait(100)
maska();
end sub
sub WallofStone2()
push_back('Wall of Stone', 'self', 'TALI_TARGET', '2150')
end sub
sub WallofStone()
maska();
uo.cast('Wall of Stone');
wait(100)
maska();
end sub
sub PoisonField()
push_back('Poison Field', 'lasttarget', 'TALI_TARGET', '3730')
end sub
sub ParalyzeField()
push_back('Paralyze Field', 'lasttarget', 'TALI_TARGET', '3730')
end sub
sub MassCurse()
push_back('Mass Curse', 'lasttarget', 'TALI_TARGET', '3730')
end sub
sub PF()
push_back('Paralyze Field', 'self', 'TALI_TARGET', '3730')
end sub
sub strelka()
push_back('Magic Arrow', 'lasttarget', 'total damage', '1030')
end sub
sub MindBlast()
push_back('Mind Blast', 'lasttarget', 'total damage', '3100')
end sub
sub EnergyBolt()
push_back('Energy Bolt', 'lasttarget', 'total damage', '3730')
end sub
sub Dispel()
push_back('Dispel', 'lasttarget', 'total damage', '3730')
end sub
sub MassDispel()
push_back('Mass Dispel', 'self', 'TALI_TARGET', '4100')
end sub
sub FlameStrike()
push_back('Flame Strike', 'lasttarget', 'total damage', '4100')
end sub
sub ManaVampire()
push_back('Mana Vampire', 'lasttarget', 'total damage', '4100')
end sub
sub Explosion()
push_back('Explosion', 'lasttarget', 'TALI_TARGET', '3730')
end sub
sub FireElemental()
push_back('Fire Elemental', 'lasttarget', 'TALI_TARGET', '4550')
end sub
sub ChainLightning()
push_back('Chain Lightning', 'lasttarget', 'TALI_TARGET', '4100')
end sub
sub MeteorSwarm()
push_back('Meteor Swarm', 'lasttarget', 'TALI_TARGET', '4100')
end sub
sub Earthguake()
push_back('Earthquake', 'nil', 'total damage', '4550')
end sub
sub por()
push_back('Paralyze', 'lasttarget', 'total damage', '3100')
end sub
sub cure()
push_back('Curse', 'lasttarget', 'total damage', '2750')
end sub
sub Lightning()
push_back('Lightning', 'lasttarget', 'total damage', '2750')
end sub
sub dheal()
push_front('Heal', 'self', 'You healed', '1030')
end sub
sub dheal2()
push_front('Greater Heal', 'self', 'You healed', '2750')
end sub
sub Bless()
push_front('Bless', 'self', 'Your strength', '2150')
end sub
sub Protection()
push_front('Protection', 'self', 'total damage', '1710')
end sub
sub ReactiveArmor()
push_front('Reactive Armor', 'nil', 'total damage', '1130')
end sub
sub Reflection()
push_front('Magic Reflection', 'nil', 'total damage', '3100')
end sub
sub guardMy()
uo.waittargetself();
UO.msg("all guards");
end sub
sub allfollowe()
uo.waittargetself();
UO.msg("all followe");
end sub
sub allstop()
UO.say("all stop");
end sub
sub allkill()
canceltarget()
uo.waittargetlast()
UO.say("all kill");
wait(500)
end sub
sub ab1()
UO.msg(".ab 1");
end sub
sub ab2()
UO.msg(".ab 2");
end sub
sub ab3()
UO.msg(".ab 3");
end sub
sub bandage()
UO.msg(".bandage self");
end sub
sub drinkGH()
UO.msg(".drink GreaterHealPotion");
endsub
sub drinkGI()
UO.msg(".drink GreaterInvisibilityPotion");
end sub
sub drinkGE()
if uo.Waiting() == true then
UO.msg(".drink GreaterExplosionPotion");
wait(500)
uo.waittargetobject('lasttarget')
else
uo.waittargetobject('lasttarget')
UO.msg(".drink GreaterExplosionPotion");
endif
end sub
#####################################################
### Вспомогательные функции
#####################################################
# Если ждем таргет перестать ждать
sub canceltarget()
if uo.Waiting() then
uo.canceltarget();
endif
end sub
sub push_back(spel_name, target, jornal, time)
VAR n = VAL(uo.getGlobal('SpelCount'));
n = n + 1;
if n > mSpell then
uo.concolor('0x068F');
uo.Print("+++ПеРеПоЛнЕнИе ОчЕрЕдИ+++")
uo.concolor('0x0000');
RETURN
endif
uo.setGlobal('spel'+str(n), spel_name);
uo.setGlobal('target'+str(n), target);
uo.setGlobal('jornal'+str(n), jornal);
uo.setGlobal('time'+str(n), time);
uo.setGlobal('SpelCount', str(n));
#uo.print("push_back "+spel_name+" "+target+" "+jornal);
#print_Spell();
end sub
sub push_front(spel_name, target, jornal, time)
VAR n = VAL(uo.getGlobal('SpelCount'));
VAR str;
VAR i;
if n == 0 then
push_back(spel_name, target, jornal, time)
RETURN
endif
n = n + 1;
if n > MSpell then
n = MSpell;
endif
i = n;
WHILE i <> 1
uo.setGlobal('spel'+str(i), uo.getGlobal('spel'+str(i-1)))
uo.setGlobal('target'+str(i), uo.getGlobal('target'+str(i-1)))
uo.setGlobal('jornal'+str(i), uo.getGlobal('jornal'+str(i-1)))
uo.setGlobal('time'+str(i), uo.getGlobal('time'+str(i-1)));
i = i - 1;
WEND
uo.setGlobal('spel1', spel_name);
uo.setGlobal('target1', target);
uo.setGlobal('jornal1', jornal);
uo.getGlobal('time', time)
uo.setGlobal('SpelCount', str(n));
#uo.print("push_front "+spel_name+" "+target+" "+jornal);
#print_Spell();
end sub
sub pop()
VAR n = VAL(uo.getGlobal('SpelCount'));
VAR i;
Var s;
if n == 0 then
RETURN
endif
if n > 1 then
for i = 1 to n-1
uo.setGlobal('spel'+str(i), uo.getGlobal('spel'+str(i+1)))
uo.setGlobal('target'+str(i), uo.getGlobal('target'+str(i+1)))
uo.setGlobal('jornal'+str(i), uo.getGlobal('jornal'+str(i+1)))
uo.setGlobal('time'+str(i), uo.getGlobal('time'+str(i+1)))
next
endif
uo.setGlobal('spel'+str(n), 'nil')
uo.setGlobal('target'+str(n), 'nil')
uo.setGlobal('jornal'+str(n), 'nil')
uo.setGlobal('time'+str(n), 'nil')
uo.setGlobal('SpelCount', str(n-1));
end sub