ScriptUO

Official ScriptUO EasyUO Scripts => Script Debug => Topic started by: Ketchup on November 06, 2015, 05:11:44 AM

Title: Addition to this sub please!
Post by: Ketchup on November 06, 2015, 05:11:44 AM
I'm trying to add something to this script that re-arms a weapon with more than 15 durability after it removes one for being low on durability
firstly I'd add this to the top of my script %weapons and add the list of weps I'd like rearmed by type or ID either is fine, I know this script removes armor too but I can check that myself and repair it way before I get through 5 or so weapons, here is the sub, maybe also the wait times may need editing so that I don't die from hitting nothing , I'd appreciate any help. THANKS!

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
Title: Re: Addition to this sub please!
Post by: The Ghost on November 06, 2015, 09:15:05 AM
Look around the board, I beleive you ask the same question to modified LAME and have it so scan weapon.  Mwinc have a sub for that and it work very well.