吐血求助,脚本帝进,其他人请绕道,免得伤了您的脑/眼,这犯罪代码还是不行,我真的不知道该怎么办了
本帖最后由 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 victim15
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)
......
.....
页:
[1]