Page 1 of 1

Magery HELP

Posted: 28.09.2008 12:22
by MurZilka
ПОМОГИТЕ ИЗ ИНЖИ В СТЕЛЗ ПЕРЕВЕСТИ ЭТОТ ПРОСТОЙ СКРИТ.
Кастует на себя поизон, который не наносит урона никакого, когда маны меньше, чем указанное число, то медитирует пока мана не станет = инте. Потом опять кастует поизон и так до бесконечности.
Не нужно хелиться, брать реги, мыть бандаги и т.п. Вот сам скрипт из инжекта

sub Magery_and_medit()
var castitem = "$004F3921"
while UO.NS>0
UO.DeleteJournal()
if UO.Mana <59 then
while UO.Mana<UO.INT
uo.exec("warmode 0")
UO.useskill("Meditation")
wait(3000)
wend
end if
UO.cast ('Poison')
uo.waittargetobject(castitem)
wait(3000)
wend
end sub

Пл3, напишите кто-нибдь под стел3. :oops: :oops: :oops: :oops:

Posted: 28.09.2008 13:32
by Beren
есть такой:

Code: Select all

// Magery script fo DRW. crafted by Sevenamber 
Program Magery; 

{$Include 'all.inc'}  

var 
 mtime : TDateTime; 
 tmana: integer; 
 i:integer; 

const 
 minLimOfMana=14;// минимальный уровень маны, после которого начинаем медитировать 
 CastSpell='Poison'; 
 eat=$160A;// тип еды 
 NS = $0F88;// тип NS 
  
procedure medium;// медитируем 
begin 
 if connected then 
  repeat 
   mtime:=Now; 
   UseSkill('Meditation'); 
   repeat 
     checksave; 
   until ((InJournalBetweenTimes('concentration|peace', mtime, Now)<>-1) or (Mana=Int) or (dead) or (not connected)); 
  until ((InJournalBetweenTimes('You are at peace', mtime, Now)<>-1) or dead or (not connected)); 
 UseObject(FindType(eat,Backpack)); 
end; 

procedure Wait_Target(time_ms:Cardinal); 
var 
 TempTime,SumTime:Cardinal; 
begin 
 SumTime:=0; 
 repeat 
  checksave; 
  TempTime:=Timer; 
  SumTime:=SumTime+(Timer-TempTime); 
 until ((targetpresent) or (dead) or (not connected) or (SumTime>time_ms)); 
end; 

begin 
 clearjournal; 
 SetARStatus(true); 
 while not Dead do 
  begin 
   while not connected do wait(1000);    
   checksave; 
   tmana:=Mana; 
   if Mana > minLimOfMana then 
    begin 
    if TargetPresent then CancelTarget; 
    // подсчёт NS
    i := Count(NS); 
    addtosystemjournal('осталось: ' + inttostr(i) +' NS'); 
    // 
    cast(CastSpell); 
    Wait_Target(10000); 
    WaitTargetSelf; 
    repeat 
     checksave; 
     until ((tmana>Mana) or (not connected) or dead); 
   end 
   else medium;    
  end; 
end.

Posted: 01.10.2008 18:01
by <'((><
А можно как нить вставить в этот скрипт, чтоб он в сис.журнале писал кол-во оставшегося НС?

Posted: 01.10.2008 20:24
by Beren
можно, я даже подправил скрипт

Posted: 10.10.2008 14:07
by MurZilka
<'((>< wrote:А можно как нить вставить в этот скрипт, чтоб он в сис.журнале писал кол-во оставшегося НС?
Спасибо тебе огромное. Отличный макрос, без глюков. Все супер работает. Супер, спасибо.

Posted: 21.10.2008 22:58
by YogurtST
А можно еще добавить сюда скупку найтшейда у близстоящего вендора? :roll:

Posted: 11.07.2009 22:54
by ё
Beren wrote:есть такой:

Code: Select all

// Magery script fo DRW. crafted by Sevenamber 
Program Magery; 

{$Include 'all.inc'}  

var 
 mtime : TDateTime; 
 tmana: integer; 
 i:integer; 

const 
 minLimOfMana=14;// минимальный уровень маны, после которого начинаем медитировать 
 CastSpell='Poison'; 
 eat=$160A;// тип еды 
 NS = $0F88;// тип NS 
  
procedure medium;// медитируем 
begin 
 if connected then 
  repeat 
   mtime:=Now; 
   UseSkill('Meditation'); 
   repeat 
     checksave; 
   until ((InJournalBetweenTimes('concentration|peace', mtime, Now)<>-1) or (Mana=Int) or (dead) or (not connected)); 
  until ((InJournalBetweenTimes('You are at peace', mtime, Now)<>-1) or dead or (not connected)); 
 UseObject(FindType(eat,Backpack)); 
end; 

procedure Wait_Target(time_ms:Cardinal); 
var 
 TempTime,SumTime:Cardinal; 
begin 
 SumTime:=0; 
 repeat 
  checksave; 
  TempTime:=Timer; 
  SumTime:=SumTime+(Timer-TempTime); 
 until ((targetpresent) or (dead) or (not connected) or (SumTime>time_ms)); 
end; 

begin 
 clearjournal; 
 SetARStatus(true); 
 while not Dead do 
  begin 
   while not connected do wait(1000);    
   checksave; 
   tmana:=Mana; 
   if Mana > minLimOfMana then 
    begin 
    if TargetPresent then CancelTarget; 
    // подсчёт NS
    i := Count(NS); 
    addtosystemjournal('осталось: ' + inttostr(i) +' NS'); 
    // 
    cast(CastSpell); 
    Wait_Target(10000); 
    WaitTargetSelf; 
    repeat 
     checksave; 
     until ((tmana>Mana) or (not connected) or dead); 
   end 
   else medium;    
  end; 
end.
при 3апуске данного скрипта чар 1 раз кастует магию и дальше не4е не делает ! что не так ? помогите ! :oops: