Hi guys,
I noticed this game (Ninja Legends) just launched few days ago. It's still in very early stage of release. I tried to extract some of it APIs, and created a python library project for it. It's not really well designed API, but enough to get it working. I'll try to maintain through some updates, if I have the time.
Link to the project: playninjalegends
Some example code to use,
I noticed this game (Ninja Legends) just launched few days ago. It's still in very early stage of release. I tried to extract some of it APIs, and created a python library project for it. It's not really well designed API, but enough to get it working. I'll try to maintain through some updates, if I have the time.
Link to the project: playninjalegends
Some example code to use,
Python:
# Use all attempt for daily hunting house
from playninjalegends import NinjaLegendsAPI
nlapi = NinjaLegendsAPI("https://playninjalegends.com/amf_nl/")
user = nlapi.systemLogin.loginUser(username='xxx', password='xxx')
charId = 1234 # get your charId from Profile panel
res = nlapi.huntingHouse.getData(user, charId)
# parse data for attempt left, and loop through it
for bossNum, attemptLeft in enumerate(res['data'].split(',')):
for _ in range(int(attemptLeft)):
battleCode = nlapi.huntingHouse.startHunting(charId, bossNum)
print(nlapi.huntingHouse.finishHunting(charId, bossNum, battleCode))
Python:
# This will complete mission indefinitely until stopped with Ctrl+C
from playninjalegends import NinjaLegendsAPI
nlapi = NinjaLegendsAPI("https://playninjalegends.com/amf_nl/")
charId = 1234 # get your charId from Profile panel
missionId = 10 # choose mission number
# Press Ctrl+C to stop
while True:
try:
battleCode = nlapi.battleSystem.startMission(charId, missionId)
print(nlapi.battleSystem.finishMission(charId, missionId, battleCode))
except KeyboardInterrupt:
break
except Exception as e:
print(f"[!] Oh no, something happened. {e}")
break
Last edited: