Eclipse - Free 2D Mmorpg Maker
September 02, 2010, 10:18:25 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: Auto-Updateing HighScore (fixed)  (Read 5623 times)
0 Members and 1 Guest are viewing this topic.
September 24, 2006, 06:34:26 PM
blarg
Administrator
Demi God
*
User No : 1667
Posts: 4316
  • 683 credits
  • View Inventory
  • Send Money To Zetta Monkey (Fabio)
  • Location : infront of the computer (Duh)
    bluh bluh
    • View Profile
    This script is dead, so I locked it.  If a mod wants it unlocked, feel free to unlock it.
    ~Admiral Refuge






    background info:
    This was orrigionally posted by M4k.
    I changed it and reposted it under zack
    now I fixed it more and am posting it under Homicidal Monkey
    Difficulty: (|||||)> 2/5
    Usefullness: (|||||)>4/5
    here is the code:
    Quote
    Paste this at the bottom of your main.txt
    Quote
    'Auto-update Highscore
    'Coded by zack a.k.a Homicidal Monkey
    'version 1 based on /top5 by m4k
    Sub HighScore(index)
    Dim acc(50)
    Dim Char(50)
    Dim Charlvl(50)
    I=1
    j=1
    C=0
    Cnum = 0
    Call PutVar("accounts\" & GetPlayerLogin(index) & ".ini " , "CHAR" & GetPlayerCharNum(Index) , "Level" , GetPlayerLevel(Index))
    Do While C = 0
       acc(I) = GetVar("accounts.ini", "Players", "Name" & I)
       If acc(I) <> "" Then
          j = 1
          Do While j < 4
             If GetVar("accounts\" & acc(I) & ".ini", "CHAR" & j, "Name") <> "" Then
                Cnum=Cnum+1
                Char(Cnum) = GetVar("accounts\" & acc(I) & ".ini", "CHAR" & j, "Name")
                Charlvl(Cnum) = INT(GetVar("accounts\" & acc(I) & ".ini", "CHAR" & j, "Level"))
             End If
             j = j + 1
          Loop
          I = I + 1
       Else
          C=1
          Max=(I - 1)
       End If
    Loop
    Ca=1
    Cb=2
    Do While Ca < Cnum
       Do While Cb <= Cnum
          If Charlvl(Ca) < Charlvl(Cb) Then
             templvla = Charlvl(Ca)
             templvlb = Charlvl(Cb)
             tempnamea = Char(Ca)
             tempnameb = Char(Cb)
             Charlvl(Ca) = templvlb
             Charlvl(Cb) = templvla
             Char(Ca) = tempnameb
             Char(Cb) = tempnamea
          End If
          Cb=(Cb + 1)
       Loop
       Ca=(Ca + 1)
       Cb=(Ca + 1)
    Loop
    Call battleMsg(index, "Top 5 Players by Level", 15, 0)
    Ca=1
    Do While Ca <= 5
       Call battleMsg(index, Char(Ca) & " = Level " & Charlvl(Ca), 12, 0)
       Ca=Ca+1
    Loop
    Call GlobalMsg("Current Top Player: " & Char(1) & " at level " & charlvl(1), 15)
    End Sub

    Sub UpdateHS(Index)
    Dim acc(50)
    Dim Char(50)
    Dim Charlvl(50)
    z = 1
    Do While C = 0
       If GetVar("accounts.ini", "Players", "Name" & z) <> "" then
          If GetVar("accounts.ini", "Players", "Name" & z) = GetPlayerLogin(index) Then
             C = 1
             'Call PlayerMsg(index, "Acc Exists!", 15)
          End if
          z = z + 1
       Else
          Call PutVar("accounts.ini", "Players", "Name" & z, GetPlayerLogin(index))
          'Call PlayerMsg(index, "Acc Added!", 6)
          C = 1
       End if
    Loop
    end sub   
    ok we are almost done.
    Put this Code at the top of joingame, leftgame, levelup
    Quote
    Call UpdateHS(Index)
              Call Highscore(Index)
    After that you are done.
    Remember:
    Always back-up your main.txt
    How to back-up:
    1) Open Main.txt
    2) Go to file, save as
    3) Type "Main.backup" (with the " ")

    how to open a back-up
    1) open Main.backup with notepad
    2) go to file, save as, main.txt
    3) close main.backup. open main.txt
    « Last Edit: December 26, 2008, 10:20:13 AM by ‪‫‬‭‮‪‫‬‭Admiral Refuge » Logged

    I think Calculus is a pretty cool guy. eh solves intergals  and derivatevs and doesnt afraid of anything.
    September 28, 2006, 12:02:24 PM
    Administrator
    Demi God
    *
    User No : 141
    Posts: 5001
  • 48 credits
  • View Inventory
  • Send Money To unnown
  • -Admin-
    • View Profile
    looks nice
    Logged

    thinks godlord is an crazy dutchie :D
    December 25, 2006, 04:03:53 PM
    Active Member
    ***
    User No : 1940
    Posts: 130
  • 0 credits
  • View Inventory
  • Send Money To Chrono917
  • Location : Wherever I wanna be
    • View Profile
    How do you check the Hi-Scores?
    Logged

    December 25, 2006, 11:48:51 PM
    Cake Supporter
    Global Moderator
    Teh Uberleet
    *
    User No : 1081
    Posts: 3806
  • 0 credits
  • View Inventory
  • Send Money To Ballie
    • View Profile
    You could set up a command to call HighScore(index),cor you can go to, looks like, accounts.ini.
    Logged

    January 04, 2007, 05:06:44 PM
    blarg
    Administrator
    Demi God
    *
    User No : 1667
    Posts: 4316
  • 683 credits
  • View Inventory
  • Send Money To Zetta Monkey (Fabio)
  • Location : infront of the computer (Duh)
    bluh bluh
    • View Profile
    How do you check the Hi-Scores?
    when logging in, someone else logs in, or just make a command under "/help" that calls sub highscore
    Logged

    I think Calculus is a pretty cool guy. eh solves intergals  and derivatevs and doesnt afraid of anything.
    January 04, 2007, 05:25:54 PM
    The Mapper
    Global Moderator
    Teh Uberleet
    *
    User No : 2021
    Posts: 3980
  • 0 credits
  • View Inventory
  • Send Money To Soljah
  • Location : Australia
    Check my Mapping Tut's out!
    • View Profile
    • WWW
    How do you check the Hi-Scores?
    when logging in, someone else logs in, or just make a command under "/help" that calls sub highscore

    The code works nicely, but just how do u make a command under /help that calls sub highscore?? could you help me?
    Logged

    Need Help with Mapping? Check out my tutorials!
    -[Soljah]- Aspects of Mapping
    -[Soljah]- Guide to Mapping Interior's

    Mapper by trade? Enter your maps into competitions!! Click the Image below!

    January 04, 2007, 05:48:48 PM
    blarg
    Administrator
    Demi God
    *
    User No : 1667
    Posts: 4316
  • 683 credits
  • View Inventory
  • Send Money To Zetta Monkey (Fabio)
  • Location : infront of the computer (Duh)
    bluh bluh
    • View Profile
    How do you check the Hi-Scores?
    when logging in, someone else logs in, or just make a command under "/help" that calls sub highscore

    The code works nicely, but just how do u make a command under /help that calls sub highscore?? could you help me?

    Code: [Select]
    Case "/Highscore"
    call Highscore(Index)
    Call UpdateHs(Index)
    exit sub
    Logged

    I think Calculus is a pretty cool guy. eh solves intergals  and derivatevs and doesnt afraid of anything.
    January 04, 2007, 06:03:55 PM
    The Mapper
    Global Moderator
    Teh Uberleet
    *
    User No : 2021
    Posts: 3980
  • 0 credits
  • View Inventory
  • Send Money To Soljah
  • Location : Australia
    Check my Mapping Tut's out!
    • View Profile
    • WWW
    Tyvm
    Logged

    Need Help with Mapping? Check out my tutorials!
    -[Soljah]- Aspects of Mapping
    -[Soljah]- Guide to Mapping Interior's

    Mapper by trade? Enter your maps into competitions!! Click the Image below!

    January 04, 2007, 06:11:18 PM
    The Mapper
    Global Moderator
    Teh Uberleet
    *
    User No : 2021
    Posts: 3980
  • 0 credits
  • View Inventory
  • Send Money To Soljah
  • Location : Australia
    Check my Mapping Tut's out!
    • View Profile
    • WWW
    hmm I no whatcha meen, but where bouts does it go... before? after? or gith in the middle of this


        If LCase(Trim(TextSay)) = "/help" Then
            Call PlayerMsg(index, "Social Commands:", 15)
            Call PlayerMsg(index, "'msghere = Broadcast Message", 15)
            Call PlayerMsg(index, "-msghere = Emote Message", 15)
            Call PlayerMsg(index, "!namehere msghere = Player Message", 15)
            Call PlayerMsg(index, "Available Commands: /help, /info, /who, /fps, /inv, /stats, /train, /party, /join, /leave, /refresh", 15)
        Exit Sub
        End If

    Logged

    Need Help with Mapping? Check out my tutorials!
    -[Soljah]- Aspects of Mapping
    -[Soljah]- Guide to Mapping Interior's

    Mapper by trade? Enter your maps into competitions!! Click the Image below!

    March 27, 2007, 07:37:40 AM
    Newb
    *
    User No : 2357
    Posts: 8
  • 0 credits
  • View Inventory
  • Send Money To zak
    • View Profile
    help wit cmd pl0x
    Logged
    March 27, 2007, 12:53:42 PM
    Newb
    *
    User No : 1187
    Posts: 7
  • 0 credits
  • View Inventory
  • Send Money To Uarepo2
    • View Profile
       Case "/top5"
            Call HighScore(Index)
            Exit Sub


    Anywhere near the end of your commands sub (inbetween 2 subs obviously like this :

    Case "/bell"
            Call GlobalMsg("*ding* *ding* *ding*", 7)
            Exit Sub

       Case "/top5"
            Call HighScore(Index)
            Exit Sub

        Case "/killall"
            If GetPlayerName(index) = "scott300" then
                Call SetPlayerHP(index, 0)
                Call SendPlayerData(index)
            End If
            Exit Sub
    End Select


    Sorry about the glow, Not sure how to put them in there own little boxes lol
    Logged
    April 24, 2007, 03:23:02 PM
    Member
    **
    User No : 2569
    Posts: 70
  • 0 credits
  • View Inventory
  • Send Money To olliepop
  • Location : NZ
    Since Eclipse 3.7
    • View Profile
    ['code']['/code']
    But remove the '
    « Last Edit: April 24, 2007, 03:25:44 PM by olliepop » Logged

    I R EAT YOU MR TEDDY >=]
    April 25, 2007, 03:33:20 PM
    Awesome Panda.
    Active Member
    ***
    User No : 374
    Posts: 259
  • 0 credits
  • View Inventory
  • Send Money To KainBloodbane
  • Location : Canada!!
    Mapper Extrordinaire
    • View Profile
    • WWW
    Great Script! I have a question though. If I want to exclude 3 admins from the high scores named:

    KainBloodbane
    Alex Fernandez
    Lightningsun

    How can I do that? I want them to  be excluded so the other players can fairly get a high score without admins all taking the top spots.
    Logged

    http://www.fantasyworldcreations.com

    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.
    April 25, 2007, 03:59:50 PM
    blarg
    Administrator
    Demi God
    *
    User No : 1667
    Posts: 4316
  • 683 credits
  • View Inventory
  • Send Money To Zetta Monkey (Fabio)
  • Location : infront of the computer (Duh)
    bluh bluh
    • View Profile
    Great Script! I have a question though. If I want to exclude 3 admins from the high scores named:

    KainBloodbane
    Alex Fernandez
    Lightningsun

    How can I do that? I want them to  be excluded so the other players can fairly get a high score without admins all taking the top spots.
    I believe this would exclude admins:
    Code: [Select]
    Sub UpdateHS(Index)
    Dim acc(50)
    Dim Char(50)
    Dim Charlvl(50)
    z = 1
    Do While C = 0
       If GetPlayerAccess(Index) < 2 then
       If GetVar("accounts.ini", "Players", "Name" & z) <> "" then
          If GetVar("accounts.ini", "Players", "Name" & z) = GetPlayerLogin(index) Then
             C = 1
             'Call PlayerMsg(index, "Acc Exists!", 15)
          End if
          z = z + 1
       Else
          Call PutVar("accounts.ini", "Players", "Name" & z, GetPlayerLogin(index))
          'Call PlayerMsg(index, "Acc Added!", 6)
          C = 1
       End if
    End If
    Loop
    end sub   
    Logged

    I think Calculus is a pretty cool guy. eh solves intergals  and derivatevs and doesnt afraid of anything.
    April 25, 2007, 04:13:23 PM
    ćŎďēŔ
    Advanced Member
    ****
    User No : 2080
    Posts: 980
  • 0 credits
  • View Inventory
  • Send Money To ۩ŞṗάỈᾗἷỗהּ۩
    • View Profile
    Ohh, I think I better add that to the server now, Thanks.
    Doesn't Work.
    When I step on the scripted tile since I added the exclued admins it says this script is taking longer then expected to execute.
    Logged

    Real men use Eclipse Origins to create their games!
    April 25, 2007, 05:33:56 PM
    Cake Supporter
    Global Moderator
    Teh Uberleet
    *
    User No : 1081
    Posts: 3806
  • 0 credits
  • View Inventory
  • Send Money To Ballie
    • View Profile
    It's because there's a loop while C = 0. A simple exit sub or a C = 1 should fix it.

    Quote
    Sub UpdateHS(Index)
    Dim acc(50)
    Dim Char(50)
    Dim Charlvl(50)
    z = 1
    Do While C = 0
       If GetPlayerAccess(Index) < 2 then
       If GetVar("accounts.ini", "Players", "Name" & z) <> "" then
          If GetVar("accounts.ini", "Players", "Name" & z) = GetPlayerLogin(index) Then
             C = 1
             'Call PlayerMsg(index, "Acc Exists!", 15)
          End if
          z = z + 1
       Else
          Call PutVar("accounts.ini", "Players", "Name" & z, GetPlayerLogin(index))
          'Call PlayerMsg(index, "Acc Added!", 6)
          C = 1
       End if
    Else
    Exit Sub

    End If
    Loop
    end sub   
    « Last Edit: April 25, 2007, 05:38:29 PM by balliztik1 » Logged

    April 25, 2007, 06:38:21 PM
    ćŎďēŔ
    Advanced Member
    ****
    User No : 2080
    Posts: 980
  • 0 credits
  • View Inventory
  • Send Money To ۩ŞṗάỈᾗἷỗהּ۩
    • View Profile
    Thanks Balliztik, Unfortunatly it still doesn't work Its easier just to give staff items that boost stats rather then them havning levels anyways
    Logged

    Real men use Eclipse Origins to create their games!
    April 30, 2007, 05:30:52 AM
    Veteran
    Active Member
    *
    User No : 1842
    Posts: 190
  • 0 credits
  • View Inventory
  • Send Money To Flaw
  • AE Founder
    • View Profile
    relating to this... Is there a way to post a top 50 players on a game website... and have the client auto up date that? at set time intervals?
    Logged



    Co-founder of Aftertouch Entertainment
    April 30, 2007, 06:53:24 AM
    Administrator
    Demi God
    *
    User No : 141
    Posts: 5001
  • 48 credits
  • View Inventory
  • Send Money To unnown
  • -Admin-
    • View Profile
    yeah it is possible but only if you can create an ftp upload program
    Logged

    thinks godlord is an crazy dutchie :D
    May 29, 2007, 05:28:31 AM
    Veteran
    Active Member
    *
    User No : 1842
    Posts: 190
  • 0 credits
  • View Inventory
  • Send Money To Flaw
  • AE Founder
    • View Profile
    Sorry for necropost, but I just remembered that I posted here...

    How to I make an FTP upload program?
    Logged



    Co-founder of Aftertouch Entertainment
    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.368 seconds with 29 queries.