Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - freddy

Pages: [1] 2 3 ... 19
1
Scripting Chat / Re: Attach the monster script
« on: July 28, 2023, 09:13:19 AM »
It's been awhile since I've used this script, but I wrote it to attack the closest monster and follow it if it runs away.

http://www.scriptuo.com/index.php?topic=8886.msg94269#msg94269

I mostly used it to farm horned leather from wyverns and added it because they like to run. Let me know if you decide to use or have any questions.

2
Character skill advancement / Re: Freddy's Poison Express
« on: July 13, 2023, 11:44:12 AM »
As a true UO mooch I got the script and hit play and of course did not reading it or any of the comments first. It started and was doing its thing so I went to the script to read as I am trying to learn the basics of scripting. Not far in @ all I found a line marked false that sounded really good and I wanted it to do that so stooped it and changed it to true.

This was the best surprise of any script i have ever run. Works amazing used an aos and in 15 min went from 25 to almost 70

I'm glad to hear the script still works. Its been awhile since I've trained skills, especially poisoning. Thanks for letting me know!

3
Scripting Chat / Re: Neo is better than we think
« on: January 18, 2023, 05:18:45 PM »
I'm pretty sure the only script i still use regularly uses a sub from neo to buy from vendors. I've been using forever and it still works. It's one of the few things I've never needed to write myself because it works so well. Tbh i have no idea if I asked if I could use it (I'm hoping i did) - thx, it still works 10+ years later

4
Site News / Re: Forum Updates
« on: December 13, 2019, 12:24:18 AM »
VBulletin is terrible - that I have more experience with and hated every moment of it.


I really liked using vbulletin with the last site I ran (a decade now ago?) - lots of customization, but that was also in 2009 lol. I was able to add a lot of cool stuff, but I know the internet has changed a lot since then.  i don't think it's worth the money these days.

Personally, I think SUO is fine how it is - a redesign/change of platform isn't going to attract a ton of new users because nobody really cares about UO anymore. Why change things up when scriptuo works fine as it is?

5
Script Debug / Re: Bag of Sending
« on: October 20, 2019, 10:06:51 PM »
idk if this is gonna answer your question, but this is how i hande BoS - it's pretty old, but it worked great for me,

Code: [Select]
;=====================================Bag Of Sending===================================================
set %use_bos #true ;set to  #true if you want to use a Bag of Sending
set %refil_bos #true ;set to #true if you want to script to refil your Bag of sending
set %refil_limit 1 ;Amount of charges left before recharging your BoS
;=====================================Skin & Leather===================================================

gosub bagofsending POF_ #findstack ;#findstack can be any variable that reprisents how much of whatever you want to send

;--------------------------------------------------------------
;--------------------------------------------------------------
sub bagofsending
  set %sendloot %1
  if %1 = pof && %2 < %lim
    return
  set *charge . %bos *charge . %bos + 1
  gosub scan_charges %bos
  set %curcharge #result
  if #result <= %refil_limit
  {
    if %refil_bos = #true
      gosub refill_bos
    else
      set %training_mode #true
  }
  finditem %bos C_ , #backpackid
  if #findkind <> -1
  {
    gosub separate_string %sendloot _
    set %loot_loop 1
    for %i 1 %t_num
    {
      set %loot_search %return . %loot_loop
      finditem %loot_search C_ , #backpackid
      for #findindex 1 #findcnt
      {
        if #findkind <> -1
        {
          wait 15
          set #lobjectid %bos
          event macro 17 0
          target 5s
          wait 10
          set #ltargetid #findid
          event macro 22 0
          set %try4 %try4 +1
          if %try4 > 4
          {
            set %try4 0
            break
          }
        }
      }
      set %loot_loop %loot_loop + 1
    }
  }
  else
  {
    event macro 3 0 Can't Find your BoS. Reverting to Training mode
    set %training_mode #true
  }
  set %chargeused %chargeused + 1
return
;--------------------------------------------------------------
;--------------------------------------------------------------
sub set_bos
  finditem CKF C_ , #backpackid
  if #findkind <> -1
  {
    for #findindex 1 #findcnt
    {
      gosub scan_charges #findid
      set %curcharge #result
      if %curcharge >= 1
      {
        set %bos #findid
        return
      }
    }
  }
  else
  {
    Display You do not have a bag of sending in your pack. Set Use_BoS to False and restart
    halt
  }
return
;--------------------------------------------------------------
;--------------------------------------------------------------
sub scan_charges
  finditem %1 C_ , #backpackid
  set %tempid #findid
  event property #findid
  set %string #property
  str len %string
  set %length #strres
  str pos %string s:
  set %del #strres + 2
  str del %string 1 %del
  set %string #strres
  str len %string
  set %l #strres
  set %movestr %strres - 1
  str pos %string $
  set %del #strres
  str del %string %del %l
return  #strres
;--------------------------------------------------------------
;--------------------------------------------------------------
sub refill_bos
  finditem EUO C_ , #backpackid
  if #findkind <> -1
  {
    set #lobjectid #findid
    event macro 17 0
    target 5s
    wait 10
    set #ltargetid %bos
    event macro 22 0
    wait 10
    gosub journal2 saturated
    if #result = #true
    {
      event macro 3 0 Your BoS cannot be charged. Reverting to training mode
      set %training_mode #true
      return #false
    }
  }
  else
  {
    event macro 3 0 Can't Find your Powder of Fortification. Reverting to Training mode
    set %training_mode #true
    return #false
  }
return
;-------------------------------------------------------------
;-------------------------------------------------------------
sub separate_string
  set %t_num 0
  str Count %1 %2
  for %i 1 #strres
  {
    set %var %2
    str len %1
    set %length #strres
    str pos %1 %var
    set %del #strres - 1
    str left %1 %del %length
    set %return . %i #strres
    set %del1 %del + 1
    str del %1 1 %del1
    set %1 #strres
    set %t_num %t_num + 1
  }
return
;----------------------------------------------------------------------
;----------------------------------------------------------------------



i don't think that snippet would work, but it shows you how to go through the process of using/recharging a BoS and switching to a new one .

I use it mainly in my dex farmer

Code: [Select]
;==================================
; Script Name: Freddy's Dexxer Farmer
; Author: Freddy
; Version: 1.9.3
; Client Tested with: 7. something
; EUO version tested with: 1.5 (Build 202)
; Shard: OSI
; Revision Date: 5/25/12
; Public Release: 12/31/07
; Subs used:
;==================================
set %use_new_menu #true
set %cast_ev #false
;---------DO NOT EDIT BELOW UNLESS YOU CHOOSE NOT TO USE THE MENU--------------------------------
;=====================================Mob Setup========================================================
set %training_mode #false ;set to #true if you want to kill without looting & recalling
set %dura_warn 15 ; Durability of a piece of armor before warning
set %dura_scan_timeout 15 ;in minutes
set %remove_armor_on_warn #true ;set to @true if you want the script to unequip armor below dura threshold and place it in your pack,
set %monsterkill af_FE_AE_DE_JB_DJ_OE_RE_BJ_yc_of_mg_pd_hd_fd_ne_i_te_oj_ed_qd_ae_fe_de_sg_NG_IG_YG_XG  ;the item type of the monsters you want to kill.
set %follow_monster #false ;Set to #true if you want to pathfind to the monster.
set %honor_monster #false ; set to false if you don't want to honor the monster.
set %tile_radius 14 ; The max radius to scan for monsters
;=====================================Looting and Banking==============================================
set %loot jjg_  ;the item(s) you want to loot.  Leave blank to not open corpses w/ war cleaver
set %stackables ;ICHB_HVF_UVF_FVF_EVF_OVF_VUF_GVF_RVF_BVF_VVF_NVF_ZVF_
set %stack_limit 300
set %gold_limit 13000 ;limit of which to send gold.
set %loot_gold #true ;Set to #true if you want to loot gold. set to #false and leave %loot blank if you want to use butcher's war cleaver without opening corpses.
set %bankbox OJAXMTD ;The item id of the container in your bank box to drop gold
set %weight_left_before_deposit 50 ;The amount of weight left on char before loot is deposited in bank or via BoS
;=====================================Bag Of Sending===================================================
set %use_bos #true ;set to  #true if you want to use a Bag of Sending
set %refil_bos #true ;set to #true if you want to script to refil your Bag of sending
set %refil_limit 1 ;Amount of charges left before recharging your BoS
;=====================================Skin & Leather===================================================
set %skin #true ;set to #false if you don't want to skin. Must be set to #true if you want to use the butcher's war cleaver
set %use_war_cleaver #true ; set to #true if you want to use a war cleaver instead of a kinfe and scissors
set %skin_tool YPCSAUD ;if of your skinning tool.
set %weight_before_split 420 ;the total weight in your pack before script splits leather so you can loot it all
;=====================================Healing and Casting==============================================
set %cast_EoO #false ; set to #false if you don't want to cast enemy of one.
set %cast_DF #false ; set to #false if you don't want to cast divine fury.
set %cast_CW #true ; set to #false if you don't want to cast consecrate weapon
set %cast_Con #true ;set to #true to cast confidence
set %cont_hit_lim 95 ;the amount of hits before confidence is casted
set %mana_limit 50 ;If mana is below this, you wont cast spells.
set %r_method c ;Recall method - c = sacred journey
;=====================================Runebook Setup===================================================
set %bankbook ZCAXMTD ;Item id of your bank runebook.
set %dungeonbook KCAXMTD ;Item id of your dungeon runebook.
set %bank_start 1 ;The number where your bank rune starts in your runebook.
set %bank_max 1  ;The number where your bank rune ends in your runebook.
set %dung_start 7 ;8 ;The number where your dungeon rune starts in your runebook.
set %dung_max 9 ;10 ;The number where your dungeon rune ends in your runebook.
;======================================================================================================
;version 1.9.3 5/25/2012
;Menu should display stats in realtime
;Edited the time to wait for a monster to approach you if you select do not move
;version 1.9.2 11/17/2011
;Fixed a bug with using a bag of sending
;Version 1.9.1 11/15/2011
;- Added the option to remove curse
;- Added a dynamic wait time for consecrate weapon that is loosely based on your
;  Karma lvl and chiv skill.
;- Fixed an issue with sending leather to the bank with the new menu update.
;version 1.9 11/14/2011
;- Added a menu to customize variables.
;Version 1.8 10/24/2011
;-Added support for Butcher's War Cleaver.
;  Use: Place war cleaver in main pack and script will find it for you.
;       If you want to just loot leather and not open corpses, set
;       %loot_golddto #false and set %loot to N/A or leave it blank
;-There is now a separate variable for stackable loot. You can set the amount
; of items in the stack before it gets sent to the bank
;Version 1.7 10/21/2011
; Added armor scanning. Will warn if durability of a piece of armor
; is below your set threshold.
;Version 1.6 10/18/2011
; -added a stat tracking menu
;- Adjusted the BoS sub - you can have multiple bags in pack,
;  script will now correctly find BoS.
;version 1.5   10/14/2011
;- Fixed the monster scanner - it now correctly attacks the closest target
;-Added Confidence, user can set when it's cast based on minimum hits specified
;-Split leather - Sometimes when your pack is nearly full, leather is too heavy for the script to loot and cut,
;  so based on specified hard limit, the script will split the looted leather into smaller chuncks so it can be
;  looted and cut correctly.
;-Added a recharge limit so user can specify at what charge to refil their BoS
;-Added a recharge BoS variable. Set to #true if script should recharge it, #false if not.
;-Enemy of One works correctly now
;-Organized the variable setup list so it's easier to set
;-Fixed an error with the sub that sets the itemid of the BoS.
;Version 1.4 10/3/2011
;-Added a variable to allow one to adjust the calculated max weight.
;-Fixed the Recall sub to work with rune 11 and 12 in a runebook.
;Version 1.3 9/15/2011
;-Added a Max Tile radius to scan for monsters
;-Changed script to attack closest monster first
;-Script will pause when character dies. Gargoyles included
;Version 1.2 9/14/2011
;-Added the ability to use bags of sendings.
;Place a BoS and the script will automatically find it. Make sure you have powder of fortification
;If you run out of PoF and charges on your BoS the script will revert to training mode.
;If you decide to use a BoS your character will not recall.
;-Removed old recall subs and replaced them with my own.
;-Removed unnecessary code
;Version 1.1
;-Changed enemy of one and diving fury to cast only when needed.
;-Added honor. If your character is too far away to honor, it will attack it and honor when the mosnter is closer.
;-Fixed the recall issues.
;-Removed a lot of unnecessary code
;Version 1.01
;4/14 Added a Training mode.
;-----------------Don't Edit Below---------------
set %version 1.9.3
if %use_new_menu = #true
  gosub first_menu
if %skin = #true
{
  if jjg notin %loot
  {
    if %loot = n/a
      set %loot jjg_
    else
      set %loot %loot , _ , jjg , _ ,
  }
}
if %cast_CW = #true
{
  gosub set_cw_timer
  set %cw_timer #result
}
set #lpc 1000
gosub startup
set #lpc 20
mloop:
if #menubutton = rescan
{
  gosub scan_armor
  set #menubutton n/a
}
gosub kill %monsterkill %tile_radius
if %killed = #true
  set *stt tru
if %training_mode <> #true
{
  gosub loot
  wait 8
  gosub weight_check
}
set %honored #false
gosub update_men
if #scnt >= %dura_timer
{
  set %dura_timer %wait_this + #scnt
  gosub scan_armor
}
if %cast_rc = #true
  gosub cast_rc
goto mloop
;--------------------------------------------------------------
;--------------------------------------------------------------
sub scan_armor
  set #lpc 1000
  gosub show_men
  finditem * C_ , #charid
  for #findindex 1 #findcnt
  {
    gosub scan_dura #findid
    if #result = #true && !dura_max <> N/A
    {
      event property #findid
      set %temp_sid #property
      str pos %temp_sid $
      set %del #strres - 1
      if %del > 22
        set %del 22
      str left %temp_sid %del
      set %prop #strres
      set %slash /
      menu list add durabox %prop , #spc , !dura_cur , %slash , !dura_max
      if !dura_cur <= %dura_warn
      {
        set %problem %problem + 1
        event macro 3 0 %prop , #spc , !dura_cur , #spc , Durability , #spc , left! , #spc , Please , #spc , Stop , #spc , Script , #spc , And , #spc , Fix , #spc , It!!!
        menu delete durawarn
        menu Font Size 8
        menu Font Style b
        menu Font Color Red
        menu Text durawarn 15 10 ( %problem warnings ) %prop is below dura threshold
        if %remove_armor_on_warn = #true
        {
          wait 10
          exevent drag #findid #findstack
          wait 10
          exevent dropc #backpackid
          wait 10
        }
      }
    }
  }
  set #lpc 20
  set %problem 0
return
;--------------------------------------------------------------
;--------------------------------------------------------------
sub scan_dura
  namespace push
  namespace local dura_check
  set !item %1
  set !dura durability
  event property !item
  if !dura in #property
  {
    set !temp_string #property
    str pos !temp_string durability
    set !delete_this #strres + 10
    str del !temp_string 1 !delete_this
    set !temp_string #strres
    str len !temp_string
    set !delete_this #strres - 1
    str left !temp_string !delete_this
    set !temp_string #strres
    wait 1
    str pos !temp_string /
    set !delete_this #strres - 1
    str left !temp_string !delete_this
    set !dura_cur #strres
    wait 1
    str pos !temp_string /
    set !delete_this #strres - 1
    str right !temp_string !delete_this
    set !dura_max #strres
    namespace push
    return #true
  }
return #false
;--------------------------------------------------------------
;--------------------------------------------------------------
sub loot
  finditem YFM G_2
  if #findkind <> -1
  {
    set %mobs_killed %mobs_killed + 1
    set %corpse #findid
    if %skin = #true  && %training_mode = #false
    {
      if %use_war_cleaver = #true
        set %skin_tool %cleaverid
      set #lobjectid %skin_tool
      event macro 17 0
      target
      set #ltargetid %corpse
      event macro 22 0
      wait 17
    }
    if %loot_gold = #false && %loot = N/A
    {
      ignoreitem %corpse
      return
    }
    set #lobjectid %corpse
    event macro 17 0
    wait 5
    gosub wait_gump container_gump 144_212 3
    if #result = #false
      return
    wait 5
    set %loot_container #contid
    wait 13
    ignoreitem %corpse
  }
  if #findkind = -1
    return
  gosub grab_items
return
;--------------------------------------------------------------
;--------------------------------------------------------------
sub grab_items
  if %loot_gold = #true
  {
    wait 4
    finditem POF C_ , %loot_container
    if #findkind <> -1
    {
      exevent drag #findid #findstack
      wait 13
      exevent dropc #backpackid
      wait 13
    }
  }
  finditem * C_ , %loot_container
  for %i 1 #findcnt
  {
    finditem %loot C_ , %loot_container
    if #findkind <> -1
    {
      exevent drag #findid #findstack
      wait 13
      exevent dropc #backpackid
      wait 13
    }
    finditem %stackables C_ , %loot_container
    if #findkind <> -1
    {
      exevent drag #findid #findstack
      wait 13
      exevent dropc #backpackid
      wait 13
    }
  }
  if %skin = #true  && %use_war_cleaver <> #true
  {
lloop:
    gosub weight_check
    wait 2
    while #true
    {
      finditem EEG C_ , %loot_container
      if #findkind <> -1
      {
        set #lid #findcnt
        if #weight > %weight_before_split
        {
          set %damount #findstack / 2
          if #findstack <= 15
            set %damount #findstack
        }
        else
          set %damount #findstack
        exevent drag #findid %damount
        wait 14
        exevent dropc #backpackid
        wait 15
      }
      if #findkind = -1
        break
      wait 5
      finditem kag C_ , #backpackid
      set #lobjectid #findid
      event macro 17 0
      target   2s
      finditem eeg C_ , #backpackid
      set #ltargetid #findid
      event macro 22 0
      wait 5
      wait 10
    }
  }
return
;--------------------------------------------------------------
;--------------------------------------------------------------
sub weight_check
  finditem POF C_ , #backpackid
  for #findindex 1 #findcnt
  {
    if %gold_limit >= 60000
      set %lim 55000
    else
      set %lim %gold_limit
    if #findstack >= %lim
    {
      set %gold_am %gold_am + #findstack
      set *total_gold   *total_gold + #findstack
      if %use_bos = #false
      {
        gosub recall_to_bank
        wait 1s
        gosub deposit_items
        wait 1s
        gosub recall_to_dungeon
      }
      else
      {
        gosub bagofsending POF_ #findstack
      }
    }
  }

  set %current_weight #weight
  set %weight_left %max_weight - %current_weight
  if %weight_left <= %weight_left_before_deposit
  {
    if %skin = #true
    {
      finditem JJG C_ , #backpackid
      set %leatherct %leatherct + #findstack
      set *total_leather *total_leather + #findstack
    }
    if %use_bos = #false
    {
      gosub recall_to_bank
      wait 1s
      gosub deposit_items
      wait 1s
      gosub recall_to_dungeon
    }
    else
    {
      gosub bagofsending %loot
      return
    }
  }
  finditem %stackables C_ , #backpackid
  for #findindex 1 #findcnt
  {

    if #findstack >= %stack_limit
    {
      if %use_bos = #false
      {
        gosub recall_to_bank
        wait 1s
        gosub deposit_items
        wait 1s
        gosub recall_to_dungeon
      }
      else
        gosub bagofsending #findid , _  #findstack
    }
  }
return
;--------------------------------------------------------------
;--------------------------------------------------------------
sub set_cleaver
  if %skin = #true && %training_mode = #false
  {
    set %bstring butcher's , #spc , war , #spc , cleaver
    finditem HFR C_ , #backpackid
    if #findkind <> -1
    {
      for #findindex 1 #findcnt
      {
        event property #findid
        if %bstring in #property
        {
          set %cleaverid #findid
          return
        }
      }
    }
    else
    {
      display Can't Find your %bstring
      halt
    }
  }
return
;--------------------------------------------------------------
;--------------------------------------------------------------
sub deposit_items
loop:
  msg bank$
  gosub wait_gump container_gump 180_240 10
  if #result = #false
  {
    set %fail_chance %fail_chance + 1
    if %fail_chance >= 3
    {
      display Can't open bank. Halting
      halt
    }
    goto loop
  }
  finditem %bankbox *
  if #findkind <> -1
  {
    finditem POF C_ , #backpackid
    exevent drag #findid #findstack
    wait 12
    exevent dropc %bankbox
    wait 12
    finditem * C_ , #backpackid
    for %i 1 #findcnt
    {
      finditem %loot C_ , #backpackid
      if #findkind <> -1
      {
        exevent drag #findid #findstack
        wait 12
        exevent dropc %bankbox
        wait 12
      }
      ignoreitem #findid
    }
    finditem %stackables C_ , #backpackid
    {
      for #findindex 1 #findcnt
      {
        if #findkind <> -1
        {
          exevent drag #findid #findstack
          wait 12
          exevent dropc %bankbox
          wait 12
        }
      }

    }
  }
return
;--------------------------------------------------------------
;--------------------------------------------------------------
sub recall_to_bank
  set %currunebook Bank
  set %trip_to_bank %trip_to_bank  + 1
  set %total_recall %total_recall + 1
  gosub update_men
bloop:
  gosub recall %bankbook %rune %r_method 3
  if #result <> #true
  {
    if %r_method = c && #result = tithe_fail
    {
      display You are out of tithe pts.
      set %training_mode #true
      return
    }
    wait 20
    set %rune %rune + 1
    if %rune >= %bank_max
    {
      set %rune %bank_start
    }
    goto bloop
  }
return
;--------------------------------------------------------------
;--------------------------------------------------------------
sub recall_to_dungeon
  set %rune1 %rune1 + 1
  set %total_recall %total_recall + 1
  set %currunebook Dungeon
dloop:
  if %rune1 >= %dung_max
  {
    set %rune1 %dung_start
  }
  gosub recall %dungeonbook %rune1 %r_method 3
  if #result <> #true
  {
    wait 20
    set %rune1 %rune1 + 1
    if %rune1 >= %dung_max
    {
      set %rune1 %dung_start
    }
    goto dloop
  }
return
;--------------------------------------------------------------
;--------------------------------------------------------------
sub kill
  set %killed #false
  set #lpc 1000
  set %monster %1
  set %distance %2
  set %m_dist 1
  while #true
  {
    if #hits = 0
    {
      event macro 3 0 You Are Dead!
      pause
    }
    for %m_dist 0 %distance
    {
      finditem %monster G_ , %m_dist
      if #findkind <> -1
      {
        set %close_mon #findid
        set %start_dist %m_dist
        set %m_dist 0
        set %montimer #scnt + 20
        break
      }
    }
    finditem %close_mon *
    if #findkind <> -1
    {
      set *statcheck #true
      set #lobjectid #findid
      set #ltargetid #findid
      repeat
        gosub journal2
        if #result = #true
        {
          ignoreitem #findid
          return
        }
        if %honored = #false && %honor_monster = #true
        {
sloop:
          event macro 49 1
          target 5s
          wait 5
          event macro 22 0
          wait 5
          gosub journal2 _too_far_
          if #result = #true
          {
            event macro 27 0
            goto sloop
          }
          set %honored #true
        }
        if #scnt > %montimer
        {
          finditem %close_mon *
          if #finddist > 5 || #finddist = %start_dist
          {
            ignoreitem %close_mon
            break
          }
        }
        event macro 27 0
        if %cast_ev = #true
          gosub cast_ev
        if %cast_EoO = #true
          gosub cast_eo1 #findrep
        if %cast_con = #true
          gosub cast_con
        if #stamina < %max_stam
          gosub cast_divine
        if %cast_CW = #true
          gosub check_cast
        if %cast_rc = #true
          gosub cast_rc

        gosub check_a #findid
      until #result = #false
      set %killed #true
      break
    }
    if #findkind = -1
      break
  }
return
;--------------------------------------------------------------
;--------------------------------------------------------------
sub cast_ev
  if %cast_ev = #true && a notin #charstatus
  {
    if #mana > %mana_limit && %evtimer <= #scnt
    {
      set %mana #mana
      event macro 15 147
      set %evtimer #scnt + 20
      set %cwtimer %cwtimer + 5
    }
  }

return
;--------------------------------------------------------------
;--------------------------------------------------------------
sub cast_rc
  if %cast_rc = #true   && a notin #charstatus
  {
    if #maxhits < %start_hit || #maxmana < %start_mana || #maxstam < %start_stam
    {
      set %mana #mana
      event macro 15 209
      target
      event macro 23 0
    }
  }

return
;--------------------------------------------------------------
;--------------------------------------------------------------
sub cast_con
  if %cast_con = #true && a notin #charstatus
  {
    if #hits <= %cont_hit_lim && #mana > %mana_limit
    {
      if  %contimer <= #scnt
      {
        set %mana #mana
        event macro 15 146
        set %contimer #scnt + 20
        wait 10
      }
    }
  }
return
;--------------------------------------------------------------
;--------------------------------------------------------------
sub cast_eo1
  if %cast_EoO = #true   && a notin #charstatus
  {
    if #findrep <> 5
    {
      if #mana > %mana_limit && %eo1timer <= #scnt && #findrep <> 5
      {
        event macro 15 206
        set %eo1timer #scnt + 5
        wait 17
      }
    }
  }
return
;--------------------------------------------------------------
;--------------------------------------------------------------
sub cast_divine
  if %cast_df = #true  && a notin #charstatus
  {
    if #mana > %mana_limit
    {
      event macro 15 205
      wait 10
    }
  }
return
;--------------------------------------------------------------
;--------------------------------------------------------------
sub check_cast
  if %cast_CW = #true
  {

    if #mana > %mana_limit
    {
      if  %cwtimer1 <= #scnt
      {
        set %mana #mana
        event macro 15 203
        set %cwtimer1 #scnt + %cw_timer
      }
    }
  }
return
;--------------------------------------------------------------
;--------------------------------------------------------------
sub check_a
  set %follow %1
  finditem %follow *
  if #findkind <> -1
  {
    if %follow_monster = #true
    {
      if #finddist > 2
        event pathfind #findx #findy #findz
    }
    return #true
  }
  else
    return #false
return #false
;--------------------------------------------------------------
;--------------------------------------------------------------
sub fix_maxweight
  if #maxweight > 550
    return 550
  else
    return #maxweight
return #maxweight
;--------------------------------------------------------------
;--------------------------------------------------------------
sub fcrmenu
  set %prop1 Faster , #spc , Cast , #spc , Recovery
  gosub GetProp %prop1
  set %FCR #result
  set %prop2 Lower , #spc , Mana , #spc , Cost
  gosub GetProp %prop2
  set %Lmc #result
  set %fcr %fcr * 5
  set %wait %fcr
return
;--------------------------------------------------------------
;--------------------------------------------------------------
sub findwait
  set %wait1 %scriptwait * 50
  set %fcr1 %fcr * 10
  set %wait2 %wait1 / %fcr1
  set %determinedwait %wait2 + 10
  if %fcr = 0
    set %determinedwait %scriptwait
  wait 2
return
;--------------------------------------------------------------
;--------------------------------------------------------------
sub bagofsending
  set %sendloot %1
  if %1 = pof && %2 < %lim
    return
  set *charge . %bos *charge . %bos + 1
  gosub scan_charges %bos
  set %curcharge #result
  if #result <= %refil_limit
  {
    if %refil_bos = #true
      gosub refill_bos
    else
      set %training_mode #true
  }
  finditem %bos C_ , #backpackid
  if #findkind <> -1
  {
    gosub separate_string %sendloot _
    set %loot_loop 1
    for %i 1 %t_num
    {
      set %loot_search %return . %loot_loop
      finditem %loot_search C_ , #backpackid
      for #findindex 1 #findcnt
      {
        if #findkind <> -1
        {
          wait 15
          set #lobjectid %bos
          event macro 17 0
          target 5s
          wait 10
          set #ltargetid #findid
          event macro 22 0
          set %try4 %try4 +1
          if %try4 > 4
          {
            set %try4 0
            break
          }
        }
      }
      set %loot_loop %loot_loop + 1
    }
  }
  else
  {
    event macro 3 0 Can't Find your BoS. Reverting to Training mode
    set %training_mode #true
  }
  set %chargeused %chargeused + 1
return
;--------------------------------------------------------------
;--------------------------------------------------------------
sub set_bos
  finditem CKF C_ , #backpackid
  if #findkind <> -1
  {
    for #findindex 1 #findcnt
    {
      gosub scan_charges #findid
      set %curcharge #result
      if %curcharge >= 1
      {
        set %bos #findid
        return
      }
    }
  }
  else
  {
    Display You do not have a bag of sending in your pack. Set Use_BoS to False and restart
    halt
  }
return
;--------------------------------------------------------------
;--------------------------------------------------------------
sub scan_charges
  finditem %1 C_ , #backpackid
  set %tempid #findid
  event property #findid
  set %string #property
  str len %string
  set %length #strres
  str pos %string s:
  set %del #strres + 2
  str del %string 1 %del
  set %string #strres
  str len %string
  set %l #strres
  set %movestr %strres - 1
  str pos %string $
  set %del #strres
  str del %string %del %l
return  #strres
;--------------------------------------------------------------
;--------------------------------------------------------------
sub refill_bos
  finditem EUO C_ , #backpackid
  if #findkind <> -1
  {
    set #lobjectid #findid
    event macro 17 0
    target 5s
    wait 10
    set #ltargetid %bos
    event macro 22 0
    wait 10
    gosub journal2 saturated
    if #result = #true
    {
      event macro 3 0 Your BoS cannot be charged. Reverting to training mode
      set %training_mode #true
      return #false
    }
  }
  else
  {
    event macro 3 0 Can't Find your Powder of Fortification. Reverting to Training mode
    set %training_mode #true
    return #false
  }
return
;--------------------------------------------------------------
;--------------------------------------------------------------
sub startup
  set %wait_this ( %dura_scan_timeout * 60 )
  set %dura_timer %wait_this + #scnt
  set %message4 Can't_get_there
  set %max_stam #maxstam - 50
  set %cwtimer1 #scnt
  set %contimer #scnt
  set %eo1Timer #scnt
  set %evtimer #scnt
  set %rune %bank_start
  set %honored #false
  set %rune1 %dung_start
  set %beginning #systime
  set %gold_am 0
  set %leatherct 0
  set %mobs_killed 0
  set %curcharge 0
  set %weightleft 0
  set %pot_am 0
  set %chargeused 0
  set %trip_to_bank  0
  set %total_recall  0
  set %currunebook 0
  set #menubutton n/a
  if %use_war_cleaver = #true  && %training_mode = #false
    gosub set_cleaver
  if %use_bos = #true && %training_mode = #false
    gosub set_bos
  gosub fcrmenu
  gosub fix_maxweight
  set %max_weight #result
  gosub weight_check
  finditem yfm G_21
  for %i 1 #findcnt
  {
    finditem yfm G_21
    ignoreitem #findid
  }
  gosub show_men
  gosub update_men
  gosub scan_armor
  if %cast_rc = #true
  {
    set %start_mana #maxmana
    set %start_hit #maxhits
    set %start_stam #maxstam
  }
return
;--------------------------------------------------------------
;--------------------------------------------------------------
sub recall
  namespace push
  namespace local recall
  set !runebook %1
  set !position %2
  set !method %3
  set !tries %4
  set !c_tries 1
  if !method = c
  {
    if #tp < 15
      return tithe_fail
  }
  if #weight >= #maxweight
    return weight_fail
try_again:
  finditem !runebook C_ , #backpackid
  if #findkind <> -1
  {
    set #lobjectid #findid
    event macro 17 0
    gosub wait_gump generic_gump 452_236 3
    gosub find_page !position
    gosub click_button %coord
    set !cur_cpos #charposx , _ , #charposy , _ , #charposz
    set !r_side !position % 2
    if !r_side <> 0 || !position = 1
      set !side L
    else
      set !side R
    if !method = R
    {
      if !side = L
        set !c_loc 140_145
      else
        set !c_loc 300_145
    }
    if !method = C
    {
      if !side = L
        set !c_loc 140_180
      else
        set !c_loc 300_180
    }
    gosub click_button !c_loc
    set %timer1 #scnt + 5
    while #true
    {
      for %u 1 20
      {
        set !n_cur_pos #charposx , _ , #charposy , _ , #charposz
        if !n_cur_pos <> !cur_cpos
          return #true
        gosub journal2 reagent
        if #result = #true
          return reg_fail
        wait 2
      }
      gosub journal2 Something_is_blocking
      if #result = #true && !c_tries <= !tries
      {
        set !c_tries !c_tries + 1
        wait 2s
        goto try_again
      }
      if #result = #true && !c_tries > !tries
        return #false
      if !c_tries >= !tries
        return #false
      if #scnt > %timer1 && !n_cur_pos = !cur_cpos
      {
        set !c_tries !c_tries + 1
        wait 2s
        goto try_again
      }

    }
    return #false
  }
  else
  {
  return #false
}
;-------------------------------------------------------------
;-------------------------------------------------------------
sub separate_string
  set %t_num 0
  str Count %1 %2
  for %i 1 #strres
  {
    set %var %2
    str len %1
    set %length #strres
    str pos %1 %var
    set %del #strres - 1
    str left %1 %del %length
    set %return . %i #strres
    set %del1 %del + 1
    str del %1 1 %del1
    set %1 #strres
    set %t_num %t_num + 1
  }
return
;----------------------------------------------------------------------
;----------------------------------------------------------------------
sub click_button
  set !parsestring %1 , _
  gosub separate_string !parsestring _
  set !clickx #contposx + %return1
  set !clicky #contposy + %return2
  click !clickx !clicky
return
;-------------------------------------------------------------
;-------------------------------------------------------------
sub find_page
  if %1 <= 2
  {
    set %page 1
    set %coord 140_195
  }
  if %1 <= 4 && %1 > 2
  {
    set %page 2
    set %coord 175_195
  }
  if %1 <= 6 && %1 > 4
  {
    set %page 3
    set %coord 210_195
  }
  if %1 <= 8 && %1 > 6
  {
    set %page 4
    set %coord 245_195
  }
  if %1 <= 10 && %1 > 8
  {
    set %page 5
    set %coord 310_195
  }
  if %1 <= 12 && %1 > 10
  {
    set %page 6
    set %coord 345_195
  }
  if %1 <= 14 && %1 > 12
  {
    set %page 7
    set %coord 380_195
  }
  if %1 <= 16 && %1 > 14
  {
    set %page 8
    set %coord 415_195
  }
return %page
;-------------------------------------------------------------
;-------------------------------------------------------------
sub wait_gump
  set %timer #scnt + %3
  repeat
    if #contsize = %2 && #contname = %1
      return #true
  until #scnt >= %timer
return #false
;--------------------------------------------------------------
;--------------------------------------------------------------
sub journal2
  set %timer #scnt
  While #true
  {
    set %_jindex #jindex
    if #jindex >= %_jindex
    {
      scanjournal %_jindex
      if %1 in #journal
        return #true
      return #false
    }
  }
return ;should never get this far
;--------------------------------------------------------------
;--------------------------------------------------------------
sub show_men
  menu clear
  menu Window Title Freddy's Farmer
  menu Window Color White
  menu Window Size 392 230
  menu Font Transparent #true
  menu Font Align Right
  menu Shape EUOShape1 0 0 421 257 3 7 1 Black 1 Maroon
  menu Shape EUOShape2 8 8 377 33 3 7 1 Black 7 White
  menu Font Name Segoe UI
  menu Font Size 12
  menu Font Style
  menu Font Color Green
  menu Font Align Left
  menu Font BGColor White
  menu Text EUOLabel1 12 16 Freddy's Farmer
  menu Shape EUOShape3 8 40 377 185 3 7 1 Black 7 Green
  menu Shape EUOShape4 16 44 361 173 3 7 1 Black 7 White
  menu Font Name MS Sans Serif
  menu Font Size 8
  menu Text EUOLabel4 324 24 Version %version
  menu Font Size 12
  menu Font Color WindowText
  menu Text EUOLabel2 20 52 Gold:
  menu Text EUOLabel3 20 72 Leather:
  menu Text EUOLabel5 20 92 Mobs Killed:
  menu Text EUOLabel8 20 192 Total Time:
  menu Text EUOLabel9 20 172 Weight Left:
  if %use_bos = #True
  {
    menu Text EUOLabel6 20 112 Charges left:
    menu Text EUOLabel7 20 152 PoT Left:
    menu Text EUOLabel10 20 132 Charges Used:
    menu Font Style b
    menu Font Color Green
    menu Text chargeused 131 132 %chargeused
    menu Text potamt 88 152 %pot_am
    menu Text curcharge 120 112 %CURCHARGE
  }
  else
  {
    menu Text EUOLabel6 20 112 Trips to Bank:
    menu Text EUOLabel7 20 152 Runebook:
    menu Text EUOLabel10 20 132 Total Recalls:
    menu Font Style b
    menu Font Color Green
    menu Text curcharge 120 112  %trip_to_bank
    menu Text chargeused 120 132 %total_recall
    menu Text potamt 96 152 %currunebook
  }
  menu Font Style b
  menu Font Color Green
  menu Text goldamount 60 52 %GOLD_AM
  menu Text leathercount 84 72 %leatherct
  menu Text mobs_kill 108 92 %MOBS_KILLED
  menu Text weightleft 108 172 %weight_left
  menu Text outtime 100 192 %outtime
  menu Font Size 8
  menu Font Style
  menu Font Color WindowText
  menu Font BGColor Window
  menu List Create DuraBox 180 52 189 137
  menu Font Size 8
  menu Font Style
  menu Font Color WindowText
  menu Font BGColor BtnFace
  menu Button rescan 196 192 125 21 Rescan
  menu Show
return
;--------------------------------------------------------------
;--------------------------------------------------------------
sub update_men
  set #lpc 1000
  gosub time
  menu Font Size 12
  menu Font Style b
  menu Font Color Green
  menu delete outtime
  menu Text outtime 100 192 %outtime
  menu delete goldamount
  set %c_gold_am %GOLD_AM + #gold
  menu Text goldamount 60 52 %c_gold_am
  menu delete leathercount
  if %skin = #false
    set %leatherct not , #spc , selected
  finditem JJG C_ , #backpackid
set %nc #findstack + %leatherct
menu Text leathercount 84 72 %nc
  menu delete mobs_kill
  menu Text mobs_kill 108 92 %MOBS_KILLED
  menu delete weightleft
  menu Text weightleft 108 172 %weight_left
  if %use_bos = #True
  {
    gosub scan_charges %bos
    set %curcharge #result
    menu delete curcharge
    menu Text curcharge 120 112 %CURCHARGE
    finditem EUO C_ , #backpackid
    if #findkind <> -1
      set %pot_am #findstack
    else
      set %pot_am 0
    menu delete potamt
    menu Text potamt 88 152 %pot_am
    set #lpc 20
    menu delete chargeused
    menu Text chargeused 131 132 %chargeused
    menu delete chargetotal
    menu Text chargetotal 131 152 t: *charge . %bos
  }
  else
  {
    menu delete curcharge
    menu Text curcharge 120 112  %trip_to_bank
    menu delete chargeused
    menu Text chargeused 120 132 %total_recall
    menu delete potamt
    menu Text potamt 100 152 %currunebook
  }
return
;--------------------------------------------------------------
;--------------------------------------------------------------
sub time
  set %time #systime - %beginning
  gosub timeformat
return
;--------------------------------------------------------------
;--------------------------------------------------------------
;==================================
; Script Name: Lion's Timer Formatting Subs
; Author: Lion
; Version: 1.1
; Client Tested with: 4.0.0p/q
; EUO version tested with: 1.41 build 0075
; Shard OSI / FS: Any
; Revision Date: 5th March 2004
; Public Release: 4th March 2003
; Purpose: Time in ms to standard MM:DD:HH:MM:SS
;==================================
;==================================
;Simple (hours:mins:secs)
;==================================
sub timeformat
  str len %time
  set %timelenght  #strres - 3
  str left %time %timelenght
  set %t1 #strres / 3600
  set %t2 #strres % 3600 / 60
  set %t3 #strres % 3600 % 60
  set %outtime %t1
  for %i 2 3
  {
    str len %t . %i
    if #strres = 1
    {
      set %outtime %outtime , : , 0 , %t . %i
      set *time  %outtime , : , %t . %i
    }
    if #strres <> 1
    {
      set *time  %outtime , : , %t . %i
      set %outtime %outtime , : , %t . %i
    }
  }
return
;--------------------------------------------------------------
;--------------------------------------------------------------
sub first_menu
mloop:
  set #lpc 1000
  menu Clear
  menu Window Title Freddy's Farmer
  menu Window Color White
  menu Window Size 574 539
  menu Font Transparent #true
  menu Font Align Right
  menu Shape EUOShape1 0 0 573 617 3 7 1 Black 1 Maroon
  menu Shape EUOShape2 8 8 557 33 3 7 1 Black 7 White
  menu Font Name Segoe UI
  menu Font Size 12
  menu Font Style
  menu Font Color Green
  menu Font Align Left
  menu Font BGColor White
  menu Text EUOLabel1 12 16 Freddy's Farmer
  menu Shape EUOShape3 8 40 557 491 3 7 1 Black 7 Green
  menu Shape EUOShape4 16 48 538 474 3 7 1 Black 7 White
  menu Font Name MS Sans Serif
  menu Font Size 8
  menu Text EUOLabel4 492 24 Version %version
  menu Shape EUOShape5 24 72 341 109 3 7 1 Black 7 White
  menu Font Size 10
  menu Font Style b
  menu Font Color WindowText
  menu Font Transparent #false
  menu Text EUOLabel2 24 52 Monster Setup
  menu Font Style
  menu Text EUOLabel3 28 76 Kill List:
  menu Font Size 8
  menu Text EUOLabel5 192 104 Tile Radius
  menu Font Size 10
  menu Font Style b
  menu Text EUOLabel6 24 188 Armor Setup
  menu Shape EUOShape6 24 208 165 97 3 7 1 Black 7 White
  menu Shape EUOShape7 200 208 165 97 3 7 1 Black 7 White
  menu Text EUOLabel7 200 188 Bag of Sending
  menu Font Size 8
  menu Font Style
  menu Text EUOLabel8 28 216 Low Durability warning:
  menu Text EUOLabel9 28 240 Durability Scan timeout:
  menu Text EUOLabel10 208 264 Charge to refill
  menu Font Size 10
  menu Font Style b
  menu Text EUOLabel11 24 312 Loot Setup
  menu Shape EUOShape8 24 332 341 181 3 7 1 Black 7 White
  menu Font Size 8
  menu Font Style
  menu Text EUOLabel12 32 340 Loot List
  menu Text EUOLabel13 32 364 Stack List
  menu Text EUOLabel14 32 388 Stack Limit:
  menu Text EUOLabel15 168 408 Gold Limit:
  menu Text EUOLabel16 32 460 Skin Tool (if War cleaver not selected)
  menu Text EUOLabel17 32 484 Bank Container ID (if BoS not chosen)
  menu Shape EUOShape9 376 72 169 157 3 7 1 Black 7 White
  menu Font Size 10
  menu Font Style b
  menu Text EUOLabel18 376 52 Casting Setup:
  menu Font Size 8
  menu Font Style
  menu Text EUOLabel20 380 200 Conf HP:
  menu Font Size 10
  menu Font Style b
  menu Text EUOLabel21 376 240 Runebook Setup:
  menu Shape EUOShape10 376 256 169 161 3 7 1 Black 7 White
  menu Font Size 8
  menu Font Style
  menu Text EUOLabel22 380 260 Bankbook:
  menu Text EUOLabel23 384 304 Start:
  menu Text EUOLabel24 464 304 End:
  menu Text EUOLabel25 384 328 Dungeon Book:
  menu Text EUOLabel26 384 368 Start:
  menu Text EUOLabel27 468 368 End:
  menu Text EUOLabel28 384 392 Method:
  menu Font BGColor Window
  menu Edit killbox 76 76 233 *fred_kill_list
  menu Font BGColor White
  if *follow_tick = #true
    menu Check follow_monster 28 100 113 25 #true Follow Monster
  else
    menu Check follow_monster 28 100 113 25 #false Follow Monster
  if *training_tick = #true
    menu Check training_mode 28 152 169 25 #true Training Mode (Does not loot)
  else
    menu Check training_mode 28 152 169 25 #false Training Mode (Does not loot)
  menu Font BGColor Window
  menu Combo Create radiusbox 252 100 105
  for %i 1 16
    menu combo add radiusbox %i
  menu combo select radiusbox *radius_tick
  menu Font BGColor White
  if *honor_tick = #true
    menu Check honor_monster 28 124 105 25 #true Honor Monster
  else
    menu Check honor_monster 28 124 105 25 #false Honor Monster
  menu Font Color White
  menu Font BGColor Green
  menu Button killbutton 312 76 49 21 Target
  menu Font Color WindowText
  menu Font BGColor Window
  menu Edit durabox 144 212 41 *fred_low_dura
  menu Edit dura_timeout 144 236 41 *fred_dura_timeout
  menu Font BGColor White
  if *removedura_tick = #true
    menu Check remove_armor 28 260 141 41 #true Remove armor on low durability warning
  else
    menu Check remove_armor 28 260 141 41 #false Remove armor on low durability warning
  if *usebos_tick = #true
    menu Check use_bos 204 216 125 21 #true Use Bag of Sending
  else
    menu Check use_bos 204 216 125 21 #false Use Bag of Sending
  if *refilbos_tick = #true

6
So here's a little scripting history lesson.

WinUO never would have existed without a scripter named sorrowmaster who wrote the original mace and shield script. She quit UO and asked me to maintain the script, EUO banned the donation scripts, and I was banned soon after due to other reasons (I didn't get along with CEO) - i made a small site that hosted hers & my scripts, eventually made the message board and it attracted a lot of great scripters. sorrowmaster's script brought a ton of ppl to the site. I was a pretty bad admin, and i relied on donations and selling GTC to keep the site running - life hit me and winuo shut down, but Trailmyx has always been there to keep everything afloat. While I appreciate Trailmyx calling me the godfather, he's the real reason why this community exists today - i was a stepping stone - he is the mountain haha   

7
I was 16/17 when winuo was a thing, then coders, then winuo, and finally scriptuo. i'm 30 now. time really does fly lol

edit: I can't believe how old UO is, also, the scripting community beyond EUO is what kept me in the game. Lots of smart people made a lot of awesome scripts that weren't allowed on easyuo and having a site devoted to that really brought some amazing scripts together. Trailmyx and cerveza's heartwood quester was a game changer. It really seemed like the wild west of scripting back when winuo/uocoders/scriptuo first started out. It was a lot of fun, and the best part was besides the beef between myself and the owner of coders, everyone got a long and just wanted to help out and create cool scripts with friends.

8
Seems like some good calcs for Spell timers here:
http://www.easyuo.com/forum/viewtopic.php?f=2&t=25215&start=15

what a blast from the past. I was banned from EUO and ended up starting my own site, which worked out really well becau7se i made a bunch of friends that were sick of EUO too.

9
I've only ever really needed to adjust the default LPC when processing strings/data; adjusting the LPC isn't going to make your script faster, and in some cases, it can cause errors. If you're just doing timers you shouldn't need to adjust LPC. combat events can benefit from faster processing, but you need to know what to speed up. i'd say work on getting your script stable before you worry about speeding it up

10
Script Snippets / Re: Freddy Snippets
« on: May 25, 2019, 01:46:18 PM »
;==================================
; Script Name: Freddy's Luna Buyer
; Author: Freddy
; Version: 1.0
; Client Tested with: 5. Something
; EUO version tested with: 1.5 (Build 0064)
; Shard: ALL
; Revision Date 11 May 2018
; Creation Date: 11/07/2011
; Uses Neo's buy subs. Thanks neo
;==================================

Luna Reg Buyer:

This script will stand in the corner of the mage shop and buy regs from the mages/alchemists while hidden. It's been updated to reflect the changes made to the bank system.

Will not work with EJ accounts (if that's still a thing)

Code: [Select]
;==================================
; Script Name: Freddy's Luna Buyer
; Author: Freddy
; Version: 1.0
; Client Tested with: 5. Something
; EUO version tested with: 1.5 (Build 0064)
; Shard: ALL
; Revision Date 11 May 2018
; Creation Date: 11/07/2011
; Uses Neo's buy subs. Thanks neo
;==================================
set %vendor ; Item ID of the mage reg vendors separated with an underscore like xxxxx_xxxxx_xxxxx_
set %item_type_buy DPF_JUF_KZF_WZF_SZF_JZF_KUF_RZF_MZF_ ;these are all the mage regs ID, you can change it to buy whatever they sell. wont work with potions or spell scrolls tho blank scrolls work just fine
set %bank_container ; item id of a container in your bank to place the regs
set %keep_hidden #true ;set to false if you don't want to hide
set %delay_between_loops 60 ;in seconds the amount of time to wait after scanning every vendor
;-----------------------Don't edit below----------------------
;-------------------------------------------------------------
set #lpc 1000
gosub separate_string %item_type_buy _
for %u 1 %t_num
{
  set %item . %u %return . %u
}
set %itemcnt %t_num
set %t_num 0
gosub separate_string %vendor _
for %u 1 %t_num
{
  set %vendor . %u %return . %u
}
set %vendcnt %t_num
set %t_num 0
event macro 3 0 bank
wait 15
set %bankid #contid
mainloop:
for %vendor_buy 1 %vendcnt
{
  wait 15
  set %vendor %vendor . %vendor_buy
  for %itm 1 %itemcnt
  {
    wait 15
    if %keep_hidden = #true
    {
      while H notin #charstatus
      {
        event macro 13 21
        wait 12s
      }
    }
    gosub get_gold
    wait 10
    while #result <> #false
    {
      set %num 999
      set %buy_this %item . %itm
      if %buy_this in wuf_dpf
      {
        set %num #maxweight - #weight
      }
      if #gold < 2
        gosub get_gold
      event property %vendor
      if alchemist in #property
        set %position 5
      else
        set %position 2
      gosub buy %vendor %buy_this %num %position
      if #result = #true
      {
sto_loop:
        finditem %bank_container *
        if #findkind = -1
        {
          event macro 3 0 bank
          wait 1s
          set #lobjectid %bank_container
          wait 10
          event macro 17 0
          wait 1s
          goto sto_loop
        }
        finditem %buy_this C_ , #backpackid
        if #findkind <> -1
        {
          wait 20
          exevent drag #findid #findstack
          wait 12
          exevent dropc %bank_container
          wait 12
        }
      }
    }
  }
}
wait %delay_between_loops , s
goto mainloop
;-------------------------------------------------------------
;-------------------------------------------------------------
sub buy
  gosub buy_books %1 %2 %3 %4
  if #result = #true
    return #true
  else
  return #false
;-------------------------------------------------------------
;-------------------------------------------------------------
sub buy_books ;neo
  namespace push
  namespace local neobuy
  set !vendor %1
  set !buy %2
  set !amount %3
  set !buyposition %4
  set !shopyes #false
  finditem !vendor G_8
  repeat
    exevent popup #findid
    gosub gumpwait normal_gump null
    wait 5
    set !x #contposx + 30
    set !y #contposy + ( 20 * !buyposition )
    click !x !y f dmc
    gosub gumpwait bill_gump null
  until #result
  set !item_x #CONTPOSX + 11
  set !item_y #CONTPOSY - 150
  set !next_x #CONTPOSX + 71
  set !next_y #CONTPOSY - 15
  set !accept_x #CONTPOSX + 42
  set !accept_y #CONTPOSY + 205
  getshopinfo
  wait 5
  for !i 1 #shopcnt
  {
    getshopinfo
    set !shopid #shopitemid
    if #shopitemtype in !buy
    {
      set !shopyes #true
      for %x 1 3
        click !item_x !item_y f dmc
      getshopinfo
      wait 10
      if #shopItemMax < !amount
      {
        set !amount #shopItemMax
      }
      setShopItem #shopitemid !amount
      break
    }
    set %timer3 #scnt + 5
    repeat
      if #scnt > %timer3
        return #false
      click !next_x !next_y f dmc
      getshopinfo
      if #shopcnt = 0
        return #false
    until #shopitemid <> !shopid || !i = #shopcnt
  }
  click !accept_x !accept_y f dmc
  wait 20
  if !shopyes <> #true
    set #result #false
  if !shopyes
    set #result #true
  namespace pop
return #result
;-------------------------------------------------------------
;-------------------------------------------------------------
sub get_gold
  return
gloop:
  if #gold <= 4999
  {
    finditem POF C_ , %bankid
    for #findindex 1 #findcnt
    {
      if #findstack > 5000
      {
        set %get 5000 - #gold
        exevent drag #findid %get
        wait 12
        exevent dropc #backpackid
        wait 12
        return
      }
    }
    if #gold < 2000
    {
      finditem EWH C_ , %bankid
      if #findkind <> -1
      {
        for #findindex 1 #findcnt
        {
          event property #findid
          str len #property
          if #findcol = 52 && #strres >= 52
          {
            set #lobjectid #findid
            wait 10
            event macro 17 0
            wait 30
            goto gloop
          }
        }
      }
    }
    if #gold < 2000
    {
      set %get 5000 - #gold
      event macro 3 0 withdraw %get
      wait 15
    }
    if #gold < 2000
    {
      display You don't have any gold!
      halt
    }
  }
return
;----------------------------------------------------------------------
;----------------------------------------------------------------------
sub separate_string
  set %t_num 0
  str Count %1 %2
  for %i 1 #strres
  {
    set %var %2
    str len %1
    set %length #strres
    str pos %1 %var
    set %del #strres - 1
    str left %1 %del %length
    set %return . %i #strres
    set %del1 %del + 1
    str del %1 1 %del1
    set %1 #strres
    set %t_num %t_num + 1
  }
return
;----------------------------------------------------------------------
;----------------------------------------------------------------------
;======= Gumpwait Sub ======= ;neo
sub gumpwait
  namespace push
  namespace local gumpwait
  set !contname %1
  set !contsize %2
  set !timeout #SCNT + 5
  if !contsize = null
  {
    repeat
    until #contname = !contname || #scnt >= !timeout
    {
      if #contname = !contname
      {
        namespace pop
        return #true
      }
      namespace pop
      return #false
    }
  }
  repeat
  until ( #contname = !contname && #contsize = !contsize ) || #scnt >= !timeout
  if #contname = !contname && #contsize = !contsize
  {
    namespace pop
    return #true
  }
  namespace pop
return #false
;======= End Sub =======





11
Script Snippets / Re: Freddy Snippets
« on: May 25, 2019, 01:37:20 PM »
;==================================
; Script Name: Freddy's Cdeed Maker
; Author: Freddy
; Version: 1.0
; Client Tested with: 7.0.16
; EUO version tested with: 1.5 (Build 0199)
; Shard OSI
; Revision Date: 10-16-2011
; Revision Date: 10-16-2011
; Purpose: Uses a commodity deed box to fill commodity deeds with the amount of your choice
;==================================

Code: [Select]
;==================================
; Script Name: Freddy's Cdeed Maker
; Author: Freddy
; Version: 1.0
; Client Tested with: 7.0.16
; EUO version tested with: 1.5 (Build 0199)
; Shard OSI
; Revision Date: 10-16-2011
; Revision Date: 10-16-2011
; Purpose: Uses a commodity deed box to fill commodity deeds with the amount of your choice
;==================================
set %comdeed_box OQXBLSD ;The item id of your commodity deed box
set %resource_box LBDUGOD ;Item id of your container that holds the items to deed
set %deed_container PXDUGOD ;Item id of the container holding blank deeds
set %deed_storage MSIPERD ;Item id of the container to hold filled deeds. You can use #backpackid or any container in your pack
set %resource_type jjg  ;the item type of the resource to deed
set %color 2129 ; set to 0 if default. the #findcol of the resource
set %amount_to_deed 5000 ;number of items to put in the deed
set %amount_to_make 12 ;number of deeds to make
;==================================
gosub set_containers
wait 1s
for %u 1 %amount_to_make
{
event sysMessage making deed %u of %amount_to_make
gosub drag_item %resource_box %resource_type %color %amount_to_deed %comdeed_box  Finished
gosub drag_item %deed_container EWH 71 1 %comdeed_box commodity_deed
gosub deed_item
wait 10
gosub drag_item %comdeed_box EWH 1426 1 %deed_storage commodity_deed
wait 10
}
Display Finished
halt
;-------------------------------------------------------------
;-------------------------------------------------------------
sub deed_item
finditem EWH C_ , %comdeed_box
set #lobjectid #findid
event macro 17 0
target 2s
finditem %resource_type C_ , %comdeed_box
set #ltargetid #findid
event macro 22
wait 10
return
;-------------------------------------------------------------
;-------------------------------------------------------------
sub drag_item
finditem %2 C_ , %1
for #findindex 1 #findcnt
{
if #findcol = %3
{
 if #findstack < %4
 set %drag_this #findstack
 else
 set %drag_this %4
 exevent drag #findid %drag_this
 wait 10
 exevent dropc %5
 wait 10
 break
 }
  }
  if #findkind = -1
  {
   display You are out of %6
   halt
  }
return
;-------------------------------------------------------------
;-------------------------------------------------------------
sub set_containers
  finditem  %comdeed_box g_2
  if #findkind <> -1
  {
    set #lobjectid #findid
    event macro 17 0
    wait 1s
    contpos 215 0
  }
  finditem %resource_box g_2
  if #findkind <> -1
  {
    set #lobjectid #findid
    event macro 17 0
    wait 1s
    contpos 430 0
  }
  finditem %deed_container g_2
  if #findkind <> -1
  {
    set #lobjectid #findid
    event macro 17 0
    wait 1s
    contpos 645 0
  }
  finditem %deed_storage g_2
  if #findkind <> -1
  {
    set #lobjectid #findid
    event macro 17 0
    wait 1s
    contpos 860 0
  }
return

12
General UO Chat / Re: OSI What Shard do you play
« on: January 13, 2019, 11:34:44 AM »
I play on atlantic. usually i'm just scripting since i don't know anyone else who plays on atlantic anymore.

13
New member introductions / Re: Hello
« on: May 29, 2018, 08:34:06 AM »
lkatana, not sure I saw on name before.   What you name on other board.

Poor Freddy,  Which I can help you, only if we played on the same shard :)   I do have a few resources on your shard and toons build up.   You can always ask and I will see if I can help you.
. Thanks! I have every thing I need in game. I'm just so lost with all the changes haha

14
New member introductions / Re: Hello
« on: May 28, 2018, 11:36:21 PM »
what kind of scripts have you written? Also it's cool you help new and returning players! I came back with endless journey and was completely lost. Most of my UO friends have moved on :( Bodfather is helping me get up to speed, but holy crap the game has changed in the 6 years i've been gone. Welcome to the site

15
I got the email too. It is the only reason I came back to the game. As much as I try, I can never seem to quit this game for good.

Pages: [1] 2 3 ... 19