Build and Shoot News Letter #3

Our latest need-to-know information.
40 posts Page 3 of 3
VladVP
Post Demon
Post Demon
Posts: 1425
Joined: Fri Dec 14, 2012 10:48 pm


Strozzi wrote:
Blue_Happy1
EEK! A blue sympatist! Kill it with fire!!! Green_Surprised2 Green_Septic Green_Spade Green_Rifle
Buffet_of_Lies
Mapper
Mapper
Posts: 402
Joined: Tue Nov 20, 2012 11:25 am


Just for the record, here is the latest release of BR's Blood Shot blood splatter server script.
Code: Select all
from commands import *
from pyspades.world import *
from pyspades.constants import *
from pyspades.server import *
from pyspades.common import *

MAX_BLOOD = 250
BLOOD_COLOR = (175, 20, 20)

def apply_script(protocol, connection, config):
        class BloodConnection(connection):
                def on_hit(hitter, hit_amount, hittee, type, grenade):
                        #hitter.protocol.send_chat("on hit: " + hitter.name + ", " + str(hit_amount) + ", " + hittee.name + ", " + str(type) + ", " + str(grenade))
                        result = connection.on_hit(hitter, hit_amount, hittee, type, grenade)
                        if result == False or result <= 0 or MAX_BLOOD <= 0:
                                return result
                        if result is not None:
                                hit_amount = result
                        #hitter.protocol.send_chat("hit not cancelled, new damage " + str(hit_amount))
                        pos = hittee.world_object.position
                        pos2 = hitter.world_object.position
                        for i in range(min(10, int(hit_amount / 10) + 1)):
                                #hitter.protocol.send_chat("trace")
                                dir = pos - pos2
                                dir.normalize()
                                dir.x = dir.x + random.random() * 0.4 - 0.2
                                dir.y = dir.y + random.random() * 0.4 - 0.2
                                dir.z = dir.z + random.random() - 0.2
                                dir.normalize()
                                c = Character(hittee.world_object.world, pos, dir)
                                loc = c.cast_ray()
                                if loc:
                                #if cast_ray(hittee.world_object.world.map.map, pos.x, pos.y, pos.z, dir.x, dir.y, dir.z, 8, x, y, z):
                                        x, y, z = loc
                                        #hitter.protocol.send_chat(str(x) + ", " + str(y) + ", " + str(z) + ", ray found")
                                        if x < 0 or y < 0 or z < 0 or x >= 512 or y >= 512 or z >= 63:
                                                continue
                                        #hitter.protocol.send_chat("painting")
                                        if hitter.protocol.map.get_color(x, y, z) == BLOOD_COLOR:
                                                continue
                                        if hitter.protocol.index >= MAX_BLOOD:
                                                solid = hitter.protocol.map.get_point(hitter.protocol.blood[hitter.protocol.index % MAX_BLOOD][0], hitter.protocol.blood[hitter.protocol.index % MAX_BLOOD][1], hit
ter.protocol.blood[hitter.protocol.index % MAX_BLOOD][2])
                                                if solid and hitter.protocol.blood[hitter.protocol.index % MAX_BLOOD][3] is not None:
                                                        hitter.protocol.map.set_point(hitter.protocol.blood[hitter.protocol.index % MAX_BLOOD][0], hitter.protocol.blood[hitter.protocol.index % MAX_BLOOD][1], hit
ter.protocol.blood[hitter.protocol.index % MAX_BLOOD][2], hitter.protocol.blood[hitter.protocol.index % MAX_BLOOD][3])
                                                        set_color.value = make_color(*hitter.protocol.blood[hitter.protocol.index % MAX_BLOOD][3])
                                                        set_color.player_id = 32
                                                        hitter.protocol.send_contained(set_color)
                                                        block_action.x = hitter.protocol.blood[hitter.protocol.index % MAX_BLOOD][0]
                                                        block_action.y = hitter.protocol.blood[hitter.protocol.index % MAX_BLOOD][1]
                                                        block_action.z = hitter.protocol.blood[hitter.protocol.index % MAX_BLOOD][2]
                                                        block_action.player_id = 32
                                                        block_action.value = DESTROY_BLOCK
                                                        hitter.protocol.send_contained(block_action, save = True)
                                                        block_action.value = BUILD_BLOCK
                                                        hitter.protocol.send_contained(block_action, save = True)
                                        hitter.protocol.blood[hitter.protocol.index % MAX_BLOOD] = (x, y, z, hitter.protocol.map.get_color(x, y, z))
                                        hitter.protocol.index = hitter.protocol.index + 1
                                        #hitter.protocol.send_chat(str(hitter.protocol.index))
                                        hitter.protocol.map.set_point(x, y, z, BLOOD_COLOR)
                                        set_color.value = make_color(*BLOOD_COLOR)
                                        set_color.player_id = 32
                                        hitter.protocol.send_contained(set_color)
                                        block_action.x = x
                                        block_action.y = y
                                        block_action.z = z
                                        block_action.player_id = 32
                                        block_action.value = DESTROY_BLOCK
                                        hitter.protocol.send_contained(block_action, save = True)
                                        block_action.value = BUILD_BLOCK
                                        hitter.protocol.send_contained(block_action, save = True)
                        #hitter.protocol.send_chat("end")
                        return hit_amount
        class BloodProtocol(protocol):
                blood = {}
                index = 0
        return BloodProtocol, BloodConnection
Sadly, there is a 'scattered block' glitch though. Still really cool. Maybe someone can figure out why it leaves blocks floating in the air after awhile?
Revolet
Deuced Up
Posts: 227
Joined: Thu Nov 15, 2012 1:50 pm


I have a question about the launcher. Will the same security(votekick process, moderation) for 0.75 and 0.76 be added to the version that didn't have moderation at all?
StackOverflow
Head Admin / Co-founder
Head Admin / Co-founder
Posts: 216
Joined: Sat Sep 22, 2012 8:13 am


Revolet wrote:
I have a question about the launcher. Will the same security(votekick process, moderation) for 0.75 and 0.76 be added to the version that didn't have moderation at all?
There will be limited support for older versions. For the most part it will come down to the individuals hosting the server(s) in regards to stuff like moderation.
FaultCheck
Coder
Coder
Posts: 171
Joined: Sun Nov 11, 2012 7:02 pm


@Danhezee - I just wanted to make sure you're not waiting on me, I'm pretty sure I saw a post by you after the contest ended, with a list of badges, but not sure where it went, and not sure if that was the final official. Let me know, and I can get them finished up and over to you.
RyanK
Deuced Up
Posts: 322
Joined: Sat Mar 02, 2013 11:02 pm


Launcher looks awesome! Now I'm hoping for it to happen!
Handles
League Participant
League Participant
Posts: 1087
Joined: Tue Jan 08, 2013 9:46 pm


It will happen. It's just a matter of when. Green_Wink1
RyanK
Deuced Up
Posts: 322
Joined: Sat Mar 02, 2013 11:02 pm


That's good.Can't wait for it! Hopefully it'll be soon.
iqbalfiona
Deuce
Posts: 1
Joined: Thu Sep 19, 2013 10:20 am


I love the epic promotion video. Great job!
ultatv
Deuce
Posts: 2
Joined: Tue Nov 25, 2014 10:53 am


very nice promo this video
40 posts Page 3 of 3
Return to “Official News”

Who is online

Users browsing this forum: No registered users and 1 guest