Hey bro ı need help
Sample:
Question:K[Guard]'a Cevap Olarak 5lk69ka Yazınız.
Reply: 5lk69ka
5lk69ka this section is constantly changing.
How do we edit these codes?
Or can you code it?
Thx <3
from phBot import *
import phBotChat
import struct
import json
import os
import time
def handle_joymax(opcode, data):
if opcode == 0x3026: # Chat Message
# Packet index
index = 0
# Message type: All or Party or Private
if data[index] == 0x01 or data[index] == 0x02 or data[index] == 0x04:
# Parse nick of character
Character = "[KGuard]"
if data[index] != 0x01:
index += 1
CharacterLength = struct.unpack_from('<H', data, index)[0]
index += 2
Character = struct.unpack_from('<' + str(CharacterLength) + 's', data, index)[0].decode('cp1252')
index += CharacterLength
if Character == "[KGuard]":
# Load and search command message
MessageLength = struct.unpack_from('<H', data, index)[0]
index += 2
Message = struct.unpack_from('<' + str(MessageLength * (2 if get_encoding() == 'utf-16le' else 1)) + 's', data, index)[0].decode(get_encoding())
if "K[Guard]'a Cevap Olarak" in Message: # soru geliyor
cevap = ""
for c in reversed(Message):
if c != "k":
cevap += c
else:
break
cevap = cevap[::-1].replace("", "")
#log(cevap)
qeqo = "" + cevap.strip()
phBotChat.Private(Character,qeqo)
time.sleep(0)
Packet = bytearray()
Packet.append(0x01)
Packet.append(0x00)
Packet = Packet + struct.pack('<H', len(qeqo))
Packet = Packet + qeqo.encode('ascii')
inject_joymax(0x7025, Packet, False)
return True
log(‘NfSRO Soru Cevap Aktif Edildi’)