注册 | 登录

游侠NETSHOW论坛





查看: 20092|回复: 2
打印 上一主题 下一主题

[原创] 汉之云脚本编写简明教程 [复制链接]

帖子
17
精华
0
积分
9
金钱
47
荣誉
0
人气
0
评议
0
楼主
发表于 2008-1-12 18:49:50 |显示全部楼层
文中对数组的调用方法有错,会导致在第1及第3项作弊时游戏卡死
  1.        for j = 1, mon do   ->         for j = 1, mon[i] do
  2.             for j = i1, i2 do  ->               for j = i1[i], i2[i] do
复制代码




全文:
  1. restore_save_q = function()
  2.    selmsg(3, "匡兜")
  3.    setselect(1, "1.絃")
  4.    setselect(2, "2.国")
  5.    setselect(3, "3.")
  6.    sleep(3)
  7.    waitanykey()
  8.    restore_save_ans(getselectanwser())
  9. end

  10. restore_cheat_q = function()
  11.    selmsg(6, "匡兜")
  12.    setselect(1, "1.┣")
  13.    setselect(2, "2.珇")
  14.    setselect(3, "3.杆称")
  15.    setselect(4, "4.窥")
  16.    setselect(5, "5.钉ヮ")
  17.    setselect(6, "6.")
  18.    sleep(3)
  19.    waitanykey()
  20.    restore_cheat_ans(getselectanwser())
  21. end

  22. restore_cheat_ans = function(x)
  23.    local mainid = get_mainrole()
  24.    local mainname = get_rolename(mainid)
  25.    if x == 1 then
  26.       local mon = {17, 14, 15, 15, 16, 16, 14, 12, 7, 6}
  27.       local a = table.getn(mon)
  28.       for i = 1, a do
  29.          for j = 1, mon[i] do
  30.             addsprite(i * 100 + 900 + j, 1)
  31.          end
  32.       end
  33.    elseif x == 2 then
  34.       for i = 6001, 6028 do
  35.          if i ~= 6024 then
  36.             additem(i, 99)
  37.          end
  38.       end
  39.       for i = 6039, 6046 do
  40.          if i ~= 6040 then
  41.             additem(i, 99)
  42.          end
  43.       end
  44.    elseif x == 3 then
  45.       local i1 = {3001, 3018, 3021, 3041, 3061, 3081, 3101, 4001, 4021, 4041, 5001, 5051}
  46.       local i2 = {3016, 3018, 3034, 3055, 3074, 3090, 3109, 4011, 4030, 4051, 5024, 5063}
  47.       local a = table.getn(i1)
  48.       local b = table.getn(i2)
  49.       local num = 11
  50.       if a == b then
  51.          for i = 1, a do
  52.             for j = i1[i], i2[i] do
  53.                additem(j, num)
  54.             end
  55.          end
  56.       end
  57.    elseif x == 4 then
  58.       addmoney(1000000)
  59.    elseif x == 5 then
  60.       for i = 1, 11 do
  61.          join(i)
  62.       end
  63.    elseif x == 6 then
  64.    else
  65.       restore_cheat_q()
  66.    end
  67. end

  68. restore_save_ans = function(x)
  69.    local mainid = get_mainrole()
  70.    local mainname = get_rolename(mainid)
  71.    if x == 1 then
  72.       call_save()
  73.    elseif x == 3 then
  74.       restore_team()
  75.    elseif x == 2 then
  76.       restore_cheat_q()
  77.    else
  78.       restore_save_q()
  79.    end
  80. end
复制代码

[ 本帖最后由 wuspring 于 2008-1-12 22:45 编辑 ]

使用道具 举报

帖子
17
精华
0
积分
9
金钱
47
荣誉
0
人气
0
评议
0
沙发
发表于 2008-1-13 13:13:33 |显示全部楼层
原帖由 vbvan 于 2008-1-13 13:00 发表


多谢提醒,我是在所见即所得模式下粘贴的,没留意UBB还是会被解析。顶楼的代码已经更新


:) 话说这个作弊太强大了,昨晚用这个去过剧情,了无乐趣了..hoho

使用道具 举报

帖子
17
精华
0
积分
9
金钱
47
荣誉
0
人气
0
评议
0
板凳
发表于 2008-1-13 13:50:21 |显示全部楼层
前头在改的脚本是作弊用的~~~~~~~~

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

手机版|Archiver|游侠NETSHOW论坛 ( 苏ICP备2023007791号 )

GMT+8, 2024-6-18 14:55 , Processed in 0.265250 second(s), 10 queries , Gzip On, Memcache On.

Powered by Discuz! X2

© 2001-2011 Comsenz Inc.

分享到