Eclipse - Free 2D Mmorpg Maker
September 02, 2010, 10:23:50 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 314piwm
[Today at 10:21:04 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


Site Author : Topic: Combined Exp  (Read 2810 times)
0 Members and 1 Guest are viewing this topic.
September 02, 2006, 06:12:42 PM
Active Member
***
User No : 1214
Posts: 199
  • 0 credits
  • View Inventory
  • Send Money To Topher
  • Location : USA
    • View Profile


    Ok, well here is a semi-usefull-ish thing that adds up all of the experience up to the level specified by you in an /exp # command. To install it, paste this to the bottom of your main.txt

    Code: [Select]
    Function ExpCount(index, level)
    Dim exp
    Dim I
    Dim counter

    exp = 0
    counter = 1

    Do While Int(counter) <= Int(level)
    I = Int(GetVar("experience.ini",  "EXPERIENCE", "Exp" & counter))
    exp = Int(Int(exp) + Int(I))
    Counter = counter + 1
    Loop

    ExpCount = Int(exp)
    End Function

    Then, add this under the /warpto command in your Sub Commands

    Code: [Select]
    If LCase(Mid(TextSay, 1, 4)) = "/exp" Then
    If Len(TextSay) > 4 Then
    TextSay = Mid(TextSay, 5, Len(TextSay) - 4)
    x = ExpCount(index, TextSay)
    Call PlayerMsg(index, "The Combined Exp to Level " & TextSay & " is " & x, 14)
    End If
    Exit Sub
    End If

    Ok, well to use this ingame, simply type /exp and a space and the level you want exp added to. For example, /exp 10 to get all the exp added up to level 10 (it will include level 10.)

    To call this function while scripting, use ExpCount(index, level) replacing level with the level you want caluclated to, again, it will include that level.

    Hope you enjoy!
    Topher

    « Last Edit: January 19, 2007, 12:42:51 PM by Godlord » Logged

    September 02, 2006, 06:24:32 PM
    Cake Supporter
    Global Moderator
    Teh Uberleet
    *
    User No : 1081
    Posts: 3806
  • 0 credits
  • View Inventory
  • Send Money To Ballie
    • View Profile
    Nice, but it would help to have a command to see how much total exp you have as well.


    Code: [Select]
    Case "/currentexp"
    Level = GetPlayerLevel(index) - 1
    CurrentExp = GetPlayerExp(index)

    Do While Level >= 1
    CurrentExp = CurrentExp + Int(GetVar("experience.ini",  "EXPERIENCE", "Exp" & level))
    Level = Level -1
    Loop

    Call PlayerMsg(index, "Your total exp is " & CurrentExp, 14)
    Exit Sub
    Logged

    September 02, 2006, 06:26:51 PM
    Active Member
    ***
    User No : 1214
    Posts: 199
  • 0 credits
  • View Inventory
  • Send Money To Topher
  • Location : USA
    • View Profile
    True....thanks  :)
    Logged

     


    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.214 seconds with 28 queries.