[EUO] Oto BOD Toplama - YENİ!! Sayfaya git: 1, 2, Sonraki |
Ultima Online Forum -> Yardımcı Programlar |
Yazar
Mesaj
Daha önce verilen "Raziel's Bod Gathering Script" üzerinde değişiklik yaptım.
rail yada recall olmaya gerek duymadan olduğunuz yerde bod alabilirsiniz.
Öncelikle Razordan 2 tane makro yapın.
1 tanesi ile BS bod alın. (Bod çantanıza düşsün) ve bu makroyu F6 tuşuna atayın.
Diğer makro ile de Tailor bod alın ve F7 tuşuna atayın.
Şimdi gelelim Scriptin çalıştırılmasına :
*****************************************************************
scriptin ikinci bölümünde
kısmını görürsünüz
burada
msg account1
msg password1
buraya acc isminizi ve şifrenizi yazıyorsunuz
birden fazla acc belirlemek için
sub account1 kısmını 2 3 4 5 ... olarak acc sayınıze göre değiştirerek msg account/password kısımlarınıda user ve passlerinizi girerek editleyin, 20 tane acc niz varsa account20 password 20 olana kadar yazmanı gerekli. yani örnek bir görünüm şöyle olur
şimdi scriptte bir alt kısımda bulunan
gosub bodcycle Account Char rail|recall { 0 1 2 ) [Shard] <------ Delete this line
bunu silin direk aşağıda dediğim şekilde acc ve karakter sayısına göre kendiniz ayarların
1.accdeki 4. karakter
1. acc'deki 4. karakterden kasıt şudur : Kendiniz oyuna girdiğinizde, şifre yazıp sonra serverı seçtikten sonra gelen karakter ekranında, yukarıdan aşağıya doğru kaçıncı sırada olduğudur. Burada 4. sıradaki karakteri belirtmişiz.
2. accdaki 5. karakter
yine örnek bir görünüm. (rail 0 yazılı olsun mutlaka)
yani 1. ve 2. acclardaki tüm karakterler ile bod alacağız.
*****************************************************************
Scripti aşağıda bulabilirsiniz :
rail yada recall olmaya gerek duymadan olduğunuz yerde bod alabilirsiniz.
Öncelikle Razordan 2 tane makro yapın.
1 tanesi ile BS bod alın. (Bod çantanıza düşsün) ve bu makroyu F6 tuşuna atayın.
Diğer makro ile de Tailor bod alın ve F7 tuşuna atayın.
*****************************************************************
scriptin ikinci bölümünde
Alıntı:
sub account1
msg Account1
wait 10
click 530 400
msg Password1
wait 20
msg $
return
msg Account1
wait 10
click 530 400
msg Password1
wait 20
msg $
return
kısmını görürsünüz
burada
msg account1
msg password1
buraya acc isminizi ve şifrenizi yazıyorsunuz
birden fazla acc belirlemek için
sub account1 kısmını 2 3 4 5 ... olarak acc sayınıze göre değiştirerek msg account/password kısımlarınıda user ve passlerinizi girerek editleyin, 20 tane acc niz varsa account20 password 20 olana kadar yazmanı gerekli. yani örnek bir görünüm şöyle olur
Spoiler:
sub account1
msg Account1
wait 10
click 530 400
msg Password1
wait 20
msg $
return
;******************************************************************
sub account2
msg Account2
wait 10
click 530 400
msg Password2
wait 20
msg $
return
;******************************************************************
sub account3
msg Account3
wait 10
click 530 400
msg Password3
wait 20
msg $
return
;******************************************************************
sub account4
msg Account4
wait 10
click 530 400
msg Password4
wait 20
msg $
return
;******************************************************************
sub account5
msg Account5
wait 10
click 530 400
msg Password5
wait 20
msg $
return
msg Account1
wait 10
click 530 400
msg Password1
wait 20
msg $
return
;******************************************************************
sub account2
msg Account2
wait 10
click 530 400
msg Password2
wait 20
msg $
return
;******************************************************************
sub account3
msg Account3
wait 10
click 530 400
msg Password3
wait 20
msg $
return
;******************************************************************
sub account4
msg Account4
wait 10
click 530 400
msg Password4
wait 20
msg $
return
;******************************************************************
sub account5
msg Account5
wait 10
click 530 400
msg Password5
wait 20
msg $
return
şimdi scriptte bir alt kısımda bulunan
Alıntı:
;******************************************************************
;******************************************************************
;gosub bod lines below this
;******************************************************************
;******************************************************************
gosub bodcycle Account Char rail|recall { 0 1 2 ) [Shard] <------ Delete this line
;******************************************************************
;gosub bod lines below this
;******************************************************************
;******************************************************************
gosub bodcycle Account Char rail|recall { 0 1 2 ) [Shard] <------ Delete this line
gosub bodcycle Account Char rail|recall { 0 1 2 ) [Shard] <------ Delete this line
bunu silin direk aşağıda dediğim şekilde acc ve karakter sayısına göre kendiniz ayarların
Alıntı:
gosub bodcycle 1 4 rail 0
1.accdeki 4. karakter
1. acc'deki 4. karakterden kasıt şudur : Kendiniz oyuna girdiğinizde, şifre yazıp sonra serverı seçtikten sonra gelen karakter ekranında, yukarıdan aşağıya doğru kaçıncı sırada olduğudur. Burada 4. sıradaki karakteri belirtmişiz.
Alıntı:
gosub bodcycle 2 5 rail 0
2. accdaki 5. karakter
yine örnek bir görünüm. (rail 0 yazılı olsun mutlaka)
Spoiler:
gosub bodcycle 1 1 rail 0
gosub bodcycle 1 2 rail 0
gosub bodcycle 1 3 rail 0
gosub bodcycle 1 4 rail 0
gosub bodcycle 1 5 rail 0
gosub bodcycle 1 6 rail 0
gosub bodcycle 2 1 rail 0
gosub bodcycle 2 2 rail 0
gosub bodcycle 2 3 rail 0
gosub bodcycle 2 4 rail 0
gosub bodcycle 2 5 rail 0
gosub bodcycle 2 6 rail 0
gosub bodcycle 1 2 rail 0
gosub bodcycle 1 3 rail 0
gosub bodcycle 1 4 rail 0
gosub bodcycle 1 5 rail 0
gosub bodcycle 1 6 rail 0
gosub bodcycle 2 1 rail 0
gosub bodcycle 2 2 rail 0
gosub bodcycle 2 3 rail 0
gosub bodcycle 2 4 rail 0
gosub bodcycle 2 5 rail 0
gosub bodcycle 2 6 rail 0
yani 1. ve 2. acclardaki tüm karakterler ile bod alacağız.
*****************************************************************
Scripti aşağıda bulabilirsiniz :
Spoiler:
Kod:
;==================================
; Script Name: Raziel's Bod Gathering Script
; Author: Raziel
; Version: 1.52
; Client Tested with: 4.0.9b
; EUO version tested with: EasyUO V1.42 [Build 00A3]
; Shard OSI / FS: OSI
; Revision Date: 27/08/2005
; Public Release: 10/08/2003
; Global Variables Used:
; Purpose: Auto Gathers bods ( multi chars/accounts/shards )
;==================================
;******************************************************************
; edit these options if you like, though defaults are fine.
set %sortDesktop #false ; #true or #false, organises your desktop
set %cancelRewards #false ; #true or #false, cancels AOS gift and vet reward gump
set %clickMod MC ; MC = move cursor, DMC = don't move cursor. MC will improve your bod gathering speed ( but will move your cursor when it clicks the npc )
set %option 4 ;this is the option on the context menu you must click to get a bod "bod info" OSI is 2 but freeshards may vary, set this here.
set %hoursBetweenBods 6 ;this is how many hours between each bod being availible. default is 6 hours.
;******************************************************************
goto Begin ;do not delete this line
;*****************************************************************
sub account1
msg account1
wait 10
click 530 400
msg pass1
wait 20
msg $
return
;******************************************************************
sub account2
msg account2
wait 10
click 530 400
msg pass2
wait 20
msg $
return
;******************************************************************
sub account3
msg account3
wait 10
click 530 400
msg pass3
wait 20
msg $
return
;******************************************************************
bodlines:
;******************************************************************
;******************************************************************
;gosub bod lines below this
;******************************************************************
;******************************************************************
gosub bodcycle 1 2 rail 1
gosub bodcycle 1 3 rail 1
gosub bodcycle 2 2 rail 1
gosub bodcycle 3 1 rail 1
gosub bodcycle 3 2 rail 1
;******************************************************************
;******************************************************************
;Edit nothing below this line
;******************************************************************
;******************************************************************
wait 100
Begin:
gosub timeOld
gosub makeMenu
gosub waitBOD
gosub _waitSysVar clilogged = 0
set *RazielBodTime #time
set *RazielBodDate #date
goto bodlines
;******************************************************************
sub bodCycle
namespace push
namespace local bodCycle
set !loginAttemps 0
set !account %1
set !char %2
set !recallOrRail %3
set !bodType %4
set !shard %5
set !numVars %0
;Check for errors in bod cycle line
set !accountCheck #false
set !charCheck #false
set !recallOrRailCheck #false
set !bodTypeCheck #false
set !shardCheck #false
gosub checkNumber !account
if ! #result
set !accountCheck #true
gosub checkNumber !char
if ! #result || !char > 6
set !charCheck #true
if rail notin !recallOrRail && !recallOrRail recall_sacred
set !recallOrRailCheck #true
if _ , !bodType , _ notin _0_1_2_
set !bodTypeCheck #true
if !numVars > 4
{
gosub checkNumber !shard
if #result
set !shardCheck #true
}
gosub checkBodCycleLine !accountCheck !charCheck !recallOrRailCheck !bodTypeCheck !shardCheck !numVars
if ! #result
{
namespace pop
return
}
;end error checking
_tryLoginAgain:
if !numVars = 5
gosub InfoMenu !account !char !recallOrRail !bodType !shard
else
gosub InfoMenu !account !char !recallOrRail !bodType
if !numVars = 5
gosub login !account !char !shard
if !numVars = 4
gosub login !account !char
set !loginAttemps !loginAttemps + 1
if ! #result
{
if !loginAttemps > 5
{
namespace pop
return
}
gosub loginFailMenu
if #result = skip
{
namespace pop
return
}
if #result = tryAgain
goto _tryLoginAgain
}
wait 40
if %sortDesktop
gosub SortDesktop
if %cancelRewards
gosub cancelRewards
ignoreitem reset
if !bodType = 0 || !bodType = 2
{
gosub moveTo tailor !bodType !recallOrRail
if ! #result
{
gosub logout
wait 300s
namespace pop
return
}
}
if !bodType = 1 || !bodType = 2
{
gosub MoveTo smith !bodType !recallOrRail
if ! #result
{
gosub logout
wait 300s
namespace pop
return
}
}
gosub moveTo inn !bodType !recallOrRail
if ! #result
{
gosub logout
wait 300s
namespace pop
return
}
finditem DYM C_ . #backpackid
if #findkind = 0
gosub bodbook
wait 10
gosub logout
namespace pop
return
;******************************************************************
sub findNpc
namespace push
namespace local findNpc
set !type %1
set !previous %2
set !arraySize 0
set !element 1
_findNpc:
finditem IS_HS G_10
ignoreitem #findid
if #findkind <> -1
{
if #findrep = 7
{
event property #findid
if !type = tailor
{
if guild notin #property
{
if weaver in #property || tailor in #property
{
set !npc . !element #findid
set !arraySize !arraySize + 1
set !element !element + 1
}
}
}
if !type = smith
{
if blacksmith in #property || armourer in #property
{
set !npc . !element #findid
set !arraySize !arraySize + 1
set !element !element + 1
}
}
}
goto _findNpc
}
ignoreitem reset
set !npc none
for !i 1 !arraySize
{
if !npc . !i <> !previous
{
set !npc !npc . !i
set !i !arraySize
}
}
if !npc = none
set #result !previous
else
set #result !npc
namespace pop
return #result
;******************************************************************
sub findRune
ignoreitem reset
if %0 = 2
ignoreitem %2
get_rune:
finditem QWL C
if #findkind = -1
return -1
event property #findid
if #property = $
goto get_rune
if %1 in #property
return #findid
ignoreitem #findid
goto get_rune
;******************************************************************
sub login
namespace push
namespace local login
set !loginMax 3 ;max number of times to look throught shardlist
set %charCreate #false;for use later to determine if char creation came up
;key combo to restore/maximize
set !key1 space
set !key2 alt
set !key3 x
;info on what char to login
set !login0_ %0
set !account %1
set !char %2
set !shard %3
;conditional inclusion of shard scanner
if ! !shardScannerInit && !login0_ = 3
{
call shardScanner.txt init
set !shardScannerInit #true
}
login:
;wait for char to be logged out and at main login
gosub _waitSysVar clilogged = 0 contname = mainmenu_gump 60
if ! #result
{
if #contsize = 356_212
gosub backTrack login_gump mainMenu_gump
goto login
}
set !shardloc 1 ;initialize
;clear old Account and pass
set !y !char * 40 + 130
click 530 360
for !i 1 16
{
key back
}
wait 10
click 530 400
for !i 1 16
{
key back
}
wait 20
click 530 360
;type account and pass
gosub account . !account
;wait for shard select screen
_waitShard:
gosub _waitSysVar contname = normal_gump 60
if ! #result
{
;wait shard select timed out, determine what to do next
gosub determineAction normal_gump
goto #result
}
set %shardContKind #contkind;for use later to determine if char creation came up
;shard selection
if !login0_ = 3
{
;use key combo to restore/maximize uo
;shard scanner must be able to "see" uo
key !key1 !key2
wait 40
key !key3
wait 20
click 640 480 mc ;move cursor out of the way so it doesn't mess up shardscanner
;check choosen shard is selected
call shardScanner.txt isShardNameSupported !shard
if #result = #false
{
;shard not supported
display ok Either your choosen shard is not supported or you have mis-spelt the shard name. Please check and try again. Shard name ( %shard )
halt
}
set !recheck 0;initialize
set !listCheck 0;number of times the list has been checked
_shardList:
if !recheck > 4 ;4 = number of pages of shards
{
set !listCheck !listCheck + 1
if !listCheck > !loginMax ;reached max login attemps
{
gosub determineAction loginMax
namespace pop
return #false
}
;reached the bottom of the shard list
click 540 100 x 40 ;goto top
set !recheck 0
}
set !login_i -1
_shardloop: ;check all 9 shards visible on the list
set !login_i !login_i + 1
call shardScanner.txt checkLineForShard !login_i !shard
if ! #result && !login_i <= 8 ;shard is not target, but there are other shards visible to check, try next
goto _shardloop
if ! #result ;shard is not target shard, go down a page
{
set !recheck !recheck + 1
wait 10
click 535 350 x 9
wait 20
goto _shardList
}
;shard found
set !clicky 25 * !login_i + 110
click 300 !clicky g
}
if !login0_ < 3 ;if no shard specified
msg $ ; just login to last shard
_waitCharSelect:
gosub _waitSysVar contname = login_gump 20
if ! #result
{
if %charCreate
{
gosub backTrack unknown mainMenu_gump
namespace pop
return #false
}
gosub determineAction login_gump
goto #result
}
wait 15
click 300 !y d
wait 20
_login3:
gosub _waitSysVar contname = login_gump 2
if #result
{
click 612 452
wait 5
click 612 452
wait 5
click 612 452
wait 5
goto _login3
}
_waitlogin:
gosub _waitSysVar clilogged = 1 5
if ! #result
{
gosub determineAction login
goto #result
}
wait 80
if #charname = N/A
{
event macro 8 2
gosub _waitSysVar contname = status_gump 10
if ! #result
goto _waitlogin
}
namespace pop
return #true
;******************************************************************
sub _waitSysVar
namespace push
namespace local _waitForSysVar
set !timeout #scnt + % . %0
set !cnt %0 / 3
set !break #false
for !i 1 !cnt
{
set !x !i * 3 - 2
set !y !x + 1
set !z !y + 1
if ! ( # . % . !x % . !y % . !z )
set !i 0
if %0 % 3 = 1 && #scnt > !timeout
{
namespace pop
return #false
}
}
namespace pop
return #true
;***************************************************************************************************
sub determineAction
namespace push
namespace local determineAction
set !problem %1
_Action:
if !problem = normal_gump
{
if #contname = normal_gump
{
namespace pop
return _waitShard
}
if #contname = waiting_gump
{
gosub backTrack normal_gump mainMenu_gump
if #result
{
namespace pop
return login
}
if ! #result
goto _Action
}
}
if !problem = loginMax
{
gosub backTrack login_gump mainMenu_gump
if #result
{
namespace pop
return
}
}
if !problem = login_gump
{
if #contname = login_gump
{
namespace pop
return _waitCharSelect
}
if #contname = normal_gump && #contkind <> %shardContKind && ! %charCreate
{
set %charCreate #true
gosub backTrack unknown mainMenu_gump
if #result
{
namespace pop
return login
}
}
gosub backTrack login_gump normal_gump
if #result
{
namespace pop
return _waitShard
}
gosub backTrack login_gump mainMenu_gump
if #result
{
namespace pop
return login
}
}
if !problem = login
{
if #clilogged = 1
{
namespace pop
return _waitlogin
}
gosub backTrack unknown login_gump
if #result
{
namespace pop
return _waitCharSelect
}
if #contname = normal_gump
{
namespace pop
return _waitShard
}
if #contname = mainMenu_gump
{
namespace pop
return login
}
gosub backTrack unknown mainMenu_gump
goto _Action
}
display ok Unknown Problem. Halting!
halt
;******************************************************************
sub backTrack
namespace push
namespace local backTrack
set !currentScreen %1
set !targetScreen %2
gosub convertScreen !currentScreen
set !currentScreen #result
gosub convertScreen !targetScreen
set !targetScreen #result
;3 = mainmenu_gump
;2 = normal_gump
;1 = login_gump
;0 = unknown
_backTrack:
if #contname in mainmenu_gump_normal_gump_login_gump
{
gosub convertScreen #contname
set !currentScreen #result
}
if !targetScreen < !currentScreen
{
namespace pop
return #false
}
if !currentScreen = !targetScreen
{
namespace pop
return #true
}
if #contname = waiting_gump
{
str pos #contsize _
set !temp #strres - 1
str left #contsize !temp
set !x ( #strres / 2 ) + #contposX
str pos #contsize _
str del #contsize 1 #strres
set !y #strres + #contposY - 34
click !x !y
gosub _waitSysVar contname <> waiting_gump 2
goto _backTrack
}
goto _backTrack . !currentScreen
_backTrack1:
click 600 450
gosub _waitSysVar contname = nomal_gump 5
goto _backTrack
_backTrack2:
click 600 450
gosub _waitSysVar contname = mainmenu_gump 5
goto _backTrack
_backTrack3:
goto _backTrack
;******************************************************************
sub convertScreen
if %1 = mainmenu_gump
return 3
if %1 = normal_gump
return 2
if %1 = login_gump
return 1
if %1 = unknown
return 0
display ok unknown. Halting
halt
;******************************************************************
sub logout
namespace push
namespace local logout
logout:
set !timeOut #scnt + 5
event macro 8 1
wait 20
waitpaperdoll:
if #scnt > !timeOut
goto logout
if #contname <> paperdoll_gump
goto waitpaperdoll
contpos #clixres 0
wait 20
_waitConfirm:
set !timeOut #scnt + 3
set !paperDollX #clixres + 210
click !paperDollX 110
waitlogout:
if #scnt > !timeOut
goto _waitConfirm
if #contname <> YesNo_gump
goto waitlogout
set !x #contposx + 120
set !y #contposy + 90
_quit:
click !x !y
set !timeOut #scnt + 20
_waitlogout:
if #scnt > !timeout
goto quit
if #contname <> MainMenu_gump
goto _waitlogout
namespace pop
return
;******************************************************************
sub recall
namespace push
namespace local recall
recall:
if %2 = recall
{
set !spell 31
set !mana 11
}
if %2 = sacred
{
set !spell 210
set !mana 10
}
set !rune %1
set #ltargetkind 1
set #ltargetid !rune
set !x #charposx
set !y #charposy
_waitMana:
if #mana < !mana
goto _waitMana
event macro 15 !spell
wait 10
target 5S
event macro 22
set !timeOut #scnt + 4
_waitRecallLoop:
scanjournal 1
if blocking in #journal
{
namespace pop
return #false
}
if reagents in #journal || fizzles in #journal
{
deletejournal
wait 20
goto _waitMana
}
if #scnt > !timeOut
goto _waitMana
if !x <> #charposx || !y <> #charposy
{
namespace pop
return #true
}
goto _waitRecallLoop
;******************************************************************
sub bod
namespace push
namespace local bod
set !NPC %1
BOD:
finditem !npc
if #findkind = -1
{
namespace pop
return #false
}
gosub useVendor !npc %option
if ! #result
{
namespace pop
return #false
}
set !timeOut #scnt + 30
_acceptBodLoop:
scanjournal 1
if an_offer_may in #journal
{
deletejournal
wait 60s
goto BOD
}
if #scnt > !timeOut
goto BOD
if #contname <> generic_gump
goto _acceptBodLoop
str pos #contsize _
str del #contsize 1 #strres
set !y 20 + #strres
_bodRetry:
click 165 !y
wait 10
if #contname = generic_gump
goto _bodRetry
namespace pop
return #true
;******************************************************************
sub bodBook
namespace push
namespace local bodBook
set !X #cliXres - 200
gosub opencont #backPackID !X #cliyres
set #findmod 22_18
finditem DYM C_ . #backpackID
gosub moveitem #findid #findx #findy
set !bookX #findx
set !bookY #findy
set #findmod 0_0
wait 30
findbodloop:
finditem EYM C
if #findkind = -1
{
namespace pop
return
}
gosub moveitem #findid !bookX !bookY
gosub _waitSysVar contname = generic_gump contsize = 615_454 2
if #result
click 610 40 r
goto findbodloop
;******************************************************************
sub rail
namespace push
namespace local rail
set %endspot checker
set !railName %1
call !railName
gosub checkNumber %endspot
if ! #result
{
display ok there is something wrong with your rail ( !railName )$
+check you have made the file and put it in the same folder as the bod script.$
+halting script.
halt
}
for !i 1 %ENDSPOT
{
set !x %x . !i
set !y %y . !i
set !z %z . !i
gosub findDist !x !y #charposx #charposy
if #result > 15
{
display ok the next spot is too far away$
+I suggest you remake the rail$
+try to keep the gap between each spot short ( 10 tiles is good )
halt
}
set !tries 0
tryAgain:
if !tries > 10
{
gosub railFailMenu
if #result
{
set !tries 0
goto tryAgain
}
namespace pop
return #false
}
set !pathfindTimeOut #scnt + 6
event pathfind !x !y !z
set !tries !tries + 1
_waitmove:
if #contname = generic_gump && #contsize = 420_280
{
click 330 360
wait 10
}
IF #charposx = !x && #charposy = !y && #charposz = !z
goto next
if #scnt < !pathfindTimeOut
goto _waitmove
goto try_again
next:
}
namespace pop
return #true
;******************************************************************
sub timeOld
set %time *RazielBodTime
set %date_old *RazielBodDate
set %seconds_old ( %time % 100 ) + ( ( %time % 10000 ) / 100 ) * 60 + ( %time / 10000 ) * 3600
set %date_new #date
if %time = N/A 2
set %date_old #date
set %seconds_old ( #time % 100 ) + ( ( #time % 10000 ) / 100 ) * 60 + ( #time / 10000 ) * 3600 - 3600 * %hoursBetweenBods
return
;******************************************************************
sub makeMenu
menu clear
set #menubutton N/A
menu show 50 50
menu Window Title Raziel's BOD Collection Script
menu window color black
menu font size 12
menu font color red
menu font bgcolor black
menu Window Size 275 50
menu text time 5 5 Time Untill next Bod run :$ , %h hours %m minutes
menu button continue 165 25 105 20 Get Bods Now
menu hideEUO
return
;******************************************************************
sub waitBod
set %show #true
_waitBOD:
set %date_new #date
set %seconds_new ( #time % 100 ) + ( ( #time % 10000 ) / 100 ) * 60 + ( #time / 10000 ) * 3600
if %date_old <> %date_new
set %get_bod 3600 * %hoursBetweenBods - ( ( %seconds_new - %seconds_old ) + 86400 )
else
set %get_bod 3600 * %hoursBetweenBods - ( %seconds_new - %seconds_old )
if %get_bod <= 0
return
set %h %get_bod / 3600
set %m ( %get_bod % 3600 ) / 60
if %show
{
menu delete time
menu text time 5 5 Time Untill next Bod run :$ , %h hours %m minutes
if #menubutton = continue
return
if #menubutton = closed
set %show #false
}
wait 20
goto _waitBOD
;******************************************************************
sub moveTo
namespace push
namespace local moveTo
set !destination %1
set !bodType %2
set !recallOrRail %3
if rail in !recallOrRail
{
set !tempRailName !recallOrRail
str len !tempRailName
set !len #strres - 4
str mid !tempRailName 5 !len
set !mod #strres
set !recallOrRail rail
}
if !recallOrRail = recall || !recallOrRail = sacred
{
set !rune N/A
_recallLoop:
gosub findRune !destination !rune
if #result = -1
{
display Ok Cannot find rune, please check rune name$ halting script
halt
}
set !rune #result
gosub recall !rune !recallOrRail
if ! #result
goto _recallLoop
}
if !recallOrRail = rail
{
key f6
wait 3s
key f7
wait 3s
}
namespace pop
return #true
;******************************************************************
sub InfoMenu
namespace push
namespace local infoMenu
set !account %1
set !char %2
set !recallOrRail %3
if %4 = 0
set !bodType Tailor
if %4 = 1
set !bodtype Smith
if %4 = 2
set !bodType Tailor , #spc , and , #spc , smith
set !shard %5
set !lines %0
set !menuHeight 20 * !lines + 30
menu clear
menu show 600 600
menu Window Title Raziel's BOD Collection Script
menu window color black
menu font size 12
menu font color red
menu font bgcolor black
menu Window Size 275 !menuHeight
menu text text 5 5 Gathering Bods
menu text text 5 25 Account : !account
menu text text 5 45 Character : !char
menu text text 5 65 Movement : !recallOrRail
menu text text 5 85 Bods : !bodtype
if !lines = 5
menu text text 5 105 Shard : !shard
namespace pop
return
;===============================
;* @name useVendor
;* @author Quintok
;* @ver 1.0 13 march 04
;* @purpose opens context menu and clicks the correct option
;* @param %1 vendor id
;* %2 which option to pick on the context menu
sub useVendor
namespace push
namespace local Quintok
set !useVendorCnt 0
set !vendorID %1
set !_contextOption %2
set !VendorX -4
set !VendorY -54
_useVendorLoop:
finditem !vendorID G
if #findkind = -1
{
namespace pop
return #false
}
gosub clickScreenXYZ #findx #findy #findz !vendorX !vendorY
if paper_doll in #contname
gosub clickScreenXYZ #findx #findy #findz !vendorX !vendorY
gosub clickContextMenuOption !_contextOption
if ! #result
{
set !useVendorCnt !useVendorCnt + 1
if !useVendorCnt > 6
{
namespace pop
return #false
}
set !VendorX !VendorX + 2
set !VendorY !VendorY + 2
goto _useVendorLoop
}
namespace pop
return #true
;===============================
;* Convert 3D world coordinates to 2D screen coordinates.
;*
;* @purpose Convert 3D world coordinates to 2D screen coordinates.
;* @author the.WZA (namespace edit by Quintok)
;* @param %1 worldx req World x-coordinate.
;* %2 worldy req World y-coordinate.
;* %3 worldz req World z-coordinate.
;* @return %_cursorX and %_cursorY holds the screen coordinates.
;* @see clickScreenXYZ checkScreenXY
sub worldXYZToScreenXY
set %1 ( %1 - #charPosX ) * 22
set %2 ( #charPosY - %2 ) * 22
set !_cursorX #cliLeft + #cliXRes / 2 + %1 + %2
set !_cursorY #cliTop + #cliYRes / 2 + %1 - %2 - ( %3 - #charPosZ ) * 4
return
;===============================
;* Clicks on the screen given by world coordinates (with displacement).
;* Initialize the following variables: %_cursorX, %_cursorY.
;*
;* @purpose Clicks on the screen given by world coordinates (with displacement).
;* @author ScriptFellow (namespace edit by Quintok)
;* @param %1 worldx req World x-coordinate.
;* %2 worldy req World y-coordinate.
;* %3 worldz req World z-coordinate.
;* %4 xdisp opt x displacement (to be added to the screen coordinate).
;* %5 ydisp opt y displacement (to be added to the screen coordinate).
;* %6 click1 opt click modifier: D, F, G, N, P, R or X (default if 'F')
;* %7 click2 opt X modifier
;* @return %outsideScreen (#true or #false )
;* @see worldXYZToScreenXY checkScreenXY openContextMenu
sub clickScreenXYZ
if %0 < 4 || %4 = N/A
set !_dx 0
else
set !_dx %4
if %0 < 5 || %5 = N/A
set !_dy 0
else
set !_dy %5
if %0 < 6 || _ , %6 , _ notIn _D_F_G_N_P_R_X_
set !_clickType F
else
set !_clickType %6
gosub worldXYZToScreenXY %1 %2 %3
set !_cursorX !_cursorX + !_dx
set !_cursorY !_cursorY + !_dy
click !_cursorX !_cursorY !_clickType %clickMod
return
;===============================
;* @name waitFor
;* @author Quintok
;* @ver 1.0 13 march 04
;* @purpose waits %4 seconds for # . %1 to %2 to %3
;* @param %1 system variable without '#' (req)
;* %2 operation ie = <> in notin (req)
;* %3 to compare with ie abcdef (req)
;* %4 timeout in seconds
sub waitFor
if %0 < 4
set !timeOut #scnt + 5
else
set !timeOut #scnt + %4
_waitForLoop:
if #scnt > !timeOut
return #false
if ! ( # . %1 %2 %3 )
goto _waitForLoop
return #true
;===============================
;* @name clickContextMenuOption
;* @author Quintok
;* @ver 1.0 13 march 04
;* @purpose waits %4 seconds for # . %1 to %2 to %3
;* @param %1 the number in the list
sub clickContextMenuOption
set !_vendorNumber %1
_clickContextMenuOptionLoop:
gosub waitfor contname = normal_gump 2
if ! #result && #contname = status_gump && #contID = !vendorID
{
set !x #contposx + 15
set !y #contposy + 15
click !x !y r
goto _clickContextMenuOptionLoop
}
if ! #result
return #false
gosub _ensureContextSize !_vendorNumber
if ! #result
return #false
set !x #contposx + 25
set !y #contposy + ( 18 * !_vendorNumber )
click !x !y f
return #true
;===============================
;* @name _ensureContextSize [internal]
;* @author Quintok
;* @ver 1.0 13 march 04
;* @purpose make sure context menu could hold atleast %1 options
;* @param %1 the number in the list
sub _ensureContextSize
str pos #contsize _
set !right #strres - 1
str right #contsize !right
set !contsize #strres
if !contsize < ( 24 + 18 * %1 )
return #false
return #true
;******************************************************************
sub sortDeskTop
namespace push
namespace local sortDeskTop
if #clileft <> 0
set #clileft 0
if #clitop <> 0
set #clitop 0
_minStatus:
event macro 8 2
wait 10
event macro 10 2
gosub _waitSysVar contname = status_gump contsize = 432_184 5
if ! #result
goto _minStatus
_moveStatus:
contpos 250 #cliYres
gosub _waitSysVar contname = status_gump contsize = 432_184 contposx = 250 contposy = #cliYres 5
if ! #result
goto _moveStatus
_openBackPack:
event macro 8 7
gosub _waitSysVar contname = container_gump contsize = 230_204 5
if ! #result
goto _openBackPack
_moveBackPack:
set !X #cliXres - 180
contpos !X #cliYres
gosub _waitSysVar contname = container_gump contsize = 230_204 contposX = !X contposY = #cliYres 5
if ! #result
goto _moveBackPack
wait 10
_openPaperDoll:
event macro 8 1
gosub _waitSysVar contname = paperdoll_gump contid = #charid 5
if ! #result
goto _openPaperDoll
_movePaperDoll:
contpos #cliXres 0
gosub _waitSysVar contname = paperdoll_gump contid = #charid contposX = #cliXres contposY = 0 5
if ! #result
goto _movePaperDoll
namespace pop
return
;******************************************************************
sub cancelRewards
_closeVetGump:
click 300 105
wait 10
gosub _waitSysVar contname = generic_gump contsize = 510_145 2
if #result
{
contpos 0 0
goto _closeVetGump
}
_closeAOSGift:
click 75 470
wait 10
gosub _waitSysVar contname = generic_gump contsize = 520_440 2
if #result
{
contpos 50 50
goto _closeAOSGift
}
return
;******************************************************************
sub moveItem
namespace push
namespace local moveItem
set !subTimeOut #scnt + 30
set !item %1
set !x %2
set !y %3
set !amount %4
set !0 %0
finditem !item
if #findkind = -1
{
ignoreitem !item
finditem !item
if #findkind = -1
{
namespace pop
return #false
}
ignoreitem !item
}
_dragAgain:
if !subTimeOut < #scnt
{
namespace pop
return #false
}
set !timeOut #scnt + 4
wait 10
event drag !item
_waitDrag:
if #scnt > !timeOut
goto _dragAgain
if #contname notin stack_gump_drag_gump
goto _waitDrag
if #contname = stack_gump && !0 = 4
msg !amount $
if #contname = stack_gump && !0 < 4
msg $
set !timeOut #scnt + 4
_waitDragging:
if #scnt > !timeOut
goto _dragAgain
if #contname <> drag_gump
goto _waitDragging
click !x !y p
namespace pop
return #true
;***************************************************************************************************
sub checkNumber
if %1 * 1 / %1 = 1 || %1 = 0
return #true
return #false
;******************************************************************
sub checkBodCycleLine
set %lines 0
if %6 > 5 || %6 < 4
set %lines %lines + 2
if %1
set %lines %lines + 1
if %2
set %lines %lines + 1
if %3
set %lines %lines + 1
if %_3 = sacred
set %lines %lines + 1
if %4
set %lines %lines + 2
if %_0 = 5 && %5
set %lines %lines + 1
if %lines = 0
return #true
set %ySize 105 + %lines * 16
menu Clear
menu Window Title BodCycle Error Checking
menu Window Color None
menu Window Size 500 %ySize
menu Font Transparent #true
menu Font Align Right
menu Shape EUOShape1 0 52 390 45 3 7 1 Black 7 Red
menu Font Name MS Sans Serif
menu Font Size 8
menu Font Style
menu Font Color Red
menu Font Transparent #false
menu Font Align Left
menu Font BGColor None
menu Text EUOLabel1 4 4 You are seeing this menu because one or more of the parameters you put in the bodcycle line have errors
menu Text EUOLabel2 4 20 This will hopefully show you what you've done wrong and what you need to change
menu Text EUOLabel3 4 36 The bold yellow parts have errors
menu Text EUOLabel10 4 80 Gosub bodCycle
menu Text EUOLabel11 4 68 Your Line:
menu Font Color WindowText
menu Font BGColor Red
menu Text EUOLabel4 4 56 Gosub bodCycle
menu Text EUOLabel10 4 80 Gosub bodCycle
menu Text EUOLabel11 4 68 Your Line:
menu Font Style
menu Font Color
menu Text EUOLabel5 88 56 Account
menu Text EUOLabel6 136 56 Char
menu Text EUOLabel7 164 56 rail|recall
menu Text EUOLabel8 220 56 { 0 1 2 }
menu Text EUOLabel9 272 56 [Shard]
menu Text EUOLabel12 88 80 %_1
menu Text EUOLabel13 136 80 %_2
menu Text EUOLabel14 164 80 %_3
menu Text EUOLabel15 220 80 %_4
if %6 <> 4
menu Text EUOLabel16 272 80 %_5
menu Font Style b
menu Font Color Yellow
if %1
{
menu delete EUOlabel5
menu delete EUOlabel12
menu Text EUOLabel5 88 56 Account
menu Text EUOLabel12 88 80 %_1
}
if %2
{
menu delete EUOlabel6
menu delete EUOlabel13
menu Text EUOLabel6 136 56 Char
menu Text EUOLabel13 136 80 %_2
}
if %3
{
menu delete EUOlabel7
menu delete EUOlabel14
menu Text EUOLabel7 164 56 rail|recall
menu Text EUOLabel14 164 80 %_3
}
if %4
{
menu delete EUOlabel8
menu delete EUOlabel15
menu Text EUOLabel8 220 56 { 0 1 2 }
menu Text EUOLabel15 220 80 %_4
}
if %5
{
menu delete EUOlabel9
menu delete EUOlabel16
menu Text EUOLabel9 272 56 [Shard]
if %6 <> 4
menu Text EUOLabel16 272 80 %_5
}
menu Font Color WindowText
menu Button Skip 400 48 100 25 Skip Character
menu Button halt 400 75 100 25 Halt Script
set %yPos 105
menu Font Style
menu Font Color Red
menu Font BGColor None
if %6 > 5 || %6 < 4
{
menu text advice 4 %yPos You have given an invalid number of parameters ( %6 ).
set %yPos %yPos + 16
menu text advice 4 %yPos There should be max 5 and min 4, please re-read the instructions
set %yPos %yPos + 16
}
if %1
{
menu text advice 4 %yPos The Account you specified was not a number, please re-read the instructions
set %yPos %yPos + 16
}
if %2 && %_2 < 6
{
menu text advice 4 %yPos The Character you specified was not a number, please re-read the instructions
set %yPos %yPos + 16
}
if %2 && %_2 > 6
{
menu text advice 4 %yPos The character you specified is invalid ( character %_2 ).
set %yPos %yPos + 16
}
if %3
{
menu text advice 4 %yPos The movement method you specified was invalid, please choose either rail or recall
set %yPos %yPos + 16
}
if %_3 = sacred
{
menu text advice 4 %yPos To use sacred journey please choose recall, the script will then use sacred journey
set %yPos %yPos + 16
}
if %4
{
menu text advice 4 %yPos The bod type to collect was invalid ( %_4 ), please choose only 0, 1 or 2.
set %yPos %yPos + 16
menu text advice 4 %yPos 0 = smith only, 1 = tailor only, 2 = both smith and tailor.
set %yPos %yPos + 16
}
if %5
{
menu text advice 4 %yPos The shard you specified was a number.
}
menu Show 421 270
set #menubutton N/A
_menuLoop:
if #menubutton = halt
halt
if #menubutton = skip
return #false
goto _menuLoop
;******************************************************************
sub findDist
namespace push
namespace local findDist
set !x abs ( %1 - %3 )
set !y abs ( %2 - %4 )
set #result !y
if !x > !y
set #result !x
namespace pop
return #result
;******************************************************************
sub railFailMenu
set %TimeUp #scnt + 300
set %timeRem %TimeUp - #scnt
menu Clear
menu Window Title Rail Move failed
menu Window Color Black
menu Window Size 335 125
menu Font Transparent #true
menu Font Align Right
menu Shape EUOShape1 0 0 345 69 3 7 1 Black 7 Yellow
menu Font Name MS Sans Serif
menu Font Size 8
menu Font Style
menu Font Color Red
menu Font Transparent #false
menu Font Align Left
menu Font BGColor Yellow
menu Text EUOLabel1 4 4 For some reason rail movement has failed
menu Text EUOLabel2 4 20 You can either move yourself manually to the next spot and try again
menu Text EUOLabel3 4 36 or the script will logout in 5 mins time, wait 5 mins for the char to timeout.
menu Text EUOLabel4 4 52 then login with any remaining characters.
menu Font Size 14
menu Font Style b
menu Font Color Yellow
menu Font BGColor Black
menu Text EUOLabel5 85 72 What Will You Do?
menu Font Size 8
menu Font Style
menu Font Color WindowText
menu Font BGColor InactiveBorder
menu Button tryAgain 15 96 150 25 Try Again
menu Button skipChar 180 96 150 25 Skip Character ( %timeRem s )
menu Show 421 270
set #menubutton N/A
_railFailMenuLoop:
menu delete skipChar
menu Button skipChar 180 96 150 25 Skip Character ( %timeRem s )
if #menubutton = tryAgain
{
menu hide
return #true
}
if #menubutton = skipChar || %timeRem < 0
{
menu hide
return #false
}
set %timeRem %TimeUp - #scnt
wait 1s
goto _railFailMenuLoop
;******************************************************************
sub loginFailMenu
set %TimeUp #scnt + 60
set %timeRem %TimeUp - #scnt
menu Clear
menu Window Title Login Fail Menu
menu Window Color Black
menu Window Size 373 122
menu Font Transparent #true
menu Font Align Right
menu Shape EUOShape1 0 0 376 69 3 7 1 Black 7 Yellow
menu Font Name MS Sans Serif
menu Font Size 8
menu Font Style
menu Font Color Red
menu Font Transparent #false
menu Font Align Left
menu Font BGColor Yellow
menu Text EUOLabel1 4 4 For some reason login has failed. It will wait 1 minute and then try again
menu Text EUOLabel2 4 20 After 5 attemps it will skip this character. ( current attemps = %loginAttemps ).
menu Text EUOLabel3 4 36 You may login manually and then click the "login manually" button to continue
menu Text EUOLabel4 4 52 or use the skip/try again buttons.
menu Font Size 12
menu Font Style b
menu Font Color Yellow
menu Font BGColor Black
menu Text EUOLabel5 100 72 What Will You Do?
menu Font Size 8
menu Font Style
menu Font Color WindowText
menu Font BGColor BtnFace
menu Button tryagain 10 96 112 25 Try Again ( %timeRem s )
menu Button manual 254 96 112 25 Login Manually
menu Button skip 132 96 112 25 Skip Character
menu Show 421 270
set #menubutton N/A
_loginFailMenuLoop:
menu delete tryagain
menu Button tryagain 10 96 112 25 Try Again ( %timeRem s )
if #menubutton = tryagain || %timeRem < 0
return tryagain
if #menubutton = skip
return skip
if #menubutton = manual
return manual
set %timeRem %TimeUp - #scnt
wait 1s
goto _loginFailMenuLoop
;***************************************************************************************************
sub OpenCont
;%1 = id %2 = x pos %3 = y pos
namespace push
namespace local OpenCont
set !contPos #false
set !container %1
if %0 = 3
{
set !xCont %2
set !yCont %3
set !contPos #true
}
gosub checkRange !container
if ! #result
{
namespace pop
return #false
}
set !timeOut #scnt
_openContLoop:
set #lobjectid !container
if #scnt > !timeOut
{
event macro 17
set !timeOut #scnt + 3
}
if #contid <> !container
goto _openContLoop
if ! !contPos
{
namespace pop
return #true
}
_openContAt:
contpos !xCont !yCont
wait 10
if #contposx <> !xCont && #contposy <> !yCont
goto _openContAt
namespace pop
return #true
;***************************************************************************************************
sub checkRange
namespace push
namespace local checkRange
set !item %1
_rangeloop:
finditem !item
if #findkind = -1
{
namespace pop
return #false
}
if #findkind = 1 && #finddist <= 2 && abs ( #charposz - #findz ) < 20
{
namespace pop
return #true
}
if #findkind = 1
{
namespace pop
return #false
}
set !item #findbagid
goto _rangeloop
;***************************************************************************************************
; Script Name: Raziel's Bod Gathering Script
; Author: Raziel
; Version: 1.52
; Client Tested with: 4.0.9b
; EUO version tested with: EasyUO V1.42 [Build 00A3]
; Shard OSI / FS: OSI
; Revision Date: 27/08/2005
; Public Release: 10/08/2003
; Global Variables Used:
; Purpose: Auto Gathers bods ( multi chars/accounts/shards )
;==================================
;******************************************************************
; edit these options if you like, though defaults are fine.
set %sortDesktop #false ; #true or #false, organises your desktop
set %cancelRewards #false ; #true or #false, cancels AOS gift and vet reward gump
set %clickMod MC ; MC = move cursor, DMC = don't move cursor. MC will improve your bod gathering speed ( but will move your cursor when it clicks the npc )
set %option 4 ;this is the option on the context menu you must click to get a bod "bod info" OSI is 2 but freeshards may vary, set this here.
set %hoursBetweenBods 6 ;this is how many hours between each bod being availible. default is 6 hours.
;******************************************************************
goto Begin ;do not delete this line
;*****************************************************************
sub account1
msg account1
wait 10
click 530 400
msg pass1
wait 20
msg $
return
;******************************************************************
sub account2
msg account2
wait 10
click 530 400
msg pass2
wait 20
msg $
return
;******************************************************************
sub account3
msg account3
wait 10
click 530 400
msg pass3
wait 20
msg $
return
;******************************************************************
bodlines:
;******************************************************************
;******************************************************************
;gosub bod lines below this
;******************************************************************
;******************************************************************
gosub bodcycle 1 2 rail 1
gosub bodcycle 1 3 rail 1
gosub bodcycle 2 2 rail 1
gosub bodcycle 3 1 rail 1
gosub bodcycle 3 2 rail 1
;******************************************************************
;******************************************************************
;Edit nothing below this line
;******************************************************************
;******************************************************************
wait 100
Begin:
gosub timeOld
gosub makeMenu
gosub waitBOD
gosub _waitSysVar clilogged = 0
set *RazielBodTime #time
set *RazielBodDate #date
goto bodlines
;******************************************************************
sub bodCycle
namespace push
namespace local bodCycle
set !loginAttemps 0
set !account %1
set !char %2
set !recallOrRail %3
set !bodType %4
set !shard %5
set !numVars %0
;Check for errors in bod cycle line
set !accountCheck #false
set !charCheck #false
set !recallOrRailCheck #false
set !bodTypeCheck #false
set !shardCheck #false
gosub checkNumber !account
if ! #result
set !accountCheck #true
gosub checkNumber !char
if ! #result || !char > 6
set !charCheck #true
if rail notin !recallOrRail && !recallOrRail recall_sacred
set !recallOrRailCheck #true
if _ , !bodType , _ notin _0_1_2_
set !bodTypeCheck #true
if !numVars > 4
{
gosub checkNumber !shard
if #result
set !shardCheck #true
}
gosub checkBodCycleLine !accountCheck !charCheck !recallOrRailCheck !bodTypeCheck !shardCheck !numVars
if ! #result
{
namespace pop
return
}
;end error checking
_tryLoginAgain:
if !numVars = 5
gosub InfoMenu !account !char !recallOrRail !bodType !shard
else
gosub InfoMenu !account !char !recallOrRail !bodType
if !numVars = 5
gosub login !account !char !shard
if !numVars = 4
gosub login !account !char
set !loginAttemps !loginAttemps + 1
if ! #result
{
if !loginAttemps > 5
{
namespace pop
return
}
gosub loginFailMenu
if #result = skip
{
namespace pop
return
}
if #result = tryAgain
goto _tryLoginAgain
}
wait 40
if %sortDesktop
gosub SortDesktop
if %cancelRewards
gosub cancelRewards
ignoreitem reset
if !bodType = 0 || !bodType = 2
{
gosub moveTo tailor !bodType !recallOrRail
if ! #result
{
gosub logout
wait 300s
namespace pop
return
}
}
if !bodType = 1 || !bodType = 2
{
gosub MoveTo smith !bodType !recallOrRail
if ! #result
{
gosub logout
wait 300s
namespace pop
return
}
}
gosub moveTo inn !bodType !recallOrRail
if ! #result
{
gosub logout
wait 300s
namespace pop
return
}
finditem DYM C_ . #backpackid
if #findkind = 0
gosub bodbook
wait 10
gosub logout
namespace pop
return
;******************************************************************
sub findNpc
namespace push
namespace local findNpc
set !type %1
set !previous %2
set !arraySize 0
set !element 1
_findNpc:
finditem IS_HS G_10
ignoreitem #findid
if #findkind <> -1
{
if #findrep = 7
{
event property #findid
if !type = tailor
{
if guild notin #property
{
if weaver in #property || tailor in #property
{
set !npc . !element #findid
set !arraySize !arraySize + 1
set !element !element + 1
}
}
}
if !type = smith
{
if blacksmith in #property || armourer in #property
{
set !npc . !element #findid
set !arraySize !arraySize + 1
set !element !element + 1
}
}
}
goto _findNpc
}
ignoreitem reset
set !npc none
for !i 1 !arraySize
{
if !npc . !i <> !previous
{
set !npc !npc . !i
set !i !arraySize
}
}
if !npc = none
set #result !previous
else
set #result !npc
namespace pop
return #result
;******************************************************************
sub findRune
ignoreitem reset
if %0 = 2
ignoreitem %2
get_rune:
finditem QWL C
if #findkind = -1
return -1
event property #findid
if #property = $
goto get_rune
if %1 in #property
return #findid
ignoreitem #findid
goto get_rune
;******************************************************************
sub login
namespace push
namespace local login
set !loginMax 3 ;max number of times to look throught shardlist
set %charCreate #false;for use later to determine if char creation came up
;key combo to restore/maximize
set !key1 space
set !key2 alt
set !key3 x
;info on what char to login
set !login0_ %0
set !account %1
set !char %2
set !shard %3
;conditional inclusion of shard scanner
if ! !shardScannerInit && !login0_ = 3
{
call shardScanner.txt init
set !shardScannerInit #true
}
login:
;wait for char to be logged out and at main login
gosub _waitSysVar clilogged = 0 contname = mainmenu_gump 60
if ! #result
{
if #contsize = 356_212
gosub backTrack login_gump mainMenu_gump
goto login
}
set !shardloc 1 ;initialize
;clear old Account and pass
set !y !char * 40 + 130
click 530 360
for !i 1 16
{
key back
}
wait 10
click 530 400
for !i 1 16
{
key back
}
wait 20
click 530 360
;type account and pass
gosub account . !account
;wait for shard select screen
_waitShard:
gosub _waitSysVar contname = normal_gump 60
if ! #result
{
;wait shard select timed out, determine what to do next
gosub determineAction normal_gump
goto #result
}
set %shardContKind #contkind;for use later to determine if char creation came up
;shard selection
if !login0_ = 3
{
;use key combo to restore/maximize uo
;shard scanner must be able to "see" uo
key !key1 !key2
wait 40
key !key3
wait 20
click 640 480 mc ;move cursor out of the way so it doesn't mess up shardscanner
;check choosen shard is selected
call shardScanner.txt isShardNameSupported !shard
if #result = #false
{
;shard not supported
display ok Either your choosen shard is not supported or you have mis-spelt the shard name. Please check and try again. Shard name ( %shard )
halt
}
set !recheck 0;initialize
set !listCheck 0;number of times the list has been checked
_shardList:
if !recheck > 4 ;4 = number of pages of shards
{
set !listCheck !listCheck + 1
if !listCheck > !loginMax ;reached max login attemps
{
gosub determineAction loginMax
namespace pop
return #false
}
;reached the bottom of the shard list
click 540 100 x 40 ;goto top
set !recheck 0
}
set !login_i -1
_shardloop: ;check all 9 shards visible on the list
set !login_i !login_i + 1
call shardScanner.txt checkLineForShard !login_i !shard
if ! #result && !login_i <= 8 ;shard is not target, but there are other shards visible to check, try next
goto _shardloop
if ! #result ;shard is not target shard, go down a page
{
set !recheck !recheck + 1
wait 10
click 535 350 x 9
wait 20
goto _shardList
}
;shard found
set !clicky 25 * !login_i + 110
click 300 !clicky g
}
if !login0_ < 3 ;if no shard specified
msg $ ; just login to last shard
_waitCharSelect:
gosub _waitSysVar contname = login_gump 20
if ! #result
{
if %charCreate
{
gosub backTrack unknown mainMenu_gump
namespace pop
return #false
}
gosub determineAction login_gump
goto #result
}
wait 15
click 300 !y d
wait 20
_login3:
gosub _waitSysVar contname = login_gump 2
if #result
{
click 612 452
wait 5
click 612 452
wait 5
click 612 452
wait 5
goto _login3
}
_waitlogin:
gosub _waitSysVar clilogged = 1 5
if ! #result
{
gosub determineAction login
goto #result
}
wait 80
if #charname = N/A
{
event macro 8 2
gosub _waitSysVar contname = status_gump 10
if ! #result
goto _waitlogin
}
namespace pop
return #true
;******************************************************************
sub _waitSysVar
namespace push
namespace local _waitForSysVar
set !timeout #scnt + % . %0
set !cnt %0 / 3
set !break #false
for !i 1 !cnt
{
set !x !i * 3 - 2
set !y !x + 1
set !z !y + 1
if ! ( # . % . !x % . !y % . !z )
set !i 0
if %0 % 3 = 1 && #scnt > !timeout
{
namespace pop
return #false
}
}
namespace pop
return #true
;***************************************************************************************************
sub determineAction
namespace push
namespace local determineAction
set !problem %1
_Action:
if !problem = normal_gump
{
if #contname = normal_gump
{
namespace pop
return _waitShard
}
if #contname = waiting_gump
{
gosub backTrack normal_gump mainMenu_gump
if #result
{
namespace pop
return login
}
if ! #result
goto _Action
}
}
if !problem = loginMax
{
gosub backTrack login_gump mainMenu_gump
if #result
{
namespace pop
return
}
}
if !problem = login_gump
{
if #contname = login_gump
{
namespace pop
return _waitCharSelect
}
if #contname = normal_gump && #contkind <> %shardContKind && ! %charCreate
{
set %charCreate #true
gosub backTrack unknown mainMenu_gump
if #result
{
namespace pop
return login
}
}
gosub backTrack login_gump normal_gump
if #result
{
namespace pop
return _waitShard
}
gosub backTrack login_gump mainMenu_gump
if #result
{
namespace pop
return login
}
}
if !problem = login
{
if #clilogged = 1
{
namespace pop
return _waitlogin
}
gosub backTrack unknown login_gump
if #result
{
namespace pop
return _waitCharSelect
}
if #contname = normal_gump
{
namespace pop
return _waitShard
}
if #contname = mainMenu_gump
{
namespace pop
return login
}
gosub backTrack unknown mainMenu_gump
goto _Action
}
display ok Unknown Problem. Halting!
halt
;******************************************************************
sub backTrack
namespace push
namespace local backTrack
set !currentScreen %1
set !targetScreen %2
gosub convertScreen !currentScreen
set !currentScreen #result
gosub convertScreen !targetScreen
set !targetScreen #result
;3 = mainmenu_gump
;2 = normal_gump
;1 = login_gump
;0 = unknown
_backTrack:
if #contname in mainmenu_gump_normal_gump_login_gump
{
gosub convertScreen #contname
set !currentScreen #result
}
if !targetScreen < !currentScreen
{
namespace pop
return #false
}
if !currentScreen = !targetScreen
{
namespace pop
return #true
}
if #contname = waiting_gump
{
str pos #contsize _
set !temp #strres - 1
str left #contsize !temp
set !x ( #strres / 2 ) + #contposX
str pos #contsize _
str del #contsize 1 #strres
set !y #strres + #contposY - 34
click !x !y
gosub _waitSysVar contname <> waiting_gump 2
goto _backTrack
}
goto _backTrack . !currentScreen
_backTrack1:
click 600 450
gosub _waitSysVar contname = nomal_gump 5
goto _backTrack
_backTrack2:
click 600 450
gosub _waitSysVar contname = mainmenu_gump 5
goto _backTrack
_backTrack3:
goto _backTrack
;******************************************************************
sub convertScreen
if %1 = mainmenu_gump
return 3
if %1 = normal_gump
return 2
if %1 = login_gump
return 1
if %1 = unknown
return 0
display ok unknown. Halting
halt
;******************************************************************
sub logout
namespace push
namespace local logout
logout:
set !timeOut #scnt + 5
event macro 8 1
wait 20
waitpaperdoll:
if #scnt > !timeOut
goto logout
if #contname <> paperdoll_gump
goto waitpaperdoll
contpos #clixres 0
wait 20
_waitConfirm:
set !timeOut #scnt + 3
set !paperDollX #clixres + 210
click !paperDollX 110
waitlogout:
if #scnt > !timeOut
goto _waitConfirm
if #contname <> YesNo_gump
goto waitlogout
set !x #contposx + 120
set !y #contposy + 90
_quit:
click !x !y
set !timeOut #scnt + 20
_waitlogout:
if #scnt > !timeout
goto quit
if #contname <> MainMenu_gump
goto _waitlogout
namespace pop
return
;******************************************************************
sub recall
namespace push
namespace local recall
recall:
if %2 = recall
{
set !spell 31
set !mana 11
}
if %2 = sacred
{
set !spell 210
set !mana 10
}
set !rune %1
set #ltargetkind 1
set #ltargetid !rune
set !x #charposx
set !y #charposy
_waitMana:
if #mana < !mana
goto _waitMana
event macro 15 !spell
wait 10
target 5S
event macro 22
set !timeOut #scnt + 4
_waitRecallLoop:
scanjournal 1
if blocking in #journal
{
namespace pop
return #false
}
if reagents in #journal || fizzles in #journal
{
deletejournal
wait 20
goto _waitMana
}
if #scnt > !timeOut
goto _waitMana
if !x <> #charposx || !y <> #charposy
{
namespace pop
return #true
}
goto _waitRecallLoop
;******************************************************************
sub bod
namespace push
namespace local bod
set !NPC %1
BOD:
finditem !npc
if #findkind = -1
{
namespace pop
return #false
}
gosub useVendor !npc %option
if ! #result
{
namespace pop
return #false
}
set !timeOut #scnt + 30
_acceptBodLoop:
scanjournal 1
if an_offer_may in #journal
{
deletejournal
wait 60s
goto BOD
}
if #scnt > !timeOut
goto BOD
if #contname <> generic_gump
goto _acceptBodLoop
str pos #contsize _
str del #contsize 1 #strres
set !y 20 + #strres
_bodRetry:
click 165 !y
wait 10
if #contname = generic_gump
goto _bodRetry
namespace pop
return #true
;******************************************************************
sub bodBook
namespace push
namespace local bodBook
set !X #cliXres - 200
gosub opencont #backPackID !X #cliyres
set #findmod 22_18
finditem DYM C_ . #backpackID
gosub moveitem #findid #findx #findy
set !bookX #findx
set !bookY #findy
set #findmod 0_0
wait 30
findbodloop:
finditem EYM C
if #findkind = -1
{
namespace pop
return
}
gosub moveitem #findid !bookX !bookY
gosub _waitSysVar contname = generic_gump contsize = 615_454 2
if #result
click 610 40 r
goto findbodloop
;******************************************************************
sub rail
namespace push
namespace local rail
set %endspot checker
set !railName %1
call !railName
gosub checkNumber %endspot
if ! #result
{
display ok there is something wrong with your rail ( !railName )$
+check you have made the file and put it in the same folder as the bod script.$
+halting script.
halt
}
for !i 1 %ENDSPOT
{
set !x %x . !i
set !y %y . !i
set !z %z . !i
gosub findDist !x !y #charposx #charposy
if #result > 15
{
display ok the next spot is too far away$
+I suggest you remake the rail$
+try to keep the gap between each spot short ( 10 tiles is good )
halt
}
set !tries 0
tryAgain:
if !tries > 10
{
gosub railFailMenu
if #result
{
set !tries 0
goto tryAgain
}
namespace pop
return #false
}
set !pathfindTimeOut #scnt + 6
event pathfind !x !y !z
set !tries !tries + 1
_waitmove:
if #contname = generic_gump && #contsize = 420_280
{
click 330 360
wait 10
}
IF #charposx = !x && #charposy = !y && #charposz = !z
goto next
if #scnt < !pathfindTimeOut
goto _waitmove
goto try_again
next:
}
namespace pop
return #true
;******************************************************************
sub timeOld
set %time *RazielBodTime
set %date_old *RazielBodDate
set %seconds_old ( %time % 100 ) + ( ( %time % 10000 ) / 100 ) * 60 + ( %time / 10000 ) * 3600
set %date_new #date
if %time = N/A 2
set %date_old #date
set %seconds_old ( #time % 100 ) + ( ( #time % 10000 ) / 100 ) * 60 + ( #time / 10000 ) * 3600 - 3600 * %hoursBetweenBods
return
;******************************************************************
sub makeMenu
menu clear
set #menubutton N/A
menu show 50 50
menu Window Title Raziel's BOD Collection Script
menu window color black
menu font size 12
menu font color red
menu font bgcolor black
menu Window Size 275 50
menu text time 5 5 Time Untill next Bod run :$ , %h hours %m minutes
menu button continue 165 25 105 20 Get Bods Now
menu hideEUO
return
;******************************************************************
sub waitBod
set %show #true
_waitBOD:
set %date_new #date
set %seconds_new ( #time % 100 ) + ( ( #time % 10000 ) / 100 ) * 60 + ( #time / 10000 ) * 3600
if %date_old <> %date_new
set %get_bod 3600 * %hoursBetweenBods - ( ( %seconds_new - %seconds_old ) + 86400 )
else
set %get_bod 3600 * %hoursBetweenBods - ( %seconds_new - %seconds_old )
if %get_bod <= 0
return
set %h %get_bod / 3600
set %m ( %get_bod % 3600 ) / 60
if %show
{
menu delete time
menu text time 5 5 Time Untill next Bod run :$ , %h hours %m minutes
if #menubutton = continue
return
if #menubutton = closed
set %show #false
}
wait 20
goto _waitBOD
;******************************************************************
sub moveTo
namespace push
namespace local moveTo
set !destination %1
set !bodType %2
set !recallOrRail %3
if rail in !recallOrRail
{
set !tempRailName !recallOrRail
str len !tempRailName
set !len #strres - 4
str mid !tempRailName 5 !len
set !mod #strres
set !recallOrRail rail
}
if !recallOrRail = recall || !recallOrRail = sacred
{
set !rune N/A
_recallLoop:
gosub findRune !destination !rune
if #result = -1
{
display Ok Cannot find rune, please check rune name$ halting script
halt
}
set !rune #result
gosub recall !rune !recallOrRail
if ! #result
goto _recallLoop
}
if !recallOrRail = rail
{
key f6
wait 3s
key f7
wait 3s
}
namespace pop
return #true
;******************************************************************
sub InfoMenu
namespace push
namespace local infoMenu
set !account %1
set !char %2
set !recallOrRail %3
if %4 = 0
set !bodType Tailor
if %4 = 1
set !bodtype Smith
if %4 = 2
set !bodType Tailor , #spc , and , #spc , smith
set !shard %5
set !lines %0
set !menuHeight 20 * !lines + 30
menu clear
menu show 600 600
menu Window Title Raziel's BOD Collection Script
menu window color black
menu font size 12
menu font color red
menu font bgcolor black
menu Window Size 275 !menuHeight
menu text text 5 5 Gathering Bods
menu text text 5 25 Account : !account
menu text text 5 45 Character : !char
menu text text 5 65 Movement : !recallOrRail
menu text text 5 85 Bods : !bodtype
if !lines = 5
menu text text 5 105 Shard : !shard
namespace pop
return
;===============================
;* @name useVendor
;* @author Quintok
;* @ver 1.0 13 march 04
;* @purpose opens context menu and clicks the correct option
;* @param %1 vendor id
;* %2 which option to pick on the context menu
sub useVendor
namespace push
namespace local Quintok
set !useVendorCnt 0
set !vendorID %1
set !_contextOption %2
set !VendorX -4
set !VendorY -54
_useVendorLoop:
finditem !vendorID G
if #findkind = -1
{
namespace pop
return #false
}
gosub clickScreenXYZ #findx #findy #findz !vendorX !vendorY
if paper_doll in #contname
gosub clickScreenXYZ #findx #findy #findz !vendorX !vendorY
gosub clickContextMenuOption !_contextOption
if ! #result
{
set !useVendorCnt !useVendorCnt + 1
if !useVendorCnt > 6
{
namespace pop
return #false
}
set !VendorX !VendorX + 2
set !VendorY !VendorY + 2
goto _useVendorLoop
}
namespace pop
return #true
;===============================
;* Convert 3D world coordinates to 2D screen coordinates.
;*
;* @purpose Convert 3D world coordinates to 2D screen coordinates.
;* @author the.WZA (namespace edit by Quintok)
;* @param %1 worldx req World x-coordinate.
;* %2 worldy req World y-coordinate.
;* %3 worldz req World z-coordinate.
;* @return %_cursorX and %_cursorY holds the screen coordinates.
;* @see clickScreenXYZ checkScreenXY
sub worldXYZToScreenXY
set %1 ( %1 - #charPosX ) * 22
set %2 ( #charPosY - %2 ) * 22
set !_cursorX #cliLeft + #cliXRes / 2 + %1 + %2
set !_cursorY #cliTop + #cliYRes / 2 + %1 - %2 - ( %3 - #charPosZ ) * 4
return
;===============================
;* Clicks on the screen given by world coordinates (with displacement).
;* Initialize the following variables: %_cursorX, %_cursorY.
;*
;* @purpose Clicks on the screen given by world coordinates (with displacement).
;* @author ScriptFellow (namespace edit by Quintok)
;* @param %1 worldx req World x-coordinate.
;* %2 worldy req World y-coordinate.
;* %3 worldz req World z-coordinate.
;* %4 xdisp opt x displacement (to be added to the screen coordinate).
;* %5 ydisp opt y displacement (to be added to the screen coordinate).
;* %6 click1 opt click modifier: D, F, G, N, P, R or X (default if 'F')
;* %7 click2 opt X modifier
;* @return %outsideScreen (#true or #false )
;* @see worldXYZToScreenXY checkScreenXY openContextMenu
sub clickScreenXYZ
if %0 < 4 || %4 = N/A
set !_dx 0
else
set !_dx %4
if %0 < 5 || %5 = N/A
set !_dy 0
else
set !_dy %5
if %0 < 6 || _ , %6 , _ notIn _D_F_G_N_P_R_X_
set !_clickType F
else
set !_clickType %6
gosub worldXYZToScreenXY %1 %2 %3
set !_cursorX !_cursorX + !_dx
set !_cursorY !_cursorY + !_dy
click !_cursorX !_cursorY !_clickType %clickMod
return
;===============================
;* @name waitFor
;* @author Quintok
;* @ver 1.0 13 march 04
;* @purpose waits %4 seconds for # . %1 to %2 to %3
;* @param %1 system variable without '#' (req)
;* %2 operation ie = <> in notin (req)
;* %3 to compare with ie abcdef (req)
;* %4 timeout in seconds
sub waitFor
if %0 < 4
set !timeOut #scnt + 5
else
set !timeOut #scnt + %4
_waitForLoop:
if #scnt > !timeOut
return #false
if ! ( # . %1 %2 %3 )
goto _waitForLoop
return #true
;===============================
;* @name clickContextMenuOption
;* @author Quintok
;* @ver 1.0 13 march 04
;* @purpose waits %4 seconds for # . %1 to %2 to %3
;* @param %1 the number in the list
sub clickContextMenuOption
set !_vendorNumber %1
_clickContextMenuOptionLoop:
gosub waitfor contname = normal_gump 2
if ! #result && #contname = status_gump && #contID = !vendorID
{
set !x #contposx + 15
set !y #contposy + 15
click !x !y r
goto _clickContextMenuOptionLoop
}
if ! #result
return #false
gosub _ensureContextSize !_vendorNumber
if ! #result
return #false
set !x #contposx + 25
set !y #contposy + ( 18 * !_vendorNumber )
click !x !y f
return #true
;===============================
;* @name _ensureContextSize [internal]
;* @author Quintok
;* @ver 1.0 13 march 04
;* @purpose make sure context menu could hold atleast %1 options
;* @param %1 the number in the list
sub _ensureContextSize
str pos #contsize _
set !right #strres - 1
str right #contsize !right
set !contsize #strres
if !contsize < ( 24 + 18 * %1 )
return #false
return #true
;******************************************************************
sub sortDeskTop
namespace push
namespace local sortDeskTop
if #clileft <> 0
set #clileft 0
if #clitop <> 0
set #clitop 0
_minStatus:
event macro 8 2
wait 10
event macro 10 2
gosub _waitSysVar contname = status_gump contsize = 432_184 5
if ! #result
goto _minStatus
_moveStatus:
contpos 250 #cliYres
gosub _waitSysVar contname = status_gump contsize = 432_184 contposx = 250 contposy = #cliYres 5
if ! #result
goto _moveStatus
_openBackPack:
event macro 8 7
gosub _waitSysVar contname = container_gump contsize = 230_204 5
if ! #result
goto _openBackPack
_moveBackPack:
set !X #cliXres - 180
contpos !X #cliYres
gosub _waitSysVar contname = container_gump contsize = 230_204 contposX = !X contposY = #cliYres 5
if ! #result
goto _moveBackPack
wait 10
_openPaperDoll:
event macro 8 1
gosub _waitSysVar contname = paperdoll_gump contid = #charid 5
if ! #result
goto _openPaperDoll
_movePaperDoll:
contpos #cliXres 0
gosub _waitSysVar contname = paperdoll_gump contid = #charid contposX = #cliXres contposY = 0 5
if ! #result
goto _movePaperDoll
namespace pop
return
;******************************************************************
sub cancelRewards
_closeVetGump:
click 300 105
wait 10
gosub _waitSysVar contname = generic_gump contsize = 510_145 2
if #result
{
contpos 0 0
goto _closeVetGump
}
_closeAOSGift:
click 75 470
wait 10
gosub _waitSysVar contname = generic_gump contsize = 520_440 2
if #result
{
contpos 50 50
goto _closeAOSGift
}
return
;******************************************************************
sub moveItem
namespace push
namespace local moveItem
set !subTimeOut #scnt + 30
set !item %1
set !x %2
set !y %3
set !amount %4
set !0 %0
finditem !item
if #findkind = -1
{
ignoreitem !item
finditem !item
if #findkind = -1
{
namespace pop
return #false
}
ignoreitem !item
}
_dragAgain:
if !subTimeOut < #scnt
{
namespace pop
return #false
}
set !timeOut #scnt + 4
wait 10
event drag !item
_waitDrag:
if #scnt > !timeOut
goto _dragAgain
if #contname notin stack_gump_drag_gump
goto _waitDrag
if #contname = stack_gump && !0 = 4
msg !amount $
if #contname = stack_gump && !0 < 4
msg $
set !timeOut #scnt + 4
_waitDragging:
if #scnt > !timeOut
goto _dragAgain
if #contname <> drag_gump
goto _waitDragging
click !x !y p
namespace pop
return #true
;***************************************************************************************************
sub checkNumber
if %1 * 1 / %1 = 1 || %1 = 0
return #true
return #false
;******************************************************************
sub checkBodCycleLine
set %lines 0
if %6 > 5 || %6 < 4
set %lines %lines + 2
if %1
set %lines %lines + 1
if %2
set %lines %lines + 1
if %3
set %lines %lines + 1
if %_3 = sacred
set %lines %lines + 1
if %4
set %lines %lines + 2
if %_0 = 5 && %5
set %lines %lines + 1
if %lines = 0
return #true
set %ySize 105 + %lines * 16
menu Clear
menu Window Title BodCycle Error Checking
menu Window Color None
menu Window Size 500 %ySize
menu Font Transparent #true
menu Font Align Right
menu Shape EUOShape1 0 52 390 45 3 7 1 Black 7 Red
menu Font Name MS Sans Serif
menu Font Size 8
menu Font Style
menu Font Color Red
menu Font Transparent #false
menu Font Align Left
menu Font BGColor None
menu Text EUOLabel1 4 4 You are seeing this menu because one or more of the parameters you put in the bodcycle line have errors
menu Text EUOLabel2 4 20 This will hopefully show you what you've done wrong and what you need to change
menu Text EUOLabel3 4 36 The bold yellow parts have errors
menu Text EUOLabel10 4 80 Gosub bodCycle
menu Text EUOLabel11 4 68 Your Line:
menu Font Color WindowText
menu Font BGColor Red
menu Text EUOLabel4 4 56 Gosub bodCycle
menu Text EUOLabel10 4 80 Gosub bodCycle
menu Text EUOLabel11 4 68 Your Line:
menu Font Style
menu Font Color
menu Text EUOLabel5 88 56 Account
menu Text EUOLabel6 136 56 Char
menu Text EUOLabel7 164 56 rail|recall
menu Text EUOLabel8 220 56 { 0 1 2 }
menu Text EUOLabel9 272 56 [Shard]
menu Text EUOLabel12 88 80 %_1
menu Text EUOLabel13 136 80 %_2
menu Text EUOLabel14 164 80 %_3
menu Text EUOLabel15 220 80 %_4
if %6 <> 4
menu Text EUOLabel16 272 80 %_5
menu Font Style b
menu Font Color Yellow
if %1
{
menu delete EUOlabel5
menu delete EUOlabel12
menu Text EUOLabel5 88 56 Account
menu Text EUOLabel12 88 80 %_1
}
if %2
{
menu delete EUOlabel6
menu delete EUOlabel13
menu Text EUOLabel6 136 56 Char
menu Text EUOLabel13 136 80 %_2
}
if %3
{
menu delete EUOlabel7
menu delete EUOlabel14
menu Text EUOLabel7 164 56 rail|recall
menu Text EUOLabel14 164 80 %_3
}
if %4
{
menu delete EUOlabel8
menu delete EUOlabel15
menu Text EUOLabel8 220 56 { 0 1 2 }
menu Text EUOLabel15 220 80 %_4
}
if %5
{
menu delete EUOlabel9
menu delete EUOlabel16
menu Text EUOLabel9 272 56 [Shard]
if %6 <> 4
menu Text EUOLabel16 272 80 %_5
}
menu Font Color WindowText
menu Button Skip 400 48 100 25 Skip Character
menu Button halt 400 75 100 25 Halt Script
set %yPos 105
menu Font Style
menu Font Color Red
menu Font BGColor None
if %6 > 5 || %6 < 4
{
menu text advice 4 %yPos You have given an invalid number of parameters ( %6 ).
set %yPos %yPos + 16
menu text advice 4 %yPos There should be max 5 and min 4, please re-read the instructions
set %yPos %yPos + 16
}
if %1
{
menu text advice 4 %yPos The Account you specified was not a number, please re-read the instructions
set %yPos %yPos + 16
}
if %2 && %_2 < 6
{
menu text advice 4 %yPos The Character you specified was not a number, please re-read the instructions
set %yPos %yPos + 16
}
if %2 && %_2 > 6
{
menu text advice 4 %yPos The character you specified is invalid ( character %_2 ).
set %yPos %yPos + 16
}
if %3
{
menu text advice 4 %yPos The movement method you specified was invalid, please choose either rail or recall
set %yPos %yPos + 16
}
if %_3 = sacred
{
menu text advice 4 %yPos To use sacred journey please choose recall, the script will then use sacred journey
set %yPos %yPos + 16
}
if %4
{
menu text advice 4 %yPos The bod type to collect was invalid ( %_4 ), please choose only 0, 1 or 2.
set %yPos %yPos + 16
menu text advice 4 %yPos 0 = smith only, 1 = tailor only, 2 = both smith and tailor.
set %yPos %yPos + 16
}
if %5
{
menu text advice 4 %yPos The shard you specified was a number.
}
menu Show 421 270
set #menubutton N/A
_menuLoop:
if #menubutton = halt
halt
if #menubutton = skip
return #false
goto _menuLoop
;******************************************************************
sub findDist
namespace push
namespace local findDist
set !x abs ( %1 - %3 )
set !y abs ( %2 - %4 )
set #result !y
if !x > !y
set #result !x
namespace pop
return #result
;******************************************************************
sub railFailMenu
set %TimeUp #scnt + 300
set %timeRem %TimeUp - #scnt
menu Clear
menu Window Title Rail Move failed
menu Window Color Black
menu Window Size 335 125
menu Font Transparent #true
menu Font Align Right
menu Shape EUOShape1 0 0 345 69 3 7 1 Black 7 Yellow
menu Font Name MS Sans Serif
menu Font Size 8
menu Font Style
menu Font Color Red
menu Font Transparent #false
menu Font Align Left
menu Font BGColor Yellow
menu Text EUOLabel1 4 4 For some reason rail movement has failed
menu Text EUOLabel2 4 20 You can either move yourself manually to the next spot and try again
menu Text EUOLabel3 4 36 or the script will logout in 5 mins time, wait 5 mins for the char to timeout.
menu Text EUOLabel4 4 52 then login with any remaining characters.
menu Font Size 14
menu Font Style b
menu Font Color Yellow
menu Font BGColor Black
menu Text EUOLabel5 85 72 What Will You Do?
menu Font Size 8
menu Font Style
menu Font Color WindowText
menu Font BGColor InactiveBorder
menu Button tryAgain 15 96 150 25 Try Again
menu Button skipChar 180 96 150 25 Skip Character ( %timeRem s )
menu Show 421 270
set #menubutton N/A
_railFailMenuLoop:
menu delete skipChar
menu Button skipChar 180 96 150 25 Skip Character ( %timeRem s )
if #menubutton = tryAgain
{
menu hide
return #true
}
if #menubutton = skipChar || %timeRem < 0
{
menu hide
return #false
}
set %timeRem %TimeUp - #scnt
wait 1s
goto _railFailMenuLoop
;******************************************************************
sub loginFailMenu
set %TimeUp #scnt + 60
set %timeRem %TimeUp - #scnt
menu Clear
menu Window Title Login Fail Menu
menu Window Color Black
menu Window Size 373 122
menu Font Transparent #true
menu Font Align Right
menu Shape EUOShape1 0 0 376 69 3 7 1 Black 7 Yellow
menu Font Name MS Sans Serif
menu Font Size 8
menu Font Style
menu Font Color Red
menu Font Transparent #false
menu Font Align Left
menu Font BGColor Yellow
menu Text EUOLabel1 4 4 For some reason login has failed. It will wait 1 minute and then try again
menu Text EUOLabel2 4 20 After 5 attemps it will skip this character. ( current attemps = %loginAttemps ).
menu Text EUOLabel3 4 36 You may login manually and then click the "login manually" button to continue
menu Text EUOLabel4 4 52 or use the skip/try again buttons.
menu Font Size 12
menu Font Style b
menu Font Color Yellow
menu Font BGColor Black
menu Text EUOLabel5 100 72 What Will You Do?
menu Font Size 8
menu Font Style
menu Font Color WindowText
menu Font BGColor BtnFace
menu Button tryagain 10 96 112 25 Try Again ( %timeRem s )
menu Button manual 254 96 112 25 Login Manually
menu Button skip 132 96 112 25 Skip Character
menu Show 421 270
set #menubutton N/A
_loginFailMenuLoop:
menu delete tryagain
menu Button tryagain 10 96 112 25 Try Again ( %timeRem s )
if #menubutton = tryagain || %timeRem < 0
return tryagain
if #menubutton = skip
return skip
if #menubutton = manual
return manual
set %timeRem %TimeUp - #scnt
wait 1s
goto _loginFailMenuLoop
;***************************************************************************************************
sub OpenCont
;%1 = id %2 = x pos %3 = y pos
namespace push
namespace local OpenCont
set !contPos #false
set !container %1
if %0 = 3
{
set !xCont %2
set !yCont %3
set !contPos #true
}
gosub checkRange !container
if ! #result
{
namespace pop
return #false
}
set !timeOut #scnt
_openContLoop:
set #lobjectid !container
if #scnt > !timeOut
{
event macro 17
set !timeOut #scnt + 3
}
if #contid <> !container
goto _openContLoop
if ! !contPos
{
namespace pop
return #true
}
_openContAt:
contpos !xCont !yCont
wait 10
if #contposx <> !xCont && #contposy <> !yCont
goto _openContAt
namespace pop
return #true
;***************************************************************************************************
sub checkRange
namespace push
namespace local checkRange
set !item %1
_rangeloop:
finditem !item
if #findkind = -1
{
namespace pop
return #false
}
if #findkind = 1 && #finddist <= 2 && abs ( #charposz - #findz ) < 20
{
namespace pop
return #true
}
if #findkind = 1
{
namespace pop
return #false
}
set !item #findbagid
goto _rangeloop
;***************************************************************************************************
tailorda sorun cıkarmaz fakat bs de sorun cıkartır cunku herkes bodcu alanında aldıgı ıcın ordaki bs ismi ve kendisi surekli degisiyor. degismeyen bir bs vendoru varsa ordan almayı dene birde lunadakini deniyebilirsin ordaki degismiyor sanırım.
tmrkymz yazmış:
bs'de de sorun çıkarmaması lazım çünkü script vendoru inceliyor blacksmith yazıyor mu isminin yanında diye.
malesef inceleme kısmını sildim. bod alma işini razorla yaptırıyorum.
ama sana gece bahsettiğim olayı yapıcam sanırım. razoru işin içinden çıkartıp belirlediğim vendorda çalışmasını sağlayacağım.
Sayfaya git: 1, 2, Sonraki | |
1. sayfa (Toplam 2 sayfa) [ 19 mesaj ] |
Bu forumda yeni başlıklar açamazsınız Bu forumdaki başlıklara cevap veremezsiniz Bu forumdaki mesajlarınızı değiştiremezsiniz Bu forumdaki mesajlarınızı silemezsiniz Bu forumdaki anketlerde oy kullanamazsınız |