Author Topic: Addition to this sub please!  (Read 2422 times)

0 Members and 1 Guest are viewing this topic.

Offline KetchupTopic starter

  • Full Member
  • ***
  • Posts: 138
  • Activity:
    0%
  • Reputation Power: 3
  • Ketchup has no influence.
  • Respect: +18
  • Referrals: 0
    • View Profile
Addition to this sub please!
« on: November 06, 2015, 05:11:44 AM »
0
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
« Last Edit: November 06, 2015, 05:17:33 AM by Ketchup »

Offline The Ghost

  • Elite
  • *
  • *
  • Posts: 1917
  • Activity:
    0%
  • Reputation Power: 25
  • The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.The Ghost is on the verge of being accepted.
  • Respect: +245
  • Referrals: 0
    • View Profile
Re: Addition to this sub please!
« Reply #1 on: November 06, 2015, 09:15:05 AM »
0
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.

Tags: