Eclipse - Free 2D Mmorpg Maker
September 02, 2010, 10:17:52 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: Mod+Admin News Script  (Read 2700 times)
0 Members and 1 Guest are viewing this topic.
August 01, 2006, 06:44:36 AM
Official Eclipse Nazi Admin
Administrator
Teh Uberleet
*
User No : 693
Posts: 3518
  • 0 credits
  • View Inventory
  • Send Money To Niko
  • Location : In The Midst Of The Most Wicked Carnival's Circus Tent
    Fear me for I have the power of the BAN HAMMER!
    • View Profile
    Yo guys, im just getting into the scripting thing, and I gotta tell ya it unlocks alot of cool features for your games.  alright so imma start posting some of my scripts up see what u guys think. Heres a sceript I made a while ago.. one of my firsts.

    You guys know when u loggin it says "welcome to <yourgame>"   Well I made a script for when a person with lvl 1 access or higher loggs in it posts a little news on whats going on development side. Only mods+ can see. To change what the news says, just type in the text, then save the main. The jump over to your server contorl panel and click reload scripts.



    Put this under the player join sub... you can edit to your likings, just replace the old welcome script with this.



    Script:

    Code: [Select]
    If GetPlayerAccess(index)>=1 Then
    Call PlayerMsg(index, "Welcome Mods & Admins <News>", 4)
    Else
    Call PlayerMsg (index, "welcome to" & GameName &"!", 15)
    End If
    Logged


    http://www.landsoforderia.com<---NEW WEBSITE!!!!!!!!
    August 01, 2006, 06:52:52 AM
    Eclipse Evolution Dev
    Active Member
    ***
    User No : 1115
    Posts: 414
  • 0 credits
  • View Inventory
  • Send Money To Heytherejake
  • Location : Why would I tell you?
    Currently working on C++ 3D
    • View Profile
    • WWW
    I edited it a bit:

    Add this command
    Code: [Select]
    If LCase(Mid(TextSay, 1, 10)) = "/adminnews" Then
         If GetPlayerAccess => 4
           If Len(TextSay) > 5 Then
               TextSay = Mid(TextSay, 5, Len(TextSay) - 4)          
               Call PUtvar("adminnews.ini", "News", Current, Trim(Textsay))
               Call PlayerMsg(index, "The Admin News has been changed to" & Trim(Textsay), 6)
           End If
          Else
    Call PlayerMsg(index, "You are not authorized to use that command!", 4)
    End If
           Exit Sub
       End If


    And this is the new joingame code
    Code: [Select]
    If GetPlayerAccess(index)>=1 Then
    Call PlayerMsg(index, "Welcome! The Current News is:" & getvar("adminnews.ini", "News", Current), 4)
    Else
    Call PlayerMsg (index, "welcome to" & GameName &"!", 15)
    End If


    Tell me if I made a mistake anywhere...
    Logged

    Quote from: The Pickle
    When Japanese try to make RPGs, somebody sets up us the bomb
    Currently Working On: Flogs and Trockets 3D
    August 01, 2006, 07:02:10 AM
    Official Eclipse Nazi Admin
    Administrator
    Teh Uberleet
    *
    User No : 693
    Posts: 3518
  • 0 credits
  • View Inventory
  • Send Money To Niko
  • Location : In The Midst Of The Most Wicked Carnival's Circus Tent
    Fear me for I have the power of the BAN HAMMER!
    • View Profile
    Looks good, and im still beginer so.. yeah thnxs

    And if u guys didnt no, the sencond scirpt will make a .ini and u type in the admin anf devloper emssage their and it shows up when anyone lvl 1access and above loggs in. So they can be intouch with the latest in development news.
    Logged


    http://www.landsoforderia.com<---NEW WEBSITE!!!!!!!!
    August 01, 2006, 07:03:11 AM
    Eclipse Evolution Dev
    Active Member
    ***
    User No : 1115
    Posts: 414
  • 0 credits
  • View Inventory
  • Send Money To Heytherejake
  • Location : Why would I tell you?
    Currently working on C++ 3D
    • View Profile
    • WWW
    No problem. I have no clue if its correct, cuz I only started with vars last night...
    Logged

    Quote from: The Pickle
    When Japanese try to make RPGs, somebody sets up us the bomb
    Currently Working On: Flogs and Trockets 3D
    August 01, 2006, 07:09:17 AM
    Official Eclipse Nazi Admin
    Administrator
    Teh Uberleet
    *
    User No : 693
    Posts: 3518
  • 0 credits
  • View Inventory
  • Send Money To Niko
  • Location : In The Midst Of The Most Wicked Carnival's Circus Tent
    Fear me for I have the power of the BAN HAMMER!
    • View Profile
    can ya give it a test id love to see if it works, and if it dont we can try to give it a nice de bugging.
    Logged


    http://www.landsoforderia.com<---NEW WEBSITE!!!!!!!!
    August 01, 2006, 07:16:39 AM
    Eclipse Evolution Dev
    Active Member
    ***
    User No : 1115
    Posts: 414
  • 0 credits
  • View Inventory
  • Send Money To Heytherejake
  • Location : Why would I tell you?
    Currently working on C++ 3D
    • View Profile
    • WWW
    I cant, my computer is being evil and wont load any servers....
    Logged

    Quote from: The Pickle
    When Japanese try to make RPGs, somebody sets up us the bomb
    Currently Working On: Flogs and Trockets 3D
    August 01, 2006, 08:09:02 AM
    ♥ Cake ♥
    Global Moderator
    Advanced Eclipser
    *
    User No : 251
    Posts: 1735
  • 72 credits
  • View Inventory
  • Send Money To Tylian!
    • View Profile
    Quote from: heytherejake
    I edited it a bit:

    Add this command
    Quote
    If LCase(Mid(TextSay, 1, 10)) = "/adminnews" Then
         If GetPlayerAccess => 4 Then
           If Len(TextSay) > 11 Then
               TextSay = Mid(TextSay, 11, Len(TextSay) - 10)          
               Call PutVar("adminnews.ini", "News", Current, Trim(Textsay))
               Call PlayerMsg(index, "The Admin News has been changed to: " & Trim(Textsay), 6)
           End If
          Else
       Call PlayerMsg(index, "You are not authorized to use that command!", 4)
       End If
           Exit Sub
       End If


    And this is the new joingame code
    Quote
    If GetPlayerAccess(index)>=1 Then
    Call PlayerMsg(index, "Welcome! The Current News is:" & Trim(GetVar("adminnews.ini", "News", Current)), 4)
    'Note: I added a trim to the above line to remove any errors, Its not required though
    Else
    Call PlayerMsg (index, "Welcome to " & GameName &"!", 15)
    'ERROR: You didnt define GameName
    End If


    Tell me if I made a mistake anywhere...


    I changed any errors I found in the code above...
    I hilighted them in red

    Edit: For the record.. its still untested...
    Logged

    Real men use Eclipse Origins v1.1.0 to create their games!
    August 01, 2006, 08:25:23 AM
    Eclipse Evolution Dev
    Active Member
    ***
    User No : 1115
    Posts: 414
  • 0 credits
  • View Inventory
  • Send Money To Heytherejake
  • Location : Why would I tell you?
    Currently working on C++ 3D
    • View Profile
    • WWW
    Thanks! I knew I screwed SOMETHING up... And for not defining game name, its earlier on, I should have posted teh whole sub
    Logged

    Quote from: The Pickle
    When Japanese try to make RPGs, somebody sets up us the bomb
    Currently Working On: Flogs and Trockets 3D
    August 01, 2006, 08:27:47 AM
    Eclipse Evolution Dev
    Active Member
    ***
    User No : 1115
    Posts: 414
  • 0 credits
  • View Inventory
  • Send Money To Heytherejake
  • Location : Why would I tell you?
    Currently working on C++ 3D
    • View Profile
    • WWW
    Could you explain the numbers for textsay though? I just copied the Bio script for that part...
    Logged

    Quote from: The Pickle
    When Japanese try to make RPGs, somebody sets up us the bomb
    Currently Working On: Flogs and Trockets 3D
    August 01, 2006, 08:59:06 AM
    Ex-Eclipse Programmer
    Veteran
    Active Member
    *
    User No : 1283
    Posts: 303
  • 0 credits
  • View Inventory
  • Send Money To Brutal - Zeldo
  • Pie
    • View Profile
    Ok I change it to the format I use :P and fix it emblem u missed an then after the If GetPlayerAccess => 4 Then

    Here what I came up with(if I post it it messes up the code for some reason so I uploaded it to a file host I have)

    Code Here
    Logged
    August 01, 2006, 09:37:43 AM
    ♥ Cake ♥
    Global Moderator
    Advanced Eclipser
    *
    User No : 251
    Posts: 1735
  • 72 credits
  • View Inventory
  • Send Money To Tylian!
    • View Profile
    Ooo good catch brutal :P


    The numbers are just.. well.. its hard to explain... it gets the text after the /adminnews
    Logged

    Real men use Eclipse Origins v1.1.0 to create their games!
    August 01, 2006, 09:42:00 AM
    Eclipse Evolution Dev
    Active Member
    ***
    User No : 1115
    Posts: 414
  • 0 credits
  • View Inventory
  • Send Money To Heytherejake
  • Location : Why would I tell you?
    Currently working on C++ 3D
    • View Profile
    • WWW
    Is there a tutorial anywhere?
    Logged

    Quote from: The Pickle
    When Japanese try to make RPGs, somebody sets up us the bomb
    Currently Working On: Flogs and Trockets 3D
    August 01, 2006, 09:51:55 AM
    Ex-Eclipse Programmer
    Veteran
    Active Member
    *
    User No : 1283
    Posts: 303
  • 0 credits
  • View Inventory
  • Send Money To Brutal - Zeldo
  • Pie
    • View Profile
    Ya right here XD

    If LCase(Mid(TextSay, 1, 10)) = "/adminnews" Then
    If Len(TextSay) > 11 Then

    The 10 is how long the command is (including the /) The first 11 is to make sure they have more than just the command if u still dont understand msn me
    Logged
    August 01, 2006, 09:56:43 AM
    Eclipse Evolution Dev
    Active Member
    ***
    User No : 1115
    Posts: 414
  • 0 credits
  • View Inventory
  • Send Money To Heytherejake
  • Location : Why would I tell you?
    Currently working on C++ 3D
    • View Profile
    • WWW
    I dont get the eleven, and I dont use msn.. I use aim
    Logged

    Quote from: The Pickle
    When Japanese try to make RPGs, somebody sets up us the bomb
    Currently Working On: Flogs and Trockets 3D
    August 02, 2006, 04:22:00 AM
    Ex-Eclipse Programmer
    Veteran
    Active Member
    *
    User No : 1283
    Posts: 303
  • 0 credits
  • View Inventory
  • Send Money To Brutal - Zeldo
  • Pie
    • View Profile
    The 11 is the make sure they have more than /adminnews when they go to use the command
    Logged
    August 02, 2006, 06:05:38 AM
    Eclipse Evolution Dev
    Active Member
    ***
    User No : 1115
    Posts: 414
  • 0 credits
  • View Inventory
  • Send Money To Heytherejake
  • Location : Why would I tell you?
    Currently working on C++ 3D
    • View Profile
    • WWW
    So if I didnt want to make sure theres more... I would put it as a case? Or make the number the same?
    Logged

    Quote from: The Pickle
    When Japanese try to make RPGs, somebody sets up us the bomb
    Currently Working On: Flogs and Trockets 3D
    August 02, 2006, 08:08:57 AM
    ♥ Cake ♥
    Global Moderator
    Advanced Eclipser
    *
    User No : 251
    Posts: 1735
  • 72 credits
  • View Inventory
  • Send Money To Tylian!
    • View Profile
    Quote
    If LCase(Mid(TextSay, 1, 10)) = "/adminnews" Then
    'If LowerCase of 10 charactors of TextSay starting at charactor #1 is equal to /adminnews
    If Len(TextSay) > 11 Then
    'If the length of textsay is Greater than 11 (To make sure they have more than the command)


    There ya go, exactly what the code does :P

    Edit: If anyone can make this sound better (im confusing myself) then go ahead...
    Logged

    Real men use Eclipse Origins v1.1.0 to create their games!
     


    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.285 seconds with 31 queries.