Adblock breaks this site

Alright im Coding a Autofighter. I Got it Done.

Discussion in 'Scar/Simba Help' started by Spawnzor, Aug 8, 2007.

  1. Spawnzor

    Spawnzor Guest

    Referrals:
    0
    Alright im Coding a Autofighter. I Got it Done.

    But. Scar Doesnt Support

    SwitchStatement; ?

    Can Someone Help me. Or Give me the Same thing as SwitchStatement?
     
  2. Zeta

    Zeta Guru
    Banned

    Joined:
    Jan 21, 2007
    Posts:
    1,680
    Referrals:
    3
    Sythe Gold:
    0
    Alright im Coding a Autofighter. I Got it Done.

    Mind if i ask what SwitchStatement does? Or post your script? I'm not the best at scar but i'm probably the only one on that will post here..
     
  3. mr.gibblet

    mr.gibblet Forum Addict
    Do Not Trade

    Joined:
    Jun 29, 2007
    Posts:
    454
    Referrals:
    0
    Sythe Gold:
    0
    Alright im Coding a Autofighter. I Got it Done.

    I am posting here too ^_^. Yes, if you explained to us what SwitchStatement does, we would be helped out alot.

    Do you mean like Switch? where you use cases and all? Or what?

    -Thanks,
    mr.gibblet
     
  4. Spawnzor

    Spawnzor Guest

    Referrals:
    0
    Alright im Coding a Autofighter. I Got it Done.

    Puts it in a loop Until Lets Say. The Monster HP Reaches 0 then it Finds Another Target.

    Then it Does the Same thing for the Other Monster.
     
  5. crossback7

    crossback7 Active Member

    Joined:
    Jun 12, 2007
    Posts:
    202
    Referrals:
    0
    Sythe Gold:
    0
    Alright im Coding a Autofighter. I Got it Done.

    Use OutFight. It will wait until your out of a fight before moving on in the procedure or function. Much easier.
     
  6. Town

    Town Grand Master
    Scar Programmers

    Joined:
    Jan 21, 2007
    Posts:
    3,776
    Referrals:
    3
    Sythe Gold:
    5
    Alright im Coding a Autofighter. I Got it Done.

    Code:
    repeat
      Wait(1);
    until(Monster = Dead);
    If only it was that easy. But that is what a loop looks like in Scar. You may want to look into If, Then, Else statements.
     
  7. pker overkil

    pker overkil Forum Addict

    Joined:
    Feb 11, 2007
    Posts:
    387
    Referrals:
    0
    Sythe Gold:
    0
    Alright im Coding a Autofighter. I Got it Done.

    Code:
    Program MonsterKiller;
     var
     Monsters2kill:integer;
     
    begin
    repeat
    if monster = Dead then
      begin
      Monsters2kill:=Monsters2kill+1
      FindNewMonster
      end else
      KeepFighting
    Until(Monsters2kill=5) //how many monsters you want to kill
    end
    Another example of something like Towns except using if then else statements.
     
< Need help new to scar | stupid question but i need help >


 
 
Adblock breaks this site