Jump to content

Get Fairy Ring current value


Toph

Recommended Posts

This will return the character that your fairy ring interface shows.

    public char getRingPosition(int ring)
    {
        int s = script.client.getConfig(816);
        int a, b, c;
        int shift = (1 << 6) - 1;
        s = s & shift;
        c = s >> 4;
        s -= c << 4;
        b = s >> 2;
        s -= b << 2;
        a = s;
        switch (ring)
        {
        case 0:
            switch (a)
            {
            case 0x0: return 'a';
            case 0x1: return 'd';
            case 0x2: return 'c';
            case 0x3: return 'b';
            }
            break;
        case 1:
            switch (b)
            {
            case 0x0: return 'i';
            case 0x1: return 'l';
            case 0x2: return 'k';
            case 0x3: return 'j';
            }
            break;
        case 2:
            switch (c)
            {
            case 0x0: return 'p';
            case 0x1: return 's';
            case 0x2: return 'r';
            case 0x3: return 'q';
            }
            break;
        }
        return 0;
    }
Edited by Toph
  • Like 1
Link to comment
Share on other sites

  • 5 weeks later...
  • 4 weeks later...
Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...