featurelist.org
 
bonbon  
total projects: total requests: 3
total comments: 4 assigned features: 3
projects assigned submitted comments replies watched

 
posted on 2008-04-10 20:25:50 by bonbon
class commands: def nearcoord(self, x_origin, y_origin, z_origin, x_range, y_range, z_range, block, team, initiator): for userid in playerlib.getUseridList(team): loc = es.getplayerlocation(userid) if abs(loc[0] - x_origin) <= x_range and abs(loc[1] - y_origin) <= y_range and abs(loc[2] - z_origin) <= z_range: block(userid, initiator) def lightning(self, x_origin, y_origin, z_origin, lightning_range, lightning_time, attacker, team): loc = (x_origin, y_origin, z_origin) effect_time = 0 effect_loop(loc, lightning_time, lightning_range, attacker, effect_time, team) def effect_loop(loc, lightning_time, lightning_range, userid, effect_time, team): if effect_time <= lightning_time: random1 = random.randint(lightning_range * -1, lightning_range) random2 = random.randint(lightning_range * -1, lightning_range) es.server.queuecmd('est_effect 3 #all 0 sprites/lgtning.vmt %s %s %s %s %s %s 1 10 20 40 250 255 255'%(loc[0] + random1, loc[1] + random2, loc[2], loc[0] + random1, loc[1] + random2, loc[2] + 120)) effect_time += 0.03 commands().nearcoord(loc[0] + random1, loc[1] + random2, loc[2], 45, 45, 45, lightning_damage, team, userid) gamethread.delayedname(0.03, 'effect_%s'&#xus;erid, effect_loop, args=(loc, lightning_time, lightning_range, userid, effect_time, team)) def lightning_damage(userid, attacker): random_number = (random.randint(1, 6) * random.randint(1, 6)) - random.randint(1, 10) random_number2 = (random.randint(1, 7) * random.randint(1, 7)) - random.randint(1, 10) random_number3 = (random.randint(1, 7) * random.randint(1, 7)) - random.randint(1, 10) if random_number > 0: es.server.queuecmd('damage %s %s 32 %s'%(userid, random_number3, attacker)) es.tell(attacker, '#multi', '#greenYou have dealt #lightgreen%s #greendamage to #lightgreen%s'%(random_number, playerlib.getPlayer(userid).attributes['name'])) else: if random_number2 > 0: es.server.queuecmd('damage %s %s 32 %s'%(userid, random_number3, attacker)) es.tell(attacker, '#multi', '#greenYou have dealt #lightgreen%s #greendamage to #lightgreen%s'%(random_number2, playerlib.getPlayer(userid).attributes['name'])) else: es.server.queuecmd('damage %s %s 32 %s'%(userid, random_number3, attacker)) es.tell(attacker, '#multi', '#greenYou have dealt #lightgreen%s #greendamage to #lightgreen%s'%(random_number3, playerlib.getPlayer(userid).attributes['name'])) used in a script I had, it uses est_effect, but could be converted if anyone wanted

 
posted on 2008-06-10 09:08:29 by bonbon
yeah, maybe a myeasymenu.setbackbutton('moo') :P

 
posted on 2008-06-12 23:11:56 by bonbon
I like this, I would like to see this seen :o

 
posted on 2008-06-15 20:55:53 by bonbon
def popup_select(ev): if str(ev['popup_name']) in all_of_the_menus: es.cexec(ev['userid'], 'play buttons/button14') that's what I use on a couple of my scripts, works perfectly. you could always use a dict to (it returns the menu name)