Eclipse - Free 2D Mmorpg Maker
September 02, 2010, 10:20:06 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


Site Author : Topic: level Tokens and storage  (Read 1505 times)
0 Members and 1 Guest are viewing this topic.
January 17, 2006, 09:55:45 PM
Newb
*
User No : 146
Posts: 22
  • 0 credits
  • View Inventory
  • Send Money To Cro
    • View Profile
    Can someone help me make a script that every time a person levels up they gain a token (the token can be handed in like money to a store that will trade you HP, MP, or SP ups and spells) I almost have it down but I want to see if I can give more tokens out depending on the level
    Example: level 2-10 will get 1 token, level 11-20 will get 2 tokens and so on
    Also, Is there a way so spots on the map that items are dropped in, those items will never disappear (such as a personal bank vault or a storage room in player owned houses)
    Logged

    To hell with the Mortals for the Lich is the only way!
    January 18, 2006, 03:11:09 PM
    Active Member
    ***
    User No : 84
    Posts: 171
  • 0 credits
  • View Inventory
  • Send Money To Steve
  • Location : Pacific,MO
    • View Profile
    • WWW
    Find this in you main.txt
    Code: [Select]

    Sub PlayerLevelUp(index)
    Dim I    
    Dim D
    Dim C
       
        C = 0
        Do While GetPlayerExp(index) => GetPlayerNextLevel(index)    
            D = GetPlayerExp(index) - GetPlayerNextLevel(index)
            Call SetPlayerLevel(index, GetPlayerLevel(index) + 1)
            I = Int(GetPlayerSPEED(index) / 10)
            If I < 1 Then I = 1
            If I > 3 Then I = 3
               
            Call SetPlayerPOINTS(index, GetPlayerPOINTS(index) + 1)
            Call SetPlayerExp(index, D)      
            C = C + 1
        Loop
        If C > 1 Then
            'Call GlobalMsg(GetPlayerName(index) & " has gained " & C & " levels!", 6)
        Else
            'Call GlobalMsg(GetPlayerName(index) & " has gained a level!", 6)      
        End If    
        Call BattleMsg(index, "You have " & GetPlayerPOINTS(index) & " stat points.", 9, 0)  
    End Sub

    All you need to do is put this code here:
    Code: [Select]

    Call GiveItem(index, ITEM NUMBER, ITEM AMOUNT)

    You need to put that where it says ------------------HERE-------------------
    Code: [Select]

    Sub PlayerLevelUp(index)
    Dim I    
    Dim D
    Dim C
       
        C = 0
        Do While GetPlayerExp(index) => GetPlayerNextLevel(index)    
            D = GetPlayerExp(index) - GetPlayerNextLevel(index)
            Call SetPlayerLevel(index, GetPlayerLevel(index) + 1)
    --------------------------HERE----------------------------------------------
            I = Int(GetPlayerSPEED(index) / 10)
            If I < 1 Then I = 1
            If I > 3 Then I = 3
               
            Call SetPlayerPOINTS(index, GetPlayerPOINTS(index) + 1)
            Call SetPlayerExp(index, D)      
            C = C + 1
        Loop
        If C > 1 Then
            'Call GlobalMsg(GetPlayerName(index) & " has gained " & C & " levels!", 6)
        Else
            'Call GlobalMsg(GetPlayerName(index) & " has gained a level!", 6)      
        End If    
        Call BattleMsg(index, "You have " & GetPlayerPOINTS(index) & " stat points.", 9, 0)  
    End Sub
    Logged

    Your Friend, (http://www.nextech.byethost.com)
    Steve :) Paperdoll God!

    January 18, 2006, 04:23:15 PM
    Active Member
    ***
    User No : 139
    Posts: 197
  • 0 credits
  • View Inventory
  • Send Money To dbgtrulz
    • View Profile
    • WWW
    Let me see if I remember this correctly, but If you want to give 1 token for each 10 levels, where steve said ITEM AMMOUNT, put:
    Code: [Select]
    Int(GetPlayerLevel(index)/10)
    That takes the players level, divides it by 10, the gets rid of the decimal. For example, if the player leveled to 27, it would divide by 10 (which gives you 2.7) and get rid of the decimal (which will leave you with 2)
    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.22 seconds with 29 queries.