Tutorial
API tutorial nempel di client.automation — namespace yang nampung driver long-running (auto-tutorial) plus state query read-only-nya. Dua lapis:
- State queries — phase saat ini, apa driver lagi jalan.
- Auto-driver —
client.automation:tutorial()ngerunin bot lewat seluruh rangkaian (character creation → tutorial world → BasicClothes pack → leave → PIXELSTATION → backpack upgrade → done).
Kenapa namespace?
clientsendiri tetep fokus ke ops account/world (warp, leave, send packet). Driver + state-nya pindah keclient.automationbiar autocomplete IDE pas ngetikc:ga banjir method tutorial.
State queries
PlayerData.TutorialState itu enum server-side (sumber: il2cpp dump, dipush via GPd). Mapping-nya:
| Value | Nama | Arti |
|---|---|---|
0 | NotStarted | Akun baru, belum ada character |
1 | CharacterCreation | Outfit dipilih, belum spawn |
2 | TutorialWorld | Di dalam TUTORIAL2, lagi flow |
3 | Completed | Selesai chain — cutoff "done" |
4-7 | Phase1..Phase4 | Checkpoint FTUE post-intro |
Cutoff < 3 itu yang dicek isInTutorial(). Cutoff >= 3 yang dicek isTutorialDone().
local c = getClient()
local a = c.automation
-- Branch lewat enum, gak pake magic number.
if a:tutorialState() == TutorialState.COMPLETED then
print("siap warp")
elseif a:tutorialState() == nil then
print("GPd belum sampe — tunggu connect")
else
print("masih mid-tutorial:", a:tutorialStateLabel())
end
client.automation:tutorialState()
Return enum int mentah, atau nil sebelum profile blob GPd pertama sampe.
client.automation:tutorialStateLabel()
Nama CamelCase canonical state saat ini — "NotStarted", "CharacterCreation", "TutorialWorld", "Completed", "Phase1"..\"Phase4\". Return nil sampai state diketahui.
print(c.automation:tutorialStateLabel()) -- contoh: "Phase4"
client.automation:isInTutorial()
true kalau state 0..2 (mid-tutorial). false kalau >= COMPLETED ATAU state nil.
client.automation:isTutorialDone()
Lawan-nya — true kalau state >= COMPLETED. Return false selama state belum diketahui, jadi gate post-tutorial gak perlu cek nil eksplisit.
-- Tunggu tutorial selesai sebelum warp.
while not c.automation:isTutorialDone() do
task.wait(0.5)
end
c:warp("ASDSA")
Auto-driver
client.automation:tutorial()
Jalanin seluruh intro flow end-to-end. Return nil kalau sukses, atau Errors.TUTORIAL_BUSY kalau ada driver lain yang lagi jalan untuk bot yang sama.
local c = getClient()
if c.automation:isInTutorial() then
local err = c.automation:tutorial()
if err then
print("tutorial gagal:", err)
else
print("tutorial selesai")
end
end
c:warp("MYWORLD")
Driver handle: character creation, spawn-pod selection, tile walk, drop block bangunan, beli BasicClothes pack, discover wearable post-shop, leave tutorial, join PIXELSTATION post-tutorial, dan upgrade slot inventory.
client.automation:tutorialRunning()
true selama driver aktif. Pake buat ngehindarin command world yang bisa race ke driver:
if c.automation:tutorialRunning() then
return -- driver lagi pegang bot
end
client.automation:tutorialStage()
Label human-readable buat step driver saat ini. Return nil kalau gak ada driver jalan.
-- Pantau progress live.
c:on("status", function()
if c.automation:tutorialRunning() then
print("step:", c.automation:tutorialStage())
end
end)
Label yang mungkin (non-lengkap): "walking to NPC", "buying clothes pack", "equipping cosmetics", "leaving tutorial world", "post-tutorial spawn world", "buying inventory slot upgrade", "complete".
Resep end-to-end
local c = getClient()
local a = c.automation
-- 1. Tunggu connect.
while a:tutorialState() == nil do task.wait(0.2) end
-- 2. Auto-run kalau mid-tutorial.
if a:isInTutorial() then
local err = a:tutorial()
if err then
print("auto-tutorial gagal:", err)
return
end
end
-- 3. Aman buat lakuin hal post-tutorial.
print("state:", a:tutorialStateLabel()) -- "Completed" atau "Phase1+"
c:warp("WORLD_PILIHAN")
Lihat juga
Client.client— referensi method Client lengkapTutorialStatekonstanta enum global