Author Topic: trying to get a maxweight to weight  (Read 2802 times)

0 Members and 1 Guest are viewing this topic.

Offline cybercasperTopic starter

  • Full Member
  • ***
  • Posts: 228
  • Activity:
    0%
  • Reputation Power: 3
  • cybercasper has no influence.
  • Respect: +41
  • Referrals: 1
    • View Profile
trying to get a maxweight to weight
« on: October 13, 2016, 06:45:07 PM »
0
I am looking how I would incorporate a weight into my script. what I want to be able to do is once my weight is say 50 I want it to open my secure, which I have already finished, and pull out enough of one item to put it to my maxweight. can anyone enlighten me on how to do this since I have looked at a lot of different scripts and they are more focused on when it is at maxweight to unload or use a bag of sending.

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: trying to get a maxweight to weight
« Reply #1 on: October 14, 2016, 11:50:11 AM »
0
CEO most have something  in his crafting build.   

Offline 12TimesOver

  • Another Day, Another Vendetta
  • Global Moderator
  • *
  • *
  • Posts: 3694
  • Activity:
    0%
  • Reputation Power: 41
  • 12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.
  • Gender: Male
  • Respect: +321
  • Referrals: 2
    • View Profile
Re: trying to get a maxweight to weight
« Reply #2 on: October 14, 2016, 11:59:37 AM »
0
I am looking how I would incorporate a weight into my script. what I want to be able to do is once my weight is say 50 I want it to open my secure, which I have already finished, and pull out enough of one item to put it to my maxweight. can anyone enlighten me on how to do this since I have looked at a lot of different scripts and they are more focused on when it is at maxweight to unload or use a bag of sending.
You would need to know the weight of the item you were pulling out (of course) then simply work with #MAXWEIGHT - #WEIGHT to know how many to pull out. %totalitems = (#maxweight - #weight) / weightof1item

Not sure I'm understanding you correctly though.

X
When they come for me I'll be sitting at my desk
     with a gun in my hand wearing a bulletproof vest
My, my, my how the time does fly
     when you know you're gonna die by the end of the night

Offline cybercasperTopic starter

  • Full Member
  • ***
  • Posts: 228
  • Activity:
    0%
  • Reputation Power: 3
  • cybercasper has no influence.
  • Respect: +41
  • Referrals: 1
    • View Profile
Re: trying to get a maxweight to weight
« Reply #3 on: October 14, 2016, 03:56:55 PM »
0
This is what I'm doing I'm trying to train archery on an artic orge lord. But during the night I run out of arrows so I log off what I wanted it to do was check for the arrows and once I run out I want it to refill from a secure. Maybe I'm going about it all wrong maybe I should have it check for item and if item isn't there then put xxxx amount in my backpack

Offline 12TimesOver

  • Another Day, Another Vendetta
  • Global Moderator
  • *
  • *
  • Posts: 3694
  • Activity:
    0%
  • Reputation Power: 41
  • 12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.
  • Gender: Male
  • Respect: +321
  • Referrals: 2
    • View Profile
Re: trying to get a maxweight to weight
« Reply #4 on: October 14, 2016, 05:30:06 PM »
0
This is what I'm doing I'm trying to train archery on an artic orge lord. But during the night I run out of arrows so I log off what I wanted it to do was check for the arrows and once I run out I want it to refill from a secure. Maybe I'm going about it all wrong maybe I should have it check for item and if item isn't there then put xxxx amount in my backpack
Nope, you got the right idea. Pretty simple really, something like:

repeat
   finditem %arrowtypes
   If #findstack < somenumber
      {
      set %arrowstoget #MAXWEIGHT - #WEIGHT ;arrows are one stone
      gosub restock %arrowstoget
      }
until

sub restock
   namespace push
   namespace local restock
   set !arrows %1
   get your arrows out of the secure
   put them in your pack
   etc
   etc
   Namespace stuff
return

You know, something along these lines. I need to go watch Stranger Things so I'm hurrying :)

X
When they come for me I'll be sitting at my desk
     with a gun in my hand wearing a bulletproof vest
My, my, my how the time does fly
     when you know you're gonna die by the end of the night

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: trying to get a maxweight to weight
« Reply #5 on: October 14, 2016, 06:09:15 PM »
0
I was under the impression that  I help you make a snippet to restock when were out of arrow.

Offline cybercasperTopic starter

  • Full Member
  • ***
  • Posts: 228
  • Activity:
    0%
  • Reputation Power: 3
  • cybercasper has no influence.
  • Respect: +41
  • Referrals: 1
    • View Profile
Re: trying to get a maxweight to weight
« Reply #6 on: October 15, 2016, 02:21:47 AM »
0
Ghost you did sir I just couldn't figure out the max weight part and u said ask orgiammi but not one offered help over there

Tags: