kamemememe

にゃんこ大戦争スクリプト

Aug 31st, 2024 (edited)
254
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 36.65 KB | None | 0 0
  1. print("Script制作:かめ", "Twitter:@gg5a0", "Discord:@ka_me4455")
  2.  
  3. while true do
  4. if gg.isVisible(true) then
  5. Lext = -1
  6. gg.setVisible(false)
  7. gg.sleep(100)
  8. end
  9.  
  10. --set variable
  11.  
  12. offset = {}
  13. cat, XP, nomal, rea = 49000, 99999999, 999, 999
  14. eye, NP, bta, rock = 999, 9999999, 999, 999
  15. ilei = 0
  16.  
  17.  
  18.  
  19. -- パスワード設定
  20. local correctPassword = "kamemememe"
  21. local passwordCheckedKey = "passwordChecked"
  22.  
  23. -- スクリプトの設定を保存するファイル
  24. local settingsFile = "/sdcard/gg_settings.txt"
  25.  
  26. -- 設定の読み込み
  27. function loadSettings()
  28. local file = io.open(settingsFile, "r")
  29. if file then
  30. local content = file:read("*a")
  31. file:close()
  32. return content
  33. end
  34. return nil
  35. end
  36.  
  37. -- 設定の保存
  38. function saveSettings(content)
  39. local file = io.open(settingsFile, "w")
  40. if file then
  41. file:write(content)
  42. file:close()
  43. end
  44. end
  45.  
  46. -- ユーザーからのパスワード入力を求める
  47. function askForPassword()
  48. gg.alert('パスワードを入力してください:')
  49. local inputPassword = gg.prompt({'パスワード'}, nil, {'text'})
  50. return inputPassword and inputPassword[1] or ''
  51. end
  52.  
  53. -- パスワード確認
  54. function checkPassword()
  55. local settings = loadSettings()
  56. if settings == passwordCheckedKey then
  57. return
  58. end
  59.  
  60. local inputPassword = askForPassword()
  61. if inputPassword ~= correctPassword then
  62. gg.alert('パスワードが間違っています!')
  63. os.exit() -- パスワードが間違っている場合、スクリプトを終了
  64. end
  65.  
  66. saveSettings(passwordCheckedKey)
  67.  
  68. -- メニューの表示
  69.  
  70.  
  71. function Main()
  72.  
  73. local Ax = gg.choice({
  74. "  基本メニュー",
  75. "  サブメニュー",
  76. "  サブメニュー2",
  77. "  ネタ枠チート",
  78. "  ステージ系メニュー",
  79. "  アップデート情報",
  80. "  終了"}, "Main")
  81.  
  82. if Ax == nil then gg.setVisible(false) return nil
  83. end
  84.  
  85. if Ax ~= nil then
  86.  
  87. if Ax == 1 then
  88. menu1()
  89. end
  90.  
  91. if Ax == 2 then
  92. menu2()
  93. end
  94.  
  95. if Ax == 3 then
  96. menu3()
  97. end
  98.  
  99. if Ax == 4 then
  100. menu4()
  101. end
  102.  
  103. if Ax == 5 then
  104. menu5()
  105. end
  106.  
  107. if Ax == 6 then
  108. gg.alert("V1.1   レジェンドステージ開放を追加・個別ステ開放を追加")
  109. end
  110.  
  111. if Ax == 7 then
  112. gg.setVisible(true)
  113. os.exit()
  114. end
  115.  
  116. Lext=-1
  117. end
  118. end
  119.  
  120.  
  121.  
  122. function menu1()
  123.  
  124. local Bx = gg.prompt({
  125. "ネコ缶 ON",
  126. "ネコ缶 Number",
  127. "XP ON",
  128. "XP Number",
  129. "ノマチケ ON",
  130. "ノマチケ Number",
  131. "レアチケ ON",
  132. "レアチケ Number",
  133. "全ステージ解放",
  134. "即勝利 ON",
  135. "戻る"}, {
  136. [1] = false,
  137. [2] = cat,
  138. [3] = false,
  139. [4] = XP,
  140. [5] = false,
  141. [6] = nomal,
  142. [7] = false,
  143. [8] = rea,
  144. [9] = false,
  145. [10] = false,
  146. [11] = false}, {
  147. "checkbox",
  148. "number",
  149. "checkbox",
  150. "number",
  151. "checkbox",
  152. "number",
  153. "checkbox",
  154. "number",
  155. "checkbox",
  156. "checkbox",
  157. "checkbox"})
  158.  
  159.  
  160. if Bx ~= nil then
  161.  
  162. if Bx[1] then
  163. -- 検索の結果をクリア
  164. gg.clearResults()
  165.  
  166. -- 検索範囲を指定
  167. gg.setRanges(gg.REGION_C_BSS)
  168.  
  169. -- DWORD型で「32400」を検索
  170. gg.searchNumber("32400", gg.TYPE_DWORD, false, gg.SIGN_EQUAL)
  171.  
  172. -- 検索結果を取得
  173. local result = gg.getResults(1)
  174.  
  175. -- 検索結果が存在する場合の処理
  176. if result[1] then
  177. local s = {}
  178.  
  179. -- 結果のアドレスを基に新しいアドレスを設定
  180. s[1] = {address = result[1].address - 0x108, flags = gg.TYPE_DWORD, value = Bx[2]}
  181. s[2] = {address = result[1].address - 0x104, flags = gg.TYPE_DWORD, value = 0}
  182.  
  183. -- メモリの値を設定
  184. gg.setValues(s)
  185.  
  186. -- 結果をクリア
  187. gg.clearResults()
  188.  
  189. -- 成功メッセージを表示
  190. gg.toast("成功")
  191. else
  192. -- 検索結果が存在しない場合のエラーメッセージを表示
  193. gg.toast("失敗")
  194. end
  195. end
  196.  
  197.  
  198. if Bx[3] then
  199. -- 検索結果をクリア
  200. gg.clearResults()
  201.  
  202. -- 検索範囲を指定
  203. gg.setRanges(gg.REGION_C_BSS)
  204.  
  205. -- DWORD型で「32400」を検索
  206. gg.searchNumber("32400", gg.TYPE_DWORD, false, gg.SIGN_EQUAL)
  207.  
  208. -- 検索結果を取得
  209. local result = gg.getResults(1)
  210.  
  211. -- 検索結果が存在する場合の処理
  212. if result[1] then
  213. local s = {}
  214.  
  215. -- 結果のアドレスを基に新しいアドレスを設定
  216. s[1] = {address = result[1].address + 0x40, flags = gg.TYPE_DWORD, value = Bx[4]}
  217. s[2] = {address = result[1].address + 0x44, flags = gg.TYPE_DWORD, value = 0}
  218.  
  219. -- メモリの値を設定
  220. gg.setValues(s)
  221.  
  222. -- 結果をクリア
  223. gg.clearResults()
  224.  
  225. -- 成功メッセージを表示
  226. gg.toast("成功")
  227. else
  228. -- 検索結果が存在しない場合のエラーメッセージを表示
  229. gg.toast("失敗")
  230. end
  231. end
  232.  
  233.  
  234. if Bx[5] then
  235. gg.clearResults()
  236. gg.setRanges(gg.REGION_C_BSS)
  237. gg.searchNumber("32400", gg.TYPE_DWORD, false, gg.SIGN_EQUAL)
  238. local result = gg.getResults(1)
  239.  
  240. if result[1] then
  241. local s = {}
  242. s[1] = {address = result[1].address + 0x2ADC58, flags = gg.TYPE_DWORD, value = Bx[6]}
  243. s[2] = {address = result[1].address + 0x2ADC5C, flags = gg.TYPE_DWORD, value = 0}
  244. gg.setValues(s)
  245. gg.clearResults()
  246. gg.toast("成功")
  247. else
  248. gg.toast("失敗")
  249. end
  250. end
  251.  
  252. if Bx[7] then
  253. gg.clearResults()
  254. gg.setRanges(gg.REGION_C_BSS)
  255. gg.searchNumber("32400", gg.TYPE_DWORD, false, gg.SIGN_EQUAL)
  256. local result = gg.getResults(1)
  257.  
  258. if result[1] then
  259. local s = {}
  260. s[1] = {address = result[1].address + 0x2ADC60, flags = gg.TYPE_DWORD, value = Bx[8]}
  261. s[2] = {address = result[1].address + 0x2ADC64, flags = gg.TYPE_DWORD, value = 0}
  262. gg.setValues(s)
  263. gg.clearResults()
  264. gg.toast("成功")
  265. else
  266. gg.toast("失敗")
  267. end
  268. end
  269.  
  270. if Bx[9] then
  271. gg.clearResults()
  272. gg.setRanges(gg.REGION_C_BSS)
  273. gg.searchNumber("32400", gg.TYPE_DWORD, false, gg.SIGN_EQUAL)
  274. local result = gg.getResults(1)
  275.  
  276. if result[1] then
  277. local s = {}
  278.  
  279. s[1] = {address = result[1].address + 0x654, flags = gg.TYPE_DWORD, value = 65585}
  280. s[2] = {address = result[1].address + 0x658, flags = gg.TYPE_DWORD, value = 65585}
  281. s[3] = {address = result[1].address + 0x65C, flags = gg.TYPE_DWORD, value = 65585}
  282. s[4] = {address = result[1].address + 0x664, flags = gg.TYPE_DWORD, value = 65585}
  283. s[5] = {address = result[1].address + 0x668, flags = gg.TYPE_DWORD, value = 65585}
  284. s[6] = {address = result[1].address + 0x66C, flags = gg.TYPE_DWORD, value = 65585}
  285. s[7] = {address = result[1].address + 0x670, flags = gg.TYPE_DWORD, value = 65585}
  286. s[8] = {address = result[1].address + 0x674, flags = gg.TYPE_DWORD, value = 65585}
  287. s[9] = {address = result[1].address + 0x678, flags = gg.TYPE_DWORD, value = 65585}
  288. s[10] = {address = result[1].address + 0x660, flags = gg.TYPE_DWORD, value = 65585}
  289. s[11] = {address = result[1].address + 0x67C, flags = gg.TYPE_DWORD, value = 65537}
  290.  
  291. gg.setValues(s)
  292. gg.clearResults()
  293. gg.toast("成功")
  294. else
  295. gg.toast("失敗")
  296. end
  297. end
  298.  
  299.  
  300. if Bx[10] then
  301. local Mx = gg.choice({
  302. "1回のみ勝利する",
  303. "常に勝利する(氷結)"
  304. }, "即勝利")
  305.  
  306. if Mx ~= nil then
  307. gg.clearResults()
  308. gg.setRanges(gg.REGION_C_BSS)
  309. gg.searchNumber("32400", gg.TYPE_DWORD, false, gg.SIGN_EQUAL)
  310. local result = gg.getResults(1)
  311.  
  312. if result[1] then
  313. local s = {}
  314. s[1] = {}
  315. s[1].name = "即勝利"
  316. s[1].address = result[1].address + 0x74058
  317. s[1].flags = gg.TYPE_DWORD
  318. s[1].value = 0
  319.  
  320. if Mx == 1 then
  321. -- 1回のみ勝利する場合
  322. s[1].freeze = false
  323. gg.setValues(s)
  324. gg.clearResults()
  325. gg.toast("1回のみ勝利する設定が成功しました")
  326. elseif Mx == 2 then
  327. -- 常に勝利する(氷結)の場合
  328. s[1].freeze = true
  329. gg.addListItems(s)
  330. gg.setValues(s)
  331. gg.clearResults()
  332. gg.toast("常に勝利する(氷結)設定が成功しました")
  333. else
  334. gg.toast("失敗")
  335. end
  336. else
  337. gg.toast("検索結果がありません")
  338. end
  339. end
  340. end
  341.  
  342.  
  343.  
  344.  
  345. if Bx[11] then
  346. Main()
  347. end
  348. end
  349. end
  350.  
  351. function menu2()
  352. gg.toast("サブメニューを開きます")
  353.  
  354. local Cx = gg.prompt({
  355. "全キャラ解放 ON",
  356. "エラーキャラ削除",
  357. "NP ON",
  358. "NP",
  359. "マタタビ ON",
  360. "キャッツアイ ON",
  361. "キャッツアイ",
  362. "ネコビタ ON",
  363. "ネコビタ",
  364. "城素材 ON",
  365. "城素材",
  366. "戻る"}, {
  367. [1] = false,
  368. [2] = false,
  369. [3] = false,
  370. [4] = NP,
  371. [5] = mata,
  372. [6] = false,
  373. [7] = eye,
  374. [8] = false,
  375. [9] = bta,
  376. [10] = false,
  377. [11] = rock,
  378. [12] = false,}, {
  379. "checkbox",
  380. "checkbox",
  381. "checkbox",
  382. "number",
  383. "checkbox",
  384. "checkbox",
  385. "number",
  386. "checkbox",
  387. "number",
  388. "checkbox",
  389. "number",
  390. "checkbox",})
  391.  
  392. if Cx ~= nil then
  393. if Cx[1] then
  394. gg.clearResults()
  395. gg.setRanges(gg.REGION_C_BSS)
  396. gg.searchNumber("32400", gg.TYPE_DWORD, false, gg.SIGN_EQUAL)
  397. local result = gg.getResults(1)
  398.  
  399. if result[1] then
  400. local s = {}
  401. s[1] = {address = result[1].address + 0x343E0, flags = gg.TYPE_DWORD, value = 0}
  402. s[2] = {address = result[1].address + 0x343DC, flags = gg.TYPE_DWORD, value = (gg.getValues({{address = result[1].address + 0x343DC}})[1].value or 0) + 1}
  403.  
  404. gg.setValues(s)
  405. gg.clearResults()
  406. gg.toast("成功")
  407. else
  408. gg.toast("失敗")
  409. end
  410. end
  411.  
  412. if Cx[2] then
  413. gg.clearResults()
  414. gg.setRanges(gg.REGION_C_BSS)
  415. gg.searchNumber("32400", gg.TYPE_DWORD, false, gg.SIGN_EQUAL)
  416. local result = gg.getResults(1)
  417.  
  418. if #result > 0 then
  419. local s = {}
  420. for i = 1, 7 do
  421. s[i] = {}
  422. end
  423.  
  424. s[1].address = result[1].address + 0x33a4C
  425. s[2].address = result[1].address + 0x33d2C
  426. s[3].address = result[1].address + 0x33d64
  427. s[4].address = result[1].address + 0x34264
  428. s[5].address = result[1].address + 0x34378
  429. s[6].address = result[1].address + 0x3437C
  430. s[7].address = result[1].address + 0x343b8
  431.  
  432. for i = 1, 7 do
  433. s[i].flags = gg.TYPE_DWORD
  434. local value = gg.getValues({s[i]})[1].value
  435. s[i].value = (value or 0) + 1
  436. end
  437.  
  438. gg.setValues(s)
  439. gg.clearResults()
  440. gg.toast("成功")
  441. else
  442. gg.toast("失敗")
  443. end
  444. end
  445.  
  446.  
  447. if Cx[3] then
  448. gg.clearResults()
  449. gg.setRanges(gg.REGION_C_BSS)
  450. gg.searchNumber("32400", gg.TYPE_DWORD, false, gg.SIGN_EQUAL)
  451. local result = gg.getResults(1)
  452.  
  453. if #result > 0 then
  454. local s = {}
  455. s[1] = {}
  456. s[2] = {}
  457.  
  458. s[1].address = result[1].address + 0x48
  459. s[2].address = result[1].address + 0x4C
  460. s[1].flags = gg.TYPE_DWORD
  461. s[2].flags = gg.TYPE_DWORD
  462. s[1].value = Cx[4] -- Cx[4]の値を設定
  463. s[2].value = 0
  464.  
  465. gg.setValues(s)
  466. gg.clearResults()
  467. gg.toast("成功")
  468. else
  469. gg.toast("失敗")
  470. end
  471. end
  472.  
  473.  
  474.  
  475. if Cx[5] then
  476. -- マタタビメニューを表示
  477. gg.toast("マタタビメニューを表示")
  478.  
  479. -- マタタビの数を指定するためのプロンプトを表示
  480. local Xx = gg.prompt({
  481. "マタタビの数を指定"
  482. }, {
  483. [1] = matatabi
  484. }, {
  485. "number"
  486. })
  487.  
  488. if Xx then
  489. gg.clearResults()
  490. gg.setRanges(gg.REGION_OTHER)
  491.  
  492. -- 数値の検索
  493. gg.searchNumber("1048843D;4294967296Q;115964116992Q;120259084288Q:237", gg.TYPE_DWORD, false, gg.SIGN_EQUAL, 0, -1, 0)
  494.  
  495. -- 検索結果の取得
  496. local result = gg.getResults(1)
  497.  
  498. if result[1] then
  499. local s = {}
  500.  
  501. -- アドレスとフラグの設定
  502. for i = 1, 29 do
  503. s[i] = {}
  504. -- 0x14から始まり、1個飛ばしでアドレスを計算
  505. s[i].address = result[1].address + 0x14 + (i - 1) * 0x08
  506. s[i].flags = gg.TYPE_DWORD
  507. s[i].value = Xx[1]
  508. end
  509.  
  510. -- 値の設定
  511. gg.setValues(s)
  512. gg.toast("成功")
  513. else
  514. gg.toast("失敗")
  515. end
  516. else
  517. gg.toast("プロンプトで数値が指定されませんでした")
  518. end
  519. end
  520.  
  521. if Cx[6] then
  522. gg.clearResults()
  523. gg.setRanges(gg.REGION_C_BSS)
  524. gg.searchNumber("32400", gg.TYPE_DWORD, false, gg.SIGN_EQUAL)
  525.  
  526. local result = gg.getResults(1)
  527.  
  528. if result[1] then
  529. local s = {}
  530.  
  531. local baseAddress = result[1].address
  532. local offsets = {
  533. 0x39f734, 0x39f738, 0x39f73C, 0x39f740, 0x39f744,
  534. 0x39f748, 0x39f74C, 0x39f750, 0x39f754, 0x39f758,
  535. 0x39f75C, 0x39f760
  536. }
  537.  
  538. -- 値の設定
  539. for i = 1, #offsets do
  540. s[i] = {
  541. address = baseAddress + offsets[i],
  542. flags = gg.TYPE_DWORD,
  543. value = (i % 2 == 1) and Cx[7] or 0 -- 奇数インデックスにCx[7]の値、偶数インデックスに0を設定
  544. }
  545. end
  546.  
  547. gg.setValues(s)
  548. gg.clearResults()
  549. gg.toast("成功")
  550. else
  551. gg.toast("検索結果が見つかりませんでした")
  552. end
  553. else
  554. gg.toast("条件が満たされていません")
  555. end
  556.  
  557.  
  558.  
  559. if Cx[8] then
  560. gg.clearResults()
  561. gg.setRanges(gg.REGION_C_BSS)
  562. gg.searchNumber("32400", gg.TYPE_DWORD, false, gg.SIGN_EQUAL)
  563. local results = gg.getResults(6)
  564.  
  565. if #results > 0 then
  566. local s = {}
  567.  
  568. for i = 1, 6 do
  569. s[i] = {}
  570. s[i].address = results[1].address + (0x39F764 + (i - 1) * 0x4)
  571. s[i].flags = gg.TYPE_DWORD
  572. s[i].value = (i % 2 == 1) and Cx[9] or 0
  573. end
  574.  
  575. gg.setValues(s)
  576. gg.clearResults()
  577. gg.toast("成功")
  578. else
  579. gg.toast("失敗")
  580. end
  581. end
  582.  
  583.  
  584.  
  585. if Cx[10] then
  586. gg.clearResults()
  587. gg.setRanges(gg.REGION_C_BSS)
  588. gg.searchNumber("32400", gg.TYPE_DWORD, false, gg.SIGN_EQUAL)
  589. local result = gg.getResults(1)
  590.  
  591. if result[1] then
  592. local s = {}
  593.  
  594. for i = 1, 18 do
  595. s[i] = {}
  596. s[i].address = result[1].address + 0x39F77C + (i - 1) * 0x4
  597. s[i].flags = gg.TYPE_DWORD
  598. s[i].value = (i % 2 == 1) and Cx[11] or 0
  599. end
  600.  
  601. gg.setValues(s)
  602. gg.clearResults()
  603. gg.toast("成功")
  604. else
  605. gg.toast("失敗")
  606. end
  607. end
  608.  
  609.  
  610. if Cx[12] then
  611. Main()
  612. end
  613. end
  614. end
  615.  
  616.  
  617. function menu3()
  618. local Dx = gg.prompt({
  619. "ゴールド会員 ON",
  620. "バトルアイテム ON",
  621. "リーダーシップカンスト ON",
  622. "チケットメニュー ON",
  623. "城レベルメニュー ON",
  624. "ユーザーランク ON",
  625. "戻る"}, {
  626. [1] = false,
  627. [2] = false,
  628. [3] = false,
  629. [4] = false,
  630. [5] = false,
  631. [6] = false,
  632. [7] = false}, {
  633. "checkbox",
  634. "checkbox",
  635. "checkbox",
  636. "checkbox",
  637. "checkbox",
  638. "checkbox",
  639. "checkbox"})
  640.  
  641. if Dx ~= nil then
  642.  
  643. if Dx[1] then
  644. -- ユーザーに値を入力させる
  645. local Rx = gg.prompt({"ゴールド会員の回数を指定"}, {[1] = gold}, {"number"})
  646.  
  647. -- ユーザーが値を入力しなかった場合のチェック
  648. if not Rx or not Rx[1] then
  649. gg.toast("無効な値が入力されました")
  650. return
  651. end
  652.  
  653. -- メモリ範囲を設定
  654. gg.clearResults()
  655. gg.setRanges(gg.REGION_C_BSS)
  656. gg.searchNumber("32400", gg.TYPE_DWORD, false, gg.SIGN_EQUAL)
  657.  
  658. -- 検索結果を取得
  659. local result = gg.getResults(1)
  660.  
  661. -- 検索結果が取得できなかった場合のチェック
  662. if not result[1] or not result[1].address then
  663. gg.toast("アドレスの取得に失敗しました")
  664. return
  665. end
  666.  
  667. -- 検索結果に基づいてアドレスと値を設定
  668. local s = {}
  669. for i = 1, 10 do
  670. s[i] = {}
  671. end
  672.  
  673. s[1].address = result[1].address - 0x8F74
  674. s[2].address = result[1].address - 0x8F64
  675. s[3].address = result[1].address - 0x8F5C
  676. s[4].address = result[1].address - 0x8F70
  677. s[5].address = result[1].address - 0x8F68
  678. s[6].address = result[1].address - 0x8F60
  679. s[7].address = result[1].address - 0x8F58
  680. s[8].address = result[1].address - 0x8F54
  681. s[9].address = result[1].address - 0x8F50
  682. s[10].address = result[1].address - 0x8F4C
  683.  
  684. s[1].flags = gg.TYPE_QWORD
  685. s[2].flags = gg.TYPE_DWORD
  686. s[3].flags = gg.TYPE_DWORD
  687. s[4].flags = gg.TYPE_DWORD
  688. s[5].flags = gg.TYPE_DWORD
  689. s[6].flags = gg.TYPE_DWORD
  690. s[7].flags = gg.TYPE_DWORD
  691. s[8].flags = gg.TYPE_DWORD
  692. s[9].flags = gg.TYPE_DWORD
  693. s[10].flags = gg.TYPE_DWORD
  694.  
  695. s[1].value = Rx[1]
  696. s[2].value = 1104786382
  697. s[3].value = 1104788998
  698. s[4].value = Rx[1]
  699. s[5].value = -603979776
  700. s[6].value = 2080374784
  701. s[7].value = -603979776
  702. s[8].value = 1104786382
  703. s[9].value = 2080374784
  704. s[10].value = 1104788998
  705.  
  706. -- 値の設定を実行
  707. local success, err = pcall(function()
  708. gg.setValues(s)
  709. end)
  710.  
  711. if success then
  712. gg.clearResults()
  713. gg.toast("成功")
  714. else
  715. gg.toast("設定に失敗しました: " .. tostring(err))
  716. end
  717. else
  718. gg.toast("Dx[1] が存在しません")
  719. end
  720.  
  721.  
  722.  
  723.  
  724.  
  725. if Dx[2] then
  726. local Lx = gg.prompt({
  727. "バトルアイテム数指定"
  728. }, {
  729. [1] = batle
  730. }, {
  731. "number"
  732. })
  733.  
  734. if not Lx then
  735. gg.toast("キャンセルされました")
  736. return
  737. end
  738.  
  739. gg.clearResults()
  740. gg.setRanges(gg.REGION_C_BSS)
  741. gg.searchNumber("32400", gg.TYPE_DWORD, false, gg.SIGN_EQUAL)
  742. local result = gg.getResults(1)
  743.  
  744. if result[1] then
  745. local s = {}
  746.  
  747. for i = 1, 12 do
  748. s[i] = {}
  749. s[i].address = result[1].address + 0x36898 + (i - 1) * 0x4
  750. s[i].flags = gg.TYPE_DWORD
  751. s[i].value = (i % 2 == 1) and Lx[1] or 0
  752. end
  753.  
  754. gg.setValues(s)
  755. gg.clearResults()
  756. gg.toast("成功")
  757. else
  758. gg.toast("失敗")
  759. end
  760. end
  761.  
  762.  
  763. if Dx[3] then
  764. gg.clearResults()
  765. gg.setRanges(gg.REGION_C_BSS)
  766. gg.searchNumber("32400", gg.TYPE_DWORD, false, gg.SIGN_EQUAL)
  767. local result = gg.getResults(1)
  768.  
  769. if result[1] then
  770. local s = {}
  771. s[1] = {}
  772. s[1].address = result[1].address - 0x8FD8
  773. s[1].flags = gg.TYPE_FLOAT
  774. s[1].value = 1.98452366e-15
  775.  
  776. gg.setValues(s)
  777. gg.clearResults()
  778. gg.toast("成功")
  779. else
  780. gg.toast("検索結果が見つかりませんでした")
  781. end
  782. else
  783. gg.toast("条件が満たされていません")
  784. end
  785.  
  786. if Dx[4] then
  787. local Px = gg.prompt({
  788. "プラチナチケット ON",
  789. "プラチケ",
  790. "プラチナ欠片 ON",
  791. "欠片",
  792. "レジェンド ON",
  793. "レジェンド",
  794. "戻る"
  795. }, {
  796. [1] = false,
  797. [2] = pla,
  798. [3] = false,
  799. [4] = hen,
  800. [5] = false,
  801. [6] = leg,
  802. [7] = false
  803. }, {
  804. "checkbox",
  805. "number",
  806. "checkbox",
  807. "number",
  808. "checkbox",
  809. "number",
  810. "checkbox"
  811. })
  812.  
  813. if Px == nil then
  814. gg.toast("操作がキャンセルされました")
  815. return
  816. end
  817.  
  818. if Px[1] then
  819. local result = performSearchAndSetValues(0x88f8, 0x88f4, Px[2])
  820. if result then gg.toast("プラチナチケット設定成功") else gg.toast("プラチナチケット設定失敗") end
  821. end
  822.  
  823. if Px[3] then
  824. local result = performSearchAndSetValues(0x88e8, 0x88e4, Px[4])
  825. if result then gg.toast("プラチナ欠片設定成功") else gg.toast("プラチナ欠片設定失敗") end
  826. end
  827.  
  828. if Px[5] then
  829. local result = performSearchAndSetValues(0x88f0, 0x88ec, Px[6])
  830. if result then gg.toast("レジェンド設定成功") else gg.toast("レジェンド設定失敗") end
  831. end
  832. end
  833.  
  834. function performSearchAndSetValues(offset1, offset2, value)
  835. gg.clearResults()
  836. gg.setRanges(gg.REGION_C_BSS)
  837. gg.searchNumber("32400", gg.TYPE_DWORD, false, gg.SIGN_EQUAL)
  838. local result = gg.getResults(1)
  839.  
  840. if result[1] then
  841. local s = {}
  842. s[1] = { address = result[1].address - offset1, flags = gg.TYPE_DWORD, value = value }
  843. s[2] = { address = result[1].address - offset2, flags = gg.TYPE_DWORD, value = 0 }
  844.  
  845. gg.setValues(s)
  846. gg.clearResults()
  847. return true
  848. else
  849. return false
  850. end
  851. end
  852.  
  853.  
  854. if Dx[5] then
  855. local Vx = gg.prompt({
  856. "城レベルを指定"
  857. }, {
  858. [1] = level
  859. }, {
  860. "number"
  861. })
  862.  
  863. if Vx == nil then
  864. gg.toast("操作がキャンセルされました")
  865. return
  866. end
  867.  
  868. gg.clearResults()
  869. gg.setRanges(gg.REGION_C_BSS)
  870. gg.searchNumber("32400", gg.TYPE_DWORD, false, gg.SIGN_EQUAL)
  871. local result = gg.getResults(1)
  872.  
  873. if result[1] then
  874. local baseAddress = result[1].address
  875. local offsets = {
  876. 0x367e4, 0x367e8, 0x367f4, 0x367f8, 0x367fC, 0x36800, 0x36804,
  877. 0x36808, 0x3680C, 0x36810, 0x36814, 0x36818, 0x3681C, 0x36820,
  878. 0x36824, 0x36828, 0x3682C, 0x36830, 0x36834, 0x36838
  879. }
  880.  
  881. local s = {}
  882.  
  883. for i = 1, #offsets do
  884. s[i] = {}
  885. s[i].address = baseAddress + offsets[i]
  886. s[i].flags = gg.TYPE_DWORD
  887. s[i].value = (i % 2 == 1) and Vx[1] or 0
  888. end
  889.  
  890. gg.setValues(s)
  891. gg.clearResults()
  892. gg.toast("成功")
  893. else
  894. gg.toast("検索結果が見つかりませんでした")
  895. end
  896. else
  897. gg.toast("Dx[5] が偽です")
  898. end
  899.  
  900.  
  901.  
  902. if Dx[6] then
  903. local Wx = gg.prompt({
  904. "ユーザーランクを指定"
  905. }, {
  906. [1] = dog
  907. }, {
  908. "number"
  909. })
  910.  
  911. if Wx == nil then
  912. gg.toast("操作がキャンセルされました")
  913. return
  914. end
  915.  
  916. gg.clearResults()
  917. gg.setRanges(gg.REGION_C_BSS)
  918. gg.searchNumber("32400", gg.TYPE_DWORD, false, gg.SIGN_EQUAL)
  919. local result = gg.getResults(1)
  920.  
  921. if result[1] then
  922. local s = {}
  923. s[1] = {}
  924. s[1].address = result[1].address - 0xA6A8
  925. s[1].flags = gg.TYPE_DWORD
  926. s[1].value = Wx[1]
  927. s[1].freeze = true
  928. s[1].name = "ユーザーランク"
  929.  
  930. gg.setValues(s)
  931. gg.addListItems(s)
  932. gg.clearResults()
  933. gg.toast("成功")
  934. else
  935. gg.toast("検索結果が見つかりませんでした")
  936. end
  937. else
  938. gg.toast("Dx[6] が偽です")
  939. end
  940.  
  941. if Dx[7] then
  942. Main()
  943. end
  944. end
  945. end
  946.  
  947.  
  948. function menu4()
  949. local Ex = gg.prompt({
  950. "生産額無料 ON",
  951. "ベビーラッシュ ON",
  952. "自城HPメニュー ON",
  953. "敵城HPメニュー ON",
  954. "イベガチャチケ ON",
  955. "道場スコアメニュー ON",
  956. "神のチカラメニュー ON",
  957. "戻る"}, {
  958. [1] = false,
  959. [2] = false,
  960. [3] = false,
  961. [4] = false,
  962. [5] = false,
  963. [6] = false,
  964. [7] = false,
  965. [8] = false}, {
  966. "checkbox",
  967. "checkbox",
  968. "checkbox",
  969. "checkbox",
  970. "checkbox",
  971. "checkbox",
  972. "checkbox",
  973. "checkbox"})
  974.  
  975. if Ex ~= nil then
  976.  
  977. if Ex[1] then
  978. local Qx = gg.prompt({
  979. "改ざんしたいキャラの現在の値段を入力",
  980. "改ざんしたい値段を入力"
  981. }, {
  982. [1] = dojo,
  983. [2] = ilei
  984. }, {
  985. "number",
  986. "number"
  987. })
  988.  
  989. if Qx == nil then
  990. gg.toast("操作がキャンセルされました")
  991. return
  992. end
  993.  
  994. local currentPrice = Qx[1] * 100
  995. local newPrice = Qx[2] * 100
  996.  
  997. gg.clearResults()
  998. gg.setRanges(gg.REGION_C_BSS)
  999. gg.searchNumber(currentPrice, gg.TYPE_DWORD)
  1000.  
  1001. local results = gg.getResults(10000)
  1002. if #results > 0 then
  1003. for i = 1, #results do
  1004. results[i].value = newPrice
  1005. end
  1006. gg.setValues(results)
  1007. gg.clearResults()
  1008. gg.toast("値段が変更されました")
  1009. else
  1010. gg.toast("指定した値段が見つかりませんでした")
  1011. end
  1012. else
  1013. gg.toast("Ex[1] が偽です")
  1014. end
  1015.  
  1016.  
  1017.  
  1018.  
  1019. if Ex[2] then
  1020. local Ox = gg.choice({
  1021. "1回のみONにする",
  1022. "常にベビーラッシュ(氷結)"
  1023. }, "ベビーラッシュ")
  1024.  
  1025. if Ox ~= nil then
  1026. gg.clearResults()
  1027. gg.setRanges(gg.REGION_C_BSS)
  1028. gg.searchNumber("32400", gg.TYPE_DWORD, false, gg.SIGN_EQUAL)
  1029. gg.getResults(1, nil, nil, nil, nil, nil, nil, nil, nil)
  1030.  
  1031. local result = gg.getResults(1)
  1032. if #result > 0 then
  1033. local s = {}
  1034. s[1] = {}
  1035. s[1].name = "ベビーラッシュ"
  1036. s[1].address = result[1].address + 0x2ac7d0
  1037. s[1].flags = gg.TYPE_DWORD
  1038. s[1].value = 1
  1039.  
  1040. if Ox == 2 then
  1041. s[1].freeze = true
  1042. gg.addListItems(s)
  1043. end
  1044.  
  1045. gg.setValues(s)
  1046. gg.clearResults()
  1047. gg.toast("成功")
  1048. else
  1049. gg.toast("検索結果が見つかりませんでした")
  1050. end
  1051. else
  1052. gg.toast("選択肢が無効です")
  1053. end
  1054. end
  1055.  
  1056.  
  1057.  
  1058. if Ex[3] then
  1059. local Mx = gg.prompt({
  1060. "自城HPを指定"
  1061. }, {
  1062. [1] = dog
  1063. }, {
  1064. "number"
  1065. })
  1066.  
  1067. if Mx ~= nil and Mx[1] ~= nil then
  1068. gg.clearResults()
  1069. gg.setRanges(gg.REGION_C_BSS)
  1070. gg.searchNumber("32400", gg.TYPE_DWORD, false, gg.SIGN_EQUAL)
  1071. gg.getResults(1, nil, nil, nil, nil, nil, nil, nil, nil)
  1072.  
  1073. local result = gg.getResults(1)
  1074. if #result > 0 then
  1075. local s = {}
  1076. s[1] = {}
  1077. s[1].address = result[1].address + 0x68DD8
  1078. s[1].flags = gg.TYPE_DWORD
  1079. s[1].value = Mx[1]
  1080. gg.setValues(s)
  1081. gg.clearResults()
  1082. gg.toast("成功")
  1083. else
  1084. gg.toast("検索結果が見つかりませんでした")
  1085. end
  1086. else
  1087. gg.toast("無効な入力です")
  1088. end
  1089. else
  1090. gg.toast("失敗")
  1091. end
  1092.  
  1093.  
  1094.  
  1095. if Ex[4] then
  1096. local Ix = gg.prompt({
  1097. "敵城HPを指定"
  1098. }, {
  1099. [1] = dog
  1100. }, {
  1101. "number"
  1102. })
  1103.  
  1104. if Ix ~= nil and Ix[1] ~= nil then
  1105. gg.clearResults()
  1106. gg.setRanges(gg.REGION_C_BSS)
  1107. gg.searchNumber("32400", gg.TYPE_DWORD, false, gg.SIGN_EQUAL)
  1108. gg.getResults(1, nil, nil, nil, nil, nil, nil, nil, nil)
  1109.  
  1110. local result = gg.getResults(1)
  1111. if #result > 0 then
  1112. local s = {}
  1113. s[1] = {}
  1114. s[1].address = result[1].address + 0x74058
  1115. s[1].flags = gg.TYPE_DWORD
  1116. s[1].value = Ix[1]
  1117. gg.setValues(s)
  1118. gg.addListItems(s)
  1119. gg.clearResults()
  1120. gg.toast("成功")
  1121. else
  1122. gg.toast("検索結果が見つかりませんでした")
  1123. end
  1124. else
  1125. gg.toast("無効な入力です")
  1126. end
  1127. else
  1128. gg.toast("失敗")
  1129. end
  1130.  
  1131.  
  1132.  
  1133. if Ex[5] then
  1134. local hnO = gg.prompt({
  1135. "イベントガチャチケ"
  1136. }, {
  1137. [1] = dog
  1138. }, {
  1139. "number"
  1140. })
  1141.  
  1142. if hnO ~= nil and hnO[1] ~= nil then
  1143. gg.clearResults()
  1144. gg.setRanges(gg.REGION_C_BSS)
  1145. gg.searchNumber("32400", gg.TYPE_DWORD, false, gg.SIGN_EQUAL)
  1146. gg.getResults(1, nil, nil, nil, nil, nil, nil, nil, nil)
  1147.  
  1148. local result = gg.getResults(1)
  1149. if #result > 0 then
  1150. local s = {}
  1151. s[1] = {}
  1152. s[1].address = result[1].address + 0x2adce4
  1153. s[1].flags = gg.TYPE_DWORD
  1154. s[1].value = hnO[1]
  1155. gg.setValues(s)
  1156. gg.clearResults()
  1157. gg.toast("成功")
  1158. else
  1159. gg.toast("検索結果が見つかりませんでした")
  1160. end
  1161. else
  1162. gg.toast("無効な入力です")
  1163. end
  1164. else
  1165. gg.toast("失敗")
  1166. end
  1167.  
  1168.  
  1169.  
  1170. if Ex[6] then
  1171. local Jx = gg.prompt({
  1172. "道場のスコアを指定"
  1173. }, {
  1174. [1] = dojo
  1175. }, {
  1176. "number"
  1177. })
  1178.  
  1179. if Jx ~= nil and Jx[1] ~= nil then
  1180. gg.clearResults()
  1181. gg.setRanges(gg.REGION_C_BSS)
  1182. gg.searchNumber("32400", gg.TYPE_DWORD, false, gg.SIGN_EQUAL)
  1183. gg.getResults(1, nil, nil, nil, nil, nil, nil, nil, nil)
  1184.  
  1185. local result = gg.getResults(1)
  1186. if #result > 0 then
  1187. local s = {}
  1188. s[1] = {}
  1189. s[1].address = result[1].address - 0x7fd4
  1190. s[1].flags = gg.TYPE_DWORD
  1191. s[1].value = Jx[1]
  1192. gg.setValues(s)
  1193. gg.clearResults()
  1194. gg.toast("成功")
  1195. else
  1196. gg.toast("検索結果が見つかりませんでした")
  1197. end
  1198. else
  1199. gg.toast("無効な入力です")
  1200. end
  1201. else
  1202. gg.toast("失敗")
  1203. end
  1204.  
  1205.  
  1206.  
  1207. if Ex[7] then
  1208. local Sx = gg.choice({
  1209. "いやしの楽園 ON",
  1210. "神の怒り ON",
  1211. "かみのくしゃみ ON"
  1212. }, "神のチカラメニュー")
  1213.  
  1214. if Sx ~= nil then
  1215. local offsets = {
  1216. [1] = 0x2ac7c4,
  1217. [2] = 0x2ac7c8,
  1218. [3] = 0x2ac7cc
  1219. }
  1220.  
  1221. local offset = offsets[Sx]
  1222. if offset then
  1223. gg.clearResults()
  1224. gg.setRanges(gg.REGION_C_BSS)
  1225. gg.searchNumber("32400", gg.TYPE_DWORD, false, gg.SIGN_EQUAL)
  1226. local result = gg.getResults(1)
  1227.  
  1228. if #result > 0 then
  1229. local s = {}
  1230. s[1] = {}
  1231. s[1].address = result[1].address + offset
  1232. s[1].flags = gg.TYPE_DWORD
  1233. s[1].value = 1
  1234. gg.setValues(s)
  1235. gg.clearResults()
  1236. gg.toast("成功")
  1237. else
  1238. gg.toast("検索結果が見つかりませんでした")
  1239. end
  1240. else
  1241. gg.toast("無効な選択肢です")
  1242. end
  1243. else
  1244. gg.toast("失敗")
  1245. end
  1246. end
  1247.  
  1248.  
  1249.  
  1250. if Ex[8] then
  1251. Main()
  1252. end
  1253. end
  1254. end
  1255.  
  1256.  
  1257. function menu5()
  1258. local Nx = gg.prompt({
  1259. "旧レジェ開放 ON",
  1260. "新レジェ開放 ON",
  1261. "0レジェ開放 ON",
  1262. "個別ステ開放メニュー ON",
  1263. "戻る"}, {
  1264. [1] = false,
  1265. [2] = false,
  1266. [3] = false,
  1267. [4] = false,
  1268. [5] = false}, {
  1269. "checkbox",
  1270. "checkbox",
  1271. "checkbox",
  1272. "checkbox",
  1273. "checkbox"})
  1274. if Nx ~= nil then
  1275.  
  1276. if Nx[1] then
  1277. gg.clearResults()
  1278. gg.setRanges(gg.REGION_C_BSS)
  1279. gg.searchNumber("32400", gg.TYPE_DWORD, false, gg.SIGN_EQUAL)
  1280.  
  1281. local result = gg.getResults(1)
  1282. if #result > 0 then
  1283. local s = {}
  1284. local baseOffset1 = 0x2BE198 -- 1〜49番目のオフセット
  1285. local baseOffset2 = 0x2EF3B8 -- 50〜98番目のオフセット
  1286. local value1 = 8
  1287. local value2 = 3
  1288.  
  1289. -- 1〜98番目のアドレス設定
  1290. for i = 1, 98 do
  1291. s[i] = {}
  1292. if i <= 49 then
  1293. -- 1〜49番目のアドレス
  1294. s[i].address = result[1].address + (baseOffset1 + (i - 1) * 4)
  1295. s[i].value = value1
  1296. else
  1297. -- 50〜98番目のアドレス
  1298. s[i].address = result[1].address + (baseOffset2 + (i - 50) * 4)
  1299. s[i].value = value2
  1300. end
  1301. s[i].flags = gg.TYPE_DWORD
  1302. end
  1303.  
  1304. -- 99番目のアドレス設定
  1305. s[99] = {}
  1306. s[99].address = result[1].address + 0x2C13A8
  1307. s[99].flags = gg.TYPE_DWORD
  1308. s[99].value = 1
  1309.  
  1310. -- 値の設定を一度に実行
  1311. gg.setValues(s)
  1312. gg.clearResults()
  1313. gg.toast("成功")
  1314. else
  1315. gg.toast("失敗")
  1316. end
  1317. end
  1318.  
  1319. if Nx[4] then
  1320. -- 日本編、未来編、宇宙編の選択肢を表示
  1321. local Hx = gg.prompt({
  1322. "日本編",
  1323. "未来編",
  1324. "宇宙編"
  1325. }, {
  1326. [1] = false,
  1327. [2] = false,
  1328. [3] = false
  1329. }, {
  1330. "checkbox",
  1331. "checkbox",
  1332. "checkbox"
  1333. })
  1334.  
  1335. -- 選択した編に応じた処理
  1336. if Hx ~= nil then
  1337. -- 編ごとのオフセットマップ
  1338. local offsets = {
  1339. Japan = {0x654, 0x658, 0x65C},
  1340. Future = {0x664, 0x668, 0x66C},
  1341. Space = {0x670, 0x674, 0x678}
  1342. }
  1343. -- 各編の章ごとの値
  1344. local chapters = {
  1345. [1] = 65585
  1346. }
  1347.  
  1348. -- 日本編の処理
  1349. if Hx[1] then
  1350. local Ux = gg.prompt({
  1351. "日本編1章",
  1352. "日本編2章",
  1353. "日本編3章"
  1354. }, {
  1355. [1] = false,
  1356. [2] = false,
  1357. [3] = false
  1358. }, {
  1359. "checkbox",
  1360. "checkbox",
  1361. "checkbox"
  1362. })
  1363. if Ux ~= nil then
  1364. local address_offset = offsets.Japan
  1365. local base_value = "32400"
  1366. for i = 1, 3 do
  1367. if Ux[i] then
  1368. gg.clearResults()
  1369. gg.setRanges(gg.REGION_C_BSS)
  1370. gg.searchNumber(base_value, gg.TYPE_DWORD, false, gg.SIGN_EQUAL)
  1371. local result = gg.getResults(1)
  1372. if result[1] then
  1373. local s = {
  1374. {
  1375. address = result[1].address + address_offset[i],
  1376. flags = gg.TYPE_DWORD,
  1377. value = chapters[i]
  1378. }
  1379. }
  1380. gg.setValues(s)
  1381. gg.clearResults()
  1382. gg.toast("成功")
  1383. else
  1384. gg.toast("失敗")
  1385. end
  1386. end
  1387. end
  1388. end
  1389. end
  1390.  
  1391. -- 未来編の処理
  1392. if Hx[2] then
  1393. local Zx = gg.prompt({
  1394. "未来編1章",
  1395. "未来編2章",
  1396. "未来編3章"
  1397. }, {
  1398. [1] = false,
  1399. [2] = false,
  1400. [3] = false
  1401. }, {
  1402. "checkbox",
  1403. "checkbox",
  1404. "checkbox"
  1405. })
  1406. if Zx ~= nil then
  1407. local address_offset = offsets.Future
  1408. local base_value = "32400"
  1409. for i = 1, 2 do
  1410. if Zx[i] then
  1411. gg.clearResults()
  1412. gg.setRanges(gg.REGION_C_BSS)
  1413. gg.searchNumber(base_value, gg.TYPE_DWORD, false, gg.SIGN_EQUAL)
  1414. local result = gg.getResults(1)
  1415. if result[1] then
  1416. local s = {
  1417. {
  1418. address = result[1].address + address_offset[i],
  1419. flags = gg.TYPE_DWORD,
  1420. value = chapters[i]
  1421. }
  1422. }
  1423. gg.setValues(s)
  1424. gg.clearResults()
  1425. gg.toast("成功")
  1426. else
  1427. gg.toast("失敗")
  1428. end
  1429. end
  1430. end
  1431. end
  1432. end
  1433.  
  1434. -- 宇宙編の処理
  1435. if Hx[3] then
  1436. local Jx = gg.prompt({
  1437. "宇宙編1章",
  1438. "宇宙編2章",
  1439. "宇宙編3章"
  1440. }, {
  1441. [1] = false,
  1442. [2] = false,
  1443. [3] = false
  1444. }, {
  1445. "checkbox",
  1446. "checkbox",
  1447. "checkbox"
  1448. })
  1449. if Jx ~= nil then
  1450. local address_offset = offsets.Space
  1451. local base_value = "32400"
  1452. for i = 1, 3 do
  1453. if Jx[i] then
  1454. gg.clearResults()
  1455. gg.setRanges(gg.REGION_C_BSS)
  1456. gg.searchNumber(base_value, gg.TYPE_DWORD, false, gg.SIGN_EQUAL)
  1457. local result = gg.getResults(1)
  1458. if result[1] then
  1459. local s = {
  1460. {
  1461. address = result[1].address + address_offset[i],
  1462. flags = gg.TYPE_DWORD,
  1463. value = chapters[i]
  1464. }
  1465. }
  1466. gg.setValues(s)
  1467. gg.clearResults()
  1468. gg.toast("成功")
  1469. else
  1470. gg.toast("失敗")
  1471. end
  1472. end
  1473. end
  1474. end
  1475. end
  1476. end
  1477. end
  1478.  
  1479.  
  1480.  
  1481.  
  1482. if Nx[5] then
  1483. Main()
  1484. end
  1485. end
  1486. end
  1487.  
  1488.  
  1489. if Lext == 1 then
  1490. Main()
  1491. end
  1492. end
  1493.  
  1494. end
Advertisement
Add Comment
Please, Sign In to add comment