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

注册 登录

QQ登录

只需一步,快速开始

查看: 2020|回复: 0
打印 上一主题 下一主题

[求助] 吐血求助,脚本帝进,其他人请绕道,免得伤了您的脑/眼,这犯罪代码还是不行,我真的不知道该怎么办了

[复制链接]

47

主题

738

帖子

757

积分

超级玩家

Rank: 5Rank: 5

贡献度
51
金元
5530
积分
757
精华
0
注册时间
2008-6-7
跳转到指定楼层
主题
发表于 2011-6-30 16:10 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
本帖最后由 gunship 于 2011-6-30 16:39 编辑

脚本越写越长,控制犯罪的代码(红色的部分)改了又改,还是无效
skill == 1时player会发动必杀技,power是经过计算的伤害值。播放动作后减掉NPC的血,我本想在被别人看到时对非邪恶NPC用时会增加赏金,但是无效....
有没什么函数是让player对NPC使用不播放动作和特效的伤害魔法?这样就可以省掉以下头痛的东西了。
.......
.......
set fQuestDelayTime to 0.001
if(skill == 0)
return
else
set timer to timer + getsecondspassed
if (skill == 1)
  player.pickidle    //播放动作
  if (timer > 0.3)
   if (victim == getcrosshairref)            
    victim.playsound WPNHitHand   
    player.PushActorAway victim  15

    if (victim.getdead == 0)&&(victim.getactorvalue health > 0)           
     ;messagebox "codeExecute"
     if (victim.iscreature)                 //是生物
      ;messagebox "iscreature"
      if (victim.getactorvalue health) < power         
//生物被杀
       ;messagebox "creaturedead"
       ModPCMiscStat 5 1                  //增加杀生数
      endif
     else      //不是生物,是NPC
      ;messagebox "isnotcreature"                  
      if (victim.isactorevil  != 1) &&(victim.isincombat  != 1)              //执行到这里就停了,应该就是这里判断的问题,但是不知道错在哪....
       messagebox "CrimeExecute"
       if ((victim.getactorvalue health) < power)    //NPC被必杀技打死了
        ModPCMiscStat 32 1                  //增加谋杀数
        ModPCMiscStat 6 1                   //增加杀人数
        ;messageboxex "victimdead"
        if ((player.IsActorDetected == 1) &&((victim.GetDetected player)!=1)) || (((victim.GetDetected player) == 1)&&((player.IsActorDetected) == 1))     //在被除受害者之外的NPC看到时增加赏金
         ;messagebox "beendetectvictimdead"
         player.ModCrimeGold 1000
        endif
       else                         //NPC没死
        ModPCMiscStat 31 1                   //增加袭击数
        ;messageboxex "victimlive"
        if ((player.IsActorDetected == 1) &&((victim.GetDetected player)!=1)) || (((victim.GetDetected player) == 1)&&((player.IsActorDetected) == 1))             //在被除受害者之外的NPC看到时增加赏金
         ;messagebox "beendetectvictimlive"
         player.ModCrimeGold 200
        endif
       endif
      endif
     endif
    endif

   
    victim.modactorvalue2 health (0-power)
    victim.startcombat player
   endif
   set timer to 0
   set skill to 0
  endif
elseif (skill == 2)
......
.....
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2026-4-6 12:55 , Processed in 0.334483 second(s), 16 queries , Memcached On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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