Thread: Looking for people to write rs2hd scripts

Page 2 of 4 FirstFirst 1234 LastLast
Results 11 to 20 of 36
  1. #11  
    Programmer, Contributor, RM and Veteran




    Join Date
    Mar 2007
    Posts
    5,147
    Thanks given
    2,656
    Thanks received
    3,731
    Rep Power
    5000
    Okay looks pretty cool. You should change the copyright lol as you write the script. If it's ok can I add it to the svn?
    .
    Reply With Quote  
     

  2. #12  
     

    Vastiko's Avatar
    Join Date
    Dec 2006
    Posts
    5,700
    Thanks given
    300
    Thanks received
    663
    Rep Power
    5000
    Its fine its not very good anyway lol
    Reply With Quote  
     

  3. #13  
    Banned

    Join Date
    Aug 2008
    Posts
    1,171
    Thanks given
    21
    Thanks received
    44
    Rep Power
    0
    New shutdown script, uses the system update timer packet, idk what easiest
    :hutdown 120 for 2 minutes,
    Code:
    from com.rs2hd.event import Event
    
    # event that runs after 'time' ms
    # shuts down the server
    class shutdownEvent(Event):
    	def __init__(self, time):
    		Event.__init__(self, time)
    	def execute(self):
    		World.getInstance().engine().setIsRunning(False)
    		Event.stop(self)
    
    # shuts down the server gracefully
    def command_shutdown(player, command):
    	if player.getRights() >= 2:
    		# sends the update packet
    		player.getActionSender().sendSystemUpdate(int(int(command[1])/0.6))
    		# register the shutdown event
    		World.getInstance().registerEvent(shutdownEvent(int(command[1])*1000))
    just practicing python a bit as i never did anything in it

    also make sure your system update packet loops through all players
    Code:
    	public void sendSystemUpdate(int time) {
    		for(Player all : World.getInstance().getPlayerList())
    		all.getSession().write(new StaticPacketBuilder().setId(8).addLEShortA(time).toPacket());
    	}
    Reply With Quote  
     

  4. #14  
     

    Vastiko's Avatar
    Join Date
    Dec 2006
    Posts
    5,700
    Thanks given
    300
    Thanks received
    663
    Rep Power
    5000
    Quote Originally Posted by NoobScape View Post
    New shutdown script, uses the system update timer packet, idk what easiest
    :hutdown 120 for 2 minutes,
    Code:
    from com.rs2hd.event import Event
    
    # event that runs after 'time' ms
    # shuts down the server
    class shutdownEvent(Event):
        def __init__(self, time):
            Event.__init__(self, time)
        def execute(self):
            World.getInstance().engine().setIsRunning(False)
            Event.stop(self)
    
    # shuts down the server gracefully
    def command_shutdown(player, command):
        if player.getRights() >= 2:
            # sends the update packet
            player.getActionSender().sendSystemUpdate(int(int(command[1])/0.6))
            # register the shutdown event
            World.getInstance().registerEvent(shutdownEvent(int(command[1])*1000))
    just practicing python a bit as i never did anything in it

    also make sure your system update packet loops through all players
    Code:
        public void sendSystemUpdate(int time) {
            for(Player all : World.getInstance().getPlayerList())
            all.getSession().write(new StaticPacketBuilder().setId(8).addLEShortA(time).toPacket());
        }
    Looks sexy
    Reply With Quote  
     

  5. #15  
    Programmer, Contributor, RM and Veteran




    Join Date
    Mar 2007
    Posts
    5,147
    Thanks given
    2,656
    Thanks received
    3,731
    Rep Power
    5000
    This is probably a slight bump but we need more people.

    Scripts would probably be incorporated into the package manager for easy installation.

    More info: http://www.rune-server.org/showthread.php?t=144187.
    .
    Reply With Quote  
     

  6. #16  
     

    Vastiko's Avatar
    Join Date
    Dec 2006
    Posts
    5,700
    Thanks given
    300
    Thanks received
    663
    Rep Power
    5000
    i WILL GRAHAM
    Reply With Quote  
     

  7. #17  
    Registered Member
    Serenity's Avatar
    Join Date
    Oct 2008
    Age
    35
    Posts
    2,327
    Thanks given
    43
    Thanks received
    44
    Rep Power
    389
    might make a enable and disable configfile for scripts?

    cause then you can shotdown scripts you dont want to be used.

    Reply With Quote  
     

  8. #18  
    Donator


    Join Date
    Mar 2008
    Posts
    1,945
    Thanks given
    118
    Thanks received
    201
    Rep Power
    2104
    mind adding a list of functions?
    Attached image
    Reply With Quote  
     

  9. #19  
    Registered Member BOOM BOOM's Avatar
    Join Date
    Jun 2008
    Age
    27
    Posts
    305
    Thanks given
    4
    Thanks received
    8
    Rep Power
    55
    Would, you need to use "Scripts" for rs2hd 525 also? Or would you just make a class?
    Reply With Quote  
     

  10. #20  
    Banned
    Join Date
    Feb 2008
    Posts
    384
    Thanks given
    30
    Thanks received
    26
    Rep Power
    0
    OO well I was going to ask a few questions about how to do a couple things in python... But thanks for the few people who posted scripts because they solved my dilemma
    Reply With Quote  
     

Page 2 of 4 FirstFirst 1234 LastLast

Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •