Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Badges

Anette ✭✭✭

About

Username
Anette
Joined
Visits
90
Last Active
Roles
Member
Points
449
Posts
729
Badges
19
  • Re: I HEART

    The spirit of Stavenn lives on!

    SarriusLynyssaDruuTysandr
  • Re: I HEART

    I have been having a lot of fun RPing with @sarrius, lately.
    SarriusKrysalissDreacorDruu
  • Re: Mudlet Scripting

    Dreacor said:
    How can I do the next thing: Attack with EQ and BAL and next attack is with only EQ, then again with EQ and BAL and then again only with EQ? So I'd attack with those two rules rules every other attack. All help is appreciated.
    So if I understand you correctly, you are alternating attacks between one that needs EQ+BAL, and one that only needs EQ?

    What I would do in that case, is remember the last attack with a global variable with something like LastAttack.  Then call a function on receiving EQ that checks what the last attack was:
    -- -----------------------------------------------------------------------
    -- function: AlternateAttack
    -- Alternate between an attack that needs EQ *and* balance, and one that
    -- only needs EQ.  Call me from the equilibrium recovery message for best
    -- results.  Returns the attack we did if we attacked, false if we did not.  
    function AlternateAttack()
       haveBalance     = gmcp.Char.Vitals.bal or false
       haveEquilibrium = gmcp.Char.Vitals.eq or false

       if (LastAttack==nil) then
          -- first attack
          if (haveBalance==true and haveEquilibrium==true) then send("<PUT EQ+BAL ATTACK HERE>") lastAttack="<PUT EQ+BAL ATTACK HERE>"
    return lastAttack else return false end elseif (LastAttack=="<PUT EQ+BAL ATTACK HERE>") then -- second attack, just EQ if (haveEquilibrium==true) then send("<PUT EQ-ONLY ATTACK HERE>") lastAttack="<PUT EQ-ONLY ATTACK HERE>" return lastAttack else return false end
       elseif (LastAttack=="<PUT EQ+BAL ATTACK HERE>") then -- third attack, EQ+BAL if (haveBalance==true and haveEquilibrium==true) then send("<PUT EQ+BAL ATTACK HERE>") lastAttack="<PUT EQ+BAL ATTACK HERE>" return lastAttack else return false end end
    end
    I wrote this up entirely now, and haven't tested it, but it should put you on the right track in terms of the logic at least.
    Dreacor