Eclipse - Free 2D Mmorpg Maker
September 02, 2010, 10:18:49 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: Script Submission: Save Script (difficulty 1/5)  (Read 4077 times)
0 Members and 1 Guest are viewing this topic.
September 29, 2006, 12:55:48 PM
The Uber-Scriptor
Advanced Member
****
User No : 375
Posts: 590
  • 0 credits
  • View Inventory
  • Send Money To Ilnair
  • Location : Netherlands, The
    The Uber-Scriptor
    • View Profile
    • WWW


    Hello,

    This one was requested, and I did kinda have it. You can make a timer or a command to run it yourself. Note, it does NOT save the weapon/armor slot and such, I did this to prevent some errors I was having from server crashes, and it does NOT affect game play in any way (exept for the fact that you might have to reequip something on first relog after server crash).

    Here you go:

    Code: [Select]
    Sub Save(index)
    Call PutVar("accounts\" & GetPlayerLogin(index) & ".ini " , "CHAR" & GetPlayerCharNum(Index) , "NecklaceSlot" , "0")
    Call PutVar("accounts\" & GetPlayerLogin(index) & ".ini " , "CHAR" & GetPlayerCharNum(Index) , "RingSlot" , "0")
    Call PutVar("Banks\" & GetPlayerLogin(index) & ".ini " , "CHAR" & GetPlayerCharNum(Index) , "NecklaceSlot" , "0")
    Call PutVar("Banks\" & GetPlayerLogin(index) & ".ini " , "CHAR" & GetPlayerCharNum(Index) , "RingSlot" , "0")
    Call PutVar("accounts\" & GetPlayerLogin(index) & ".ini " , "CHAR" & GetPlayerCharNum(Index) , "Guild" , GetPlayerGuild(index))
    Call PutVar("Banks\" & GetPlayerLogin(index) & ".ini " , "CHAR" & GetPlayerCharNum(Index) , "Guild" , GetPlayerGuild(index))

    Call PutVar("accounts\" & GetPlayerLogin(index) & ".ini " , "CHAR" & GetPlayerCharNum(Index) , "EXP" , GetPlayerExp(Index))
    Call PutVar("accounts\" & GetPlayerLogin(index) & ".ini " , "CHAR" & GetPlayerCharNum(Index) , "Class" , GetPlayerClass(Index))
    Call PutVar("accounts\" & GetPlayerLogin(index) & ".ini " , "CHAR" & GetPlayerCharNum(Index) , "Sprite" , GetPlayerSprite(Index))
    Call PutVar("accounts\" & GetPlayerLogin(index) & ".ini " , "CHAR" & GetPlayerCharNum(Index) , "ArmorSlot" , GetPlayerArmorSlot(Index))
    Call PutVar("accounts\" & GetPlayerLogin(index) & ".ini " , "CHAR" & GetPlayerCharNum(Index) , "WeaponSlot" , GetPlayerWeaponSlot(Index))
    Call PutVar("accounts\" & GetPlayerLogin(index) & ".ini " , "CHAR" & GetPlayerCharNum(Index) , "HelmetSlot" , GetPlayerHelmetSlot(Index))
    Call PutVar("accounts\" & GetPlayerLogin(index) & ".ini " , "CHAR" & GetPlayerCharNum(Index) , "ShieldSlot" , GetPlayerShieldSlot(Index))
    Call PutVar("accounts\" & GetPlayerLogin(index) & ".ini " , "CHAR" & GetPlayerCharNum(Index) , "Level" , GetPlayerLevel(Index))
    Call PutVar("accounts\" & GetPlayerLogin(index) & ".ini " , "CHAR" & GetPlayerCharNum(Index) , "HP" , GetPlayerHP(Index))
    Call PutVar("accounts\" & GetPlayerLogin(index) & ".ini " , "CHAR" & GetPlayerCharNum(Index) , "MP" , GetPlayerMP(Index))
    Call PutVar("accounts\" & GetPlayerLogin(index) & ".ini " , "CHAR" & GetPlayerCharNum(Index) , "SP" , GetPlayerSP(Index))
    Call PutVar("accounts\" & GetPlayerLogin(index) & ".ini " , "CHAR" & GetPlayerCharNum(Index) , "STR" , GetPlayerSTR(Index))
    Call PutVar("accounts\" & GetPlayerLogin(index) & ".ini " , "CHAR" & GetPlayerCharNum(Index) , "DEF" , GetPlayerDEF(Index))
    Call PutVar("accounts\" & GetPlayerLogin(index) & ".ini " , "CHAR" & GetPlayerCharNum(Index) , "SPEED" , GetPlayerSPEED(Index))
    Call PutVar("accounts\" & GetPlayerLogin(index) & ".ini " , "CHAR" & GetPlayerCharNum(Index) , "MAGI" , GetPlayerMAGI(Index))
    Call PutVar("accounts\" & GetPlayerLogin(index) & ".ini " , "CHAR" & GetPlayerCharNum(Index) , "POINTS" , GetPlayerPOINTS(Index))
    Call PutVar("accounts\" & GetPlayerLogin(index) & ".ini " , "CHAR" & GetPlayerCharNum(Index) , "Map" , GetPlayerMap(Index))
    Call PutVar("accounts\" & GetPlayerLogin(index) & ".ini " , "CHAR" & GetPlayerCharNum(Index) , "X" , GetPlayerX(Index))
    Call PutVar("accounts\" & GetPlayerLogin(index) & ".ini " , "CHAR" & GetPlayerCharNum(Index) , "Y" , GetPlayerY(Index))
    n = 1
    Do While n < 25
    Call PutVar("accounts\" & GetPlayerLogin(index) & ".ini ", "CHAR" & GetPlayerCharNum(Index), "InvItemNum" & n, GetPlayerInvItemNum(Index, n))
    Call PutVar("accounts\" & GetPlayerLogin(index) & ".ini ", "CHAR" & GetPlayerCharNum(Index), "InvItemVal" & n, GetPlayerInvItemValue(Index, n))
    Call PutVar("accounts\" & GetPlayerLogin(index) & ".ini ", "CHAR" & GetPlayerCharNum(Index), "InvItemDur" & n, GetPlayerInvItemDur(Index, n))
    n = n + 1
    Loop
    n = 1
    Do While n < 21
    Call PutVar("accounts\" & GetPlayerLogin(index) & ".ini ", "CHAR" & GetPlayerCharNum(Index), "Spell" & n, GetPlayerSpell(Index, n))
    n = n + 1
    Loop
    Call PutVar("banks\" & GetPlayerLogin(index) & ".ini " , "CHAR" & GetPlayerCharNum(Index) , "NecklaceSlot" , "0")
    Call PutVar("banks\" & GetPlayerLogin(index) & ".ini " , "CHAR" & GetPlayerCharNum(Index) , "RingSlot" , "0")
    Call PutVar("Banks\" & GetPlayerLogin(index) & ".ini " , "CHAR" & GetPlayerCharNum(Index) , "NecklaceSlot" , "0")
    Call PutVar("Banks\" & GetPlayerLogin(index) & ".ini " , "CHAR" & GetPlayerCharNum(Index) , "RingSlot" , "0")
    Call PutVar("banks\" & GetPlayerLogin(index) & ".ini " , "CHAR" & GetPlayerCharNum(Index) , "EXP" , GetPlayerExp(Index))
    Call PutVar("banks\" & GetPlayerLogin(index) & ".ini " , "CHAR" & GetPlayerCharNum(Index) , "Class" , GetPlayerClass(Index))
    Call PutVar("banks\" & GetPlayerLogin(index) & ".ini " , "CHAR" & GetPlayerCharNum(Index) , "Sprite" , GetPlayerSprite(Index))
    Call PutVar("banks\" & GetPlayerLogin(index) & ".ini " , "CHAR" & GetPlayerCharNum(Index) , "ArmorSlot" , GetPlayerArmorSlot(Index))
    Call PutVar("banks\" & GetPlayerLogin(index) & ".ini " , "CHAR" & GetPlayerCharNum(Index) , "WeaponSlot" , GetPlayerWeaponSlot(Index))
    Call PutVar("banks\" & GetPlayerLogin(index) & ".ini " , "CHAR" & GetPlayerCharNum(Index) , "HelmetSlot" , GetPlayerHelmetSlot(Index))
    Call PutVar("banks\" & GetPlayerLogin(index) & ".ini " , "CHAR" & GetPlayerCharNum(Index) , "ShieldSlot" , GetPlayerShieldSlot(Index))
    Call PutVar("banks\" & GetPlayerLogin(index) & ".ini " , "CHAR" & GetPlayerCharNum(Index) , "Level" , GetPlayerLevel(Index))
    Call PutVar("banks\" & GetPlayerLogin(index) & ".ini " , "CHAR" & GetPlayerCharNum(Index) , "HP" , GetPlayerHP(Index))
    Call PutVar("banks\" & GetPlayerLogin(index) & ".ini " , "CHAR" & GetPlayerCharNum(Index) , "MP" , GetPlayerMP(Index))
    Call PutVar("banks\" & GetPlayerLogin(index) & ".ini " , "CHAR" & GetPlayerCharNum(Index) , "SP" , GetPlayerSP(Index))
    Call PutVar("banks\" & GetPlayerLogin(index) & ".ini " , "CHAR" & GetPlayerCharNum(Index) , "STR" , GetPlayerSTR(Index))
    Call PutVar("banks\" & GetPlayerLogin(index) & ".ini " , "CHAR" & GetPlayerCharNum(Index) , "DEF" , GetPlayerDEF(Index))
    Call PutVar("banks\" & GetPlayerLogin(index) & ".ini " , "CHAR" & GetPlayerCharNum(Index) , "SPEED" , GetPlayerSPEED(Index))
    Call PutVar("banks\" & GetPlayerLogin(index) & ".ini " , "CHAR" & GetPlayerCharNum(Index) , "MAGI" , GetPlayerMAGI(Index))
    Call PutVar("banks\" & GetPlayerLogin(index) & ".ini " , "CHAR" & GetPlayerCharNum(Index) , "POINTS" , GetPlayerPOINTS(Index))
    Call PutVar("banks\" & GetPlayerLogin(index) & ".ini " , "CHAR" & GetPlayerCharNum(Index) , "Map" , GetPlayerMap(Index))
    Call PutVar("banks\" & GetPlayerLogin(index) & ".ini " , "CHAR" & GetPlayerCharNum(Index) , "X" , GetPlayerX(Index))
    Call PutVar("banks\" & GetPlayerLogin(index) & ".ini " , "CHAR" & GetPlayerCharNum(Index) , "Y" , GetPlayerY(Index))
    n = 1
    Do While n < 25
    Call PutVar("banks\" & GetPlayerLogin(index) & ".ini ", "CHAR" & GetPlayerCharNum(Index), "InvItemNum" & n, GetPlayerInvItemNum(Index, n))
    Call PutVar("banks\" & GetPlayerLogin(index) & ".ini ", "CHAR" & GetPlayerCharNum(Index), "InvItemVal" & n, GetPlayerInvItemValue(Index, n))
    Call PutVar("banks\" & GetPlayerLogin(index) & ".ini ", "CHAR" & GetPlayerCharNum(Index), "InvItemDur" & n, GetPlayerInvItemDur(Index, n))
    n = n + 1
    Loop
    n = 1
    Do While n < 21
    Call PutVar("banks\" & GetPlayerLogin(index) & ".ini ", "CHAR" & GetPlayerCharNum(Index), "Spell" & n, GetPlayerSpell(Index, n))
    n = n + 1
    Loop
    End Sub

    Just place that one on the bottom of your main.txt. Now go to your Sub Commands, and then find "Select Case LCase(Trim(TextSay))", without the "and" ofcourse. Right below it paste this:
    Code: [Select]
    Case "/save"
    Call Save(index)
    Exit Sub

    If you want it to run every time you switch map, find Sub OnMapLoad(index), and right below that post:
    Code: [Select]
    Call Save(index)

    Code: [Select]
    '*****************************************************************
    '*****************************************************************
    'XX This script has been created by Ilnair, aka Dinand Mentink  XX
    'XX Please do not give it out saying you made it, or distribute XX
    'XX it anywhere outside the Eclipse forums! Also, please always XX
    'XX distribute these credits along with the script! XX
    'XX           www.nishansu.tk       ©Dinand Mentink (aka Ilnair)XX
    '*****************************************************************
    '*****************************************************************
    « Last Edit: January 19, 2007, 12:34:14 PM by Godlord » Logged

    Ilnair
    Uber-Scriptor

    Nishansu, beta testing. Have a look at http://www.nishansu.com
    October 01, 2006, 07:19:31 AM
    DFAx
    Guest
    thx, I was the 1 that needed but I already figured out how to implement it =)

    sorry for your troubles xD
    Logged
    October 01, 2006, 08:29:29 AM
    The Uber-Scriptor
    Advanced Member
    ****
    User No : 375
    Posts: 590
  • 0 credits
  • View Inventory
  • Send Money To Ilnair
  • Location : Netherlands, The
    The Uber-Scriptor
    • View Profile
    • WWW
    Np dude, already had the script, took me 30 sec.
    Logged

    Ilnair
    Uber-Scriptor

    Nishansu, beta testing. Have a look at http://www.nishansu.com
    October 06, 2006, 06:58:23 PM
    DFAx
    Guest
    no wonder I couldnt find Sub OnMapLoad(index)

    its on EE, not TE X_X

    any solutions to often saving?
    Logged
    October 06, 2006, 08:50:26 PM
    Leader of the Society Of Flaws
    Member
    **
    User No : 1574
    Posts: 52
  • 0 credits
  • View Inventory
  • Send Money To Shadow Master
    • View Profile
    Ilnair u must be a devils worker. Lol
    Logged

    If u are a host I need u for a great game in produtcion we are hoping tobe a great success pm if u can host the game and u can tell em what u want and want wil go on in the game.
    October 07, 2006, 05:03:55 AM
    DFAx
    Guest
    I just did save tiles......

    hmmmmm

    yeah I saw that equipment bug, happened to 2 of my players last nite

    had to clear their equipment.....
    I used the script you provided...hopefully it wont occur anymore

    so u said that doesnt save their equipment?
    Does that mean a possible loss of equipment?
    Logged
    October 08, 2006, 11:17:37 AM
    The Uber-Scriptor
    Advanced Member
    ****
    User No : 375
    Posts: 590
  • 0 credits
  • View Inventory
  • Send Money To Ilnair
  • Location : Netherlands, The
    The Uber-Scriptor
    • View Profile
    • WWW
    No. It means it doesn't save the fact that they are WEARING/WIELDING it. So all that happens is that when the server crashes, some players will have to re-equip some stuf...

    Quote
    and it does NOT affect game play in any way (exept for the fact that you might have to reequip something on first relog after server crash).
    Logged

    Ilnair
    Uber-Scriptor

    Nishansu, beta testing. Have a look at http://www.nishansu.com
    October 08, 2006, 01:54:29 PM
    DFAx
    Guest
    right, sorry, I realized that later because the item still does remain in your inventory

    thx for that awesome script

    I set a 2 minute timer to autosave =)

    I learned how to script in 1 day hehe

    but I did experience 2 minor problems with TE

    These 2 methods do not work
    GetPlayerMaxMP()
    and
    PlaySound()

    maybe PlaySound() isnt in TE, but getPlayerMaxMP()
    Logged
    October 11, 2006, 07:35:07 AM
    The Uber-Scriptor
    Advanced Member
    ****
    User No : 375
    Posts: 590
  • 0 credits
  • View Inventory
  • Send Money To Ilnair
  • Location : Netherlands, The
    The Uber-Scriptor
    • View Profile
    • WWW
    Both are bugged, true.
    Logged

    Ilnair
    Uber-Scriptor

    Nishansu, beta testing. Have a look at http://www.nishansu.com
    October 11, 2006, 08:54:46 AM
    DFAx
    Guest
    actually, the playsound() started to work after awhile...not sure why though, I guess one of my scripts could of conflicted with it or something?

    I'm sure that I had correct usage of it before...oh well, at least it works now
    Logged
    January 19, 2008, 08:24:49 PM
    Newb
    *
    User No : 5295
    Posts: 7
  • 0 credits
  • View Inventory
  • Send Money To silverstein101
    • View Profile
    ok, so I'm new at this, and kind of confused.  what does this do exactly? like, does it save the character so if they die right away, they can go log back in and they'll be where they were before?
    Logged
    January 19, 2008, 09:53:54 PM
    █☻█
    Administrator
    Epic Poster
    *
    User No : 440
    Posts: 8768
  • 494 credits
  • View Inventory
  • Send Money To ÅÐмiядζ ЯξƒµĢ€
  • Location : Delaware, USA
    The Admiral.
    • View Profile
    No, see... without this script, if your server crashes, a player that could be playing the game and lvling for the past hour, would loose everything he did in that hour... this script prevents that
    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:56:04 AM
    Newb
    *
    User No : 3619
    Posts: 12
  • 0 credits
  • View Inventory
  • Send Money To Bradybunch
    • View Profile
    yeah I know I necro posted, but I still needed to know

    lol thanks admiral :)
    Logged
    January 23, 2008, 12:53:26 PM
    █☻█
    Administrator
    Epic Poster
    *
    User No : 440
    Posts: 8768
  • 494 credits
  • View Inventory
  • Send Money To ÅÐмiядζ ЯξƒµĢ€
  • Location : Delaware, USA
    The Admiral.
    • View Profile
    yeah I know I necro posted, but I still needed to know

    lol thanks admiral :)

    Do you = silverstein101?
    *confused*
    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 24, 2008, 11:17:27 AM
    Newb
    *
    User No : 5295
    Posts: 7
  • 0 credits
  • View Inventory
  • Send Money To silverstein101
    • View Profile
    lol my bad

    I was on my friends computer
    Logged
    January 24, 2008, 06:01:31 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 see... Actually you didn't necropost, because the rules have been changed and necroposting is okay in this board(otherwise, you would of gotten a warning) now ^_^
    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 25, 2008, 08:32:26 AM
    Newb
    *
    User No : 5295
    Posts: 7
  • 0 credits
  • View Inventory
  • Send Money To silverstein101
    • View Profile
    thats good, cause every new scripter is going to go looking through this entire section and have questions about it
    Logged
    November 08, 2008, 05:51:41 AM
    Newb
    *
    User No : 9114
    Posts: 1
  • 0 credits
  • View Inventory
  • Send Money To Hoschi
    • View Profile
    no wonder I couldnt find Sub OnMapLoad(index)

    its on EE, not TE X_X

    any solutions to often saving?

    Paste this in the bottom of your Main.txt:
    Code: [Select]
    Sub OnMapLoad(Index)
    Call Save(Index)
    End Sub
    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.393 seconds with 29 queries.