Discordance Makrosu,
Sadece Compossion Meer, orta bahçenin etrafında çalışır. Çünki, Bu bölgede 10 x 10 luk bir karede yürüyerek kasar. Eliniz ile kasacağınızdan daha hızlıdır yani :P
Kod:
;================================================
; Script Name: Disco Meer's
; Author: Aastrom
; Version: 1.0
; Client Tested with: 6.0.11.0
; EUO version tested with: 1.5
; Shard OSI / FS: Alexandria
; Revision Date: 2008-12-14
; Public Release: 2008-12-14
; Purpose: Trains Discord to 120. Moves about the Meers and Discord them.
;Special Thanks: ScriptFellow for his pathFind Sub
;=================================================
set %x 1772
set %y 77
set %z -28
Set %inst QRF_NRF_MQF_PRF_LQF_OQF_QRF_RGP_KRF
Set %targets IGB_HGB_NGB_OGB ;Eternal,Captain,Warrior,Mage
gosub menu
;--------------------------------------------------
;--------------------------------------------------
loop:
finditem %inst C_ , #BACKPACKID
set #lobjectid #findid
wait 10
event macro 17
wait 10
gosub pathFind %x %y %z 2 5
gosub play
gosub pathFind 1772 68 -28 0 1
gosub play
gosub pathFind 1772 58 -28 0 1
gosub play
gosub pathFind 1779 58 -28 0 1
gosub play
gosub pathFind 1788 58 -28 0 1
gosub play
gosub pathFind 1795 58 -28 0 1
gosub play
gosub pathFind 1803 58 -28 0 1
gosub play
gosub pathFind 1803 68 -28 0 1
gosub play
gosub pathFind 1803 77 -28 0 1
gosub play
gosub pathFind 1795 77 -28 0 1
gosub play
gosub pathFind 1788 77 -28 0 1
gosub play
gosub pathFind 1779 77 -28 0 1
gosub play
ignoreitem reset
goto loop
;--------------------------------------------------
;--------------------------------------------------
;==================================================
Sub Play
;==================================================
set %scnt ( #scnt + 3 )
if #CHARPOSZ <> -28
{
set %x 1039
set %y 580
set %z -73
gosub pathFind %x %y %z 5 5
}
event macro 13 15 ; Discord
set %timer #scnt + 5
wait 10
Repeat:
finditem %targets G_10
set #ltargetid #findid
If #FindDist > 12
{
if #scnt > %timer
return
goto Repeat
}
wait 10
event macro 22 0
set %ignorelst #findid
Set %SkillCheck Disc
Set %Skill Discordance
Set *Attempts ( *Attempts + 1 )
if #findid = X
{
ignoreitem reset
}
gosub SkillCheck
Menu delete Attempts
Menu Text Attempts 80 3 *attempts
ignoreitem %ignorelst
Return
;--------------------------------------------------
;==================================================
Sub SkillCheck
;==================================================
chooseskill disc real
if #skill = #skillcap
{
set %currentskill #skill
menu set current %currentskill
wait 10
display You have reached your skill cap.$
halt
}
if #skill > %currentskill
{
Set %currentskill #skill
str len %currentskill
str ins %currentskill #dot #strRes
Menu Font Size 10
Menu Font Color Black
Menu delete currentskill
Menu text currentskill 145 20 #strRes
Set %totalgains %currentskill - %startingskill
str len %totalgains
str ins %totalgains #dot #strRes
Menu delete totalgains
Menu Font Color Red
Menu text totalgains 195 20 + #strRes
}
Return
;--------------------------------------------------
;==================================================
; Name: pathFind
; Author: ScriptFellow (the.WZA)
; Parameters: %1 = X
; %2 = Y
; %3 = Z
; %4 = tolerance
; %5 = timeout (in seconds)
; Purpose: Pathfind to the given coordinates
; Return: %return (#true or #false )
;---------------------------------------------------
sub pathFind
set %_x %1
set %_y %2
if %0 <= 2 || %2 = N/A
set %_z -1
else
set %_z %3
if %0 <= 3 || %3 = N/A
set %_tolerance 0
else
set %_tolerance %4
if %0 <= 4
set %_endTime #sCnt + 15
else
set %_endTime #sCnt + %5
set %return #false
deleteJournal
scanJournal 2
event PathFind %_x %_y %_z
;_pathFindScanAgain:
;scanJournal 1
;if pathfinding in #journal
; goto _pathFindOkay
;if can't_get_there in #journal || #sCnt > %_endTime
;return
;goto _pathFindScanAgain
_pathFindOkay:
gosub _pathFindDist %_x %_y %_z #charPosX #charPosY #charPosZ
set %return %return <= %_tolerance
if %return
{
if %_tolerance > 0
{
set %1 #cliLeft + #cliXRes / 2
set %2 #cliTop + #cliYRes / 2
if #charDir < 3
set %1 %1 + 1
else
{
if #charDir > 3 && #charDir < 7
set %1 %1 - 1
}
if #charDir = 0 || #charDir = 6
set %2 %2 - 1
else
{
if #charDir > 1 && #charDir < 5
set %2 %2 + 1
}
click %1 %2 R
}
return
}
if #sCnt > %_endTime
return
goto _pathFindOkay
sub _pathFindDist
set %1 %1 - %4 abs
set %2 %2 - %5 abs
set %3 %3 - %6 abs
gosub max %1 %2 %3
return
; to be defined
sub max
set %return %1
for %_idx 2 %0
{
if % . %_idx > %return
set %return % . %_idx
}
return
;--------------------------------------------------
;==================================================
Sub Menu
;==================================================
Menu Window Title 10X10 Walk'n Disco Trainer
Menu Window Color Silver
Menu Window Size 250 50
Menu Font BGColor Silver
Menu Font Color Yellow
Menu Font Size 12
Menu Font Color Black
Menu Font Size 10
Menu Text Titles 13 20 Discordance
chooseskill disc real
set %startingskill #skill
set %currentskill #skill
str len %startingskill
str ins %startingskill #dot #strRes
menu Text startingskill 100 20 #strRes
str len %currentskill
str ins %currentskill #dot #strRes
menu text currentskill 145 20 #strRes
set %totalgains %currentskill - %startingskill
str len %totalgains
str ins %totalgains #dot #strRes
menu Text totalhgains 195 20 + #strRes
Set *Attempts *Attempts
Menu Font Size 10
Menu Text Titles 15 3 Attempts:
Menu Text Attempts 80 3 *Attempts
Menu Font Align Left
Menu Show
Return
;--------------------------------------------------