Author Topic: Determine and set %bankbox variable  (Read 904 times)

0 Members and 1 Guest are viewing this topic.

Offline NObamaTopic starter

  • Everything I need to know, I learned from Miffy's Item Finder.
  • Elite
  • *
  • *
  • Posts: 3454
  • Activity:
    0%
  • Reputation Power: 43
  • NObama is a force to reckon with.NObama is a force to reckon with.NObama is a force to reckon with.NObama is a force to reckon with.NObama is a force to reckon with.NObama is a force to reckon with.NObama is a force to reckon with.NObama is a force to reckon with.
  • Respect: +161
  • Referrals: 2
    • View Profile
Determine and set %bankbox variable
« on: February 16, 2010, 06:06:34 PM »
0
I script.  I script a lot.  I script on four different shards using 82 different characters.

Hi, my name is NObama and I am an EUOholic.

I get tired of setting %bankbox variables manually.  This helps.

 :)

Code: [Select]
;=============================================================
;NObama go tired of setting bankbox values for his bajillion
;different slaves on every shard.  This takes care of that
;for you.
;
;Be warned: This script is tremendously powerful.
;Use only for good
;^o^
;=============================================================
sub get_bankbox
set %bankbox N/A ;substitute your script's bankbox variable name for %bankbox
while %bankbox = N/A
{
msg bank$
scanjournal 1
      if items in #journal
         set %bankbox #contid
}
return
;=============================================================
« Last Edit: February 16, 2010, 06:17:27 PM by NObama »

Offline manwinc

  • Elite
  • *
  • *
  • Posts: 2536
  • Activity:
    0%
  • Reputation Power: 32
  • manwinc is a rising star!manwinc is a rising star!manwinc is a rising star!manwinc is a rising star!manwinc is a rising star!manwinc is a rising star!
  • Gender: Male
  • "The Devs Hard at Work"
  • Respect: +123
  • Referrals: 1
    • View Profile
Re: Determine and set %bankbox variable
« Reply #1 on: February 17, 2010, 09:04:56 AM »
0
Hmm..... Something that Might work a little better would be checking the #contsize as Opposed to journal, in case some noob is running around spamming buying items or something ridiculous Like that.

I'm at school right now and Haven't copied any of my scripts onto a usb, but I THINK Thats how my Sub Cont_Timer works in some of my newer scripts... COuld be Very Very Very Wrong. Of course this is an Infinite Loop, so you had better be able to access your bank from where you are or else the script will just Cry about it. Might change the MSG BANK$ to event macro so you don't have that problem, then simply put a

if #result
return

after the gosub Cont_Timer (it returns #true if it Fails to do what you asked, which was to wait a maximum of 2 seconds for #contsize to = %bank_Contsize)

Code: [Select]
set %Bank_Contsize
Repeat
Msg Bank$
Gosub Cont_Timer 20 Contsize %Bank_Contsize
until #contsize = %Bank_Contsize
set %Bankbox #contid

Sub Cont_Timer
Namespace Push
Namespace Local Mwinc_Cont_Timer
if %0 = 0
{
; Lol, Just saw this used in a script of tm's and I liked it. Although I think there should be a set %Mwinc_Thinks_You_Are_A_nub True in here....
Namespace Pop
Return #True
}
set !Time_Limit #Scnt2 + %1
set !Cont_Check # . %2
While !Cont_Check <> %3 && !Time_Limit > #scnt2
{
wait 1
set !Cont_Check # . %2
}
if !Time_Limit < #scnt2
{
Namespace Pop
return #True
}
Namespace Pop
Return #False
Monkeys and Typewriters!

" Oh I know, We'll make a Boss Encounter that requires 3 keys per player to enter, Then we'll make it not a closed instance so you never know if you are going to pop into a fresh room or a boss that has 1% Health left with 20 dudes smashing its face in, wasting your time and effort"

Offline NObamaTopic starter

  • Everything I need to know, I learned from Miffy's Item Finder.
  • Elite
  • *
  • *
  • Posts: 3454
  • Activity:
    0%
  • Reputation Power: 43
  • NObama is a force to reckon with.NObama is a force to reckon with.NObama is a force to reckon with.NObama is a force to reckon with.NObama is a force to reckon with.NObama is a force to reckon with.NObama is a force to reckon with.NObama is a force to reckon with.
  • Respect: +161
  • Referrals: 2
    • View Profile
Re: Determine and set %bankbox variable
« Reply #2 on: February 17, 2010, 02:35:55 PM »
0
Ah - A much more elegant solution!  I tend to do my script banking in remote locations, so I didn't worry about infinite bank spams - but I did think about 'em briefly!

 ;)

Tags: