memo: all meth and vars for main objects pyspades

Installation support, coding tips, and general tutorials.
24 posts Page 1 of 2 First unread post
thepolm3
Scripter
Scripter
Posts: 424
Joined: Sat Feb 16, 2013 10:49 pm


I'll forget this soon, So here is a list of all the variables and methods in pyspades protocol:
don't worry if you don't know what this is :)
so for example,
Code: Select all
def getIP(protocol):
    return protocol.ip
Protocol
Spoiler:
_next_time_announce()
_time_up()
add_ban()
advance_rotation()
call_end()
cancel_vote()
check_client()
connect()
connectTCP()
connection_class()
data_received()
format()
format_lines()
getPage()
get_advance_time()
get_cp_entities()
get_fog_color()
get_map()
get_map_rotation()
get_mode_mode()
get_mode_name()
get_name()
get_random_location()
got_external_ip()
got_master_connection()
irc_say()
is_indestructable()
listenTCP()
map_rotator_type()
master_disconnected()
on_advance()
on_ban()
on_ban_attempt()
on_base_spawn()
on_connect()
on_cp_capture()
on_disconnect()
on_flag_spawn()
on_game_end()
on_map_change()
on_map_leave()
on_update_entity()
on_world_update()
receive_callback()
reconnect_master()
remove_ban()
remove_peer()
reset_game()
reset_tc()
save_bans()
send_chat()
send_contained()
send_tip()
set_fog_color()
set_map()
set_map_name()
set_map_rotation()
set_master()
set_master_state()
set_time_limit()
team_class()
undo_last_ban()
update()
update_entities()
update_format()
update_loop()
update_master()
update_network()
update_world__dict__
__doc__
__module__
__weakref__
advance_call
advance_on_win
balanced_teams
ban_manager
ban_publish
bans
blue_team
building
clients
config
connections
console
debug_log
default_ban_time
default_cap_limit
default_time_limit
end_calls
entities
everyone_is_admin
fall_damage
fog_color
friendly_fire
friendly_fire_time
game_mode
game_mode_name
global_chat
god_blocks
green_team
hard_bans
host
identifier
interface
ip
irc_relay
is_client
killing
last_time
login_retries
loop_count
map
map_info
map_rotator
maps
master
master_connection
master_reconnect_call
max_connections
max_connections_per_ip
max_players
max_score
melee_damage
name
passwords
planned_map
player_ids
player_memory
players
playersMaxed
port
pos_table
refill_interval
remote_console
respawn_time
respawn_waves
server_prefix
server_version
set_god_build
spade_teamkills_on_grief
spawns
spectator_name
spectator_team
speedhack_detect
start_time
team1_color
team1_name
team2_color
team2_name
teams
teamswitch_interval
time_announce_schedule
time_announcements
timestamps
user_blocks
version
win_count
winning_player
Connection:
Spoiler:
_can_build()
_connection_ack()
_on_fall()
_on_reload()
_send_connection_data()
add_score()
ban()
capture_flag()
check_refill()
continue_map_transfer()
disconnect()
drop_flag()
get_location()
get_respawn_time()
get_spawn_location()
grenade_exploded()
hit()
is_location_free()
is_valid_position()
kick()
kill()
loader_received()
on_animation_update()
on_block_build()
on_block_build_attempt()
on_block_destroy()
on_block_removed()
on_chat()
on_chat_sent()
on_color_set()
on_color_set_attempt()
on_command()
on_connect()
on_disconnect()
on_fall()
on_flag_capture()
on_flag_drop()
on_flag_take()
on_grenade()
on_grenade_thrown()
on_hack_attempt()
on_hit()
on_join()
on_kill()
on_line_build()
on_line_build_attempt()
on_login()
on_orientation_update()
on_position_update()
on_refill()
on_reset()
on_secondary_fire_set()
on_shoot_set()
on_spawn()
on_spawn_location()
on_team_changed()
on_team_join()
on_team_switch_attempt()
on_tool_changed()
on_tool_set_attempt()
on_user_login()
on_walk_update()
on_weapon_set()
refill()
reset()
respawn()
send_chat()
send_contained()
send_data()
send_lines()
send_map()
set_hp()
set_location()
set_location_safe()
set_team()
set_weapon()
spawn()
take_flag()
timed_out__dict__
address
admin
best_streak
blocks
building
chat_count
chat_time
color
deaf
disconnected
filter_animation_data
filter_visibility_data
filter_weapon_input
fly
freeze_animation
god
god_build
grenades
hp
invisible
killing
kills
last_block
last_block_destroy
last_chat
last_position_update
last_refill
last_switch
latency
login_retries
map_data
map_packets_sent
mute
name
peer
player_id
printable_name
protocol
rapid_hack_detect
rapids
respawn_time
rights
saved_loaders
spawn_call
spawns
speedhack_detect
streak
team
timeout_call
timers
tool
user_types
weapon
weapon_object
connection.world_object
Spoiler:
can_see()
cast_ray()
delete()
fall_callback()
initialize()
set_animation()
set_crouch()
set_dead()
set_orientation()
set_position()
set_walk()
set_weapon()
airborne
crouch
dead
down
jump
left
name
orientation
position
primary_fire
right
secondary_fire
sneak
sprint
up
velocity
wade
world
team
Spoiler:
count()
get_entities()
get_entity_location()
get_players()
get_random_location()
initialize()
set_base()
base
color
cp
flag
id
kills
last_spawn
locked
name
other
protocol
score
spawn_cp
connection.weapon_object
Spoiler:
get_ammo()
get_damage()
is_empty()
on_reload()
reload()
reload_callback()
reset()
restock()
ammo
current_ammo
current_stock
damage
delay
id
name
next_shot
reload_time
reloading
shoot
shoot_time
slow_reload
start
stock
grenade
Spoiler:
callback()
delete()
get_damage()
get_next_collision()
fuse
name
position
team
velocity
world
CP (control point)
Spoiler:
add_player()
remove_player()
update_rate()
send_progress()
finish()
get_progress()
update()
id
protocol
team
progress
players
start
rate
rate_value
finish_call
capturing_team
Please feel free to ask any questions

FAQ
Spoiler:
How do I change a team name from inside a script? team1_name doesn't work
You need to change both self.team1_name and self.blue_team.name
Last edited by thepolm3 on Sun Aug 18, 2013 11:17 am, edited 4 times in total.
danhezee
Former Admin / Co-founder
Former Admin / Co-founder
Posts: 1710
Joined: Wed Oct 03, 2012 12:09 am


cool, I am glad you took the time to find all the little hooks we can override
thepolm3
Scripter
Scripter
Posts: 424
Joined: Sat Feb 16, 2013 10:49 pm


would do the same for connection, team and world_object, but unfourtunately my server broke :'(
EDIT: fixed server and did all I said above ^^
Falk3n
Deuce
Posts: 6
Joined: Tue Nov 06, 2012 7:54 pm


This will probably be really useful to some other scripters. Good job.
thepolm3
Scripter
Scripter
Posts: 424
Joined: Sat Feb 16, 2013 10:49 pm


Just added probably the most seful of all: CP's. Its exciting!
Kamikaze_Blargle
Blue Master Race
Blue Master Race
Posts: 263
Joined: Mon Dec 17, 2012 5:43 pm


I...Love..You... This has helped so much <3333333
thepolm3
Scripter
Scripter
Posts: 424
Joined: Sat Feb 16, 2013 10:49 pm


I'm glad to have helped
learn_more
Coder
Coder
Posts: 891
Joined: Sun Mar 24, 2013 9:59 pm


so you basically did 'print dir()' on a few things?
thepolm3
Scripter
Scripter
Posts: 424
Joined: Sat Feb 16, 2013 10:49 pm


yup :D its a memo
thepolm3
Scripter
Scripter
Posts: 424
Joined: Sat Feb 16, 2013 10:49 pm


hmmmm
Last edited by thepolm3 on Fri Jun 28, 2013 8:42 pm, edited 1 time in total.
Kamikaze_Blargle
Blue Master Race
Blue Master Race
Posts: 263
Joined: Mon Dec 17, 2012 5:43 pm


thepolm3 wrote:
hmmmm
why is the heading of that post black? ':o
thepolm3
Scripter
Scripter
Posts: 424
Joined: Sat Feb 16, 2013 10:49 pm


oO
my posts now have black headings?
Kamikaze_Blargle
Blue Master Race
Blue Master Race
Posts: 263
Joined: Mon Dec 17, 2012 5:43 pm


I guess ^^

*edit* ugh nvm, im a fkin retard...
never noticed it before, but the last post in a topic has a black heading... i guess...
thepolm3
Scripter
Scripter
Posts: 424
Joined: Sat Feb 16, 2013 10:49 pm


ahahahaha me too
Jdrew
Mapper
Mapper
Posts: 4808
Joined: Tue Oct 30, 2012 10:48 pm


this should be stickied
24 posts Page 1 of 2 First unread post
Return to “Help!”

Who is online

Users browsing this forum: No registered users and 11 guests