[EasyUO] Stag Trophy Eval

Discussion about the technical aspects of scripting. Ask about all issues involving your freelance projects here.
Locked
User avatar
Xavian
Legendary Scribe
Posts: 485
Joined: Sun Dec 25, 2011 4:09 pm

[EasyUO] Stag Trophy Eval

Post by Xavian »

Excel Stag Calculator = Good tool.

I took it one step lazier.. This script will:
Determine the score of a trophy in your main pack.
Open a corpse and search for a trophy.
Evaluate a trophy if found.
Display the score of the trophy on the corpse, if found.
Let you know to loot if it is higher.
Will tell you compare trophy if the score is the same.
-- The higher the last digit on the weight, the better trophy if scores are the same

I don't know if there is a way to use decimals for the weight or not, nor do I care enough to investigate as it works fine the way it is.

Code: Select all

set %CurrentHigh 0
finditem BLL 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 BLL C_
If #FindCNT > 0
{
  Eval:
  Event Property #findID
  set %MountID #FindID
  gosub extract #PROPERTY Weighing , #spc #spc Weight
  set %WeightPoints %Weight / 10
  gosub extract #PROPERTY With , #spc #spc Rack
  set %RackPoints %Rack
  if Poor 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 Superior in #Property
    set %QualityPoints 30
  if Peerless in #Property
    set %QualityPoints 35
    
  set %TotalPoints %WeightPoints + %RackPoints + %QualityPoints
  event ExMsg %CorpseID 0 0 Total Points: %TotalPoints
  if %TotalPoints = %CurrentHigh
    event ExMsg %CorpseID 0 0 Compare Mounts
  if %TotalPoints > %CurrentHigh
  {
    set %CurrentHigh %TotalPoints
    event ExMsg %CorpseID 0 0 Loot Mount
  }
  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
}
Last edited by Xavian on Wed Feb 05, 2014 2:47 pm, edited 1 time in total.
User avatar
JimTheDM
Elder Scribe
Posts: 175
Joined: Sat Oct 01, 2011 10:10 pm

Re: Stag Trophy Eval

Post by JimTheDM »

What Program is this for? EasyUO or OpenUO?
Jamkul
Guild Master
Ghost Walkers Guild (GW)
User avatar
Xavian
Legendary Scribe
Posts: 485
Joined: Sun Dec 25, 2011 4:09 pm

Re: Stag Trophy Eval

Post by Xavian »

EasyUO
ahorton12
Elder Scribe
Posts: 157
Joined: Mon Dec 06, 2010 6:09 pm
Location: Onondaga Mi, USA

Re: [EasyUO] Stag Trophy Eval

Post by ahorton12 »

this doesnt seem to be working for me, is there any code that i manually need to enter to get this to check my pack? check corpses?
Eziekial Moss
User avatar
Xavian
Legendary Scribe
Posts: 485
Joined: Sun Dec 25, 2011 4:09 pm

Re: [EasyUO] Stag Trophy Eval

Post by Xavian »

There shouldn't be anything you would need to do. They are all standard values, nothing character or account specific. What does it do when you attempt to use it?
ahorton12
Elder Scribe
Posts: 157
Joined: Mon Dec 06, 2010 6:09 pm
Location: Onondaga Mi, USA

Re: [EasyUO] Stag Trophy Eval

Post by ahorton12 »

it does nothing, i have a stag trophy in my pack and i click play n nothing happens
Eziekial Moss
User avatar
Xavian
Legendary Scribe
Posts: 485
Joined: Sun Dec 25, 2011 4:09 pm

Re: [EasyUO] Stag Trophy Eval

Post by Xavian »

It doesn't do anything obvious when you hit play. Have you tried running it while killing stuff?
ahorton12
Elder Scribe
Posts: 157
Joined: Mon Dec 06, 2010 6:09 pm
Location: Onondaga Mi, USA

Re: [EasyUO] Stag Trophy Eval

Post by ahorton12 »

its working while killing stuff, just not counting my bag, ill have to look into setting it up to just click a hotkey and have it count whatever i click on. works good while killing stuff but i gotta turn my auto looter off to use it. otherwise autolooter trumps it in timing.
Eziekial Moss
User avatar
Xavian
Legendary Scribe
Posts: 485
Joined: Sun Dec 25, 2011 4:09 pm

Re: [EasyUO] Stag Trophy Eval

Post by Xavian »

It counts your bag, just doesn't let you know that it is doing so. It stores the value of the mount in your pack to compare with any mount on the corpse. I thought about adding a hotkey function, but didn't care enough as this works just fine the way it is for me.
Locked