Hi,,I wnna request a script that everyone can use it
like b4yl
you can do /blocks but it just makes your blocks infinite but anyone can still kill you
[REQUEST]Infinite Blocks
-
Bux Xray
3 Years of Ace of Spades
- Posts: 218
- Joined: Sat Aug 24, 2013 9:07 am
-
-
Kuma
Scripter
- Posts: 758
- Joined: Fri Mar 22, 2013 10:05 am
Here something I made in haste (tested only once) It heals you like the tent/cp heal when you place a block/line.
WARNING: I don't think this script is compatible with PEACE script (PEACE has its own way for infinite blocks)
WARNING: I don't think this script is compatible with PEACE script (PEACE has its own way for infinite blocks)
Code: Select all
from commands import add, name
@name('blocks')
def toggle_infi_blocks(connection):
protocol = connection.protocol
if connection in protocol.players:
connection.infi_blocks = not connection.infi_blocks
return "You are {} infinite blocks mode.".format(["out of", "now in"][int(connection.infi_blocks)])
add(toggle_infi_blocks)
def apply_script(protocol, connection, config):
class blockConnection(connection):
infi_blocks = False
def on_block_build(self, x, y, z):
if self.infi_blocks:
self.refill()
return connection.on_block_build(self, x, y, z)
def on_line_build(self, points):
if self.infi_blocks:
self.refill()
return connection.on_line_build(self, points)
return protocol, blockConnection
Attachments
infiblocks.py
(885 Bytes) Downloaded 321 times
(885 Bytes) Downloaded 321 times
-
Dr.Morphman
Scripter
- Posts: 73
- Joined: Sun Feb 24, 2013 9:55 am
hmm there is no way to actualy set the amount of blocks a player is carrying with him even though there is a player.blocks variable right?
-
Kuma
Scripter
- Posts: 758
- Joined: Fri Mar 22, 2013 10:05 am
Dr.Morphman wrote:hmm there is no way to actualy set the amount of blocks a player is carrying with him even though there is a player.blocks variable right?But there is no way to send the packet to the client so it won't matter any way. (UNLESS almighty polm has a solution!)
EDIT:
This may be done by storing their health in some variables and after the .refill() we can just set their health and ammo to that. The problem is that grenades are similar to blocks and there is no way to send a grenade packet as a ammunition (we can create a grenade in the world like you said.)
Who is online
Users browsing this forum: No registered users and 1 guest