Filthy newline drama?
[craw.git] / script / craw.py
blob08ea745895b59b598fdcdd04c0b044bc3030f95d
1 #Nasty hack to import stuff from ../configuration
2 import sys, utility
4 sys.path.append(utility.get_configuration_directory())
6 import configuration, craw, automap, packets, chicken, command, town_portal, player_kill, skills, bncs, item_handler, follow, enchant, battle_orders, party, auto_cast, experience, bind, player_killer, summoner
8 #Set up handlers
10 packet_handler = packets.packet_handler_class()
11 craw.set_packet_handler(packet_handler.process_data)
13 bind_handler = bind.bind_handler_class()
15 command_handler = command.command_handler_class(bind_handler)
16 craw.set_command_handler(command_handler.process_command)
18 automap_handler = automap.automap_handler_class()
19 craw.set_automap_handler(automap_handler.process_data)
21 chicken_handler = chicken.chicken_handler_class()
22 packet_handler.add_byte_handler(chicken_handler.process_bytes)
24 town_portal_handler = town_portal.town_portal_class()
25 packet_handler.add_byte_handler(town_portal_handler.process_bytes)
26 command_handler.town_portal_handler = town_portal_handler
28 player_kill_handler = player_kill.player_kill_handler_class()
29 packet_handler.add_byte_handler(player_kill_handler.process_bytes)
31 skill_handler = skills.skill_handler_class()
32 packet_handler.add_byte_handler(skill_handler.process_bytes)
33 command_handler.skill_handler = skill_handler
35 bncs_packet_handler = bncs.bncs_packet_handler_class()
36 packet_handler.add_byte_handler(bncs_packet_handler.process_bytes)
37 craw.set_bncs_packet_handler(bncs_packet_handler.process_packet)
38 player_kill_handler.bncs_handler = bncs_packet_handler
39 command_handler.bncs_handler = bncs_packet_handler
41 item_handler = item_handler.item_handler_class()
42 craw.set_item_handler(item_handler.process_item)
43 packet_handler.add_byte_handler(item_handler.process_bytes)
45 follow_handler = follow.follow_handler_class(town_portal_handler)
46 packet_handler.add_byte_handler(follow_handler.process_bytes)
48 enchant_handler = enchant.enchant_handler_class()
49 packet_handler.add_byte_handler(enchant_handler.process_bytes)
51 battle_orders_handler = battle_orders.battle_orders_handler_class()
52 packet_handler.add_byte_handler(battle_orders_handler.process_bytes)
54 party_handler = party.party_handler_class()
55 packet_handler.add_byte_handler(party_handler.process_bytes)
57 auto_cast_handler = auto_cast.auto_cast_handler_class()
58 packet_handler.add_byte_handler(auto_cast_handler.process_bytes)
60 experience_handler = experience.experience_handler_class()
61 packet_handler.add_byte_handler(experience_handler.process_bytes)
63 player_killer_handler = player_killer.player_killer_class(town_portal_handler)
64 bind_handler.player_killer_handler = player_killer_handler
65 packet_handler.add_byte_handler(player_killer_handler.process_bytes)
66 chicken_handler.add_damage_handler(player_killer_handler.process_damage)
67 chicken_handler.add_hostility_handler(player_killer_handler.process_hostility)
69 summoner_handler = summoner.summoner_handler_class()
70 packet_handler.add_byte_handler(summoner_handler.process_bytes)