From ab9555996d8f0bbe9fe5b2a7a93c4215eef1814a Mon Sep 17 00:00:00 2001 From: Lenheart <947330670@qq.com> Date: Tue, 29 Mar 2022 01:10:57 +0800 Subject: [PATCH] 11 --- test/squirrel.cpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/test/squirrel.cpp b/test/squirrel.cpp index f10d005..d9eec39 100644 --- a/test/squirrel.cpp +++ b/test/squirrel.cpp @@ -374,6 +374,23 @@ static int GoDungeon(uint32_t v) return 1; } +//»Ø³Ç +static int GoTown(uint32_t v) +{ + int num = SQGetTop(v); + if (num == 1) + { + _SendpacksType(*_SendClass, 0, 0x2D); + _SendPacks(); + SQPushBool(v, true); + } + else + { + SQPushBool(v, false); + } + return 1; +} + //Ldofile static int LDofile(uint32_t v) { @@ -936,6 +953,7 @@ void squirrel::R_Register_Nut() RegisterNutApi(L"L_sq_GivePlayerItem", GivePlayerItem); RegisterNutApi(L"L_sq_GivePlayerEqu", GivePlayerEqu); RegisterNutApi(L"L_sq_GoDungeon", GoDungeon); + RegisterNutApi(L"L_sq_GoTown", GoTown); RegisterNutApi(L"L_sq_Dofile", LDofile); RegisterNutApi(L"L_cout", Lcout); RegisterNutApi(L"L_NewWindows", NewWindows);