Forum in READ ONLY mode! All questions and discussions on Discord official server, invite link: https://discord.gg/VxsGzJ7

Magery HELP

тут можно задать вопрос по скриптингу
Post Reply
MurZilka
Posts: 5
Joined: 14.08.2008 16:11

Magery HELP

Post 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:
Beren
Novice
Novice
Posts: 108
Joined: 08.09.2008 1:07

Post 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.
Last edited by Beren on 01.10.2008 20:23, edited 5 times in total.
<'((><
Neophyte
Neophyte
Posts: 21
Joined: 28.09.2008 6:54

Post by <'((>< »

А можно как нить вставить в этот скрипт, чтоб он в сис.журнале писал кол-во оставшегося НС?
Beren
Novice
Novice
Posts: 108
Joined: 08.09.2008 1:07

Post by Beren »

можно, я даже подправил скрипт
MurZilka
Posts: 5
Joined: 14.08.2008 16:11

Post by MurZilka »

<'((>< wrote:А можно как нить вставить в этот скрипт, чтоб он в сис.журнале писал кол-во оставшегося НС?
Спасибо тебе огромное. Отличный макрос, без глюков. Все супер работает. Супер, спасибо.
YogurtST
Neophyte
Neophyte
Posts: 18
Joined: 19.10.2008 10:21

Post by YogurtST »

А можно еще добавить сюда скупку найтшейда у близстоящего вендора? :roll:
ё
Neophyte
Neophyte
Posts: 23
Joined: 21.05.2005 19:45

Post 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:
Post Reply