Holzfäller Script, funktioniert nicht richtig!

Hallo zusammen,
ich bin neu hier auf Sigena,
ich habe eine Frage bezüglich eines Scripts, irgendwie läuft das nicht so rund.
Wenn mein Charakter am Holz hacken ist und er zum nächsten Baum geht und dort die meldung kommt " Hier gibt es kein verwertbares Holz" hört er auf.
Danach geht er nicht weiter und ich muss es über easy Uo neustarten, weiß jemand zufällig wo der Fehler liegt? und kann ihn in einem Kommentar einfügen?
Sript---->
set %packy BO_WN
set %jrnl #jindex - 1
set %wdist *3
for %y -2 2
Gosub Setup
MainLoop:
Gosub FindTree
Gosub MoveToTree
Gosub ChopTrees
Gosub DropWood
Wait 1
Goto MainLoop
Sub ChopTrees
Set #LObjectID %AxeID
Set #LTargetX %MoveToX
Set #LTargetY %MoveToY
Set #LTargetZ 0
Set #LTargetKind 3
Set #LTargetTile %TileType
ChopAgain:
Event Macro 17
Target
Event Macro 22
Wait 5 s
Set %Timer ( #SCnt + 2 )
JournalScanner:
Wait 1
If %Timer < #SCnt
Goto ChopAgain
If #Weight > #MaxWeight
{
Gosub DropWood
Goto ChopAgain
}
ScanJournal 1
If Ihr_legt in #Journal
Goto ChopAgain
If gibt_es_kein_verwertbares in #Journal
Abbruck in #Journal
{
deletejournal
}
wait 1 s
}
wait 5 s
if %counter_2 >= 6
{
return
}
Goto JournalScanner
Sub MoveToTree
Set %StartPosX #CharPosX
Set %StartPosY #CharPosY
Set %Timer ( #SCnt + 6 )
StillMoving:
Move %MoveToX %MoveToY 1
If %Timer < #SCnt
Goto TimedOut
If #CharPosX <> %MoveToX || #CharPosY <> %MoveToY
Goto StillMoving
TimedOut:
If #CharPosX > ( %MoveToX + 2 ) || #CharPosY > ( %MoveToY + 2 )
{
Display OK Du kommst nicht nah genug an einen Baum.
Halt
}
Return
Sub FindTree
Set %StartX ( #CharPosX - 5 )
Set %StartY ( #CharPosY - 5 )
Set %EndX ( #CharPosX + 5 )
Set %EndY ( #CharPosY + 5 )
Tile Init
FindTree:
For %SearchY %StartY %EndY
{
For %SearchX %StartX %EndX
{
Tile Get %SearchX %SearchY 1 #CursKind
Tile Cnt %SearchX %SearchY #CursKind
If #TileCnt > 1
{
Set %EndLoop #TileCnt
For %Loop 0 %EndLoop
{
Tile Get %SearchX %SearchY %Loop
Set %TileType #TileType
If _ , #TileType , _ in %Trees
{
Set %MoveToX %SearchX
Set %MoveToY %SearchY
Set %ChopZ #TileZ
Set %TileType #TileType
Return
}
}
}
}
}
Display OK No Tiles found
Halt
Return
Sub Setup
Set %Trees _3274_3275_3276_3277_3278_3279_3280_3281_3282_3283_3284_3285_
+3286_3287_3288_3289_3290_3291_3292_3293_3294_3295_3296_3297_
+3298_3299_3300_3301_3302_3304_3320_3321_3322_3323_3324_3325_
+3326_3327_3328_3329_3330_3331_3393_3394_3395_3396_3397_3398_
+3399_3400_3401_3402_3403_3404_3405_3406_3407_3408_3409_3410_
+3411_3415_3416_3417_3418_3419_3420_3421_3422_3423_3424_3425_
+3426_3427_3428_3429_3430_3431_3432_3433_3438_3439_3440_3441_
+3442_3443_3444_3445_3446_3447_3448_3449_3450_3451_3452_3453_
+3454_3455_3460_3461_3462_3463_3464_3465_3466_3467_3468_3469_
+3470_3471_3472_3477_3478_3479_3481_3482_3483_3485_3486_3487_
+3489_3490_3491_3493_3494_3495_3497_3498_3499_4789_4790_4791_
+4792_4793_4794_4795_4796_4797_4798_4799_4801_4802_4803_4804_
+4805_4806_4807_8781_8778_3496_
Set %AxeTypes ZRF_CSF_BSF_MSF_LSF_OSF_NSF_ISF_JOH_UOH_SMH_RMH_MPH_LPH_
+FSF_ASF_QCO_OFR_SFR
FindItem %AxeTypes C_ , #BackPackID
If #FindKind = -1
FindItem %AxeTypes C_ , #CharID
If #FindKind = -1
{
Display OK Du hast keine Axt.
Halt
}
Set %AxeID #FindID
Return
Sub DropWood
holzumlagern:
if #weight => #maxweight
ignoreitem reset
{
set #nextcposx 765
set #nextcposy 555
set %2 0
set %1 0
tryagain:
finditem %packy G_1
if #findkind = -1
{
set %1 %1 + 1
if %1 > 2
{
event sysmessage Packtier nicht gefunden. Script stopt!!!
pause
}
event macro 1 0 All come
wait 2s
goto tryagain:
}
if #findkind > -1
{
set #lobjectid #findid
event macro 17 0
wait 1s
}
set %2 %2 + 1
if %2 > 6
{
event sysmessage Packpferd voll?
pause
set %2 0
}
finditem ZLK C_ , #backpackid
if #findkind = -1
{
return
}
if #findcol = 0
{
event drag #findid
msg all come $
click 873 664 p
wait 1s
goto holzumlagern
}
if #findcol <> 0
{
event drag #findid
msg all come $
click 840 650 p
wait 1s
goto holzumlagern
}
}
Return
<-----Script endet
Mit freundlichen grüßen
Hercules(Neuling)
ich bin neu hier auf Sigena,
ich habe eine Frage bezüglich eines Scripts, irgendwie läuft das nicht so rund.
Wenn mein Charakter am Holz hacken ist und er zum nächsten Baum geht und dort die meldung kommt " Hier gibt es kein verwertbares Holz" hört er auf.
Danach geht er nicht weiter und ich muss es über easy Uo neustarten, weiß jemand zufällig wo der Fehler liegt? und kann ihn in einem Kommentar einfügen?
Sript---->
set %packy BO_WN
set %jrnl #jindex - 1
set %wdist *3
for %y -2 2
Gosub Setup
MainLoop:
Gosub FindTree
Gosub MoveToTree
Gosub ChopTrees
Gosub DropWood
Wait 1
Goto MainLoop
Sub ChopTrees
Set #LObjectID %AxeID
Set #LTargetX %MoveToX
Set #LTargetY %MoveToY
Set #LTargetZ 0
Set #LTargetKind 3
Set #LTargetTile %TileType
ChopAgain:
Event Macro 17
Target
Event Macro 22
Wait 5 s
Set %Timer ( #SCnt + 2 )
JournalScanner:
Wait 1
If %Timer < #SCnt
Goto ChopAgain
If #Weight > #MaxWeight
{
Gosub DropWood
Goto ChopAgain
}
ScanJournal 1
If Ihr_legt in #Journal
Goto ChopAgain
If gibt_es_kein_verwertbares in #Journal
Abbruck in #Journal
{
deletejournal
}
wait 1 s
}
wait 5 s
if %counter_2 >= 6
{
return
}
Goto JournalScanner
Sub MoveToTree
Set %StartPosX #CharPosX
Set %StartPosY #CharPosY
Set %Timer ( #SCnt + 6 )
StillMoving:
Move %MoveToX %MoveToY 1
If %Timer < #SCnt
Goto TimedOut
If #CharPosX <> %MoveToX || #CharPosY <> %MoveToY
Goto StillMoving
TimedOut:
If #CharPosX > ( %MoveToX + 2 ) || #CharPosY > ( %MoveToY + 2 )
{
Display OK Du kommst nicht nah genug an einen Baum.
Halt
}
Return
Sub FindTree
Set %StartX ( #CharPosX - 5 )
Set %StartY ( #CharPosY - 5 )
Set %EndX ( #CharPosX + 5 )
Set %EndY ( #CharPosY + 5 )
Tile Init
FindTree:
For %SearchY %StartY %EndY
{
For %SearchX %StartX %EndX
{
Tile Get %SearchX %SearchY 1 #CursKind
Tile Cnt %SearchX %SearchY #CursKind
If #TileCnt > 1
{
Set %EndLoop #TileCnt
For %Loop 0 %EndLoop
{
Tile Get %SearchX %SearchY %Loop
Set %TileType #TileType
If _ , #TileType , _ in %Trees
{
Set %MoveToX %SearchX
Set %MoveToY %SearchY
Set %ChopZ #TileZ
Set %TileType #TileType
Return
}
}
}
}
}
Display OK No Tiles found
Halt
Return
Sub Setup
Set %Trees _3274_3275_3276_3277_3278_3279_3280_3281_3282_3283_3284_3285_
+3286_3287_3288_3289_3290_3291_3292_3293_3294_3295_3296_3297_
+3298_3299_3300_3301_3302_3304_3320_3321_3322_3323_3324_3325_
+3326_3327_3328_3329_3330_3331_3393_3394_3395_3396_3397_3398_
+3399_3400_3401_3402_3403_3404_3405_3406_3407_3408_3409_3410_
+3411_3415_3416_3417_3418_3419_3420_3421_3422_3423_3424_3425_
+3426_3427_3428_3429_3430_3431_3432_3433_3438_3439_3440_3441_
+3442_3443_3444_3445_3446_3447_3448_3449_3450_3451_3452_3453_
+3454_3455_3460_3461_3462_3463_3464_3465_3466_3467_3468_3469_
+3470_3471_3472_3477_3478_3479_3481_3482_3483_3485_3486_3487_
+3489_3490_3491_3493_3494_3495_3497_3498_3499_4789_4790_4791_
+4792_4793_4794_4795_4796_4797_4798_4799_4801_4802_4803_4804_
+4805_4806_4807_8781_8778_3496_
Set %AxeTypes ZRF_CSF_BSF_MSF_LSF_OSF_NSF_ISF_JOH_UOH_SMH_RMH_MPH_LPH_
+FSF_ASF_QCO_OFR_SFR
FindItem %AxeTypes C_ , #BackPackID
If #FindKind = -1
FindItem %AxeTypes C_ , #CharID
If #FindKind = -1
{
Display OK Du hast keine Axt.
Halt
}
Set %AxeID #FindID
Return
Sub DropWood
holzumlagern:
if #weight => #maxweight
ignoreitem reset
{
set #nextcposx 765
set #nextcposy 555
set %2 0
set %1 0
tryagain:
finditem %packy G_1
if #findkind = -1
{
set %1 %1 + 1
if %1 > 2
{
event sysmessage Packtier nicht gefunden. Script stopt!!!
pause
}
event macro 1 0 All come
wait 2s
goto tryagain:
}
if #findkind > -1
{
set #lobjectid #findid
event macro 17 0
wait 1s
}
set %2 %2 + 1
if %2 > 6
{
event sysmessage Packpferd voll?
pause
set %2 0
}
finditem ZLK C_ , #backpackid
if #findkind = -1
{
return
}
if #findcol = 0
{
event drag #findid
msg all come $
click 873 664 p
wait 1s
goto holzumlagern
}
if #findcol <> 0
{
event drag #findid
msg all come $
click 840 650 p
wait 1s
goto holzumlagern
}
}
Return
<-----Script endet
Mit freundlichen grüßen
Hercules(Neuling)