Помогите немного подправить...

Anything and all.

Moderators: Murderator+, Murderator

Post Reply
kexwer
Posts: 159
Joined: 2005-06-19 19:21:28

Помогите немного подправить...

Post by kexwer »

Вот скрипт, при появлении ПК он реколиться домой , т.е. всё отлично, но если другой чар рядом выкопал элема то он реколиться домой :(
Можно сделать , так что бы, если в журнале надпись Elemental, то не реколился домой, а продолжал фнкцию, на атаку Элема....


Code: Select all

sub ControlOfDanger() 
 
var Time,danger,Space
Time=Time()
Space=' '
while 1
uo.DeleteJournal()
while not uo.InJournal(':')
wait(100)
wend
danger=uo.GetNotoriety(uo.JournalSerial(0))
if uo.InJournal('OOPS') then
if ElementalKill==1 then
uo.PlayWav(DisturbingSound)
uo.Exec('exec ElementalKill')
end if
if ElementalKill==0 then
uo.Exec('exec RecallRune')
end if
end if
if RecallPhysicalDanger==1 then
if uo.InJournal('attacking you') then
uo.GetStatus('uo.JournalSerial(0)')
uo.SetGlobal('name',uo.GetName(uo.JournalSerial(0)))
uo.TextOpen()
uo.TextPrint('Вы были атакованы - '+uo.GetName(uo.JournalSerial(0)) +Space +Time)
uo.Exec('exec RecallRune')
end if
end if

if SeenDanger==1 then
if Danger==6 and UO.JournalSerial(0) <> UO.GetSerial() then
uo.GetStatus('uo.JournalSerial(0)')
uo.SetGlobal('name',uo.GetName(uo.JournalSerial(0)))
uo.TextOpen()
uo.TextPrint('Рядом оказался ПК - '+uo.GetName(uo.JournalSerial(0)) +Space +Time)
uo.Exec('exec RecallRune')
end if

if Danger==4 and UO.JournalSerial(0) <> UO.GetSerial() then
uo.GetStatus('uo.JournalSerial(0)')
uo.SetGlobal('name',uo.GetName(uo.JournalSerial(0)))
uo.TextOpen()
uo.TextPrint('Рядом оказался криминал - '+uo.GetName(uo.JournalSerial(0)) +Space +Time)
uo.Exec('exec RecallRune')
end if
if RecallBluePlayer==1 then
if danger==1 and uo.JournalSerial(0)<>uo.GetSerial() then
uo.Exec('exec RecallRune')
end if
end if
wend
end sub
Scripts Writer
Posts: 2259
Joined: 2005-04-19 18:00:29
Location: Московская область
Contact:

Post by Scripts Writer »

Code: Select all

if uo.InJournal('attacking you') then 
if uo.InJournal('Elemental is attacking you')
end if


возможно так
kexwer
Posts: 159
Joined: 2005-06-19 19:21:28

Post by kexwer »

You Must Die wrote:

Code: Select all

if uo.InJournal('attacking you') then 
if uo.InJournal('Elemental is attacking you')
end if


возможно так



Лучше тогда так ;)

Code: Select all

if uo.InJournal('attacking you') or uo.InJournal('Elemental')  then 
Что делать дальше...
end if

Но при атаке или появлении Элементаля он будет реколиться по руне...
А нужно, чтобы при uo.InJournal('Elemental') включал функцию Killelemental
Kynep
Expert!
Posts: 1348
Joined: 2006-02-07 08:51:40
Location: г. Старый Оскол
Contact:

Post by Kynep »

kexwer wrote:
You Must Die wrote:

Code: Select all

if uo.InJournal('attacking you') then 
if uo.InJournal('Elemental is attacking you')
end if


возможно так



Лучше тогда так ;)

Code: Select all

if uo.InJournal('attacking you') or uo.InJournal('Elemental')  then 
Что делать дальше...
end if

Но при атаке или появлении Элементаля он будет реколиться по руне...
А нужно, чтобы при uo.InJournal('Elemental') включал функцию Killelemental


Попробуй поменять следующее:

Code: Select all

danger=uo.GetNotoriety(uo.JournalSerial(0)) 
if uo.InJournal('OOPS') or uo.InJournal('Elemental') then
if ElementalKill==1 then
uo.PlayWav(DisturbingSound)
uo.Exec('exec ElementalKill')
end if
kexwer
Posts: 159
Joined: 2005-06-19 19:21:28

Post by kexwer »

Спасибо...
Kynep
Expert!
Posts: 1348
Joined: 2006-02-07 08:51:40
Location: г. Старый Оскол
Contact:

Post by Kynep »

kexwer wrote:Спасибо...


Если работает... тогда не за что :D
Post Reply