Searches corpses for feathers and evaluates them.
Displays the value of feathers on corpse and tells you to loot if they are higher than your current feathers.
I got lazy and didn't want to keep checking feather and doing math anymore
Code: Select all
set %CurrentHigh 0
set %Bagcheck 0
finditem QFF C_ , #BackpackID
If #FindCNT > 0
goto Eval
Top:
Finditem YFM G_2 ; Look for corpses on the ground
If #FindCNT > 0
{
set #LObjectID #FindID
set %CorpseID #FindID
event macro 17 0
ignoreitem #FindID
wait 10
finditem QFF C_
If #FindCNT > 0
{
Eval:
Event Property #findID
set %MountID #FindID
gosub extract #PROPERTY Are , #spc #spc Length
gosub extract #PROPERTY A , #spc #spc Quality
if Poor in #Property
set %QualityPoints 5
if Low in #Property
set %QualityPoints 10
if Fair in #Property
set %QualityPoints 15
if Average in #Property
set %QualityPoints 20
if Above in #Property
set %QualityPoints 25
if High in #Property
set %QualityPoints 30
if Peerless in #Property
set %QualityPoints 40
gosub extract #PROPERTY Are , #spc #spc Colors
if Bright in #Property
set %ColorPoints 6
if Flashy in #Property
set %QualityPoints 12
if Sparkling in #Property
set %ColorPoints 18
if Vivid in #Property
set %ColorPoints 22
if Vibrant in #Property
set %ColorPoints 26
if Glistening in #Property
set %ColorPoints 32
if Shimmering in #Property
set %ColorPoints 38
set %TotalPoints %Length + %ColorPoints + %QualityPoints
if %bagcheck = 0
{
event sysmessage Current Feathers are %totalpoints points.
set %bagcheck = 1
}
event ExMsg %CorpseID 0 0 Total Points: %TotalPoints
if %TotalPoints > %CurrentHigh
{
set %CurrentHigh %TotalPoints
event ExMsg %CorpseID 0 0 Loot Feathers
}
ignoreitem %MountID
}
}
wait 10
Goto Top
sub extract
{
set %weaponString %1
set %leftOf %2
set %rightOf %3
str Pos %weaponString %leftOf
set %tempPos #STRRES
str Len %leftOf
set %tempPos %tempPos + #STRRES - 1
str Del %weaponString 1 %tempPos
set %weaponString #STRRES
str Pos %weaponString %rightOf
set %tempPos #STRRES - 1
str Left %weaponString %tempPos
set % . %4 #STRRES
return
}