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

注册 登录

QQ登录

只需一步,快速开始

查看: 2350|回复: 1
打印 上一主题 下一主题

[求助] 求代码查错/优化,自制必杀技,为什么我的犯罪代码无效?

[复制链接]

47

主题

738

帖子

757

积分

超级玩家

Rank: 5Rank: 5

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

自己作了一个必杀技,想法是用必杀技攻击非战斗状态的非邪恶NPC被探测到时触发犯罪,犯罪代码(红色部分)不知怎么的无效,其他正常,求高人援手,感谢!
......
......
if(skill == 0)
return
else
set timer to timer + getsecondspassed
if (skill == 1)
  player.pickidle
  if (timer > 0.3)
   victim.playsound WPNHitHand
   player.PushActorAway victim  15

   if (victim.getdead == 0)&&(victim.getactorvalue health > 0)  /*另一个quest脚本中已经判断victim不为空且为actor才被传递*/
     if (victim.iscreature)
      if (victim.getactorvalue health) < power
       ModPCMiscStat 5 1
      endif
     elseif (victim.isactorevil == 0) && (victim.iscreature == 0)&&(victim.isincombat == 0)
      messagebox "CrimeExecute"
      if ((victim.getactorvalue health) < power)
       ModPCMiscStat 32 1
       ModPCMiscStat 6 1
       messageboxex "victimdead"
       if player.IsActorDetected
        messagebox "beendetectvictimdead"
        player.ModCrimeGold 1000
       endif
      else
       ModPCMiscStat 31 1
       messageboxex "victimlive"
       if player.IsActorDetected
        messagebox "beendetectvictimlive"
        player.ModCrimeGold 20
       endif
      endif
     endif
    endif


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

使用道具 举报

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

本版积分规则

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

GMT+8, 2026-4-6 08:42 , Processed in 0.025861 second(s), 16 queries , Memcached On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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