Page 1 of 1

Feature Request: $char(ability,xxx) return values

Posted: Fri Jan 17, 2003 2:55 pm
by GoatFoot
Change the return values of $char(ability,xxx) to:
  • 1+: Currently useable /doability number
    0: The ability is on a button but is currently unuseable.
    -1: The skill is not on an ability button
    -2: You do not have that skill
I realise that this is entering the realm of nitpicky bs so feel free to slap me down. :)

Currently ...

$char(ability,xxx) returns what /doability you have a skill set to (see Appendix C)
Also can return:
  • 0: Skill not on an ability button
    -1: You do not have that skill
    -2: The ability is on a button but unuseable right now
This means the possible return values of available skills are broken up into 2 ranges:
  • -2 available but not currently useable
    1+ available and useable.
with the return codes for an unavailable skill setting in the middle.

So if I wish to:
  1. ignore all unavailable skills, while
  2. note an available skill but currenly unuseable skill and
  3. do something interesting with a useable skill
I have to do something like:

Code: Select all

sub Fragment
   /if $char(ability,xxx)==0 /return
   /if $char(ability,xxx)==-1 /return
   /if $char(ability,xxx)==-2 /goto :DoCommonStuff
   /do useable stuff
   /do more useable stuff
   :DoCommonStuff
   /stuff
/return
whereas I'd much rather do this:

Code: Select all

/sub Fragment
  /if $char(ability,xxx)<0 /return
  /do something for all available skills

  /if $char(ablity,xxx)>0 {
      /do aesthetically pleasing stuff with usable skills
      /do elegant stuff (note the subliminal propaganda)
   }
 /return
Bleah, that example isn't great, but you get the point. Return values that share a common states are not contiguous.


I REALLY need to get a life/job.