Eclipse - Free 2D Mmorpg Maker
September 02, 2010, 10:23:54 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: Script Submission: Mail System (dificulty: 4/5)  (Read 3277 times)
0 Members and 1 Guest are viewing this topic.
June 23, 2006, 03:40:28 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
    Another script submission from me, I'm not gonna do a complete tutorial this time, newby's won't be able to do this, kinda hard, and the advanced scripters over here won't need a tutorial.


    Here it goes:

    The Subs:
    Code: [Select]
    '************************************************
    'Start Mail System! Dinand Mentink - Ilnair
    '************************************************
    Sub ReadMailBox(index)
    Dim msg1
    Dim msg2
    Dim msg3
    Dim msg4
    Dim msg5

    msg1 = GetVar("mailbox.ini", GetPlayerLogin(index) & GetPlayerCharNum(index), "mailbox1")
    msg2 = GetVar("mailbox.ini", GetPlayerLogin(index) & GetPlayerCharNum(index), "mailbox2")
    msg3 = GetVar("mailbox.ini", GetPlayerLogin(index) & GetPlayerCharNum(index), "mailbox3")
    msg4 = GetVar("mailbox.ini", GetPlayerLogin(index) & GetPlayerCharNum(index), "mailbox4")
    msg5 = GetVar("mailbox.ini", GetPlayerLogin(index) & GetPlayerCharNum(index), "mailbox5")

    If msg1 = "No message" Then
    Call PlayerMsg(index, "No messages!", 10)
    Exit Sub
    End If
    Call PlayerMsg(index, "Message1: " & msg1, 10)
    If msg2 = "No message" Then
    Exit Sub
    End If
    Call PlayerMsg(index, "Message2: " & msg2, 10)
    If msg3 = "No message" Then
    Exit Sub
    End If
    Call PlayerMsg(index, "Message3: " & msg3, 10)
    If msg4 = "No message" Then
    Exit Sub
    End If
    Call PlayerMsg(index, "Message4: " & msg4, 10)
    If msg5 = "No message" Then
    Exit Sub
    End If
    Call PlayerMsg(index, "Message5: " & msg5, 10)
    Call ClearMailBox(index)
    End Sub

    Sub ClearMailBox(index)
    Dim postbox

    postbox = 1

    Do While postbox < 6
    Call PutVar("mailbox.ini", GetPlayerLogin(index) & GetPlayerCharNum(index), "mailbox" & postbox, "No message")
    postbox = postbox + 1
    Loop

    Call PlayerMsg(index, "Mailbox cleared!", 10)
    Call PutVar("mailbox.ini", "playernames", GetPlayerName(index), GetPlayerLogin(index) & GetPlayerCharNum(index))
    End Sub
    '************************************************
    'End Mail System! Dinand Mentink - Ilnair
    '************************************************




    Add the following stuff:
    Inside Sub Onjoin:

    Call PutVar("mailbox.ini", "playernames", GetPlayerName(index), GetPlayerLogin(index) & GetPlayerCharNum(index))
       If GetPlayerLevel(index) = 1 and GetPlayerExp(index) = 0 Then
          Call ClearMailBox(index)
       End If

    Create the following scripted item:
       Case 15
          Call playerquerybox(index, "Who do you want to send a message?", 1)
          Exit Sub


    Create the following query box cases:
    Code: [Select]
    Case 1
    player = response
    If GetVar("mailbox.ini", "playernames", player & "") = "" Then
    Call PlayerMsg(index, "Invalid player", 12)
    Exit Sub
    Else
    player = GetVar("mailbox.ini", "playernames", player & "")
    Call PutVar("mailbox.ini", GetPlayerLogin(index) & GetPlayerCharNum(index), "player", player & "")
    Call playerquerybox(index, "What message do you want to send?", 2)
    End If
    Exit Sub

    Case 2
    msg = 1
    player = GetVar("mailbox.ini", GetPlayerLogin(index) & GetPlayerCharNum(index), "player")

    msg1 = GetVar("mailbox.ini", player & "", "mailbox1")
    msg2 = GetVar("mailbox.ini", player & "", "mailbox2")
    msg3 = GetVar("mailbox.ini", player & "", "mailbox3")
    msg4 = GetVar("mailbox.ini", player & "", "mailbox4")
    msg5 = GetVar("mailbox.ini", player & "", "mailbox5")

    If msg1 = "No message" Then
    Call PutVar("mailbox.ini", player & "", "mailbox1", GetPlayerName(index) & ": " & response & "")
    Call PlayerMsg(index, "Message Send!", 10)
    Exit Sub
    End If
    If msg2 = "No message" Then
    Call PutVar("mailbox.ini", player & "", "mailbox2", GetPlayerName(index) & ": " & response & "")
    Call PlayerMsg(index, "Message Send!", 10)
    Exit Sub
    End If
    If msg3 = "No message" Then
    Call PutVar("mailbox.ini", player & "", "mailbox3", GetPlayerName(index) & ": " & response & "")
    Call PlayerMsg(index, "Message Send!", 10)
    Exit Sub
    End If
    If msg4 = "No message" Then
    Call PutVar("mailbox.ini", player & "", "mailbox4", GetPlayerName(index) & ": " & response & "")
    Call PlayerMsg(index, "Message Send!", 10)
    Exit Sub
    End If
    If msg5 = "No message" Then
    Call PutVar("mailbox.ini", player & "", "mailbox5", GetPlayerName(index) & ": " & response & "")
    Call PlayerMsg(index, "Message Send!", 10)
    Exit Sub
    End If
    Call PlayerMsg(index, "Targets Mailbox full!", 10)
    Exit Sub



    Ok, should be working now. Everyone will have an empty mail box when they first join, if you inplement this script when a few people already have an account, just delete them and have them join again ^^.

    To read the message box, make a scripted tile with the following command:

    Case X
       Call ReadMailBox(index)

    to delete the messages (reset mail box), the following command:
    Case X
      Call ClearMailBox(index)


    and the following command will open a player prompt for the message (to send it):

    Case X
       Call playerquerybox(index, "Who do you want to send a message?", 2)







    Good luck
    Logged

    Ilnair
    Uber-Scriptor

    Nishansu, beta testing. Have a look at http://www.nishansu.com
    June 23, 2006, 07:41:39 AM
    The Gnome King
    Global Moderator
    Advanced Eclipser
    *
    User No : 264
    Posts: 1442
  • 26 credits
  • View Inventory
  • Send Money To Draken
  • Location : Texas USA
    • View Profile
    • WWW
    Sweet man thanks I was having problems with that other one :)
    Logged



    With every post my army of gnomes grows larger. Soon we will dominate the WORLD!! DOMINATION!




    Soon looking for a few mappers to help map Storm of Conquest. Will need mappers to do atleast 3 maps a day. PM me with map example if you want to help
    June 23, 2006, 09:39:13 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
    Glad you like it ^^
    Logged

    Ilnair
    Uber-Scriptor

    Nishansu, beta testing. Have a look at http://www.nishansu.com
    June 25, 2007, 05:24:40 PM
    #1 HYPER ACTIVE NIJNA
    Member
    **
    User No : 2969
    Posts: 69
  • 0 credits
  • View Inventory
  • Send Money To shuri-kun
  • Mwhahaha the power of n00b
    • View Profile
    • WWW
    please make a tut  :'(
    Logged

    Game Title: Cobalt Blaze please PM me it you want to be an admin  Maps: 2.1% NPCs: .1% Shops: 0% Items: 5% Scripts: more added every day
    This game will have many features such as mining and fishing and player owned houses
    September 13, 2007, 10:18:36 PM
    Member
    **
    User No : 3843
    Posts: 65
  • 0 credits
  • View Inventory
  • Send Money To Sk8erace1
    • View Profile
    • WWW
    Hey thanks I got it in my game and all but theres one problem. The script wont save the message that I input into the query box to the player or any player at all. and instead of deleting the players accounts cant I just reset them to lvl 1 with 0 xp? I did that with my acc and it worked, thought it would be alot of work but, I dont feel like deleting all of our players.

    anyways any help to geting it to send the messages would be very helpfull thank you!

    Edit: nevermind I solved it =) just had to remove the "Exit sub" in case 1 of the querybox sub
    BTW nice script helps alot!

    Quote
    please make a tut  :'(
    I would be happy to make a tut for you ^_^ just PM me if you want it
    also he has a litlte tut already up there
    « Last Edit: September 13, 2007, 11:51:33 PM by Sk8erace1 » 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.243 seconds with 29 queries.