Подскажите пожалуйста, как правильно прописать сценарии для открытия дверей?
Имеются две системы СКУД, которые заведены на компьютер ПБ-5-ПК (сервер системы IP 192.168.0.1) и две системы пожарной сигнализации, которые заведены на компьютер PojPB5-pc( IP 192.168.0.4)
Задача, как открыть доступ (двери) в определенном здании (помещении) при получении сигнала «Пожар» от системы АПС?
Система СКУД построена на приборах С2000-2. Система АПС на Сигнал-20М. Орион-ПРО версии 1.11 sp2.
Насколько я понял, что при помощи сценариев, созданный на базе шаблонов, система работать не будет, т.к.
«АРМ «Орион Про» 1.11 последняя версия, в которой сценарии управления, а также расписание запуска сценариев управления не привязаны к Ядрам опроса. Отсюда вытекает следующая логика запуска сценариев управления:
1. Автоматический запуск сценариев управления по событиям системы:
Сценарии управления на основе шаблонов, запускаемые по определенным событиям, будут отрабатываться только в рамках Ядра опроса, зарегистрировавшего соответствующие события.
Сценарии управления, написанные на макроязыке, не имеют ограничения рамками одного Ядра опроса.»
Прошу показать образец написания сценария управления на макроязыке.
Добрый день! Подскажите пожалуйста, где можно найти документ «Описание макроязыка сценариев ОРИОН_Scripts»? 2 года 4 месяца назад
Подольский Филипп Олегович 3 #ссылка В папке с установленным АРМ, обычно BOLIDARM_ORION_PRO1_20_3DOC – Тремасов Константин Александрович 2 года 4 месяца назад #ссылка Для добавления сообщений на форуме вам необходимо зарегистрироваться и указать мобильный телефон в своем профиле (зачем?) |
0 ответов
Добавить ответ
Для добавления сообщений на форуме вам необходимо зарегистрироваться и указать мобильный телефон в своем профиле (зачем?)
ЗАДАН
2 года 4 месяца назад
По каждому вопросу/ответу можно добавлять комментарии. Комментарии предназначены для уточнения вопроса/ответа.
Сценарии управления могут выполняться по временному расписанию, автоматически при возникновении какого-либо события в системе, по команде оператора «Монитора системы» – при нажатии горячей клавиши или при использовании элементов интерфейса «Дерева управления».
Сценарии управления, а также тип (по времени, по событию, из дерева управления) запуска конфигурируются администратором системы в «Администраторе базы данных».
Рассмотрим функции запуска сценариев управления оператором с помощью вкладки «Управление» в «Мониторе системы».
Если в системе предусмотрены сценарии управления, администратором системы также должен быть настроен доступ оператора к вкладке «Управление».
Вкладка управление
На вкладке «Управление» отображается дерево управления – ключевые узлы, к каждому из которых привязаны свои сценарии управления. Для просмотра привязанных к узлу сценариев необходимо щёлкнуть по нему правой кнопкой мыши. Появится контекстное меню со списком сценариев управления. Для запуска сценария управления нужно выбрать требуемый сценарий управления и нажать на него левой кнопкой мыши. Если администратором системы сценарию назначена какая-либо «горячая» клавиша (комбинация клавиш), то для запуска сценария достаточно нажать эту клавишу (комбинацию клавиш) на клавиатуре. После запуска сценария управления в журнал событий будет добавлено событие «Запуск сценария управления с ФИО текущего оператора.
В случае, если в системе настроен автоматический запуск сценариев управления, то при запуске такого сценария, оператор увидит соответствующее событие в журнале событий.
2.9 Фотоверификация
В «Мониторе системы» существует возможность осуществлять фотоверификацию хозорганов при управлении ими объектами системы.
События, по которым в «Мониторе системы» отображается фото сотрудников, время показа фото, настраивается администратором системы в «Администраторе базы данных».
Отображение карточки сотрудника
То есть в ситуации, когда какой-либо сотрудник предприятия осуществляет действие по постановке под охрану или снятию с охраны какого-либо объекта системы, оператор в «Мониторе системы» увидит окно с фотографией и личными данными этого сотрудника. Данная функция полезна, если оператору необходимо сверять личность сотрудника и не допускать передачи персоналом друг другу личных идентификаторов для управления объектами системы.
2.10 Работа с модулем речевого оповещения
Если администратором системы для рабочего места оператора настроено включение речевого оповещения и АРМ оператора оснащён акустической системой, то по тревожным событиям оператор услышит предупреждающие речевые сообщения. Речевые сообщения по озвучиваемым событиям синтезируются системой автоматически из названия события (типа тревоги: тревога проникновения, тревога входа и т.п.) и его атрибутов (адреса объекта в системе и его названия).
Список озвучиваемых событий настраивается администратором.
Например, для тревожного события, представленного ниже на скриншоте, будет озвучено сообщение: «Тревога проникновения. Периметр. ШС 3. Прибор 13:
Сообщение, генерируемое по умолчанию при возникновении тревожного события, может быть изменено администратором.
В зависимости от настроек системы, проведённых администратором, речевые сообщения могут либо повторяться заданное количество раз, либо неограниченное количество раз (до реакции оператора).
Оператор может отключить текущее речевое сообщение, нажав на кнопку «Выключение звука» или комбинацию клавиш Alt+F6.
Возможен сброс всех речевых сообщений, находящихся в очереди на воспроизведение. Для этого нужно нажать на кнопку со стрелкой, рядом с кнопкой «Управления оповещением» и выбрать пункт «Отменить все сообщения:
Сброс всех речевых сообщений
Оператор может отключить речевое оповещение для всех приходящих событий. Для этого нужно нажать на кнопку со стрелкой рядом с кнопкой «Управление оповещением» и выбрать пункт «Отключить». В этом случае оператор не будет слышать никаких речевых сообщений, пока снова не включит речевое оповещение в этом же меню, пункт «Включить».
Отключение модуля речевого оповещения
Более подробное описание настройки и работы непосредственно с модулем речевого оповещения дано в РЭ на АРМ «Орион Про», п. «Модуль речевого оповещения».
Тут будут скрипты для программы Орион.
Некоторые скрипты будут работать вместе с Макросом что в Орионе.
function ka4magery2()
{
while (!Player.Dead())
{
while ((Player.Hits() > 30) && (Player.Mana() > 30))
{
Orion.Cast(‘Magic Arrow’, self)
Orion.Wait(1500) //Тут время каста
}
while(Player.Hits() < Player.MaxHits())
{
Orion.BandageSelf()
Orion.ClearJournal()
while(Orion.WaitJournal(‘full’, Orion.Now(), Orion.Now()+2000) != null){break}
}
while (Player.Mana() < Player.MaxMana()) {
if (!Orion.BuffExists(‘Meditation’)) {
Orion.UseSkill(‘Meditation’);
}
Orion.Wait(4000);
}
}
}
function Mining()
{
var xTileInd, yTileInd, findMsg, stopWeight = 1100,;
var mineMsg = «You loosen some rocks|You put the|ore in your pack|ores in your pack|You broke the pickaxe|incorrectly entered a code|entered a true code»;
var stopMsg = «There is nothing|Цель слишком далеко|Try mining in rock|That is too far away|There is no metal here to mine|Вы слишком далеко|Try mining |Try mining elsewhere»;
for (xTileInd = -2; xTileInd <= 2; xTileInd ++)
{
for (yTileInd = -2; yTileInd <= 2; yTileInd ++)
{
do
{
if (Player.Weight() >= stopWeight)
{
Orion.Print(«Перевес!»);
return;
}
Orion.WaitTargetTileRelative(«mine», xTileInd, yTileInd, Player.Z());
Orion.UseType(«0x0E86»);
findMsg = Orion.WaitJournal(mineMsg + «|» + stopMsg, Orion.Now(), Orion.Now() + 6000);
Orion.Wait(100);
}
while ((findMsg == null || !Orion.Contains(findMsg.Text(), stopMsg)) && !Player.Dead());
}
}
Orion.Print(«Выполнил Mining!»);
}
// Скрипт Enemy() для поисков злобных игроков
function Enemy()
{
while(!Player.Dead())
{
a = Orion.FindType(any, any, ground, «ignoreself|human», 18, «gray|orange|red»);
if (a.length > 0)
{
Orion.PauseScript(‘Name’); //тут названия скрипта что ставит на паузу
Orion.Wait(5000);
Orion.ResumeScript(‘Name’); // тут снимает с паузы
}
}
}
//////////////Скрипт на прокачку Мининг+Бс////////////
///// Читаем все что написано если хотите что бы работал скрипт/////
/////Этот скрипт работает вместе с Макросом//////
//1)Создаёти что надо крафтить в разделе Макрос//////
//2)Создаёте в разделе Макрос что плавить////////
//3)Создаёш координаты где будеш копать////
//4)Не забудь вписать Ид плавилке////
//5)Если будете копать не с Ирон киркой а другой укажите везде Тип И Цвет и в сумке должны лежать только те чем копайте
//6)В банке должна лежать одна сумка или две как вам угодна для кирок и молотков///
//7)Перед Запуском скрафть одну вещь но только ту вещь что ты будеш крафтить///
//
function start()
{
Orion.WalkTo(0000,0000); //Тут кординаты где копать будет
Mining();
Orion.WalkTo(0000,0000);
Mining();
Orion.WalkTo(0000,0000);
Mining();
start();
}
function Mining()
{
// Где stopWeight = 800 укажите Вес
var xTileInd, yTileInd, findMsg, stopWeight = 800, maxWeight = 705; // В stopWeight = 800
var mineMsg = «You loosen some rocks|You put the|ore in your pack|ores in your pack|You broke the pickaxe|incorrectly entered a code|entered a true code»;
var stopMsg = «There is nothing|Цель слишком далеко|Try mining in rock|You have no line of sight|That is too far away|There is no metal here to mine|Вы слишком далеко|Try mining |Try mining elsewhere»;
for (xTileInd = -2; xTileInd <= 2; xTileInd ++)
{
for (yTileInd = -2; yTileInd <= 2; yTileInd ++)
{
do
{
if (Orion.Count(0x0E86) <= 0)
{
kirka()
Orion.Print(«Нет кирки!»);
Orion.Wait(100);
}
// if (Player.Weight() >= maxWeight)
// {
// sbrostres()
// Orion.Print(«Перевес!»);
// }
if (Player.Weight() >= stopWeight)
{
Orion.Print(«Перевес!»);
crafter()
return;
}
Orion.WaitTargetTileRelative(«mine», xTileInd, yTileInd, Player.Z());
Orion.UseType(«0x0E86»);
findMsg = Orion.WaitJournal(mineMsg + «|» + stopMsg, Orion.Now(), Orion.Now() + 6000);
Orion.Wait(100);
}
while ((findMsg == null || !Orion.Contains(findMsg.Text(), stopMsg)) && !Player.Dead());
}
}
Orion.Print(«Выполнил Mining!»);
}
function sbrostres()
{
Orion.DropType(‘0x19B9|0x19B7|0x19BA|0x19B8’, ‘0x0AB2’, ‘Backpack’, 0, Player.X() +1, Player.Y() +1, Player.Z());
}
function crafter()
{
Orion.WalkTo(2573,475,0,0);
Orion.Wait(500);
Orion.PlayMacro(‘ruda’); // руда что плавит перед крафтом
Orion.Wait(500);
craft();
craftCoper();
craftBronza();
craftStell();
Orion.Wait(100);
GUm()
Orion.Wait(100);
}
function GUm()
{
var gump = Orion.GetLastGump();
gump.Close();
}
function craft() //Крафт из Ирон
{
while (!Player.Dead())
{
if (Orion.Count(‘0x1BEF’, ‘0x0000’) > 30)
{
Orion.PlayMacro(‘craft’); //впиши тут свое название макроса
Orion.Wait(6000);//тут время в милисекундах крафта
plavkairon(); //тут название скрипта для плавки
if (Orion.Count(0x13E3) <= 0)
{
molotok()
Orion.Print(«Нет молотка!»);
Orion.Wait(100);
}
}
if (Orion.Count(‘0x1BEF’, ‘0x0000’) <= 30){break}
Orion.Wait(1000);
}
}
function craftCoper() ////Крафт из Копер
{
while (!Player.Dead())
{
if (Orion.Count(‘0x1BEF’, ‘0x0AB2’) > 30)
{
Orion.PlayMacro(‘craftCoper’); //впиши тут свое название макроса
Orion.Wait(6000);//тут время в милисекундах крафта
plavkairon(); //тут название скрипта для плавки
plavkaCoper();
if (Orion.Count(0x13E3) <= 0)
{
molotok()
Orion.Print(«Нет молотка!»);
Orion.Wait(100);
}
}
if (Orion.Count(‘0x1BEF’, ‘0x0AB2’) <= 30){break}
Orion.Wait(1000);
}
}
function craftBronza() ////Крафт из Бронза
{
while (!Player.Dead())
{
if (Orion.Count(‘0x1BEF’, ‘0x0488’) > 30)
{
Orion.PlayMacro(‘craftBronza’); //впиши тут свое название макроса
Orion.Wait(6000);//тут время в милисекундах крафта
plavkaBronza();//тут название скрипта для плавки
plavkaCoper();
if (Orion.Count(0x13E3) <= 0)
{
molotok()
Orion.Print(«Нет молотка!»);
Orion.Wait(100);
}
}
if (Orion.Count(‘0x1BEF’, ‘0x0488’) <= 30){break}
Orion.Wait(1000);
}
}
function craftStell() ////Крафт из Стелл
{
while (!Player.Dead())
{
if (Orion.Count(‘0x1BEF’, ‘0x042C’) > 30)
{
Orion.PlayMacro(‘craftStell’); //впиши тут свое название макроса
Orion.Wait(6000);//тут время в милисекундах крафта
plavkaBronza();//тут название скрипта для плавки
plavkaStell();
if (Orion.Count(0x13E3) <= 0)
{
molotok()
Orion.Print(«Нет молотка!»);
Orion.Wait(100);
}
}
if (Orion.Count(‘0x1BEF’, ‘0x042C’) <= 30){break}
Orion.Wait(1000);
}
}
//Укажите Тип того что скрафтил у меня Викинг Сворд
function plavkairon()
{
var iplav = Orion.FindType(‘0x13B9’, backpack);
for (var i = 0; i <= iplav.length; i++)
{
Orion.WaitTargetType(‘0x13B9’, backpack);
Orion.UseObject(‘0x4011C58C’); //Ид Плавилки
Orion.Wait(300);
}
}
//Укажите Тип и Цвет того что скрафтил у меня Викинг Сворд
function plavkaCoper()
{
var iplav = Orion.FindType(‘0x13B9’, ‘0x0AB2’, backpack);
for (var i = 0; i <= iplav.length; i++)
{
Orion.WaitTargetType(‘0x13B9’, ‘0x0AB2’, backpack);
Orion.UseObject(‘0x4011C58C’);
Orion.Wait(300);
}
}
//Укажите Тип и Цвет того что скрафтил у меня Викинг Сворд
function plavkaBronza()
{
var iplav = Orion.FindType(‘0x13B9’, ‘0x0488’, backpack);
for (var i = 0; i <= iplav.length; i++)
{
Orion.WaitTargetType(‘0x13B9’, ‘0x0488’, backpack);
Orion.UseObject(‘0x4011C58C’);
Orion.Wait(300);
}
}
//Укажите Тип и Цвет того что скрафтил у меня Викинг Сворд
function plavkaStell()
{
var iplav = Orion.FindType(‘0x13B9’, ‘0x042C’, backpack);
for (var i = 0; i <= iplav.length; i++)
{
Orion.WaitTargetType(‘0x13B9’, ‘0x042C’, backpack);
Orion.UseObject(‘0x4011C58C’);
Orion.Wait(300);
}
}
var ResultContainer = ‘0x44577D0C’;
//Контейнер, куда складывать руду (может быть равен ResultContainer, если для руды нет отдельного мешка в нем)
var OreBag = ‘0x44577D0C’;
//Разгрузка происходит в банк, true — да, false — разгружается в контейнер у дома (или где-то еще)
var UnloadToBank = true;
//Функция разгрузки
function UnloadOres()
{
if (UnloadToBank)
Orion.Say(‘bank’);
else
Orion.UseObject(ResultContainer);
Orion.Wait(500);
if (ResultContainer != OreBag)
{
Orion.UseObject(OreBag);
Orion.Wait(500);
}
//Крутим цикл, пока не сбросим всю руду
while (true)
{
//Поиск всех типов руды всех указанных цветов
var list = Orion.FindType(‘0x1BEF|0x19BA|0x19B8|0x19B9|0x0F25|0x0F2D’);
//Ничего не нашлось — выходим
if (!list.length)
break;
//Сбрасываем под ноги все что нашлось
for (var i = 0; i < list.length; i++)
{
Orion.MoveItem(list[i], 0, OreBag);
Orion.Wait(‘moveitemdelay’);
}
Orion.Wait(100);
}
}
function kirka()
{
goBank()
{
Orion.Say(‘bank’);
Orion.Wait(500);
//Ид сумки где лежат кирки
Orion.UseObject(‘0x4762647C’)
Orion.Wait(1000);
//Укажите Тип и Цвет Кирки и Ид Сумки
Orion.MoveItemType(‘0x0E86’, ‘0x0000’, ‘0x4762647C’, 1, ‘Backpack’);
Orion.Wait(1000);
}
Orion.Print(«Взяли Кирку!»);
goSahta()
}
function molotok()
{
goBank()
{
Orion.Say(‘bank’);
Orion.Wait(500);
//Ид сумки где лежат Молотки
Orion.UseObject(‘0x4762647C’)
Orion.Wait(1000);
//Укажите Тип и Цвет Молотка и Ид Сумки
Orion.MoveItemType(‘0x13E3’, ‘0x0000’, ‘0x4762647C’, 1, ‘Backpack’);
Orion.Wait(1000);
}
Orion.Print(«Взяли Молоток!»);
goplavilnia()
}
function goBank()
{
Orion.WalkTo(2572,480);
Orion.WalkTo(2572,500);
Orion.WalkTo(2514,500);
Orion.WalkTo(2514,515);
Orion.WalkTo(2501,522);
}
function goSahta()
{
Orion.WalkTo(2514,515);
Orion.WalkTo(2514,500);
Orion.WalkTo(2572,500);
Orion.WalkTo(2572,480);
}
function goplavilnia()
{
Orion.WalkTo(2514,515);
Orion.WalkTo(2514,500);
Orion.WalkTo(2572,500);
Orion.WalkTo(2572,480);
Orion.WalkTo(2573,475,0,0);
}
function AutoLoot()
//Режит и лутит
{
while (true)
{
if (Player.Dead())
{
Orion.Wait(500);
continue;
}
var corpses = Orion.FindType(‘0x2006’, ‘-1’, ground, », ‘usedistance’);
for (var c = 0; c < corpses.length; c++)
{
var serial = corpses[c]
Orion.WaitTargetObject(serial);
Orion.UseType(‘knife’);
Orion.Wait(300);
Orion.UseObject(serial);
Orion.Wait(300);
var list = Orion.FindList(‘Loot’, serial);
Orion.ResetIgnoreList();
for (var i = 0; i < list.length; i++)
{
Orion.MoveItem(list[i], 0,backpack);
Orion.Wait(1750);
}
Orion.Ignore(serial);
Orion.Wait(500);
}
Orion.Wait(500);
}
}
Орион пак скрипты —- >>> Скачать
Спасибо Игроку Sova за проделанную работу:
C++:
//#include helpers.oajs
// Health potion will be used at this threshold
POTION_HEAL = 60;
types = {
healingPotion: {
type: 0x0F0E,
color: 0x0031,
cooldown: 5000,
}
}
displayTimerSize = [200, 10]
abilities = {
"Defence": {
"command": ".Defence1",
"cooldown": 120,
"duration": 100,
"position": [1250, 650]
},
"SpeedAttack": {
"command": ".Combat1",
"cooldown": 240,
"duration": 120,
"position": [1250, 600],
},
"SpeedCast": {
"command": ".Combat2",
"cooldown": 240,
"duration": 120,
"position": [1250, 550],
},
"MaxDPS": {
"command": ".Combat3",
"cooldown": 240,
"duration": 120,
"position": [1250, 500],
},
"MaxDex": {
"command": ".Magic1",
"cooldown": 100,
"duration": 15,
"position": [1250, 450],
},
"NPCPain": {
"command": ".Magic2",
"cooldown": 140,
"duration": 80,
"position": [1250, 400],
},
"Chuma": {
"command": ".Magic3",
"cooldown": 140,
"duration": 80,
"position": [1250, 350],
},
"Chain": {
"command": ".InfChain",
"cooldown": 40,
"duration": 0,
"position": [1250, 300],
}
}
// Kill existing processes and spawn new ones
function Autostart() {
functions = [
"AutoHealSelf",
"panicHeal",
"exp_counter",
]
functions.forEach(function (script) {
Orion.Terminate(script);
Orion.Exec(script);
})
}
//
function attack() {
target = Orion.TargetSystemSerial();
overheadPrint("Attacking!", "OK", target)
Orion.Attack(Orion.TargetSystemSerial());
}
function panicHeal() {
while (true) {
if (!Player.Dead()) {
// If we have some potions - proceed
potionCount = Orion.Count(types.healingPotion.type, types.healingPotion.color)
if (potionCount > 0) {
if (Player.Hits() < (Player.MaxHits() - (Player.MaxHits() / 100 * POTION_HEAL))) {
// Warn if 10 or less potions were found
if (potionCount <= 10) {
overheadPrint("There is !! " + potionCount + " !! heal potions left", "WARNING")
}
// Use potion
overheadPrint("Should use healpot!", "INFO")
potion = Orion.FindType(types.healingPotion.type, types.healingPotion.color);
if (potion.length > 0) {
Orion.UseType(types.healingPotion.type, types.healingPotion.color);
overheadPrint("Used healpot!", "OK")
Orion.Wait(types.healingPotion.cooldown);
}
}
} else {
// if no potions are present - let's wait, maybe we can get some from loot
if (Orion.Count(types.healingPotion.type, types.healingPotion.color) < 1) {
overheadPrint("No more potions left, waiting for 1 more minute", "ERROR")
for (i = 0; i <= 60; i++) {
Orion.Print("Waiting for potion...");
Orion.Wait(1000);
}
}
}
}
Orion.Wait(100);
}
}
// Autoheal
function AutoHealSelf() {
while (true) {
if (!Player.Dead()) {
while (Player.Hits() < (Player.MaxHits() - 10)) {
if (Orion.Count(0x0E21) > 0) {
Orion.BandageSelf();
Orion.Wait(500);
Orion.WaitJournal("Вылечено|interrupted|Не удалось|Вы положили", Orion.Now(), Orion.Now() + 10000);
Orion.Wait(1000);
}
else
Orion.Print('33', ' No more bandage left ! ');
Orion.Wait(500);
}
Orion.Wait(500);
}
Orion.Wait(500);
}
}
// Attack NewTargetSystem target
function AttackNextMob() {
var _target = Orion.TargetSystemSerial();
var _name = Orion.FindObject(_target).Name()
if (_target && _name && _name != "Bear spirit") {
Orion.WarMode(true);
Orion.CharPrint(self, 1153, ">>" + _name);
Orion.Wait(200);
Orion.Attack(_target);
}
}
// Summon bear + overhead timer
function summon_bear() {
Orion.Say(".newbear")
if (!Orion.DisplayTimerExists(1)) {
Orion.AddDisplayTimer(1, 650 * 1000, 'custom', 'LineBar', 'Bear', 700, 350);
Orion.DisplayTimerSetSize(1, 200, 10);
}
}
function use_ability(name) {
colorGreen = "#4dff00ff"
colorRed = "#fc0320ff"
if (!abilities.hasOwnProperty(name)) {
Orion.Print("Ability >> " + name + " << not found");
return;
}
ability = abilities[name];
Orion.Say(ability["command"]);
if (!Orion.DisplayTimerExists(name)) {
Orion.CancelTarget();
Orion.CancelWaitTarget();
Orion.AddDisplayTimer(
name,
ability["cooldown"] * 1000,
'custom',
'LineBar',
'>> ' + name + ' <<',
ability["position"][0],
ability["position"][1],
'any',
colorGreen
);
if (!ability.hasOwnProperty("duration")) {
ability["duration"] = ability["cooldown"];
}
durationPercents = Math.round((100 * ability["duration"]) / ability["cooldown"])
Orion.Print("Duration percents: " + durationPercents);
Orion.DisplayTimerSetColorStage(name, 100 - durationPercents, 'any', colorRed);
Orion.DisplayTimerSetSize(name, displayTimerSize[0], displayTimerSize[1]);
}
}
// Loot from container
function loot_from_container(container_serial) {
_loot_bag = 0x00000;
_loot = [
// General
0x0EED, // Gold
0x0F3F, // Arrows
0x1BFB, // Bolts
0x0F0E, // heal
// Gems
0x0F11, // Sapphire
0x0F25, // Piece of Amber
0x0F10, // Emerald
0x0F18, // Tourmaline
0x0F13, // Rubie
0x0F0F, // Star Sapphire
0x0F26, // Diamond
0x0F15, // Citrine
0x0F16, // Amethyst
// Misc
0x0E34, // Eledars contract
//0x2258, // Recipe
0x14EB, // Map
0x14ED, // Ashas book
// Cutting
0x1BD1, // Feather
//0x0F8E, // Dragon Scale
];
if (!Orion.FindObject(_loot_bag))
_loot_bag = backpack;
// ###################
Orion.UseObject(container_serial);
Orion.Wait(300);
_loot.forEach(function (_item) {
var _found_items = Orion.FindType(_item, 0xFFFF, container_serial);
if (_found_items.length) {
_found_items.forEach(function (_loot_item) {
Orion.MoveItem(_loot_item, 0, _loot_bag);
Orion.Wait(600);
});
}
});
}
function loot() {
_bags = [
0x0E75, // Backpack
];
_bladed = [
0x1401, // Kryss
0x0F51, // Dagger
];
var _counter = 0;
var _to_cut = 0;
var _corpses = Orion.FindType(0x2006, 0xFFFF, ground);
if (_corpses.length) {
var _dagger = Orion.FindType(0x0F51, 0xFFFF, backpack);
if (Orion.ObjAtLayer(1))
_weapon = Orion.ObjAtLayer(1)
else
_weapon = Orion.ObjAtLayer(2)
_bladed.forEach(function (_type) {
if (_type == _weapon.Graphic()) {
Orion.Print("Bladed item equipped");
_dagger = _weapon.Serial();
}
});
_corpses.forEach(function (_corpse) {
_counter++;
Orion.Print("Corpse " + _counter + "/" + _corpses.length);
if (_dagger.length && _to_cut == 1) {
Orion.UseObject(_dagger);
Orion.Wait(200);
Orion.TargetObject(_corpse);
Orion.Wait(650);
}
loot_from_container(_corpse);
Orion.Wait(300);
_bags.forEach(function (_bag) {
var _bags_in_corpse = Orion.FindType(_bag, 0xFFFF, _corpse)
if (_bags_in_corpse.length) {
_bags_in_corpse.forEach(function (_bag_in_corpse) {
loot_from_container(_bag_in_corpse);
Orion.Wait(300);
});
}
});
});
if (_weapon)
Orion.Equip(_weapon.Serial());
}
}
function craft() {
while (!Player.Dead()) {
Orion.Say(".makelastitem");
Orion.Wait(4000);
}
}
function exp_counter() {
// Вы получили {int} единиц опыта
var _started = new Date().getTime();
var _total_exp = 0;
while (true) {
if (Orion.InJournal("MakeReset")) {
_started = new Date().getTime();
_total_exp = 0;
Orion.ClearJournal("MakeReset");
Orion.Print("Опыт сброшен");
}
var _message = Orion.WaitJournal("Вы получили", Orion.Now(), Orion.Now() + 10000);
if (_message) {
var _message_text = _message.Text();
var _exp_match = /Вы получили (d+)/.exec(_message_text);
if (_exp_match && _exp_match.length)
_total_exp += parseInt(_exp_match[1]);
var _minutes = ((new Date().getTime() - _started) / 1000) / 60;
var _exp_per_minute = (_total_exp / _minutes).toFixed(2);
Orion.Print("Минут -> " + _minutes.toFixed(0));
Orion.Print("0x0035", "Опыта в минуту: +" + _exp_per_minute + ", всего: +" + _total_exp);
}
Orion.Wait(200);
}
}
function unload_maps() {
var _maps = Orion.FindType(0x14EB);
Orion.Print(_maps);
if (_maps.length) {
_maps.forEach(function (_item) {
Orion.Print(_item);
var _map = Orion.FindObject(_item);
Orion.Print(_map);
Orion.Print(_map.Properties());
});
}
}
function train_bowcraft() {
while (!Player.Dead()) {
var _on_ground = Orion.FindType(0x1BDD, 0xFFFF, 'ground');
if (_on_ground.length) {
Orion.MoveItem(_on_ground, 1, 'backpack');
Orion.Wait(200);
}
Orion.Say(".makelastitem");
Orion.Wait(4000);
var _shafts = Orion.FindType(0x1BD4);
Orion.Print(_shafts);
if (_shafts) {
Orion.MoveItem(_shafts, 0, 0x40038482);
Orion.Wait(500);
}
}
}
function BH() {
Orion.Boxhack(0x40038482);
}
C++:
//#include helpers.oajs
// Health potion will be used at this threshold
POTION_HEAL = 60;
types = {
healingPotion: {
type: 0x0F0E,
color: 0x0031,
cooldown: 5000,
}
}
lootLists = [
"loot",
"gems",
"reagents",
"use"
]
useList = "use"
loot_bag = 'backpack'
displayTimerSize = [200, 10]
abilities = {
// Warrior
"absorb": {
"command": ".Brave3",
"cooldown": 260,
"duration": 35,
"position": [700, 350]
},
"strength": {
"command": ".Brave1",
"cooldown": 130,
"duration": 65,
"position": [700, 300],
},
"hpboost": {
"command": ".Brave4",
"cooldown": 70,
"duration": 30,
"position": [700, 250],
},
"reflection": {
"command": ".Brave5",
"cooldown": 70,
"duration": 8,
"position": [700, 200],
},
"chains": {
"command": ".infchain",
"cooldown": 50,
"duration": 0,
"position": [500, 200],
},
"attackspeed": {
"command": ".Attack2",
"cooldown": 90,
"duration": 30,
"position": [500, 350],
},
"damage": {
"command": ".Attack1",
"cooldown": 90,
"duration": 20,
"position": [500, 300],
},
"roar": {
"command": ".Roar",
"cooldown": 55,
"duration": 0,
"position": [500, 250],
},
// Paladin
"Defence": {
"command": ".Defence1",
"cooldown": 120,
"duration": 100,
"position": [1250, 650]
},
"SpeedAttack": {
"command": ".Combat1",
"cooldown": 240,
"duration": 120,
"position": [1250, 600],
},
"SpeedCast": {
"command": ".Combat2",
"cooldown": 240,
"duration": 120,
"position": [1250, 550],
},
"MaxDPS": {
"command": ".Combat3",
"cooldown": 240,
"duration": 120,
"position": [1250, 500],
},
"MaxDex": {
"command": ".Magic1",
"cooldown": 100,
"duration": 15,
"position": [1250, 450],
},
"NPCPain": {
"command": ".Magic2",
"cooldown": 140,
"duration": 80,
"position": [1250, 400],
},
"Chuma": {
"command": ".Magic3",
"cooldown": 140,
"duration": 80,
"position": [1250, 350],
},
"Chain": {
"command": ".InfChain",
"cooldown": 40,
"duration": 0,
"position": [1250, 300],
}
}
// Kill existing processes and spawn new ones
function Autostart() {
functions = [
"AutoHealSelf",
"panicHeal",
"exp_counter",
]
functions.forEach(function (script) {
Orion.Terminate(script);
Orion.Exec(script);
})
}
//
function attack() {
target = Orion.TargetSystemSerial();
overheadPrint("Attacking!", "OK", target)
Orion.Attack(Orion.TargetSystemSerial());
}
function panicHeal() {
while (true) {
if (!Player.Dead()) {
// If we have some potions - proceed
potionCount = Orion.Count(types.healingPotion.type, types.healingPotion.color)
if (potionCount > 0) {
if (Player.Hits() < (Player.MaxHits() - (Player.MaxHits() / 100 * POTION_HEAL))) {
// Warn if 10 or less potions were found
if (potionCount <= 10) {
overheadPrint("There is !! " + potionCount + " !! heal potions left", "WARNING")
}
// Use potion
overheadPrint("Should use healpot!", "INFO")
potion = Orion.FindType(types.healingPotion.type, types.healingPotion.color);
if (potion.length > 0) {
Orion.UseType(types.healingPotion.type, types.healingPotion.color);
overheadPrint("Used healpot!", "OK")
Orion.Wait(types.healingPotion.cooldown);
}
}
} else {
// if no potions are present - let's wait, maybe we can get some from loot
if (Orion.Count(types.healingPotion.type, types.healingPotion.color) < 1) {
overheadPrint("No more potions left, waiting for 1 more minute", "ERROR")
for (i = 0; i <= 60; i++) {
Orion.Print("Waiting for potion...");
Orion.Wait(1000);
}
}
}
}
Orion.Wait(100);
}
}
// Autoheal
function AutoHealSelf() {
while (true) {
if (!Player.Dead()) {
while (Player.Hits() < (Player.MaxHits() - 10)) {
if (Orion.Count(0x0E21) > 0) {
Orion.BandageSelf();
Orion.Wait(500);
Orion.WaitJournal("Вылечено|interrupted|Не удалось|Вы положили", Orion.Now(), Orion.Now() + 10000);
Orion.Wait(1000);
}
else
Orion.Print('33', ' No more bandage left ! ');
Orion.Wait(500);
}
Orion.Wait(500);
}
Orion.Wait(500);
}
}
// Attack NewTargetSystem target
function AttackNextMob() {
var _target = Orion.TargetSystemSerial();
var _name = Orion.FindObject(_target).Name()
if (_target && _name && _name != "Bear spirit") {
Orion.WarMode(true);
Orion.CharPrint(self, 1153, ">>" + _name);
Orion.Wait(200);
Orion.Attack(_target);
}
}
// Summon bear + overhead timer
function summon_bear() {
Orion.Say(".newbear")
if (!Orion.DisplayTimerExists(1)) {
Orion.AddDisplayTimer(1, 650 * 1000, 'custom', 'LineBar', 'Bear', 700, 350);
Orion.DisplayTimerSetSize(1, 200, 10);
}
}
function use_ability(name) {
colorGreen = "#4dff00ff"
colorRed = "#fc0320ff"
if (!abilities.hasOwnProperty(name)) {
Orion.Print("Ability >> " + name + " << not found");
return;
}
ability = abilities[name];
Orion.Say(ability["command"]);
if (!Orion.DisplayTimerExists(name)) {
Orion.CancelTarget();
Orion.CancelWaitTarget();
Orion.AddDisplayTimer(
name,
ability["cooldown"] * 1000,
'custom',
'LineBar',
'>> ' + name + ' <<',
ability["position"][0],
ability["position"][1],
'any',
colorGreen
);
if (!ability.hasOwnProperty("duration")) {
ability["duration"] = ability["cooldown"];
}
durationPercents = Math.round((100 * ability["duration"]) / ability["cooldown"])
Orion.Print("Duration percents: " + durationPercents);
Orion.DisplayTimerSetColorStage(name, 100 - durationPercents, 'any', colorRed);
Orion.DisplayTimerSetSize(name, displayTimerSize[0], displayTimerSize[1]);
}
}
// Loot from container
function loot_from_container(container_serial) {
loot = []
Orion.UseObject(container_serial);
Orion.Wait(300);
lootLists.forEach(function (lootList) {
// Orion.Print(" Found -> " + Orion.FindList(lootList, container_serial))
// Orion.Print("Added " + lootList);
Array.prototype.push.apply(loot, Orion.FindList(lootList, container_serial));
})
Orion.Print(loot)
loot.forEach(function (item) {
Orion.MoveItem(item, 0, loot_bag);
Orion.Wait(600);
});
}
function loot() {
_bags = [
0x0E75, // Backpack
];
var _counter = 0;
var _corpses = Orion.FindType(0x2006, 0xFFFF, ground);
if (_corpses.length) {
_corpses.forEach(function (_corpse) {
_counter++;
Orion.Print("Corpse " + _counter + "/" + _corpses.length);
loot_from_container(_corpse);
Orion.Wait(300);
_bags.forEach(function (_bag) {
var _bags_in_corpse = Orion.FindType(_bag, 0xFFFF, _corpse)
if (_bags_in_corpse.length) {
_bags_in_corpse.forEach(function (_bag_in_corpse) {
loot_from_container(_bag_in_corpse);
Orion.Wait(300);
});
}
});
});
toUse = Orion.FindList(useList, 'backpack');
if (toUse.length) {
Orion.Print("Found " + toUse.length + " items to use");
toUse.forEach(function (item) {
Orion.UseObject(item);
Orion.Wait(1000)
});
}
}
}
function craft() {
while (!Player.Dead()) {
Orion.Say(".makelastitem");
Orion.Wait(4000);
}
}
function exp_counter() {
// Вы получили {int} единиц опыта
var _started = new Date().getTime();
var _total_exp = 0;
while (true) {
if (Orion.InJournal("MakeReset")) {
_started = new Date().getTime();
_total_exp = 0;
Orion.ClearJournal("MakeReset");
Orion.Print("Опыт сброшен");
}
var _message = Orion.WaitJournal("Вы получили", Orion.Now(), Orion.Now() + 10000);
if (_message) {
var _message_text = _message.Text();
var _exp_match = /Вы получили (d+)/.exec(_message_text);
if (_exp_match && _exp_match.length)
_total_exp += parseInt(_exp_match[1]);
var _minutes = ((new Date().getTime() - _started) / 1000) / 60;
var _exp_per_minute = (_total_exp / _minutes).toFixed(2);
Orion.Print("Минут -> " + _minutes.toFixed(0));
Orion.Print("0x0035", "Опыта в минуту: +" + _exp_per_minute + ", всего: +" + _total_exp);
}
Orion.Wait(200);
}
}
function unload_maps() {
var _maps = Orion.FindType(0x14EB);
Orion.Print(_maps);
if (_maps.length) {
_maps.forEach(function (_item) {
Orion.Print(_item);
var _map = Orion.FindObject(_item);
Orion.Print(_map);
Orion.Print(_map.Properties());
});
}
}
function train_bowcraft() {
while (!Player.Dead()) {
var _on_ground = Orion.FindType(0x1BDD, 0xFFFF, 'ground');
if (_on_ground.length) {
Orion.MoveItem(_on_ground, 1, 'backpack');
Orion.Wait(200);
}
Orion.Say(".makelastitem");
Orion.Wait(4000);
var _shafts = Orion.FindType(0x1BD4);
Orion.Print(_shafts);
if (_shafts) {
Orion.MoveItem(_shafts, 0, 0x40038482);
Orion.Wait(500);
}
}
}
function BH() {
Orion.Boxhack(0x40038482);
}
C++:
// Output levels
output = {
"ERROR": {
"prefix": "P >",
"color": 0x008A,
},
"INFO": {
"prefix": "I >",
"color": 0x0003,
},
"OK": {
"prefix": "O >",
"color": 0x0044,
},
"WARNING": {
"prefix": "W >",
"color": 0x0085,
}
}
// Prints pased message above target/player/whatever
// If target is undefined, prints above player
// If level if undefined, INFO will be used
function overheadPrint(message, level, target) {
if (!target) {
target = Player.Serial();
}
if (!level || !output[level]) {
level = "INFO";
}
Orion.CharPrint(target, output[level]["color"], output[level]["prefix"] + " " + message);
}