Example #1
0
	def run(self):
		#print 'Entering TP %08x' % self.tp_entry.id
		x, y = self.tp_entry.location
		craw.send_packet('\x03' + utility.pack_number(x, 2) + utility.pack_number(y, 2))
		time.sleep(configuration.follow_portal_move_delay)
		portal_id = utility.pack_number(self.tp_entry.id, 4)
		craw.send_packet('\x04\x02\x00\x00\x00' + portal_id)
		time.sleep(configuration.follow_portal_interact_delay)
		craw.send_packet('\x13\x02\x00\x00\x00' + portal_id)
Example #2
0
	def cast_town_portal(self):
		if utility.town_check() != False:
			print 'You cannot open a town portal inside a town.'
			return False
			
		tome_id = craw.get_tp_tome_id()
		if tome_id == None:
			print 'Unable to cast a town portal because you have no non-empty Tome of Town Portal in your inventory'
			return False
			
		location = craw.get_player_location()
		if location == None:
			print 'Unable to retrieve the location of your character'
			return False
			
		x, y = location
			
		packet = chr(0x20) + utility.pack_number(tome_id, 4) + utility.pack_number(x, 4) + utility.pack_number(y, 4)
		craw.send_packet(packet)
		
		return True
Example #3
0
	def whois_thread(self):
		while True:
			self.lock.acquire()
			if len(self.whois_name_queue) > 0:
				name = self.whois_name_queue[0]
				#print 'Whois thread is processing %s' % name
				command = '/whois %s' % name
				packet = '\xff\x0e' + utility.pack_number(len(command) + 5, 1) + '\x00' + command + '\x00'
				#Missing BNCS connection check?
				craw.send_bncs_packet(packet)
				self.whois_name_queue = self.whois_name_queue[1 : ]
			self.lock.release()
			time.sleep(configuration.whois_delay)
Example #4
0
def hostile_player_string(id):
    packet = "\x5d\x04\x01" + utility.pack_number(id, 4)
    return packet
Example #5
0
def enter_portal(portal_id):
    packet = chr(0x13) + utility.pack_number(2, 4) + utility.pack_number(portal_id, 4)
    craw.send_packet(packet)
Example #6
0
def grant_loot_permission(player_id):
    packet = "\x5d\x01\x01" + utility.pack_number(player_id, 4)
    craw.send_packet(packet)
Example #7
0
def invite_player(player_id):
    packet = "\x5e\x06" + utility.pack_number(player_id, 4)
    craw.send_packet(packet)
Example #8
0
def accept_invitation(player_id):
    packet = "\x5e\x08" + utility.pack_number(player_id, 4)
    craw.send_packet(packet)
Example #9
0
def cast_skill_at_location(side, x, y):
    packet = chr(side) + utility.pack_number(x, 2) + utility.pack_number(y, 2)
    craw.send_packet(packet)
Example #10
0
def cast_skill_at_target(side, type, target):
    packet = chr(side) + utility.pack_number(type, 4) + utility.pack_number(target, 4)
    craw.send_packet(packet)
Example #11
0
def set_skill(skill, side):
    packet = "\x3c" + utility.pack_number(skill, 2) + "\x00" + chr(side) + "\xff\xff\xff\xff"
    craw.send_packet(packet)
Example #12
0
def flash_player(id):
	packet = '\x4b\x00\x00\x00\x00' + utility.pack_number(id, 4)
	craw.send_packet(packet)