[EasyUO]Oint Assistant

If you make a Client-side script you can publish it here for other players to use
Locked
Alaskan
Expert Scribe
Posts: 36
Joined: Sun Jul 14, 2013 2:08 pm
Location: Trinsic Bank

[EasyUO]Oint Assistant

Post by Alaskan »

A little helper script to assist with ointing pets. It will make the three major oint types and also apply them. If you have more than one of the major oint types then it will proceed to apply all of the major oint types until there are none left in your backpack.

Code: Select all

;=================================================================
; Script Name: Alaskan's Oint Assistant
; Author: Alaskan
; Version: 1.4
; Shard OSI / FS: FS OK
; Revision Date: 10/28/2014
; Purpose: Makes vitality, endurance or dexterity ointments and allows you to oint your pet. This will continue to
; make/apply the ointments so it is up to you to make sure that you have the correct amount or it will keep going.
;
;Suggestions or issues message Alaskan on the UOEX forums.
;=================================================================

set %oints WLF
;JUF= BloodMoss | JZF = Ginseng | KUF = Black Pearl

display Target the container where your oints and regs are. It must be different than your main backpack.
bagcheck:
set #targcurs 1
while #targcurs = 1
  wait 5
set %resource_bag #ltargetid
set #ltargetkind 1
display yesno Is this the correct container? Click yes to continue
if #dispres = no
  goto bagcheck
if %resource_bag = #backpackid
{
  display You must select a different bag than your backpack
  goto bagcheck
}
wait 10
set #lobjectid %resource_bag
event macro 17 0
wait 10
contpos 611 396
wait 10

gosub OintMenu

main:
if #menubutton = hp
{
  set #menubutton n/a
  gosub hp_oints
}
if #menubutton = dex
{
  set #menubutton n/a
  gosub dex_oints
}
if #menubutton = stam
{
  set #menubutton n/a
  gosub stam_oints
}
if #menubutton = pet
{
  set #menubutton n/a
  gosub oint_pet
}
goto main

sub hp_oints
hpoints:
  gosub oint_check
  if #result = #false
    return
  finditem jzf c_ , %resource_bag
  if #findcnt < 1
  {
    display No ginseng found. Put ginseng in the bag you targeted.
    return
  }
  if #findcnt > 0 && #findstack < 140
  {
    display You need minimum of 140 ginseng to make hp oints. Please add more.
    return
  }
  set #ltargetid #findid
  set #ltargetkind 1
  finditem %oints c_ , %resource_bag
  set #lobjectid #findid
  event macro 17 0
  wait 10
  event macro 22 0
  wait 10
  goto hpoints
return

sub dex_oints
dexoints:
  gosub oint_check
  if #result = #false
    return
  finditem juf c_ , %resource_bag
  if #findcnt < 1
  {
    display No bloodmoss found. Put bloodmoss in the bag you targeted.
    return
  }
  if #findcnt > 0 && #findstack < 90
  {
    display You need minimum of 90 bloodmoss to make dex oints. Please add more.
    return
  }
  set #ltargetid #findid
  set #ltargetkind 1
  finditem %oints c_ , %resource_bag
  set #lobjectid #findid
  event macro 17 0
  wait 10
  event macro 22 0
  wait 10
  goto dexoints
return

sub stam_oints
stamoints:
  gosub oint_check
  if #result = #false
    return
  finditem kuf c_ , %resource_bag
  if #findcnt < 1
  {
    display No blackpearl found. Put blackpearl in the bag you targeted.
    return
  }
  if #findcnt > 0 && #findstack < 140
  {
    display You need minimum of 140 blackpearl to make stam oints. Please add more.
    return
  }
  set #ltargetid #findid
  set #ltargetkind 1
  finditem %oints c_ , %resource_bag
  set #lobjectid #findid
  event macro 17 0
  wait 10
  event macro 22 0
  wait 10
  goto stamoints
return

sub oint_pet
  finditem %oints c_ , #backpackid
  if #findcnt < 1
  {
    display No ointments found, make sure you have either vitality, endurance or dexterity ointments in your
    + backpack
    return
  }
  if #findcnt > 0
  {
    event property #findid
    if vitality && endurance && dexterity notin #property
    {
      display No vitality, endurance or dexterity oints found. Move either of those oints to your main backpack.
      return
    }
    display Oinments found, target the pet you want to oint.
    set #lobjectid #findid
    event macro 17 0
    wait 10
    while #targcurs = 1
      wait 5
    set %pet #ltargetid 
    set #ltargetkind 1
ointpet:
    finditem %oints c_ , #backpackid
    if #findcnt < 1
    {
      display No ointments found, make sure you have either vitality, endurance or dexterity ointments in your
      + backpack
      return
    }
    if #findcnt > 0
    {
      event property #findid
      if vitality && endurance && dexterity notin #property
      {
        display No vitality, endurance or dexterity oints found. Move either of those oints to your main backpack.
        return
      }
      set #lobjectid #findid
      set #ltargetid %pet
      set #ltargetkind 1
      event macro 17 0
      wait 10
      event macro 22 0
      wait 10
      goto ointpet
    }
  }
return

sub oint_check
  finditem %oints c_ , %resource_bag
  if #findcnt < 1
  {
    display No ointments found. Put ointments in the bag you targeted.
    return #false
  }
return

sub OintMenu
  menu clear
  menu window title Alaskan's Oint Assistant
  menu window color black
  menu window size 250 150
  menu font name comic sans
  menu font size 8
  menu font color red
  menu font transparent #false
  menu font align left
  menu button hp 30 20 200 25 HP Oints
  menu button dex 30 50 200 25 Dex Oints
  menu button stam 30 80 200 25 Stam Oints
  menu button pet 30 110 200 25 Oint Pet
  menu show 1300 800
return
Locked