Maid python api (client?) です

Forum for alternative clients, mods & discussions on the same.

Maid python api (client?) です

Postby Maid » Sat Dec 28, 2024 8:22 pm

At the great christmas times, neko girls girls come to your house, and give you a present :3

Image

No more yucky よかった java needed to play ur favorite game, meow.

Instameowtion:
Code: Select all
pip install HvH-Maid-API


Uwsage uwu example:
Code: Select all
import time
from HvH_Maid_API import maid_game_client as neko

login = 'Maid'
passw = 'uwuwuwnyadesu3'
shizo_connect_number = 28 #changed times to time, usually increase

neko.combo_connect(login, passw, shizo_connect_number)

neko.wow_im_so_so_smart_java_programmer()
neko.char_select('Neko_Girl', 1)
time.sleep(1)
neko.chat_msg('HASHIRE SORI YO', 2)
time.sleep(4)
neko.chat_msg('KAZE NO YOU NI', 3)
time.sleep(4)
neko.chat_msg('TSUKIMIHARA WO', 4)
time.sleep(4)
neko.chat_msg('PADORU PADORU', 5)
time.sleep(4)


Mewwy cristmasu です
Last edited by Maid on Mon Dec 30, 2024 7:23 pm, edited 1 time in total.
User avatar
Maid
 
Posts: 11
Joined: Sat Dec 28, 2024 7:57 pm

Re: Maid python api (client?) です

Postby noindyfikator » Sat Dec 28, 2024 10:12 pm

game finally playable
User avatar
noindyfikator
 
Posts: 1452
Joined: Fri Jul 15, 2011 11:10 am

Re: Maid python api (client?) です

Postby Maid » Sat Dec 28, 2024 11:47 pm

noindyfikator wrote:game finally playable

I'm glad you liked it, Master! *bow*

I also maked quick example of how to walk and wish meowy christmas to all of your friends who live in houses in the mine (have meowlot of themm >.<)

Code: Select all
song_words = ['HASHIRE SORI YO', 'KAZE NO YOU NI', 'TSUKIMIHARA WO', 'PADORU PADORU']
song_n = 0

def Sing_song():
    global song_n, n
    if song_n >= len(song_words):
        song_n = 0
    n += 1
    Chat_msg(song_words[song_n], n)
    song_n += 1
    time.sleep(1)

def Move(signal):
    global n
    n += 1
    signal[1] = n
    Send_msg_0(signal)
    time.sleep(2)
    Sing_song()

def BackMeow():
    global n
    n += 1
    Hf_tp(n)
    time.sleep(4)



Move([1, 0, 0, 1, 7, 0, 0, 0, 99, 108, 105, 99, 107, 0, 3, 105, 3, 0, 0, 12, 2, 0, 0, 3, 93, 178, 241, 255, 189, 242, 240, 255, 4, 1, 4, 0])
Move([1, 0, 0, 1, 7, 0, 0, 0, 99, 108, 105, 99, 107, 0, 3, 228, 3, 0, 0, 24, 2, 0, 0, 3, 17, 180, 241, 255, 3, 248, 240, 255, 4, 3, 4, 0, 4, 0, 1, 75, 3, 110, 52, 3, 128, 177, 241, 255, 128, 6, 241, 255, 4, 0, 4, 16])
BackMeow()


Image
User avatar
Maid
 
Posts: 11
Joined: Sat Dec 28, 2024 7:57 pm

Re: Maid python api (client?) です

Postby rfxDarth » Sun Dec 29, 2024 12:30 am

inb4: Move() gets completely screwed if you go to a different grid and re-login
User avatar
rfxDarth
 
Posts: 69
Joined: Tue Mar 09, 2010 4:13 pm

Re: Maid python api (client?) です

Postby Milarepa » Sun Dec 29, 2024 12:10 pm

Nice trannyware. Give git(hub) repo link.
Feeling purely shitpost sock account, might delete later.
User avatar
Milarepa
 
Posts: 28
Joined: Tue Oct 10, 2023 5:52 pm

Re: Maid python api (client?) です

Postby Maid » Sun Dec 29, 2024 8:30 pm

rfxDarth wrote:inb4: Move() gets completely screwed if you go to a different grid and re-login

Hi Master! Yes, you have to get house id from the server and replace it in the signal after location 20min reload. This functional not in api yet, cos i kinda idk what bytes represent houses in this yuck server spam. I hand coded it for myself to randomly click on all clickable like ids and then teleport to hf and so on. But uh, for you, you have to solve it by yourself, somehow...... Or maybe later ill figure out how it works and update the package.
User avatar
Maid
 
Posts: 11
Joined: Sat Dec 28, 2024 7:57 pm

Re: Maid python api (client?) です

Postby rfxDarth » Sun Dec 29, 2024 9:23 pm

Maid wrote:
rfxDarth wrote:inb4: Move() gets completely screwed if you go to a different grid and re-login

Hi Master! Yes, you have to get house id from the server and replace it in the signal after location 20min reload. This functional not in api yet, cos i kinda idk what bytes represent houses in this yuck server spam. I hand coded it for myself to randomly click on all clickable like ids and then teleport to hf and so on. But uh, for you, you have to solve it by yourself, somehow...... Or maybe later ill figure out how it works and update the package.



Well, I figure you already figured out MSG_OBJDATA and OD_MOVE. Somewhere before that you should have received RMSG_RESID with some random number and a human readable name inside. After OD_MOVE(yuck!) there should be OD_RES that should have the gob id and res id.

To enter the houses, you need to modify the last four bytes(int32), which usually -1 for most objects, but for gfx/terobjs/arch I believe they point to a specific mesh id within a 3d model. Luckily, that id is consistently 16 for all enterable structures, so you could hack around it.

Keep in mind that object and map coordinates are not consistent between sessions, and, in some cases, even within a single session. To deal with that you'd have to use any grid as an anchor as it has consistent id within mapdata2 frame, and then keep a backtrack leading back to it to navigate, especially with mineholes and structures, as those are completely disconnected from the world.

Good luck!
User avatar
rfxDarth
 
Posts: 69
Joined: Tue Mar 09, 2010 4:13 pm

Re: Maid python api (client?) です

Postby Maid » Sun Dec 29, 2024 11:23 pm

rfxDarth wrote:Well, I figure you already figured out MSG_OBJDATA and OD_MOVE. Somewhere before that you should have received RMSG_RESID with some random number and a human readable name inside. After OD_MOVE(yuck!) there should be OD_RES that should have the gob id and res id.

To enter the houses, you need to modify the last four bytes(int32), which usually -1 for most objects, but for gfx/terobjs/arch I believe they point to a specific mesh id within a 3d model. Luckily, that id is consistently 16 for all enterable structures, so you could hack around it.

Keep in mind that object and map coordinates are not consistent between sessions, and, in some cases, even within a single session. To deal with that you'd have to use any grid as an anchor as it has consistent id within mapdata2 frame, and then keep a backtrack leading back to it to navigate, especially with mineholes and structures, as those are completely disconnected from the world.

Good luck!


Noo, kitty just stoled MSG_OBJDATA and OD_MOVE things from some python haven project that was maded 10 years ago and didnt work at all >_<. Most of this code not even used, i just forget to delete it....
I figured out houses seems can be found by bytes [21, 142, 1, 4] Negative 19 bites offset to [4 byte something like id] and negative 6 to [8 bytes somethin like id]. But i'll take my time to code and clean it up, to push it.

But thank you for help very much! I noticed coords and stuff are acting very weird.
User avatar
Maid
 
Posts: 11
Joined: Sat Dec 28, 2024 7:57 pm

Re: Maid python api (client?) です

Postby Maid » Mon Dec 30, 2024 7:34 pm

Meow version 0.0.10:

- all api functions now start with small letter to be more cute

- you now can find all your houses
Code: Select all
neko.find_houses()

will give you something like
Code: Select all
[[17, 74, 51, 4], [0, 1, 2, 5, 0, 22, 20, 25]]
[[18, 74, 51, 4], [0, 8, 242, 25, 0, 22, 20, 25]]

list, which you can use to call
Code: Select all
neko.open_doors([[17, 74, 51, 4], [0, 1, 2, 5, 0, 22, 20, 25]], n)

[4bit] is door id and [8bit] is seems house coords (and stable between sessions, so you can use coords to remember your favorite house nya)

Knowing issues:
- All working clumsy and buggy
- Server happy to disconnect me after 1-2mins of playing (idk why?)
- n number [2nd byte in every msg] always get messed up and all stuck! how to guess it right? me downt know...
User avatar
Maid
 
Posts: 11
Joined: Sat Dec 28, 2024 7:57 pm

Re: Maid python api (client?) です

Postby rfxDarth » Mon Dec 30, 2024 9:10 pm

Maid wrote:- Server happy to disconnect me after 1-2mins of playing (idk why?).




Did you forget sending heartbeats? Should be byte just "3" sent every 5 seconds or so.
User avatar
rfxDarth
 
Posts: 69
Joined: Tue Mar 09, 2010 4:13 pm

Next

Return to The Wizards' Tower

Who is online

Users browsing this forum: No registered users and 94 guests