|
发表于 2008-1-8 21:32:00
|
显示全部楼层
Re:请牛人抬手帮忙下
namespace eval BHN_Boss {//命名空间。防止变量重复声明用的。BHN_BOSS是头BOSS,BHN彪悍牛?
variable timeline [ clock seconds ]//声明变量,看下面应该是计时器
variable timediff 3 //声明变量,看下面应该是周期设定,单位是秒
proc CanCast { npc victim } {//处理函数,参数应该是NPC目标
variable timeline//再次声明
variable timediff//还声明
set now [ clock seconds ]//设置时间为当前时间
set mobh [GetHealthPCT $npc]//设置怪物HP为这个怪物的HP
set spell_list "22539 23364 22687 20623 18431 17646 17131"//设置法术列表,应该是5位数为1个法术ID
##############################################################################
# NPC Say//NPC说
#######################
set spellid [lindex $spell_list [expr {int(rand()*[llength $spell_list])}]]//应该是怪物施法
if {$spellid == 22539} { Say $npc 0 "Burn! You wretches! Burn!" }//法术对应台词,以下皆同
if {$spellid == 23364} { Say $npc 0 "I'll swap you from these grounds!" }
if {$spellid == 22687} { Say $npc 0 "Stop healing and face me!" }
if {$spellid == 20623} { Say $npc 0 "I command death!" }
if {$spellid == 18431} { Say $npc 0 "RROOOAARRGGH!" }
if {$spellid == 17646} { Say $npc 0 "My whelps will become as powerful as I am one day!" }
if {$spellid == 17131} { Say $npc 0 "Obey me! The Broad Mother of the Black Dragonflight!" }
############################################################################
# NPC & Victim Spell Line
############################################################################
## Circle of Flame
if { $mobh == 98 } {//如果怪物HP=98
castspell $npc $npc 17447//对NPC变量施展17447编号的法术,应该是烈焰之环还是火环啥的.看翻译
if { $now >= ( $timeline + $timediff ) } {//如果现在的时间>刚才记录的时间+周期秒,则返回法术ID.
return $spellid
}
}
## Boss Flying (remote timer test)
if { ($mobh <= 75)&&($mobh >= 70)} {
Emote $npc 254//做表情,条件同上
# Landing Script Call Command
if { $now >= ( $timeline + $timediff ) } {
# Boss Landing
Emote $npc 293//做表情,其他同.这两个表情应该是BOSS起飞和降落.
}
}
## Self Heal (potion spell)
if { ($mobh <= 5)&&($mobh >= 2) } {//5>=HP>=2,BOSS自疗
castspell $npc $npc 4042
if { $now >= ( $timeline + $timediff ) } {
return $spellid
}
}
## Return Else
else { return $spellid }
}
set loadinfo "Flying & Landing Boss"//下面应该是说明
set loadvers "Beta 2.00"
puts "[clock format [clock seconds] -format %k:%M:%S]:M loadinfo ($loadvers) - Tha-Doctor"
|
|