Eclipse - Free 2D Mmorpg Maker
September 02, 2010, 10:19:31 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
 
   Home   Shop Arcade chat Login Register  
 
 
   
 
collapse

* No Spam Or Websites

Refresh History
  • Ertzel: So... Anyone with basic/none/limited photoshop or even paint skills want to make some money converting sprites for me?
    Today at 10:07:35 PM
  • Gamma™: weaver why are you oflfine on H&H? :S
    Today at 10:04:26 PM
  • Ertzel: Ya, only one try per knife, my one try failed :(
    Today at 10:00:17 PM
  • LegendWeaver: is it one use?
    Today at 09:43:15 PM
  • Ertzel: Wish I didnt spend my 1k+ credits to buy the stupid knife that failed at stealing Robins credits >.<
    Today at 09:42:42 PM
  • Wraith: ) Kreator!
    Today at 09:06:52 PM
  • Wraith: yes! you were! (in red text
    Today at 09:06:46 PM
  • ToshiroHayate: Kreator!
    Today at 08:25:02 PM
  • Kreator: o_0 Was I supposed to Wraith?
    Today at 08:16:02 PM
  • [Pie] ICT: Don't worry.. I commented.
    Today at 07:55:08 PM
  • Wraith: Ay, kreator, wtf is up with you not posting anything about my new cliffs??
    Today at 07:50:36 PM

* Recent Topics

[EO] Attaching Problem. by Ertzel
[Today at 10:11:57 PM]


Project Vertigo [2d Tile-based Side-Scrolling Engine] by Miguu
[Today at 10:03:22 PM]


Zacaras Empire (Hiring) by Ertzel
[Today at 08:43:54 PM]


custom cliff tiles by ToshiroHayate
[Today at 08:29:15 PM]


.: RPG Kingdom :. by LegendWeaver
[Today at 08:25:20 PM]


What do you think? by [Pie] ICT
[Today at 07:54:54 PM]


[Show Off] Aztec Stuff by [Pie] ICT
[Today at 07:50:07 PM]


So I herd you liek mudkipz by Kreator
[Today at 07:36:52 PM]


Haven and Hearth: Epic Screenshot Thread by Tompwnage™
[Today at 07:14:21 PM]


The Lonliest Star [RP] by DDunit
[Today at 07:09:46 PM]


* Who's Online


Pages: [1] 2
Site Author : Topic: My Capture the flag script  (Read 4156 times)
0 Members and 1 Guest are viewing this topic.
April 15, 2006, 11:31:42 AM
♥ Cake ♥
Global Moderator
Advanced Eclipser
*
User No : 251
Posts: 1735
  • 72 credits
  • View Inventory
  • Send Money To Tylian!
    • View Profile
    I was bored today so I tried making a capture the flag script.
    I am compleatly new to this language (I dont even know what its called)
    I thought it might inspire others to edit it and make it work.
    Notes:
    It Does not work:
    • Very Buggy
    • Untested
    • 100+ Script Errors
    • Im a newb
    • [/list:u]
      Some info you will need to know:
    Map 1:Lobby
    Map 2:Red Team Waiting Room
    Map 3:Blue Waiting Room
    Map 4:Red Team Base
    Map 5:Blue Team Base
    Item 1:Red Bandana (Team Emblem)
    Item 2:Blue Bandana
    Item 3:Red Flag
    Item 4:Blue Flag

    Any way well if you want to help me get it to work I would be happy to help  :P
    Anyway here is the code: Just look for all the 'TODO: 's to fund out what you need to change.
    Code: [Select]

    '********************************
    'Capture The Flag               *
    '********************************
    'Capture The Flag was made by:  *
    '    Emblem Of Eclips Forums    *
    '                               *
    'Anyone may use and/or change   *
    'This script as long as you     *
    'Leave the origional            *
    'Author note where it is.       *
    '********************************


    '********************************
    'TODO:Add this to the end of your main file:
    '********************************


    Sub CTF_Chose_Red(index)
    If GetPlayerHelmetSlot(index)=0 Then
     If GetPlayerShieldSlot(index)=0 Then
      If GetVar("CTF.ini", "Settings", "GameOn") = 1 Then
       Call PlayerMsg(index, "There is already a game started.", 14)
       Call PlayerMsg(index, "Please wait untill another game starts.", 14)
       Else
        If GetVar("CTF.ini", "Red", "Players")=5 Then
        Call PlayerMsg(index, "This team is already full.", 14)
        Else
        Call PlayerMsg(index, "You have joined the red team.", 4)
        Call PlayerMsg(index, "Please wait till both teams have 5 players.", 4)
        Call MapMsg(1, GetPlayerName(index)& " has joined the Red team.", 14)
        Call MapMsg(1, GetPlayerName(index)& " has joined the Red team.", 14)
        Call MapMsg(1, GetPlayerName(index)& " has joined the Red team.", 14)
        Call PutVar("CTF.ini", "Red", "Player"& GetVar("CTF.ini", "Red", "Players"), index)
        Call PutVar("CTF.ini", "Red", "Players", int(GetVar("CTF.ini", "Red", "Players"))+1)
       '********************************
        'TODO:Change Red Wait Room Location Here:
        '********************************
        Call SetPlayerMap(index,3)
        Call SetPlayerX(index, 5)
        Call SetPlayery(index, 5)
        '********************************
        'TODO: Set Item Representing Red Team.
        '********************************
        Call SetPlayerInvItemNum(index, 25, 1)
        Call SetPlayerHelmetSlot(index, 25)
        Call CTF_Begin()
       End If
      End If
      Else
      Call PlayerMsg(index, "Please Unequip your sheild to join a team.", 14)
     End If
     Else
     Call PlayerMsg(index, "Please Unequip your Helmet to join a team.", 14)
    End If
    End Sub


    Sub CTF_Chose_Blue(index)
    If GetPlayerHelmetSlot(index)=0 Then
     If GetPlayerShieldSlot(index)=0 Then
      If GetVar("CTF.ini", "Settings", "GameOn") = 1 Then
       Call PlayerMsg(index, "There is already a game started.", 14)
       Call PlayerMsg(index, "Please wait untill another game starts.", 14)
       Else
        If GetVar("CTF.ini", "Blue", "Players")=5 Then
        Call PlayerMsg(index, "This team is already full.", 14)
        Else
        Call PlayerMsg(index, "You have joined the blue team.", 1)
        Call PlayerMsg(index, "Please wait till both teams have 5 players.", 1)
        Call MapMsg(1, GetPlayerName(index)& " has joined the blue team.", 14)
        Call MapMsg(2, GetPlayerName(index)& " has joined the blue team.", 14)
        Call MapMsg(3, GetPlayerName(index)& " has joined the blue team.", 14)
        Call PutVar("CTF.ini", "Blue", "Player"& GetVar("CTF.ini", "Blue", "Players"), index)
        Call PutVar("CTF.ini", "Blue", "Players", int(GetVar("CTF.ini", "Blue", "Players"))+1)
        '********************************
        'TODO:Change Blue Wait Room Location Here:
        '********************************
        Call SetPlayerMap(index,2)
        Call SetPlayerX(index, 5)
        Call SetPlayery(index, 5)
        '********************************
        'TODO: Set Item Representing Blue Team.
        '********************************
        Call SetPlayerInvItemNum(index, 25, 2)
        Call SetPlayerHelmetSlot(index, 25)
        Call CTF_Begin()
       End If
      End If
      Else
      Call PlayerMsg(index, "Please Unequip your sheild to join a team.", 14)
     End If
     Else
     Call PlayerMsg(index, "Please Unequip your Helmet to join a team.", 14)
    End If
    End Sub


    Sub CTF_Begin()
    Dim tele
    tele=1
    If GetVar("CTF.ini, "Blue", "Players")=5 Then
     If GetVar("CTF.ini, "Red", "Players")=5 Then
      Call PutVar("CTF.ini", "Settings", "GameOn", 1)
      Do While Int(tele) < 5
       '********************************
       'TODO:Change Red Respawn Location Here:
       '********************************
       Call SetPlayerMap(GetVar("CTF.ini", "Red", "Player"& tele, index), 4)
       Call SetPlayerX(GetVar("CTF.ini", "Red", "Player"& tele, index), 2)
       Call SetPlayery(GetVar("CTF.ini", "Red", "Player"& tele, index), 3+tele)
       tele= tele + 1
      Loop
      tele=1
      Do While Int(tele) < 5
       '********************************
       'TODO:Change Blue Respawn Location Here:
       '********************************
       Call SetPlayerMap(GetVar("CTF.ini", "Blue", "Player"& tele, index), 5)
       Call SetPlayerX(GetVar("CTF.ini", "Blue", "Player"& tele, index), 7)
       Call SetPlayery(GetVar("CTF.ini", "Blue", "Player"& tele, index), 3+tele)
       tele= tele + 1
      Loop
     End If
    End If
    End Sub

    Sub Red_Flag(index)
    If GetVar("CTF.ini", "Settings", "RedCapture") = 1 Then
     '********************************
      'TODO:Put red Flag Item #    vvv
     '********************************
      If GetPlayerShieldSlot(index)=3 Then
      SetPlayerInvItemNum(index, 24, 0)
      Call PutVar("CTF.ini", "Settings", "RedCapture", 0)
      Call MapMsg(4, GetPlayerName(index)& " has returned the Red Flag.", 14)
      Call MapMsg(5, GetPlayerName(index)& " has returned the Red Flag.", 14)
      Else
      '********************************
      'TODO:Put Blue Flag Item #   vvv
      '********************************
      If GetPlayerShieldSlot(index)=4 Then
      SetPlayerInvItemNum(index, 24, 0)
      Call PutVar("CTF.ini", "Settings", "BlueCapture", 0)
      Call PutVar("CTF.ini", "Settings", "RedScore", int(GetVar("CTF.ini", "Settings",

    "RedScore"))+1)
      Call MapMsg(4, GetPlayerName(index)& " has scored a point for the Red Team.", 14)
      Call MapMsg(5, GetPlayerName(index)& " has scored a point for the Red Team.", 14)
     End If
     Else
     If GetPlayerShieldSlot(index)=0 Then
      '********************************
      'TODO:Put red Flag Item #          vvv
      '********************************
      Call SetPlayerInvItemNum(index, 24, 3)
      Call SetPlayerShieldSlot(index, 24)
      Call PutVar("CTF.ini", "Settings", "RedCapture", 1)
      Call MapMsg(4, GetPlayerName(index)& " has took the Flag from Red Base.", 14)
      Call MapMsg(5, GetPlayerName(index)& " has took the Flag from Red Base.", 14)
     End If
    End If
    Call CTF_End()
    End Sub

    Sub Blue_Flag(index)
    If GetVar("CTF.ini", "Settings", "BlueCapture") = 1 Then
     '********************************
      'TODO:Put Blue Flag Item #   vvv
     '********************************
      If GetPlayerShieldSlot(index)=4 Then
      SetPlayerInvItemNum(index, 24, 0)
      Call PutVar("CTF.ini", "Settings", "BlueCapture", 0)
      Call MapMsg(4, GetPlayerName(index)& " has returned the Blue Flag.", 14)
      Call MapMsg(5, GetPlayerName(index)& " has returned the Blue Flag.", 14)
      Else
     '********************************
      'TODO:Put Blue Flag Item #    vvv
      '********************************
      If GetPlayerShieldSlot(index)=3 Then
      SetPlayerInvItemNum(index, 24, 0)
      Call PutVar("CTF.ini", "Settings", "RedCapture", 0)
      Call PutVar("CTF.ini", "Settings", "BlueScore", int(GetVar("CTF.ini", "Settings",

    "BlueScore"))+1)
      Call MapMsg(4, GetPlayerName(index)& " has scored a point for the Blue Team.", 14)
      Call MapMsg(5, GetPlayerName(index)& " has scored a point for the Blue Team.", 14)
     End If
     Else
     If GetPlayerShieldSlot(index)=0 Then
      '********************************
      'TODO:Put Blue Flag Item #         vvv
      '********************************
      Call SetPlayerInvItemNum(index, 24, 4)
      Call SetPlayerShieldSlot(index, 24)
      Call PutVar("CTF.ini", "Settings", "BlueCapture", 1)
      Call MapMsg(4, GetPlayerName(index)& " has took the Flag from Blue Base.", 14)
      Call MapMsg(5, GetPlayerName(index)& " has took the Flag from Blue Base.", 14)
     End If
    End If
    Call CTF_End()
    End Sub


    Sub CTF_End()
    If GetVar("CTF.ini", "Settings", "BlueScore")=5 Then
     If If GetVar("CTF.ini", "Settings", "RedScore")=5 Then
     '********************************
     'TODO:Say on every map who won.
     '********************************
     Call MapMsg(1, "Both teams won!", 14)
     Call MapMsg(2, "Both teams won!", 14)
     Call MapMsg(3, "Both teams won!", 14)
     Call MapMsg(4, "Both teams won!", 14)
     Call MapMsg(5, "Both teams won!", 14)
     Call CTF_Exit()
     End If
    End If

    If GetVar("CTF.ini", "Settings", "BlueScore")=5 Then
     '********************************
     'TODO:Say on every map who won.
     '********************************
     Call MapMsg(4, "Blue team has won!", 4)
     Call MapMsg(5, "Blue team has won!", 4)
     Call MapMsg(2, "Blue team has won!", 4)
     Call MapMsg(3, "Blue team has won!", 4)
     Call MapMsg(1, "Blue team has won!", 4)
     Call CTF_Exit()
    End If
    If GetVar("CTF.ini", "Settings", "RedScore")=5 Then
     '********************************
     'TODO:Say on every map who won.
     '********************************
     Call MapMsg(4, "Red team has won!", 4)
     Call MapMsg(5, "Red team has won!", 4)
     Call MapMsg(2, "Red team has won!", 4)
     Call MapMsg(3, "Red team has won!", 4)
     Call MapMsg(1, "Red team has won!", 4)
     Call CTF_Exit()
    End If
    End Sub

    Sub CTF_Exit()
    Dim tele
    tele=1
      Do While Int(tele) < 5
       '********************************
       'TODO:Change Exit Location Here:
       '********************************
       Call SetPlayerMap(GetVar("CTF.ini", "Red", "Player"& tele, index), 4)
       Call SetPlayerX(GetVar("CTF.ini", "Red", "Player"& tele, index), 5)
       Call SetPlayery(GetVar("CTF.ini", "Red", "Player"& tele, index), 5)
       Call SetPlayerInvItemNum(GetVar("CTF.ini", "Red", "Player"& tele, index), 24, 0)
       Call SetPlayerInvItemNum(GetVar("CTF.ini", "Red", "Player"& tele, index), 25, 0)
       Call SetPlayerShieldSlot(GetVar("CTF.ini", "Red", "Player"& tele, index), 24)
       Call SetPlayerHelmetSlot(GetVar("CTF.ini", "Red", "Player"& tele, index), 25)
       tele= tele + 1
      Loop
      tele=1
      Do While Int(tele) < 5
       '********************************
       'TODO:Change Exit Location Here:
       '********************************
       Call SetPlayerMap(GetVar("CTF.ini", "Blue", "Player"& tele, index), 1)
       Call SetPlayerX(GetVar("CTF.ini", "Blue", "Player"& tele, index), 5)
       Call SetPlayery(GetVar("CTF.ini", "Blue", "Player"& tele, index), 5)
       Call SetPlayerInvItemNum(GetVar("CTF.ini", "Blue", "Player"& tele, index), 24, 0)
       Call SetPlayerInvItemNum(GetVar("CTF.ini", "Blue", "Player"& tele, index), 25, 0)
       Call SetPlayerShieldSlot(GetVar("CTF.ini", "Blue", "Player"& tele, index), 24)
       Call SetPlayerHelmetSlot(GetVar("CTF.ini", "Blue", "Player"& tele, index), 25)
       tele= tele + 1
      Loop
      Call PutVar("CTF.ini", "Settings", "GameOn", 0)
      Call PutVar("CTF.ini", "Settings", "RedScore", 0)
      Call PutVar("CTF.ini", "Settings", "BlueScore", 0)
      Call PutVar("CTF.ini", "Settings", "RedCapture", 0)
      Call PutVar("CTF.ini", "Settings", "BlueCapture", 0)
      Call PutVar("CTF.ini", "Red", "Players", 0)
      Call PutVar("CTF.ini", "Red", "Player1", 0)
      Call PutVar("CTF.ini", "Red", "Player2", 0)
      Call PutVar("CTF.ini", "Red", "Player3", 0)
      Call PutVar("CTF.ini", "Red", "Player4", 0)
      Call PutVar("CTF.ini", "Red", "Player5", 0)
      Call PutVar("CTF.ini", "Blue", "Players", 0)
      Call PutVar("CTF.ini", "Blue", "Player1", 0)
      Call PutVar("CTF.ini", "Blue", "Player2", 0)
      Call PutVar("CTF.ini", "Blue", "Player3", 0)
      Call PutVar("CTF.ini", "Blue", "Player4", 0)
      Call PutVar("CTF.ini", "Blue", "Player5", 0)
    End Sub

    '********************************
    'TODO:Add this to the OnDeath Sub
    '********************************
    '********************************
    'TODO:Change Everything here so it works with your maps/items etc.
    '********************************
    If GetPlayerShieldSlot(index)=3 Then
     Call PutVar("CTF.ini", "Settings", "BlueCapture", 0)
     Call MapMsg(4, "The Blue Flag has returned to its base.", 14)
     Call MapMsg(5, "The Blue Flag has returned to its base.", 14)
    End If
    If GetPlayerShieldSlot(index)=4 Then
     Call PutVar("CTF.ini", "Settings", "BlueCapture", 0)
     Call MapMsg(4, "The Blue Flag has returned to its base.", 14)
     Call MapMsg(5, "The Blue Flag has returned to its base.", 14)
    End If
    If GetPlayerHelmetSlot(index)=1 Then
     townx=2
     towny=5
     townmap=4
     Call PlayerWarp(index, Int(townmap), Int(townx), Int(towny) )
    End If
    If GetPlayerHelmetSlot(index)=2 Then
     townx=10
     towny=5
     townmap=5
     Call PlayerWarp(index, Int(townmap), Int(townx), Int(towny) )
    End If
    '********************************
    'TODO:Add this to the Scripted Tiles
    '********************************
    'Red Portal:
    Case 3
    Call CTF_Chose_Red(index)

    'Blue Portal:
    Case 4
    Call CTF_Chose_Blue(index)

    'Around Red Flag
    Case 5
    Call Red_Flag(index)

    'Around Blue Flag
    Case 6
    Call Blue_Flag(index)
    Logged

    Real men use Eclipse Origins v1.1.0 to create their games!
    April 15, 2006, 11:38:01 PM
    Active Member
    ***
    User No : 590
    Posts: 207
  • 0 credits
  • View Inventory
  • Send Money To michael0987
  • Location : Israel
    • View Profile
    its sound cool but you have fix bugs if there are =p

    and I hope its work to you
    Logged

    April 16, 2006, 08:23:41 AM
    ♥ Cake ♥
    Global Moderator
    Advanced Eclipser
    *
    User No : 251
    Posts: 1735
  • 72 credits
  • View Inventory
  • Send Money To Tylian!
    • View Profile
    Well do you think you could help me? im used to writing javascript. Like you said I wrote this just for ideas but I would like to make it work :)
    Logged

    Real men use Eclipse Origins v1.1.0 to create their games!
    April 16, 2006, 09:38:44 AM
    Active Member
    ***
    User No : 658
    Posts: 144
  • 0 credits
  • View Inventory
  • Send Money To Lee_Dragoon
    • View Profile
    Damn thats pretty good, I know java, visual basic .net and html myself, and I wouldn't have gotten that far. I hope someone can help you because that is really awsome. When I get better a scripting I'll let you know, im working on some stuff right now.
    Logged
    April 16, 2006, 09:41:22 AM
    Anonymous
    Guest
    Thanks a bunch :) Im looking over the code right not trying to find some bugs.
    Can someone test it for me? im affraid it might screw up my game  :?
    Logged
    April 16, 2006, 09:43:16 AM
    ♥ Cake ♥
    Global Moderator
    Advanced Eclipser
    *
    User No : 251
    Posts: 1735
  • 72 credits
  • View Inventory
  • Send Money To Tylian!
    • View Profile
    Quote from: Anonymous
    Thanks a bunch :) Im looking over the code right not trying to find some bugs.
    Can someone test it for me? im affraid it might hammer up my game  :?

    Sorry that was me :?
    And I ment to say im looking over it for bugs right now.
    Logged

    Real men use Eclipse Origins v1.1.0 to create their games!
    April 16, 2006, 09:47:15 AM
    michael
    Guest
    try dp there no bugs couse people hate bugs =p
    Logged
    April 16, 2006, 09:48:22 AM
    ♥ Cake ♥
    Global Moderator
    Advanced Eclipser
    *
    User No : 251
    Posts: 1735
  • 72 credits
  • View Inventory
  • Send Money To Tylian!
    • View Profile
    Quote from: michael
    try dp there no bugs couse people hate bugs =p

    Pardon me but DP? sorry in new like I said :?
    Logged

    Real men use Eclipse Origins v1.1.0 to create their games!
    September 21, 2007, 07:14:54 PM
    Member
    **
    User No : 3843
    Posts: 65
  • 0 credits
  • View Inventory
  • Send Money To Sk8erace1
    • View Profile
    • WWW
    think I may have fixed it ^_^ here ya go

    Code: [Select]
    'XXXXXXXXXXXXXXXXXXXXXXXXXX
    Sub CTF_Chose_Red(index)
    'XXXXXXXXXXXXXXXXXXXXXXXXXX
    If GetPlayerHelmetSlot(index)=0 Then
     If GetPlayerShieldSlot(index)=0 Then
      If GetVar("CTF.ini", "Settings", "GameOn") = 1 Then
       Call PlayerMsg(index, "There is already a game started.", 14)
       Call PlayerMsg(index, "Please wait untill another game starts.", 14)
       Else
        If GetVar("CTF.ini", "Red", "Players")=5 Then
        Call PlayerMsg(index, "This team is already full.", 14)
        Else
        Call PlayerMsg(index, "You have joined the red team.", 4)
        Call PlayerMsg(index, "Please wait till both teams have 5 players.", 4)
        Call MapMsg(1, GetPlayerName(index)& " has joined the Red team.", 14)
        Call MapMsg(1, GetPlayerName(index)& " has joined the Red team.", 14)
        Call MapMsg(1, GetPlayerName(index)& " has joined the Red team.", 14)
        Call PutVar("CTF.ini", "Red", "Player"& GetVar("CTF.ini", "Red", "Players"), index)
        Call PutVar("CTF.ini", "Red", "Players", int(GetVar("CTF.ini", "Red", "Players"))+1)
       '********************************
        'TODO:Change Red Wait Room Location Here:
        '********************************
        Call SetPlayerMap(index,3)
        Call SetPlayerX(index, 5)
        Call SetPlayery(index, 5)
        '********************************
        'TODO: Set Item Representing Red Team.
        '********************************
        Call SetPlayerInvItemNum(index, 25, 1)
        Call SetPlayerHelmetSlot(index, 25)
        Call CTF_Begin()
       End If
      End If
      Else
      Call PlayerMsg(index, "Please Unequip your sheild to join a team.", 14)
     End If
     Else
     Call PlayerMsg(index, "Please Unequip your Helmet to join a team.", 14)
    End If
    End Sub

    'XXXXXXXXXXXXXXXXXXXXXXXXXXX
    Sub CTF_Chose_Blue(index)
    'XXXXXXXXXXXXXXXXXXXXXXXXXXXX
    If GetPlayerHelmetSlot(index)=0 Then
     If GetPlayerShieldSlot(index)=0 Then
      If GetVar("CTF.ini", "Settings", "GameOn") = 1 Then
       Call PlayerMsg(index, "There is already a game started.", 14)
       Call PlayerMsg(index, "Please wait untill another game starts.", 14)
       Else
        If GetVar("CTF.ini", "Blue", "Players")=5 Then
        Call PlayerMsg(index, "This team is already full.", 14)
        Else
        Call PlayerMsg(index, "You have joined the blue team.", 1)
        Call PlayerMsg(index, "Please wait till both teams have 5 players.", 1)
        Call MapMsg(1, GetPlayerName(index)& " has joined the blue team.", 14)
        Call MapMsg(2, GetPlayerName(index)& " has joined the blue team.", 14)
        Call MapMsg(3, GetPlayerName(index)& " has joined the blue team.", 14)
        Call PutVar("CTF.ini", "Blue", "Player"& GetVar("CTF.ini", "Blue", "Players"), index)
        Call PutVar("CTF.ini", "Blue", "Players", int(GetVar("CTF.ini", "Blue", "Players"))+1)
        '********************************
        'TODO:Change Blue Wait Room Location Here:
        '********************************
        Call SetPlayerMap(index,2)
        Call SetPlayerX(index, 5)
        Call SetPlayery(index, 5)
        '********************************
        'TODO: Set Item Representing Blue Team.
        '********************************
        Call SetPlayerInvItemNum(index, 25, 2)
        Call SetPlayerHelmetSlot(index, 25)
        Call CTF_Begin()
       End If
      End If
      Else
      Call PlayerMsg(index, "Please Unequip your sheild to join a team.", 14)
     End If
     Else
     Call PlayerMsg(index, "Please Unequip your Helmet to join a team.", 14)
    End If
    End Sub

    'XXXXXXXXXXXXXXXXXXXXXXXX
    Sub CTF_Begin()
    'XXXXXXXXXXXXXXXXXXXXXXXX
    Dim tele
    tele=1
    If GetVar("CTF.ini", "Blue", "Players")=5 Then
     If GetVar("CTF.ini", "Red", "Players")=5 Then
      Call PutVar("CTF.ini", "Settings", "GameOn", 1)
      Do While Int(tele) < 5
       '********************************
       'TODO:Change Red Respawn Location Here:
       '********************************
       Call SetPlayerMap(GetVar("CTF.ini", "Red", "Player"& tele, index), 4)
       Call SetPlayerX(GetVar("CTF.ini", "Red", "Player"& tele, index), 2)
       Call SetPlayery(GetVar("CTF.ini", "Red", "Player"& tele, index), 3+tele)
       tele= tele + 1
      Loop
      tele=1
      Do While Int(tele) < 5
       '********************************
       'TODO:Change Blue Respawn Location Here:
       '********************************
       Call SetPlayerMap(GetVar("CTF.ini", "Blue", "Player"& tele, index), 5)
       Call SetPlayerX(GetVar("CTF.ini", "Blue", "Player"& tele, index), 7)
       Call SetPlayery(GetVar("CTF.ini", "Blue", "Player"& tele, index), 3+tele)
       tele= tele + 1
      Loop
     End If
    End If
    End Sub

    'XXXXXXXXXXXXXXXXXXXXXX
    Sub Red_Flag(index)   
    'XXXXXXXXXXXXXXXXXXXXXX
    If GetVar("CTF.ini", "Settings", "RedCapture") = 1 Then
     '********************************
      'TODO:Put red Flag Item #    vvv
     '********************************
      If GetPlayerShieldSlot(index)=3 Then
      Call SetPlayerInvItemNum(index, 24, 0)
      Call PutVar("CTF.ini", "Settings", "RedCapture", 0)
      Call MapMsg(4, GetPlayerName(index)& " has returned the Red Flag.", 14)
      Call MapMsg(5, GetPlayerName(index)& " has returned the Red Flag.", 14)
      Else
      '********************************
      'TODO:Put Blue Flag Item #   vvv
      '********************************
      If GetPlayerShieldSlot(index)=4 Then
      Call SetPlayerInvItemNum(index, 24, 0)
      Call PutVar("CTF.ini", "Settings", "BlueCapture", 0)
      Call PutVar("CTF.ini", "Settings", "RedScore", int(GetVar("CTF.ini", "Settings", "RedScore"))+1)
      Call MapMsg(4, GetPlayerName(index)& " has scored a point for the Red Team.", 14)
      Call MapMsg(5, GetPlayerName(index)& " has scored a point for the Red Team.", 14)
     End If
     If GetPlayerShieldSlot(index)=0 Then
      '********************************
      'TODO:Put red Flag Item #          vvv
      '********************************
      Call SetPlayerInvItemNum(index, 24, 3)
      Call SetPlayerShieldSlot(index, 24)
      Call PutVar("CTF.ini", "Settings", "RedCapture", 1)
      Call MapMsg(4, GetPlayerName(index)& " has took the Flag from Red Base.", 14)
      Call MapMsg(5, GetPlayerName(index)& " has took the Flag from Red Base.", 14)
     End If
    End If
    Call CTF_End()
    End If
    End Sub
    'XXXXXXXXXXXXXXXXXXXXX
    Sub Blue_Flag(index)
    'XXXXXXXXXXXXXXXXXXXXX
    If GetVar("CTF.ini", "Settings", "BlueCapture") = 1 Then
     '********************************
      'TODO:Put Blue Flag Item #   vvv
     '********************************
      If GetPlayerShieldSlot(index)=4 Then
      Call SetPlayerInvItemNum(index, 24, 0)
      Call PutVar("CTF.ini", "Settings", "BlueCapture", 0)
      Call MapMsg(4, GetPlayerName(index)& " has returned the Blue Flag.", 14)
      Call MapMsg(5, GetPlayerName(index)& " has returned the Blue Flag.", 14)
      Else
     '********************************
      'TODO:Put Blue Flag Item #    vvv
      '********************************
      If GetPlayerShieldSlot(index)=3 Then
      Call SetPlayerInvItemNum(index, 24, 0)
      Call PutVar("CTF.ini", "Settings", "RedCapture", 0)
      Call PutVar("CTF.ini", "Settings", "BlueScore", int(GetVar("CTF.ini", "Settings", "BlueScore"))+1)
      Call MapMsg(4, GetPlayerName(index)& " has scored a point for the Blue Team.", 14)
      Call MapMsg(5, GetPlayerName(index)& " has scored a point for the Blue Team.", 14)
     Else
     If GetPlayerShieldSlot(index)=0 Then
      '********************************
      'TODO:Put Blue Flag Item #         vvv
      '********************************
      Call SetPlayerInvItemNum(index, 24, 4)
      Call SetPlayerShieldSlot(index, 24)
      Call PutVar("CTF.ini", "Settings", "BlueCapture", 1)
      Call MapMsg(4, GetPlayerName(index)& " has took the Flag from Blue Base.", 14)
      Call MapMsg(5, GetPlayerName(index)& " has took the Flag from Blue Base.", 14)
     End If
    End If
    Call CTF_End()
    End If
    End If
    End Sub

    'XXXXXXXXXXXXXXXXXXXX
    Sub CTF_End()       
    'XXXXXXXXXXXXXXXXXXXX
    If GetVar("CTF.ini", "Settings", "BlueScore")=5 Then
     If GetVar("CTF.ini", "Settings", "RedScore")=5 Then
     '********************************
     'TODO:Say on every map who won.
     '********************************
     Call MapMsg(1, "Both teams won!", 14)
     Call MapMsg(2, "Both teams won!", 14)
     Call MapMsg(3, "Both teams won!", 14)
     Call MapMsg(4, "Both teams won!", 14)
     Call MapMsg(5, "Both teams won!", 14)
     Call CTF_Exit()
     End If
    End If

    If GetVar("CTF.ini", "Settings", "BlueScore")=5 Then
     '********************************
     'TODO:Say on every map who won.
     '********************************
     Call MapMsg(4, "Blue team has won!", 4)
     Call MapMsg(5, "Blue team has won!", 4)
     Call MapMsg(2, "Blue team has won!", 4)
     Call MapMsg(3, "Blue team has won!", 4)
     Call MapMsg(1, "Blue team has won!", 4)
     Call CTF_Exit()
    End If
    If GetVar("CTF.ini", "Settings", "RedScore")=5 Then
     '********************************
     'TODO:Say on every map who won.
     '********************************
     Call MapMsg(4, "Red team has won!", 4)
     Call MapMsg(5, "Red team has won!", 4)
     Call MapMsg(2, "Red team has won!", 4)
     Call MapMsg(3, "Red team has won!", 4)
     Call MapMsg(1, "Red team has won!", 4)
     Call CTF_Exit()
    End If
    End Sub

    'XXXXXXXXXXXXXXXXXXX
    Sub CTF_Exit()     
    'XXXXXXXXXXXXXXXXXXX
    Dim tele
    tele=1
      Do While Int(tele) < 5
       '********************************
       'TODO:Change Exit Location Here:
       '********************************
       Call SetPlayerMap(GetVar("CTF.ini", "Red", "Player"& tele, index), 4)
       Call SetPlayerX(GetVar("CTF.ini", "Red", "Player"& tele, index), 5)
       Call SetPlayery(GetVar("CTF.ini", "Red", "Player"& tele, index), 5)
       Call SetPlayerInvItemNum(GetVar("CTF.ini", "Red", "Player"& tele, index), 24, 0)
       Call SetPlayerInvItemNum(GetVar("CTF.ini", "Red", "Player"& tele, index), 25, 0)
       Call SetPlayerShieldSlot(GetVar("CTF.ini", "Red", "Player"& tele, index), 24)
       Call SetPlayerHelmetSlot(GetVar("CTF.ini", "Red", "Player"& tele, index), 25)
       tele= tele + 1
      Loop
      tele=1
      Do While Int(tele) < 5
       '********************************
       'TODO:Change Exit Location Here:
       '********************************
       Call SetPlayerMap(GetVar("CTF.ini", "Blue", "Player"& tele, index), 1)
       Call SetPlayerX(GetVar("CTF.ini", "Blue", "Player"& tele, index), 5)
       Call SetPlayery(GetVar("CTF.ini", "Blue", "Player"& tele, index), 5)
       Call SetPlayerInvItemNum(GetVar("CTF.ini", "Blue", "Player"& tele, index), 24, 0)
       Call SetPlayerInvItemNum(GetVar("CTF.ini", "Blue", "Player"& tele, index), 25, 0)
       Call SetPlayerShieldSlot(GetVar("CTF.ini", "Blue", "Player"& tele, index), 24)
       Call SetPlayerHelmetSlot(GetVar("CTF.ini", "Blue", "Player"& tele, index), 25)
       tele= tele + 1
      Loop
      Call PutVar("CTF.ini", "Settings", "GameOn", 0)
      Call PutVar("CTF.ini", "Settings", "RedScore", 0)
      Call PutVar("CTF.ini", "Settings", "BlueScore", 0)
      Call PutVar("CTF.ini", "Settings", "RedCapture", 0)
      Call PutVar("CTF.ini", "Settings", "BlueCapture", 0)
      Call PutVar("CTF.ini", "Red", "Players", 0)
      Call PutVar("CTF.ini", "Red", "Player1", 0)
      Call PutVar("CTF.ini", "Red", "Player2", 0)
      Call PutVar("CTF.ini", "Red", "Player3", 0)
      Call PutVar("CTF.ini", "Red", "Player4", 0)
      Call PutVar("CTF.ini", "Red", "Player5", 0)
      Call PutVar("CTF.ini", "Blue", "Players", 0)
      Call PutVar("CTF.ini", "Blue", "Player1", 0)
      Call PutVar("CTF.ini", "Blue", "Player2", 0)
      Call PutVar("CTF.ini", "Blue", "Player3", 0)
      Call PutVar("CTF.ini", "Blue", "Player4", 0)
      Call PutVar("CTF.ini", "Blue", "Player5", 0)
    End Sub

    '********************************
    'TODO:Add this to the OnDeath Sub
    '********************************
    '********************************
    'TODO:Change Everything here so it works with your maps/items etc.
    '********************************
    If GetPlayerShieldSlot(index)=3 Then
     Call PutVar("CTF.ini", "Settings", "BlueCapture", 0)
     Call MapMsg(4, "The Blue Flag has returned to its base.", 14)
     Call MapMsg(5, "The Blue Flag has returned to its base.", 14)
    End If
    If GetPlayerShieldSlot(index)=4 Then
     Call PutVar("CTF.ini", "Settings", "BlueCapture", 0)
     Call MapMsg(4, "The Blue Flag has returned to its base.", 14)
     Call MapMsg(5, "The Blue Flag has returned to its base.", 14)
    End If
    If GetPlayerHelmetSlot(index)=1 Then
     townx=2
     towny=5
     townmap=4
     Call PlayerWarp(index, Int(townmap), Int(townx), Int(towny) )
    End If
    If GetPlayerHelmetSlot(index)=2 Then
     townx=10
     towny=5
     townmap=5
     Call PlayerWarp(index, Int(townmap), Int(townx), Int(towny) )
    End If
    '********************************
    'TODO:Add this to the Scripted Tiles
    '********************************
    'Red Portal:
    Case 3
    Call CTF_Chose_Red(index)

    'Blue Portal:
    Case 4
    Call CTF_Chose_Blue(index)

    'Around Red Flag
    Case 5
    Call Red_Flag(index)

    'Around Blue Flag
    Case 6
    Call Blue_Flag(index)
    « Last Edit: September 21, 2007, 07:17:17 PM by Sk8erace1 » Logged

    November 01, 2007, 06:26:44 PM
    Member
    **
    User No : 4515
    Posts: 29
  • 0 credits
  • View Inventory
  • Send Money To bygcrazy
    • View Profile
    in whatpart I need put this code in /away where?
    I mean to this work ?
    Logged
    November 23, 2007, 11:40:52 AM
    The Overlord Rule of The n00bs
    Active Member
    ***
    User No : 1463
    Posts: 122
  • 0 credits
  • View Inventory
  • Send Money To hashbakedgoods
  • Location : The Illegal Alien Camp lol
    I make my own "Stuff"
    • View Profile
    so is this all fixed up?
    Logged


    92% of teens have moved on to rap. If you are part of the 8% who still listen to real music, copy and paste this into your signature. Go ROCK ON EMO FRIEND!
    My baked goods use the finest ingridents. But theres no pot in them lol. ;( The feds caught me last time I did that

    Dont be jealous I am more expensive than you
    You all are probably going to hate me more for this but I don't care so *drum roll*

    I think emo "chicks" (a crude term, female or young lady or something of the sort would be much better) or any kind of emo really is quite pathetic and in extreme cases disturbing.
    That would be because your queer
    November 26, 2007, 05:06:36 AM
    Member
    **
    User No : 3843
    Posts: 65
  • 0 credits
  • View Inventory
  • Send Money To Sk8erace1
    • View Profile
    • WWW
    from what icould see whats wrong with it yes but it may have some errors place most of this code at the bottom of your main.txt and place the little parts where the comment says to put them ^_^
    Logged

    December 09, 2007, 04:01:15 PM
    Chit Chat God
    Demi God
    User No : 4374
    Posts: 6389
  • 2011 credits
  • View Inventory
  • Send Money To Bone
  • Location : All up in this shiznit
    [SB] Commodore
    • View Profile
    ,,,, is this tested or anything?
    Logged

    Admiral for President...

    Quote
    "With it we will all find peace and love, and learn to accept each other for who we are, because we all have one common purpose in life, and that is to enjoy its taste"
    - From the Gospel, JBA 5:18


    December 11, 2007, 11:40:42 PM
    [SB] Sergeant
    Active Member
    ***
    User No : 4911
    Posts: 297
  • 0 credits
  • View Inventory
  • Send Money To ノ◊ㄅサкレ∆z
  • Location : New Zealand
    • View Profile
    • WWW
    One of the most impressive scripts I've seen! Especially for a "noob" as you call yourself ;)
    Logged



    -------------
    MAKER OF SHADOW OF HOPE
    -------------
    They've finally come up with the perfect office computer. If it makes a mistake, it blames another computer.
    -------------
    Man, JoshKlaz, you're AwESOME!
    December 12, 2007, 05:33:42 PM
    Chit Chat God
    Demi God
    User No : 4374
    Posts: 6389
  • 2011 credits
  • View Inventory
  • Send Money To Bone
  • Location : All up in this shiznit
    [SB] Commodore
    • View Profile
    Quote
    One of the most impressive scripts I've seen! Especially for a "noob" as you call yourself 

    check barons super skills for impersive :D

    but yea this is a good script
    Logged

    Admiral for President...

    Quote
    "With it we will all find peace and love, and learn to accept each other for who we are, because we all have one common purpose in life, and that is to enjoy its taste"
    - From the Gospel, JBA 5:18


    January 23, 2008, 07:18:01 AM
    █☻█
    Administrator
    Epic Poster
    *
    User No : 440
    Posts: 8768
  • 494 credits
  • View Inventory
  • Send Money To ÅÐмiядζ ЯξƒµĢ€
  • Location : Delaware, USA
    The Admiral.
    • View Profile
    Which one is better...
    This one: http://www.touchofdeathforums.com/smf5/index.php/,6609.html
    Or the current one?

    This works for EE right?
    Logged

    I no longer offer engine support through PMs.  If you need help, please do so by posting in the correct board, thank you.
    I also do not grant "Moderator" or "Administrator" requests; such a PM will be ignored.


    Remember that marshmallow from Ghost Busters? marsh is a Canadian version of that.

    And thus paperdoll was born! | Sub: "Destroy Game" | Evolve 4.0 -- Evolving Simulaton! | Script Index - Almost ALL of Eclipse's ScriptsOkay, if you are not open-minded, then stop reading...
    Guess what? Telekinesis, Pyrokinesis, Cryokinesis, Hydrokinesis, Electrokinesis, Psychokinesis, Telepathy, Empathy, Energy Balls, Energy Shields, Remote Viewing, and more IS POSSIBLE! If you have an open mind, and willing to TRY IT YOURSELF, then  read THIS FREE BOOK I've compiled myself!
    Hello! I am French and I have found my happiness on your software.
    January 23, 2008, 07:20:28 AM
    Chit Chat God
    Demi God
    User No : 4374
    Posts: 6389
  • 2011 credits
  • View Inventory
  • Send Money To Bone
  • Location : All up in this shiznit
    [SB] Commodore
    • View Profile
    mega necro much?

    sorry I dont hav the kitten necro picture ;)

    @ admiral refuge : the second one ( the one on this page )

    and yea , both shud be EE compatible
    Logged

    Admiral for President...

    Quote
    "With it we will all find peace and love, and learn to accept each other for who we are, because we all have one common purpose in life, and that is to enjoy its taste"
    - From the Gospel, JBA 5:18


    January 23, 2008, 01:03:21 PM
    █☻█
    Administrator
    Epic Poster
    *
    User No : 440
    Posts: 8768
  • 494 credits
  • View Inventory
  • Send Money To ÅÐмiядζ ЯξƒµĢ€
  • Location : Delaware, USA
    The Admiral.
    • View Profile
    Nope, not anymore; Read the rules , necroposting doesn't apply to this board xD

    So this one's better?
    What if I wanted my whole game to be CTF based..ish... Like, where people didn't wait in lobbys and so forth, but just register, level up, and try to make their way to the other side's camp and steal the flag?
    Logged

    I no longer offer engine support through PMs.  If you need help, please do so by posting in the correct board, thank you.
    I also do not grant "Moderator" or "Administrator" requests; such a PM will be ignored.


    Remember that marshmallow from Ghost Busters? marsh is a Canadian version of that.

    And thus paperdoll was born! | Sub: "Destroy Game" | Evolve 4.0 -- Evolving Simulaton! | Script Index - Almost ALL of Eclipse's ScriptsOkay, if you are not open-minded, then stop reading...
    Guess what? Telekinesis, Pyrokinesis, Cryokinesis, Hydrokinesis, Electrokinesis, Psychokinesis, Telepathy, Empathy, Energy Balls, Energy Shields, Remote Viewing, and more IS POSSIBLE! If you have an open mind, and willing to TRY IT YOURSELF, then  read THIS FREE BOOK I've compiled myself!
    Hello! I am French and I have found my happiness on your software.
    January 23, 2008, 05:45:31 PM
    Chit Chat God
    Demi God
    User No : 4374
    Posts: 6389
  • 2011 credits
  • View Inventory
  • Send Money To Bone
  • Location : All up in this shiznit
    [SB] Commodore
    • View Profile
    ah, I remember the change in the rules, sorry :D

    yea, for your idea ( is that what ur doing? flag online? )
    it requires only a bit of tweeking, personally, for my own game, I'm redoing this from scratch, or doing some heavy modification.

    so if you know a thing or two about scripting, its not that hard to modify this to suit your needs
    Logged

    Admiral for President...

    Quote
    "With it we will all find peace and love, and learn to accept each other for who we are, because we all have one common purpose in life, and that is to enjoy its taste"
    - From the Gospel, JBA 5:18


    January 23, 2008, 05:57:18 PM
    █☻█
    Administrator
    Epic Poster
    *
    User No : 440
    Posts: 8768
  • 494 credits
  • View Inventory
  • Send Money To ÅÐмiядζ ЯξƒµĢ€
  • Location : Delaware, USA
    The Admiral.
    • View Profile
    I'm no expert on scripting, but I can modify scripts(actually, after the summer I start up my computer classes with full code learning...ish..)

    Anyway, I'm not making Flag Online, but I am putting plans together to maybe start up The Two Sides(I posted about it before, look up my post for it if you want)
    Logged

    I no longer offer engine support through PMs.  If you need help, please do so by posting in the correct board, thank you.
    I also do not grant "Moderator" or "Administrator" requests; such a PM will be ignored.


    Remember that marshmallow from Ghost Busters? marsh is a Canadian version of that.

    And thus paperdoll was born! | Sub: "Destroy Game" | Evolve 4.0 -- Evolving Simulaton! | Script Index - Almost ALL of Eclipse's ScriptsOkay, if you are not open-minded, then stop reading...
    Guess what? Telekinesis, Pyrokinesis, Cryokinesis, Hydrokinesis, Electrokinesis, Psychokinesis, Telepathy, Empathy, Energy Balls, Energy Shields, Remote Viewing, and more IS POSSIBLE! If you have an open mind, and willing to TRY IT YOURSELF, then  read THIS FREE BOOK I've compiled myself!
    Hello! I am French and I have found my happiness on your software.
    Pages: [1] 2
     


    Powered by MySQL Powered by PHP Powered by SMF 2.0 RC3 | SMF © 2006–2010, Simple Machines LLC
    SimplePortal 2.3.1 © 2008-2009, SimplePortal
    Valid XHTML 1.0! Valid CSS!
    Page created in 0.447 seconds with 32 queries.