3DMGAME 3DM首页 新闻中心 前瞻 | 评测 游戏库 热门 | 最新 攻略中心 攻略 | 秘籍 下载中心 游戏 | 汉化 购买正版 论坛

注册 登录

QQ登录

只需一步,快速开始

查看: 7378|回复: 8
打印 上一主题 下一主题

[资料] GTA4 Alice脚本编写汇总。。。。算了。。。不让置顶亮高了。。

[复制链接]

14

主题

2660

帖子

3317

积分

游戏达人

Rank: 7Rank: 7Rank: 7

贡献度
457
金元
14893
积分
3317
精华
0
注册时间
2008-10-19
跳转到指定楼层
主题
发表于 2009-5-9 00:16 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
拒绝灌水!!!!!!
作者:    Alexander /Alexander Blade / Alexander Koryakin ,flacs
翻译试用:星梦sK.y(本人琢磨了一个多小时)





安 装 :

1 打上ASI Loader补丁

2 把"copy"文件夹里的所有东西拷贝到GTA4根目录



3 example文件夹里有一些范例脚本,把你需要的脚本拷贝到...GTAIVAlice目录



4 进入游戏后,切换出来会看到GTA4目录里自动生成了alice.log,打开可以看到很多跟你的GTAIVAlice目录下的脚本相关的信息
  比如,你从example文件夹拷贝了playercoords.lua,那么alice.log里将包含你在游戏所处位置的坐标信息(相当于坐标获取器拉!!!)


5 使用本脚本补丁,在游戏里,可能出现部分贴图丢失,退出游戏后,有可能有出错信息,不要紧的。

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~



进阶说明:(程序员看)


1.Alice脚本(即本工具)是什么 ?
  Alice是基于lua脚本语言的GTA4的脚本引擎。

  本工具需要打上ASI Loader补丁

2.关于本工具包里的脚本 ?
  所有脚本(后缀为.lua)必须放在"GTAIVAlice"文件夹里。保存或者读取游戏后,脚本功效不会丢失。


3. 脚本信息 :

  [!!! 强烈建议抽出时间关注下面的脚本范例]
  ----- General functions -----
   To push integer/float parameter into the calling native func use
     PushInt(Value) / PushFloat(Value)
   To push script pointer use
     PushVarPtr() -- no params, if native changes pushed value
    -- u must use this function and after native
                  -- calling read the value of this variable
   To get integer/float param from stack after native call use
     Value = GetIntParam(ParamNumber) /
     Value = GetFloatParam(ParamNumber)
   To get the integer/float result of function (if exists) use
     Val = GetIntResult() / Val = GetFloatResult()  
   At least, to call native function use
     CallNative("NATIVE_FUNCTION_NAME") -- names are declared in
     -- other files
     (WARNING : You can't use functions which operate with models,
                and now i don't know what is the reason of this .)
   ----- Other needed functions (not for natives) -----
   Game must be started to use native functions, so we need a check:
     bool IsPlayerPoolCreated() -- if player pool is ok then we can
    -- use some native functions
     bool IsKeyPressed(AnsiKeyNum) -- checking any ansi key state
     Wait(Milliseconds) -- stops script for a needed time
     PrintFloatToLog(Value) / PrintStrToLog("STRING") -- prints
            -- to log
     
   ----- Call example -----
      --  GET_PLAYER_CHAR(0, &Var)
      --  declarations of functions u will see soon ,
      --  and now look at additional files  
      PushInt(0) -- 0 param
      PushVarPtr() -- 1 param (this is our &Var)
      CallNative("GET_PLAYER_CHAR") -- making a call
      PLAYER_CHAR = GetIntParam(1) -- reading the value
       -- from 1 parameter

   ----- Player structure organization -----
      int GET_PLAYER_ID() -- get player id , using only for getting
                          -- results of next functions
                          --  (always 0 in single player mode);
      int CONVERT_INT_TO_PLAYERINDEX( GET_PLAYER_ID() ) -- get player
             -- index from id , this is player definition variable
             -- (in SA was $PLAYER_CHAR) (always 0 in single player mode);
      GET_PLAYER_CHAR( CONVERT_INT_TO_PLAYERINDEX( GET_PLAYER_ID() ), &layerChar )
             -- get player char from player index , this is "player as ped/actor"
             -- definition variable (in SA was $PLAYER_ACTOR);





~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~



本补丁自带了作者编写的三个脚本:玩家坐标获取、超人(无敌)、即时保存,如果你有编程基础,那么你也可以按照它的范例教程,创作更好更强大的脚本。然后把你编写的脚本放到...GTAIV  Alice目录下,进游戏后测试你写的脚本有没有效 ^_^







GTA4_Alice脚本.part1.rar

195.31 KB, 下载次数: 68

rar

GTA4_Alice脚本.part2.rar

104.77 KB, 下载次数: 59

rar

回复

使用道具 举报

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

本版积分规则

Archiver|手机版|3DMGAME ( 京ICP备14006952号-1  沪公网安备 31011202006753号

GMT+8, 2026-4-10 04:43 , Processed in 0.030345 second(s), 17 queries , Memcached On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表