Salve, tempo fa quando giocavo ero solito usare questo script per killare, skinnare e lootare uccelli.
Solo che al momento non va bene. Qualcuno sarebbe così caritatevole da provare a sistemarlo? ^_^
Grazie
codice:
;=============================================================
; Script Name: the Birds
; Author: Machine
; Version: 1.0
; Client Tested with: 5.0.8.1
; EUO version tested with: 1.5
; Shard OSI / FS: Only tested on Alexandria. Should work
; wherever item types are same
; Revision Date: 22/02/2007
; Public Release: 22/02/2007
; Global Variables Used: NONE
; Purpose:
; Makes all birds attack you, also automatically cuts and
; collects feathers and raw birds if desired.
; Script thread:
; http://www.easyuo.com/forum/viewtopic.php?p=266119
;=============================================================
; ============================================================
; INFO:
; This script makes all birds around you attack you, Hitchcock
; style. After the birds are dead, the script can cut and loot
; the feathers and raw birds if desired. If you are running
; this script together with a proper looter it's best to
; disable the built-in looter since it is very primitive. It
; only loots feathers and (optionally) raw birds, leaving
; everything else.
; If you turn off the option to loot it should run smoothly
; with any looter scripts you may have running.
; DISCLAIMER:
; This script does NOT have any attack or healing functions,
; it merely makes sure that all birds around attack you. And
; frankly, if you get killed by a bird, you deserved to die ;)
; ============================================================
; ===========================
; SCRIPT BEHAVIOUR
; EDIT BELOW
; ===========================
; Set this to #false if you use an external looter, else
; #true
set %doLooting #true
; Set %featherBag to the id of the bag you want the looter
; to use. Defaults to your backpack
set %featherBag #backpackId
; Set to #true if you want to loot raw birds
set %collectRawBirds #false
; Set to #true if you want to close any opened corpses
set %closeCorpse #false
; Set to #true if you want to experience the Birds...
set %scaryMode #false
; ===========================
; ITEM AND BIRD TYPES
; ===========================
set %birdTypes WC_TC
set %rawBirdType PUD
set %featherType VLK
initEvents
set #lpc 5
if #doLooting = #true
{
display ok Target a weapon to be used in cutting corpses
gosub getTargetIDType
set %knife #result
}
loop:
gosub attackBird
if %doLooting = #true
gosub lootBird
goto loop
sub attackBird
findItem %birdTypes G_15
set !result #findcnt <> 0
if #findcnt > 0
{
namespace push
namespace Local Attacker
set !lTargetId #lTargetId
for !i 1 #findcnt
{
set #findindex !i
if #findId notin !oldTargets && %scaryMode = #true
{
set !oldTargets !oldTargets , _ , #findId
event ExMsg #charId 3 33 Another bird sweeps down to attack you!
}
set #lTargetId #findId
set #lTargetKind 1
event Macro 27
}
set #lTargetId !lTargetId
namespace pop
}
return !result
sub walk
return
sub lootBird
gosub equipTool %knife id
findItem YFM
if #findcnt <> 0
{
set !lTargetId #lTargetId
for !i 1 #findCnt
{
set #findIndex !i
set #lTargetId #findId
set #lTargetKind 1
event Macro 17
target 5s
event Macro 22
wait 5
set !birdId #lTargetId
gosub openCorpse !birdId
if #result = #true
{
gosub getFeathers
if %closeCorpse = #true
gosub closeCorpse !birdId
ignoreItem !birdId corpses
}
}
set #lTargetId !targetId
}
return
sub equipTool
namespace Push
namespace Local Equip
set !types %1
if %0 > 1
set %argType %2
if %argType = id
set #lObjectId %1
else
{
findKnife:
findItem !types C_ , #backpackId
if #findcnt = 0
findItem !types C_ , #charId
if #findcnt = 0 6
{
set #sysmsgcol 33
event Sysmessage Unable to locate a knife! Script paused.
pause
goto findKnife
}
set #lObjectId #findId
}
namespace Pop
return
sub openCorpse
namespace push
namespace Local openCorpse
set !id %1
set !lObjectId #lObjectId
set #lObjectId !id
set #nextCPosX 0
set #nextCPosY 0
event Macro 17
gosub waitForVar contid = #lObjectId
set #lObjectId !lObjectId
namespace pop
return #result
sub closeCorpse
namespace push
namespace Local closeCorpse
set !gumpId %1
set !lObjectId #lObjectId
set #lObjectId !gumpId
event Macro 17
gosub waitForVar contid = !gumpId
if #result = #true
{
str Pos #contsize _
set !_Pos #strRes
str Len #contSize
set !xLen !_Pos - 1
set !yLen #strRes - !_Pos
str Left #contSize !xLen
set !xSize #strres
set !x #contPosX + !xSize / 2
str Right #contSize !yLen
set !y #contPosy + #strRes / 2
wait 5
click !x !y dmc r
}
set #lObjectId !lObjectId
namespace pop
return #result
sub getFeathers
set !toFind %featherType
if %collectRawBirds = #true
set !toFind %featherType , _ , %rawBirdType
findItem !toFind C_ , #contId
if #findcnt <> 0
{
for !i 1 #findCnt
{
set #findIndex !i
exEvent drag #findId #findStack
wait 15
exEvent dropc %featherBag
wait 20
}
}
return
sub waitForVar
set %timeout #time + 5
if %0 > 3
set %timeout #time + %4
waitForVarLoop:
if # . %1 %2 %3
return #true
if #time >= %timeout
return #false
goto waitForVarLoop
sub GetTargetIDType
set #targCurs 1
targLoop:
if #targCurs = 1
goto targLoop
finditem #lTargetID
if %1 = Type
return #FINDTYPE
return #lTargetID
Grazie




: algander#6292
Commenta