Program BotHelper; var IsCasting:Boolean; // 1 - кастуем, 0 - не кастуем Following:Boolean; // 1 - идем за ботоводом, 0 - стоим i,enemiesCount:integer; // i - счетчик, enemiesCount - количество мобов Friends:Array of Cardinal; // список друзей Enemies:Array of Word; // список врагов Scrappers, RepondSlayer, DragonSlayer, UndeadSlayer, DemonSlayer, SpiderSlayer:Cardinal; // спелбуки. Скрапер - общая. CharToHealIndex:integer; // айди перса которого будем лечить OneEnemy:Cardinal; // айди моба которого будем атаковать const SpellBook=$0EFA; //spellbook PowerScrollType=$14F0; //power scroll //Растояние до перса после которого подбегаем FollowDistance= 2; //На каком растоянии ищем мобов/врагов MobsFindDistance= 4; // Id frinds (Список персонажей которые друзья) TimmiTime=$0005E528; // Бот основа Shpakenson=$0002717A; // Тамер Shadis=$00007060; // Шади, основа пве RedYorick=$00032BCE; // бард Stygian=$0021B0E1; // грит Baal=$000443AD; // gena Troglo=$00021F44; NZN=$0003E6CC; Mirali=$0000378D; Shnep=$00004273; camicadze=$000C08A1; hibaksar=$0007FDCE; Ariesha=$0006282A; Shvonder=$0007DE3F; Dlaya=$0000CB8F; // Хилеры. Третий хилер должен быть хорошим дамагером - он подключается к хилингу последним, основое время дамажит мобов. CharToFollow=Shpakenson; //тамер CharToFollowName='Shpakenson'; CharIDOne=RedYorick; CharIDTwo=Mirali; CharIDThree=Shpakenson; //Server-specific IDs TravestyEntryCrate=$404E8149; TravestyDoorOne=$40029997; StygianEntryGate=$4011bd5c; ResurrectionGumpID=$B04C9A31; // гамп на ресалку IgnoredGumpID=$F22EE4C6; // гамп меню сервера // Doom DoomEnterSymbol=$1822; DoomSafeZoneX=392; DoomSafeZoneY=441; procedure buffChecker(id, attributeid:word; isenabled:boolean); begin if (IsCasting = True) then exit; if (attributeid = $0421) then begin if (isenabled = false ) then begin UOSayColor('Кастуем Дчи/Дамаг', 37); IsCasting:=True; Cast('Resilience'); wait(3000); Cast('Perseverance'); wait(3000); end; end; IsCasting:=False; end; procedure Heal(Pers:Cardinal); begin if GetHP(Pers) < GetMaxHP(Pers)-2 then begin IsCasting:=True; if IsPoisoned(Pers) then begin CancelTarget; CancelWaitTarget; Cast('Cure'); WaitForTarget(750); if targetpresent then begin TargetToObject(Pers); IsCasting:=False; end; end else begin CancelTarget; CancelWaitTarget; cast ('Heal'); WaitForTarget(750); if targetpresent then begin TargetToObject(Pers); IsCasting:=False; end; end; end; end; procedure CheckParty; begin if (not InParty) and (InJournal('You see: '+CharToFollowName+' : You are invited to join the party') <> -1) then begin PartyAcceptInvite; PartyCanLootMe(True); ClearJournal; end; if (InParty) and (InJournal(': PartyChatMsg: enter gate') <> -1) then begin for i:=0 to GetGumpsCount-1 do begin if GetGumpID(i) = $DD8B146A then begin NumGumpButton(i,1); end; end; ClearJournal; end; if (InParty) and (InJournal(': PartyChatMsg: go room') <> -1) then begin if (FindType(DoomEnterSymbol, Ground) <> 0) then begin newmovexy(GetX(finditem),GetY(finditem),true,0,true); UOSayColor('Im find Symbol!', 33); end else begin UOSayColor('No Find Symbol!', 33); end; ClearJournal; end; if (InParty) and (InJournal(CharToFollowName+': PartyChatMsg: gate spirit') <> -1) then begin for i:=0 to GetGumpsCount-1 do begin if GetGumpID(i) = $B8110C96 then begin NumGumpRadioButton(i, 106, 1); NumGumpButton(i,1); end; end; ClearJournal; end; if (InParty) and (InJournal(CharToFollowName+': PartyChatMsg: gate valor') <> -1) then begin for i:=0 to GetGumpsCount-1 do begin if GetGumpID(i) = $B8110C96 then begin NumGumpRadioButton(i, 107, 1); NumGumpButton(i,1); end; end; ClearJournal; end; if (InParty) and (InJournal(CharToFollowName+': PartyChatMsg: gate port') <> -1) then begin for i:=0 to GetGumpsCount-1 do begin if GetGumpID(i) = $B8110C96 then begin NumGumpRadioButton(i, 500, 1); NumGumpButton(i,1); end; end; ClearJournal; end; if (InParty) and (InJournal(CharToFollowName+': PartyChatMsg: enter doom') <> -1) then begin for i:=0 to GetGumpsCount-1 do begin if GetGumpID(i) = $40317BA4 then begin //NumGumpRadioButton(i, 2, 1); //NumGumpCheckBox(i,2,1); NumGumpButton(i,1); end; end; ClearJournal; end; if (InParty) and (InJournal(CharToFollowName+': PartyChatMsg: exit doom') <> -1) then begin for i:=0 to GetGumpsCount-1 do begin if GetGumpID(i) = $52cc0e56 then begin NumGumpButton(i,1); end; end; ClearJournal; end; if (InParty) and (InJournal(CharToFollowName+': PartyChatMsg: enter peerless') <> -1) then begin for i:=0 to GetGumpsCount-1 do begin if GetGumpID(i) = $D6A4F9E4 then begin //NumGumpRadioButton(i, 2, 1); //NumGumpCheckBox(i,2,1); NumGumpButton(i,2); end; end; ClearJournal; end; if (InParty) and (InJournal(CharToFollowName+': PartyChatMsg: exit peerless') <> -1) then begin for i:=0 to GetGumpsCount-1 do begin if GetGumpID(i) = $361B782A then begin //NumGumpRadioButton(i, 500, 1) NumGumpButton(i,2); end; end; ClearJournal; end; if (InParty) and (InJournal(CharToFollowName+': PartyChatMsg: buff') <> -1) then begin IsCasting:=True; Cast('Resilience'); wait(3000); Cast('Perseverance'); wait(3000); IsCasting:=False; ClearJournal; end; // if (InParty) and (InJournal('Nefrid Damodred: PartyChatMsg: enter travesty') <> -1) then // begin // UseObject(TravestyEntryCrate); // ClearJournal; // end; // if (InParty) and (InJournal('Nefrid Damodred: PartyChatMsg: enter travDoorOne') <> -1) then // begin // UseObject(TravestyDoorOne); // ClearJournal; // end; if (InParty) and (InJournal(CharToFollowName+': PartyChatMsg: enter stygian') <> -1) then begin UseObject(StygianEntryGate); ClearJournal; end; if (InParty) and (InJournal(': PartyChatMsg: crew stay') <> -1) then begin // if (self=Dissector) or (self=WooWoo) then // begin Following:=False; // end; ClearJournal; end; if (InParty) and (InJournal(': PartyChatMsg: crew come') <> -1) then begin // if (self=Dissector) or (self=WooWoo) then // begin Following:=True; // end; ClearJournal; end; if (InParty) and (InJournal(': PartyChatMsg: step east') <> -1) then begin Step(2,True); ClearJournal; end; if (InParty) and (InJournal(': PartyChatMsg: step west') <> -1) then begin Step(6,True); ClearJournal; end; if (InParty) and (InJournal(': PartyChatMsg: step south') <> -1) then begin Step(4,True); ClearJournal; end; if (InParty) and (InJournal(': PartyChatMsg: step north') <> -1) then begin Step(0,True); ClearJournal; end; if (InParty) and (InJournal(': PartyChatMsg: cbol') <> -1) then begin ClearBadObjectList; ClearBadLocationList; ClearJournal; end; if (InParty) and (InJournal(CharToFollowName+': PartyChatMsg: drop trash') <> -1) then begin // DropTrash; ClearJournal; end; if (InParty) and (InJournal(CharToFollowName+': PartyChatMsg: drop loot') <> -1) then begin // DropLoot; ClearJournal; end; end; procedure FindSomeOneToHeal; var MinCharHP, CharDistance:Integer; begin MinCharHP:=23; CharDistance:=-1; if (self = CharIDOne) or (self = CharIDTwo) then begin MinCharHP:=23; end else begin if (self = CharIDThree) then begin MinCharHP:=20; end else begin MinCharHP:=15; end; end; for i:=0 to Length(Friends)-1 do begin if (Friends[i]=self) then begin if (GetHP(self)/(GetMaxHP(self)/25) < MinCharHP) then begin MinCharHP:=GetHP(Friends[i]); //AddToSystemJournal('MinHP=' + IntToStr(MinCharHP) // +' Pers:'+GetName(Friends[i])); //AddToSystemJournal('HP=' + IntToStr(GetHP(self)/(GetMaxHP(self)/25))); CharToHealIndex:=i; end; end else begin CharDistance:=GetDistance(Friends[i]); if (CharDistance > -1) and (CharDistance < 10) and (GetHP(Friends[i])>0) and (GetHP(Friends[i]) < MinCharHP) then begin MinCharHP:=GetHP(Friends[i]); //AddToSystemJournal('MinHP=' + IntToStr(MinCharHP) // +' Pers:'+GetName(Friends[i]) // +' index:'+IntToStr(i) // +' distance:'+IntToStr(GetDistance(Friends[i]))); CharToHealIndex:=i; end; end; end; end; procedure CastPoisonStrike; begin if (not IsCasting) and (OneEnemy<>-1) then begin if targetpresent then CancelTarget; CancelWaitTarget; IsCasting:=True; Cast('Poison Strike'); WaitForTarget(2000); if targetpresent then begin TargetToObject(OneEnemy); end; IsCasting:=False; end; end; procedure AcceptResurrection; begin for i:=0 to GetGumpsCount-1 do begin if GetGumpID(i) = ResurrectionGumpID then begin NumGumpButton(i,1); end; end; end; Begin SetARStatus(true); SetPauseScriptOnDisconnectStatus(true); SetEventProc(evBuff_DebuffSystem, 'buffChecker'); IsCasting:=False; Friends:=[ TimmiTime, Shpakenson, Shadis, RedYorick, Stygian, Baal, Troglo, NZN, Mirali, Shnep, camicadze, hibaksar, Ariesha, Shvonder ]; Enemies:=[ $0190, // human male $029A, //Neira $0191, // human female $009A, // mummy $0099, // bogle $0039, // bone knight $0093, // skeletal knight $0094, // skeletal & bone mage $0018, // lich $004F, // lich lord $0003, // zombie $009B, // rotting corpse $00AE, //Semidar $0027, // greater mongbat $001E, // harpy $0004, // gargoyle $0043, // stone gargoyle $0082, // searing & burning gargoyle $0009, // demon $0095, // succubus // ansient wirm $00AC, //Rikktor $0024, // lizardman $0034, // snake $00CE, // lava lizard $0055, // ophidian justicar $003D, // drake $003C, // drake 2 $003E, // wywern $003B, // dragon red $000C, // dragon gray $0056, // ophidian enforcer & warrior $00AF, //Lord Oaks //$00A5, // shadow wisp //$0080, // pixie $003A, // wisp $0065, // centaur $0067, // serpentine dragon $007B, // ethereal $0084, // kirin $007A, // unicorn //Barraccoon $0033, // slime $00D7, // giant rat $0017, // dire wolf $002A, // ratman $0062, // hell hound $008F, // ratman mage $005C, // silver serpent $008E, // ratman archer $00AD, //Mephitis $0030, // scorpion $001C, // giant spider $0046, // terathan warrior $0047, // terathan drone $0048, // terathan matriarch $000B, // dread spider $0098, // terathan avenger $00A2, // poison elemental $00F9, //Serado the Awakened $00F2, // deathwatch beetle & deathwatch beetle hatchling $00F0, // kappa $00F3, // lesser hiryu & hiryu $00FB, // revenant lion $00F1, // oni $033e, //Primeval Lich $02E4, //dream wraith $0131, //gore fiend $0136, //wight $013D, //vampire bat $0068, //skeletal drake $0130, //flash golem $004e, //ancient lich $012f, //devourer of souls $004C, //Corgul the Soulbinder $007C, // corgul mage $0092, //the harrower $030C, //True Harrower $02D8, //Medusa $0053, //ogre lord $02D2, //undead guardian $0026, //forgotten servant (lord of the abyss) $033A, //stygian dragon $0101, //Dread Horn //changeling //$02EB, //wraith female $009D, //Lady Lissith & Sabrix $02DF, //Navrey Night-Eyes $02E5, //The Slasher of Veils //Doom $0134, //bone daemon $013E, //dark father $0139, //1st room $013B, //2nd room $0132, //3rd room $0137, //4th room $0138, //5th room // wiwern minichamp $02CE, //a fairy dragon // infernal //$0318, //chaos daemon $0310 //arcane daemon ]; CheckLag(1000); MoveThroughNPC:=0; MoveOpenDoor:=True; Following:=false; // ходить за ботоводом или нет. AddGumpIgnoreByID(IgnoredGumpID); // игнорим гамп с менюшкой сервера. for i:=0 to Length(Friends)-1 do begin Ignore(Friends[i]); end; CheckLag(1000); Wait(650); while Connected do begin CharToHealIndex:=-1; CheckParty; if (Following) and (GetDistance(CharToFollow) > FollowDistance) and ((Stam > 5) or Dead) then begin newmovexy(GetX(CharToFollow),GetY(CharToFollow),true,1,true); end else begin if not Dead then begin FindSomeOneToHeal; if CharToHealIndex<>-1 then begin Heal(Friends[CharToHealIndex]); end; //else // begin // // // end; Wait(250); end else begin AcceptResurrection; end; Wait(250); end; end; End.