На сайте изи уо выложили догонялку ( DarkScribe). На шарде, где я играю, скрипт не пашет. Добавляются в список преследования только ящики\сундуки ( и то как-то рандомно), а плееры нет. Но к самому сундуку чар подбегает. То есть дабл клик по сундуку и включаешь скрипт, сундук добавляется в окошко изи, а плееры нет. Это можно как-нибудь поправить?
;==================================
; Script Name: Friend follower
; Author: DarkScribe
; Version: 1.0
; Client Tested with: 6.0.3.1
; EUO version tested with: 1.5 Version 127
; Shard OSI / FS: OSI Only
; Revision Date: 10/08/2006
; Public Release: 10/11/07
; Global Variables Used: Dynamically created for the friend list, others for hot keys named below.
; Purpose: Follow visible friends (even if ghost) in an order defined by a list managed by this script.
;==================================
; Hotkeys can be configured to enable/disable the
; following mode.
; Configure hotkeys for pausing and resuming in
; the Initialize subroutine. It is perhaps easier to
; edit them in the registry with regedit instead of
; modifying this script.
gosub Initialize
gosub CreateUI
repeat
gosub UserInputHandler
if %follow
gosub TagFriends
until #false
sub Initialize
set %follow #TRUE
set %movedelay 2
set #lpc 1000
if *PauseHotKey = N/A
set *PauseHotKey F12
if *ResumeHotKey = N/A
set *ResumeHotKey F11
if *PauseHotKeyMod1 = N/A
set *PauseHotKeyMod1 #SPC
if *PauseHotKeyMod2 = N/A
set *PauseHotKeyMod2 #SPC
if *PauseHotKeyMod3 = N/A
set *PauseHotKeyMod3 #SPC
if *ResumeHotKeyMod1 = N/A
set *ResumeHotKeyMod1 #SPC
if *ResumeHotKeyMod2 = N/A
set *ResumeHotKeyMod2 #SPC
if *ResumeHotKeyMod3 = N/A
set *ResumeHotKeyMod3 #SPC
set %pausekeysym *PauseHotKey , #spc , *PauseHotKeyMod1 , #spc , *PauseHotKeyMod2 , #spc , *PauseHotKeyMod3
set %resumekeysym *ResumeHotKey , #spc , *ResumeHotKeyMod1 , #spc , *ResumeHotKeyMod2 , #spc , *ResumeHotKeyMod3
set %pathfinding #FALSE
set %dir21 1
set %dir31 2
set %dir32 3
set %dir33 4
set %dir23 5
set %dir13 6
set %dir12 7
set %dir11 8
set %prevcharposx -1
set %prevcharposy -1
set %scntprevpos #scnt
set %prevfrienddist 0
set %visible #TRUE
return
sub UserInputHandler
if #menuButton = CLOSED
{
menu Clear
halt
}
gosub ButtonHandler
if %pausekeysym = %resumekeysym
{
onhotkey *PauseHotKey *PauseHotKeyMod1 *PauseHotKeyMod2 *PauseHotKeyMod3
gosub TogglePause
return
}
onhotkey *PauseHotKey *PauseHotKeyMod1 *PauseHotKeyMod2 *PauseHotKeyMod3
gosub Disable
onhotkey *ResumeHotKey *ResumeHotKeyMod1 *ResumeHotKeyMod2 *ResumeHotKeyMod3
gosub Enable
return
sub AdjustFacing
set %dx #findx - #charposx
if %dx > 0
set %dx 1
if %dx < 0
set %dx -1
set %dy #findy - #charposy
if %dy > 0
set %dy 1
if %dy < 0
set %dy -1
set %dx %dx + 2
set %dy %dy + 2
set %arg dir , %dx , %dy
set %dir % . %arg
set %dir %dir - 1
if %dir <> #charDir
{
event macro 5 % . %arg
wait %moveDelay
}
return
sub TagFriends
if ( #contkind = MGT ) && ( #contsize = 420_280 )
{
click 136 360
wait %moveDelay
}
set %dist 30
set %friendIdx 0
if *NumFriends > 0
{
for %idx 1 *NumFriends
{
set %id *FriendID . %idx
if #charid = %id
continue
finditem %id G_30
if #findkind <> -1 || %prevfrienddist > 0
{
if #findkind = -1
{
if %visible
{
set %visible #FALSE
set %prevfrienddist 10
}
}
if #findkind <> -1
{
set %prevfrienddist #finddist
set %visible #TRUE
}
set %name *FriendName . %idx
if %prevfrienddist > 1
{
if %visible
{
set %prevfrienddist #finddist
if %prevcharposx = #charposx
{
if %prevcharposy = #charposy
{
if ! %pathfinding
{
event macro 12 0
set %pathfinding #TRUE
event pathfind #findx #findy #findz
set %status #charname , #spc , pathfinding , #spc , to , #spc , %name
gosub UpdateUIStatus %status
return
}
}
}
if #scnt > %scntprevpos
{
set %prevcharposx #charposx
set %prevcharposy #charposy
set %scntprevpos #scnt + 3
set %pathfinding #FALSE
}
gosub AdjustFacing
}
if %prevfrienddist > 0
{
set %prevfrienddist %prevfrienddist - 1
event macro 5 % . %arg
wait %moveDelay
set %status #charname , #spc , following , #spc , %name
gosub UpdateUIStatus %status
return
}
set %status #charname , #spc , standing
gosub UpdateUIStatus %status
set %pathfinding #FALSE
return
}
gosub AdjustFacing
set %status #charname , #spc , standing , #spc , by , #spc , %name
gosub UpdateUIStatus %status
return
}
}
}
set %status #charname , #spc , following , #spc , no , #spc , one
gosub UpdateUIStatus %status
return
sub Disable
if %follow
{
set #sysmsgcol 35
set %message Paused , #spc , FriendFollower , #spc , for , #spc , #charname
event sysmessage %message
gosub UpdateUIStatus %message
menu List Select lstFriends 0
set %follow #FALSE
gosub UpdateUIButtons
}
return
sub Enable
if ! %follow
{
set #sysmsgcol 75
set %message Resumed , #spc , FriendFollower , #spc , for , #spc , #charname
event sysmessage %message
menu List Select lstFriends 0
set %follow #TRUE
gosub UpdateUIButtons
}
return
sub TogglePause
if %follow
{
gosub Disable
return
}
gosub Enable
return
sub FindFriends
finditem * G_3
for #findindex 1 #findcnt
{
if #charid <> #findid
{
if ( #findrep > 0 ) && ( #findrep < 7 )
{
gosub AddFriend
}
}
}
return
sub Trim
str len %1
set %len #strRes
for %idx 1 %len
{
str mid %1 %idx 1
if #strRes = $
{
str left %1 %idx
set %1 #strRes
str len %1
set %len #strRes
break
}
}
for %idx %len 1
{
str mid %1 %idx 1
if ( #strRes <> #SPC ) && ( #strRes <> & )
{
set %idx %idx - 1
str left %1 %idx
break
}
}
set %1 #strRes
str len %1
set %len #strRes
for %idx 1 %len
{
str mid %1 %idx 1
if ( #strRes <> #SPC )
{
set %len %len - %idx
set %len %len + 1
str right %1 %len
break
}
}
return #strRes
sub AddFriend
event property #findId
str len #property
if #strRes < 3
return
gosub Trim #property
if *NumFriends = N/A
set *NumFriends 0
set %new #TRUE
if *NumFriends > 0
{
for %idx 1 *NumFriends
{
set %id *FriendId . %idx
if #findId = %id
{
set %new #FALSE
set %name *FriendName . %idx
if #result <> %name
set %name #result
break
}
}
}
if %new
{
set *NumFriends *NumFriends + 1
set *FriendName . *NumFriends #result
set *FriendId . *NumFriends #findId
}
return
sub CreateUI
menu Clear
menu window title FriendFollower by DarkScribe
menu window color black
menu window size 335 300
menu font bgcolor black
menu font color blue
menu font size 10
menu text txtLabelStatus 4 0 Status:
menu text txtLabelFriendsList 4 70 Friends (follow in descending priority order):
set %pauseLabel Pause , #spc , HotKey: , #spc , %pausekeysym
menu text txtLabelPause 4 30 %pauseLabel
set %resumeLabel Resume , #spc , HotKey: , #spc , %resumekeysym
menu text txtLabelResume 4 46 %resumeLabel
gosub UpdateUIFriendList
set #menubutton STARTED
gosub UpdateUIButtons
menu Show
return
sub UpdateUIStatus
if %1 <> %oldstatus
{
menu font size 10
menu font color green
set %text %1
set %title FriendFollower , #spc , - , #spc , %1
if Paused in %1
{
menu font color red
set %text Paused , #spc , for , #spc , #charname
set %title FriendFollower , #spc , - , #spc , %text
}
menu Delete txtStatus
menu text txtStatus 50 0 %text
menu window title %title
set %oldstatus %1
}
return
sub UpdateUIFriendList
menu Delete lstFriends
menu font color yellow
menu font size 10
menu List Create lstFriends 4 88 275 167
if *NumFriends = N/A
set *NumFriends 0
if *NumFriends < 1
return
for %idx 1 *NumFriends
{
set %name FriendName . %idx
set %line %idx , #dot , #spc , * . %name
menu List Add lstFriends %line
}
menu List Select lstFriends 0
return
sub UpdateUIButtons
menu get lstFriends
if ( #menuRes = %lastMenuRes ) && ( %follow = %lastfollow )
return
set %lastMenuRes #menuRes
set %lastfollow %follow
menu font size 30
menu font color blue
menu button ButtonAdd 11 256 40 40 +
if #menuRes <> 0
{
if ( %follow ) && ( *NumFriends > 0 )
menu button ButtonRemove 55 256 40 40 -
menu button ButtonMoveDown 231 256 40 40 v
menu button ButtonMoveUp 143 256 40 40 ^
menu font size 16
menu button ButtonMoveToBottom 187 256 40 40 *NumFriends
menu button ButtonMoveToTop 101 256 40 40 1
if #menuRes = 1
{
menu delete ButtonMoveUp
menu delete ButtonMoveToTop
return
}
if #menuRes = *NUMFRIENDS
{
menu delete ButtonMoveDown
menu delete ButtonMoveToBottom
return
}
return
}
menu delete ButtonMoveUp
menu delete ButtonMoveDown
menu delete ButtonMoveToTop
menu delete ButtonMoveToBottom
if %follow
{
menu delete ButtonRemove
return
}
if *NumFriends > 0
menu button ButtonRemove 55 256 40 40 -
return
sub ButtonHandler
gosub UpdateUIButtons
if ( #menubutton <> STARTED ) && ( #menubutton <> %lastbutton )
{
set %lastbutton #menubutton
gosub #menubutton
}
return
sub CheckSelection
set #menuButton CAPTURED
menu get lstFriends
if #menures = 0
return #TRUE
return #FALSE
sub ButtonAdd
set #menuButton CAPTURED
gosub FindFriends
gosub UpdateUIFriendList
gosub UpdateUIButtons
if *NumFriends > 0
{
menu font size 30
menu font color blue
menu button ButtonRemove 55 256 40 40 -
}
return
sub CopyFriend
set %sname *FriendName . %1
set %dname FriendName , %2
set * . %dname %sname
set %sid *FriendId . %1
set %did FriendId , %2
set * . %did %sid
return
sub ReplaceFriend
set %did FriendId , %1
set %dname FriendName , %1
set * . %did %2
set * . %dname %3
return
sub ButtonRemove
menu get lstFriends
if ( #menuRes = 0 ) && ( *NumFriends > 0 )
{
display yesno Do you want to clear list?
if #dispres = yes
{
set *NumFriends 0
gosub UpdateUIFriendList
gosub UpdateUIButtons
menu delete ButtonRemove
return
}
set #menubutton REENABLE_REMOVEALL
return
}
if *NumFriends < 1
{
set *NumFriends 0
gosub UpdateUIFriendList
menu delete ButtonRemove
return
}
gosub CheckSelection
if #result
return
set *NumFriends *NumFriends - 1
set %idVar FriendId , #menuRes
set %id * . %idVar
set %nameVar FriendName , #menuRes
set %name * . %nameVar
if #menuRes <= *NumFriends
{
for %idx #menuRes *NumFriends
{
set %sidx %idx + 1
gosub CopyFriend %sidx %idx
}
}
set %idx *NumFriends + 1
gosub ReplaceFriend %idx %id %name
gosub UpdateUIFriendList
gosub UpdateUIButtons
if *NumFriends = 0
menu delete ButtonRemove
return
sub ButtonMoveToTop
gosub CheckSelection
if #result
return
set %index #menuRes
repeat
gosub MoveUpWorker %index
set %index %index - 1
until %index = 1
gosub UpdateUIFriendList
return
sub ButtonMoveToBottom
gosub CheckSelection
if #result
return
set %index #menuRes
repeat
gosub MoveDownWorker %index
set %index %index + 1
until %index = *NumFriends
gosub UpdateUIFriendList
return
sub MoveUpWorker
set %didx %1 - 1
set %topid *FriendId . %didx
set %topname *FriendName . %didx
gosub CopyFriend %1 %didx
gosub ReplaceFriend %1 %topid %topname
return
sub ButtonMoveUp
gosub CheckSelection
if #result
return
gosub MoveUpWorker #menuRes
gosub UpdateUIFriendList
return
sub MoveDownWorker
set %didx %1 + 1
set %botid *FriendId . %didx
set %botname *FriendName . %didx
gosub CopyFriend %1 %didx
gosub ReplaceFriend %1 %botid %botname
return
sub ButtonMoveDown
gosub CheckSelection
if #result
return
gosub MoveDownWorker #menuRes
gosub UpdateUIFriendList
return
Где качаешь читы
Русская версия Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)