Author Topic: Need a sub that will check to see if a SBOD is full  (Read 2743 times)

0 Members and 1 Guest are viewing this topic.

Offline PauloniusTopic starter

  • Elite
  • *
  • *
  • Posts: 2040
  • Activity:
    0%
  • Reputation Power: 29
  • Paulonius is on the verge of being accepted.Paulonius is on the verge of being accepted.Paulonius is on the verge of being accepted.Paulonius is on the verge of being accepted.Paulonius is on the verge of being accepted.
  • Respect: +162
  • Referrals: 1
    • View Profile
Need a sub that will check to see if a SBOD is full
« on: April 05, 2010, 09:42:23 PM »
0
I have not figured out a good way to pull this out of the #property.  Can anyone help me out?

This coin declares Caesar is "Dictator for Life." He did serve as Dictator for the remainder of his life, but his life would end only a few weeks after this issue. For Caesar to put his image on coins and essentially declare himself king was too much for Brutus and his republican allies.

"If everything seems under control, you're not going fast enough'
-Mario Andretti

"If everyone is thinking alike, someone isn't thinking."
- General George Patton Jr

Offline manwinc

  • Elite
  • *
  • *
  • Posts: 2556
  • 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: Need a sub that will check to see if a SBOD is full
« Reply #1 on: April 05, 2010, 11:27:01 PM »
0
First figure out what type of bod it is. 10-15-20

then do a

string Count %String (number)


if that count = 2
then its full
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 PauloniusTopic starter

  • Elite
  • *
  • *
  • Posts: 2040
  • Activity:
    0%
  • Reputation Power: 29
  • Paulonius is on the verge of being accepted.Paulonius is on the verge of being accepted.Paulonius is on the verge of being accepted.Paulonius is on the verge of being accepted.Paulonius is on the verge of being accepted.
  • Respect: +162
  • Referrals: 1
    • View Profile
Re: Need a sub that will check to see if a SBOD is full
« Reply #2 on: April 06, 2010, 10:07:23 AM »
0
I figured that Bizatch out

Code: [Select]
;==========================================================
; Sub will check a SBOD for Item Count
; Returns #True if it is full or #False if it's not
; Sets %SBODItemCount to the number of items in the sBod
; Returns #False for LBODs and sets %BODStatus to Large
; Will return status for SBODs as Full# or Partial# where #
; is the number required to fill the SBOD
;----------------------------------------------------------
; Dependency: This Sub requires the included Sub Large_Check
Sub SBOD_Check
Set %BOD %1
Set %BODStatus N/A
Set %SBODItemCnt N/A
Set %Ones N/A
Set %Tens N/A
Set %BODFillStatusSubString N/A
Event Property %BOD
Set %BODFillStatusString #Property
Str Len %BODFillStatusString
Set %BODFillStatusStringLength #strRes - 3
Str Left %BODFillStatusString %BODFillStatusStringLength
Set %BODFillStatusStringRemainder #StrRes
If Large in #Property
   {
   Gosub Large_Check %BOD
   event exmsg #charid 3 4 TEST MESSAGE Back From Large Check
   If #Result = #True
      {
      Set %BODStatus Large
      Return #False
      }
   }
str Right %BODFillStatusString 3
Set %BODFillStatusSubString #strRes
Str Left %BODFillStatusSubString 2
Set %BODFillStatusSubString2 #strRes
Str Left %BODFillStatusSubString2 1
Set %Tens #StrRes
Str Right %BODFillStatusSubString2 1
Set %Ones #StrRes
If %tens > 0
   {
   Set %sBODItemCnt %Tens , %Ones
   }
If %tens < 1
   Set %sBODItemCnt %Ones
If %sBODItemCnt = 20
   {
   Set %BODStatus Full20
   Return #True
   }
If %sBODItemCnt = 15
   {
   If 15 in %BODFillStatusStringRemainder
      {
      Set %BODStatus Full15
      Return #True
      }
   Set %BODStatus Partial20
   Return #False
   }
If %sBODItemCnt = 10
   {
   If 10 in %BODFillStatusStringRemainder
      {
      Set %BODStatus Full10
      Return #True
      }
   If 15 in %BODFillStatusStringRemainder
      {
      Set %BODStatus Partial15
      Return #False
      }
   If 20 in %BODFillStatusStringRemainder
      {
      Set %BODStatus Partial20
      Return #False
      }
   }
If 10 in %BODFillStatusStringRemainder
   {
   Set %BODStatus Parial10
   Return #False
   }
If 15 in %BODFillStatusStringRemainder
   {
   Set %BODStatus Partial15
   Return #False
   }
If 20 in %BODFillStatusStringRemainder
   {
   Set %BODStatus Partial20
   Return #False
   }
Set %BODStatus ERROR
Return #False

;----------------------------------------------------------
; Returns #True for LBOD
Sub Large_Check
Set %BODLargeCheck %1
Event Property %BODLargeCheck
Set %StringCheckLarge #Property
str Pos %StringCheckLarge Large
If #StrRes = 43
   Return #TRUE
Return #False
This coin declares Caesar is "Dictator for Life." He did serve as Dictator for the remainder of his life, but his life would end only a few weeks after this issue. For Caesar to put his image on coins and essentially declare himself king was too much for Brutus and his republican allies.

"If everything seems under control, you're not going fast enough'
-Mario Andretti

"If everyone is thinking alike, someone isn't thinking."
- General George Patton Jr

Scrripty

  • Guest
Re: Need a sub that will check to see if a SBOD is full
« Reply #3 on: April 06, 2010, 10:38:34 AM »
0
I wish you guys would get in the habit of coding like SUO does it. :)  So much easier to read for those of us who use it. hehe

Offline manwinc

  • Elite
  • *
  • *
  • Posts: 2556
  • 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: Need a sub that will check to see if a SBOD is full
« Reply #4 on: April 06, 2010, 02:01:00 PM »
0
I wish you would LEARN TO CODE LIKE THE REST OF US!!!!
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"

Scrripty

  • Guest
Re: Need a sub that will check to see if a SBOD is full
« Reply #5 on: April 06, 2010, 02:33:28 PM »
0
I wish you would LEARN TO CODE LIKE THE REST OF US!!!!

Hey, at least my followers don't stop following after 15 tiles... :)

Offline manwinc

  • Elite
  • *
  • *
  • Posts: 2556
  • 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: Need a sub that will check to see if a SBOD is full
« Reply #6 on: April 06, 2010, 06:00:13 PM »
0
The only situations that I want my followers more than 15 tiles away from me is when I Want them to HOLD STILL
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"

Tags: