Time Command

Approved Time Command 1.0 Python

No permission to download

CorrosionX

Plugin Developer
Plugin Developer
Sep 3, 2014
212
85
18
California

yeah...change name of stuff and added day and night commands, thats it. Not sure if thats considered original...
 

balu92

Retired Staff
Retired Staff
Trusted Member
Jul 11, 2014
338
75
28
34
lol, he changed the time just like anyone else?
 

Firestorm

New Member
Member
Oct 16, 2014
9
0
1
I just installed this plugin this afternoon and it doesn't seem to be working. When I looked at the log i go the following:

Code:
[10/16/2014 12:49:10 PM] [Debug] [PluginLoader] Loading plugin TimeCommand.
[10/16/2014 12:49:10 PM] [Exception] [ PluginLoader->LoadPlugin | PluginLoader->LoadPlugins | PluginLoader->ReloadPlugins | PluginLoader->Init | Bootstrap->Init | Bootstrap->AttachBootstrap | Bootstrap->Start | ]
System.IO.IOException: Could not add reference to assembly Fougerite
  at IronPython.Runtime.ClrModule.AddReferenceByPartialName (IronPython.Runtime.CodeContext context, System.String name) [0x00000] in <filename unknown>:0
  at IronPython.Runtime.ClrModule.AddReferenceByPartialName (IronPython.Runtime.CodeContext context, System.String[] names) [0x00000] in <filename unknown>:0
  at Microsoft.Scripting.Interpreter.ActionCallInstruction`2[IronPython.Runtime.CodeContext,System.String[]].Run (Microsoft.Scripting.Interpreter.InterpretedFrame frame) [0x00000] in <filename unknown>:0
  at Microsoft.Scripting.Interpreter.Interpreter.Run (Microsoft.Scripting.Interpreter.InterpretedFrame frame) [0x00000] in <filename unknown>:0
Any suggestions on how to fix this or is there an issue with the plugin?
 

h0wHigh

Retired Staff
Retired Staff
Aug 5, 2014
103
9
18
Can't seem to do /time 8 but /time day and /time night works.
 

DreTaX

Probably knows the answer...
Administrator
Jun 29, 2014
4,093
4,784
113
At your house.
github.com
Can't seem to do /time 8 but /time day and /time night works.
Python:
__author__ = 'BogdanWDK'
__version__ = '1.0'
import clr

clr.AddReferenceByPartialName("Fougerite")
import Fougerite
"""
    Class
"""


class TimeCommand:

    def On_PluginInit(self):
        Util.ConsoleLog("TimeCommand by " + __author__ + " Version: " + __version__ + " loaded.", False)

    def On_Command(self, Player, cmd, args):
        if cmd == "time":
            if len(args) == 0:
                Player.MessageFrom("[SetTime]","============================================")
                Player.MessageFrom("[SetTime]","In order to set time to a certain moment you must use :")
                Player.MessageFrom("[SetTime]","/time day | /time night")
                Player.MessageFrom("[SetTime]","============================================")
            elif len(args) == 1:
                if args[0] == "day":
                    World.Time = 6
                elif args[0] == "night":
                    World.Time = 24
                else:
                    World.Time = int(args[0])
 

h0wHigh

Retired Staff
Retired Staff
Aug 5, 2014
103
9
18
Sweet, that works great. Cheers.
Yeah i'd rather not anyone could change the time :) @DreTaX if you could add/change that, would be great.
 

DreTaX

Probably knows the answer...
Administrator
Jun 29, 2014
4,093
4,784
113
At your house.
github.com
Says im not an admin, when i'm masteradmin.
Pretty much everytime i do a command, with / it says im not an admin.
Oh crap. Use Notepad++ to edit the script. Line 23 should have: if not Player.Admin or self.isMod(Player.SteamID):

Now, If you found that replace the or to and. So It will be: if not Player.Admin and not self.isMod(......

Sent from my Samsung Galaxy S4