//TESH.scrollpos=0
//TESH.alwaysfold=0
globals
constant real Area_X = 451.3
constant real Area_Y = -93.3
endglobals
//********************
// ReturnBug *
//********************
function H2I takes handle h returns integer
return h
return 0
endfunction
function H2S takes handle h returns string
return I2S(H2I(h))
endfunction
function I2B takes integer i returns boolean
local boolean b
if i == 1 then
set b = true
elseif i == 0 then
set b = false
endif
return b
endfunction
//! textmacro ReturnBugFunction takes NAME,TYPE
function I2$NAME$ takes integer i returns $TYPE$
return i
return null
endfunction
//! endtextmacro
//! runtextmacro ReturnBugFunction("Tm","timer")
//! runtextmacro ReturnBugFunction("Td","timerdialog")
//! runtextmacro ReturnBugFunction("Dg","dialog")
//! runtextmacro ReturnBugFunction("TG","trigger")
//! runtextmacro ReturnBugFunction("TC","triggercondition")
//! runtextmacro ReturnBugFunction("U","unit")
//! runtextmacro ReturnBugFunction("P","player")
//! runtextmacro ReturnBugFunction("RC","rect")
//********************
// GameCache *
//********************
function GC takes nothing returns gamecache
if bj_lastCreatedGameCache==null then
call FlushGameCache(InitGameCache("Gameche.w3v"))
set bj_lastCreatedGameCache=InitGameCache("Gameche.w3v")
endif
return bj_lastCreatedGameCache
endfunction
function SetHandleReal takes handle subject,string name,real object returns nothing
if object==0.00 then
call FlushStoredReal(GC(),H2S(subject),name)
else
call StoreReal(GC(),H2S(subject),name,object)
endif
endfunction
function SetHandleInt takes handle subject,string name,integer object returns nothing
if object==0 then
call FlushStoredInteger(GC(),H2S(subject),name)
else
call StoreInteger(GC(),H2S(subject),name,object)
endif
endfunction
function SetValueInt takes string subject,string name,integer object returns nothing
if object==0 then
call FlushStoredInteger(GC(),subject,name)
else
call StoreInteger(GC(),subject,name,object)
endif
endfunction
function SetHandleString takes handle subject,string name,string object returns nothing
if object=="" then
call FlushStoredString(GC(),H2S(subject),name)
else
call StoreString(GC(),H2S(subject),name,object)
endif
endfunction
function SetValueString takes string subject,string name,string object returns nothing
if object=="" then
call FlushStoredString(GC(),subject,name)
else
call StoreString(GC(),subject,name,object)
endif
endfunction
function SetHandleBool takes handle subject,string name,boolean object returns nothing
if object==false then
call FlushStoredBoolean(GC(),H2S(subject),name)
else
call StoreBoolean(GC(),H2S(subject),name,object)
endif
endfunction
//! textmacro Gain takes NAME, PARAMETER1, PARAMETER2, PARAMETER3, RESULT, VALUE
function Get$NAME$ takes $PARAMETER1$ subject,$PARAMETER2$ name returns $PARAMETER3$
return $RESULT$
return $VALUE$
endfunction
//! endtextmacro
//! runtextmacro Gain("HandleInt","handle","string","integer","GetStoredInteger(GC(),H2S(subject),name)","0")
//! runtextmacro Gain("HandleReal","handle","string","real","GetStoredReal(GC(),H2S(subject),name)","0.00")
//! runtextmacro Gain("ValueInt","string","string","integer","GetStoredInteger(GC(),subject,name)","0")
//! runtextmacro Gain("ValueString","string","string","string","GetStoredString(GC(),subject,name)","null")
//! runtextmacro Gain("HandleString","handle","string","string","GetStoredString(GC(),H2S(subject),name)","null")
function FlushHandleValue takes handle h returns nothing
call FlushStoredMission(GC(),H2S(h))
endfunction
function FlushCache takes string subject returns nothing
call FlushStoredMission(GC(),subject)
endfunction
function DemolishProject takes handle h,string object returns nothing
call FlushStoredInteger(GC(), H2S(h), object)
endfunction
//Simplify Formula
function DistanceLink takes real x1, real y1, real x2, real y2 returns real
return SquareRoot((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2))
endfunction
function AngleLink takes real x1, real y1, real x2, real y2 returns real
return 57.296 * Atan2(y2 - y1, x2 - x1)
endfunction
function MatrixLink takes real dividend, real divisor returns real
return ModuloReal(dividend, divisor)
endfunction
function PowerLink takes real parameter1, real parameter2 returns real
return Pow(( parameter1 + parameter2 ), 2.00)
endfunction
function TrigonometricLink takes real constant1, real parameter1, real constant2, real parameter2 returns real
return (constant1*Sin(parameter1) + constant2*Cos(parameter2))
endfunction
//***********************************
// Map Boundary Measurement *
//***********************************
function checkX takes real x returns real
local real r = GetRectMinX(bj_mapInitialPlayableArea) + 50
if x < r then
return r
endif
set r = GetRectMaxX(bj_mapInitialPlayableArea) - 50
if x > r then
return r
endif
return x
endfunction
function checkY takes real y returns real
local real r = GetRectMinY(bj_mapInitialPlayableArea) + 50
if y < r then
return r
endif
set r = GetRectMaxY(bj_mapInitialPlayableArea) - 50
if y > r then
return r
endif
return y
endfunction
//************************
// Floating Text *
//************************
function AddFadingTextTag takes string text, unit whichunit, integer red, integer green, integer blue, integer alpha returns nothing
local texttag t = CreateTextTag()
call SetTextTagText(t, text, 0.023)
call SetTextTagPosUnit(t, whichunit, 0)
call SetTextTagColor(t,red,green,blue,alpha)
call SetTextTagVelocity(t, 0, 0.03)
call SetTextTagVisibility(t, true)
call SetTextTagFadepoint(t, 2)
call SetTextTagLifespan(t, 2)
call SetTextTagPermanent(t, false)
set t = null
endfunction
//Continuous Displacement Mouldboard
function DestroyDestructables takes nothing returns nothing
call KillDestructable( GetEnumDestructable() )
endfunction
function GroupStrategy takes nothing returns boolean
local unit major = I2U(GetValueInt("MajorUnit","Unit"))
if IsUnitType(GetFilterUnit(), UNIT_TYPE_STRUCTURE) == false and GetUnitState(GetFilterUnit(), UNIT_STATE_LIFE) > 0 and IsUnitEnemy(GetFilterUnit(), GetOwningPlayer(major)) == true and IsUnitType(GetFilterUnit(), UNIT_TYPE_GROUND) == true then
call UnitDamageTarget( major, GetFilterUnit(), 75.00 * (I2R(GetUnitLevel(major))), true, false, ATTACK_TYPE_HERO, DAMAGE_TYPE_NORMAL, WEAPON_TYPE_WHOKNOWS )
endif
set major = null
return false
endfunction
function MoveFunc takes nothing returns nothing
local timer t = GetExpiredTimer()
local integer i = 0
local integer n = 1
local unit u
local unit Role=I2U(GetHandleInt(t,"OriginUnit"))
local unit major = I2U(GetValueInt("MajorUnit","Unit"))
local integer Au = GetHandleInt(t,"UnitId")
local real UnitLocX = GetHandleReal(t,"X")
local real UnitLocY = GetHandleReal(t,"Y")
local real TempLocX
local real TempLocY
local real h = GetHandleReal(t,"Height")
local real r = GetHandleReal(t,"r")
local real k = GetHandleReal(t,"k")
local real array Coordinate_X
local real array Coordinate_Y
local real angle = GetHandleReal(t,"angle")
local real dis = GetHandleReal(t,"distance")
local real len = GetHandleReal(t,"Length")
local integer steps= GetHandleInt(t,"steps")
local integer Max= GetHandleInt(t,"Max")
local integer Num= GetHandleInt(t,"Num")
local string SpecialEffectModel = GetHandleString(t,"Model")
local string SpecialEffectModel2 = GetHandleString(t,"Model2")
local string SpecialEffectModel3 = GetHandleString(t,"Model3")
local effect Effect
local location Point
local group Group = CreateGroup()
local group Scope = CreateGroup()
if steps>0 then
set steps=steps-1
call SetHandleInt(t,"steps",steps)
set r = r + 0.05
call SetHandleReal(t,"r",r)
set k = ( ( h * r ) - ( ( h / 3.00 ) * Pow(r, 2.00) ) )
call SetHandleReal(t,"k",k)
set TempLocX = UnitLocX + dis*Cos(angle*bj_DEGTORAD)*(Max-steps)
set TempLocY = UnitLocY + dis*Sin(angle*bj_DEGTORAD)*(Max-steps)
call SetUnitFlyHeight( Role, k, 0.00 )
set u = CreateUnit(GetOwningPlayer(Role), Au, TempLocX, TempLocY, GetUnitFacing(Role))
call SetUnitVertexColor( u, 255, 255, 255, 255 )
call SetUnitFlyHeight( u, GetUnitFlyHeight(Role), 0.00 )
set Effect = AddSpecialEffect(SpecialEffectModel,TempLocX,TempLocY)
call DestroyEffect( Effect )
set Point = Location(TempLocX, TempLocY)
call EnumDestructablesInCircleBJ( 128.00, Point, function DestroyDestructables )
call RemoveLocation(Point)
set Point = null
set u = null
set Effect = null
call SetUnitX(Role,checkX(TempLocX))
call SetUnitY(Role,checkY(TempLocY))
call SetHandleReal(t,"NX",TempLocX)
call SetHandleReal(t,"NY",TempLocY)
else
call DestroyEffect( AddSpecialEffect(SpecialEffectModel3,GetHandleReal(t,"NX"),GetHandleReal(t,"NY")) )
loop
exitwhen n > Num
set Coordinate_X[n]=GetHandleReal(t,"NX") + len*Cos((360/Num)*n*bj_DEGTORAD)
set Coordinate_Y[n]=GetHandleReal(t,"NY") + len*Sin((360/Num)*n*bj_DEGTORAD)
call DestroyEffect( AddSpecialEffect(SpecialEffectModel2,Coordinate_X[n],Coordinate_Y[n]) )
set n = n + 1
endloop
call GroupEnumUnitsInRange(Group,GetHandleReal(t,"NX"),GetHandleReal(t,"NY"),300 + I2R(GetUnitLevel(major)) * 50,Condition(function GroupStrategy))
call DestroyGroup(Group)
set Group = null
call GroupEnumUnitsInRange(Scope,GetUnitX(major),GetUnitY(major),300 + I2R(GetUnitLevel(major)) * 50,Condition(function GroupStrategy))
call DestroyGroup(Scope)
set Scope = null
call SelectUnit( Role, true )
call SetUnitPathing( Role,true )
set i=0
call FlushHandleValue(t)
call FlushCache("MajorUnit")
call DestroyTimer(t)
endif
set Role=null
endfunction
function DeliveryFunc takes unit major,unit Role,real lasttime,real interval,real dis,real angle,integer num,real len,string sem,string sem2,string sem3,integer au,real h returns nothing
//传递参数:移动单位、持续时间、时间间隔、移动速度、移动方向、扩散特效数量、扩散特效距离、持续位移产生特效的模型、扩散特效的模型、即时特效、辅助单位类型、飞行高度
local real UnitLocX = GetUnitX(Role)
local real UnitLocY = GetUnitY(Role)
local timer t=CreateTimer()
local integer steps=R2I(lasttime/interval)
call SetHandleReal(t,"X",UnitLocX)
call SetHandleReal(t,"Y",UnitLocY)
call SetHandleInt(t,"UnitId",au)
call SetHandleInt(t,"steps",steps)
call SetHandleInt(t,"Max",steps)
call SetHandleInt(t,"Num",num)
call SetHandleReal(t,"Height",h)
call SetHandleReal(t,"angle",angle)
call SetHandleReal(t,"distance",dis)
call SetHandleReal(t,"Length",len)
call SetHandleInt(t,"OriginUnit",H2I(Role))
call SetValueInt("MajorUnit","Unit",H2I(major))
call SetHandleString(t,"Model",sem)
call SetHandleString(t,"Model2",sem2)
call SetHandleString(t,"Model3",sem3)
call TimerStart(t,interval,true,function MoveFunc)
set t=null
endfunction
function Preparatory takes nothing returns nothing
local timer keep = GetExpiredTimer()
local integer i = 1
local unit array Monster
local integer array Hero
set Hero[1] = 'Hmkg'
set Hero[2] = 'Hblm'
set Hero[3] = 'Hamg'
set Hero[4] = 'Ofar'
set Hero[5] = 'Ekee'
set Hero[6] = 'Edem'
set Hero[7] = 'Udea'
loop
exitwhen i > 21
if i < 7 then
set Monster[i] = CreateUnit(Player(1), 'hfoo', Area_X, Area_Y, 90)
elseif i > 7 and i <= 12 then
set Monster[i] = CreateUnit(Player(1), 'hrif', Area_X, Area_Y, 90)
elseif i > 12 and i <= 14 then
set Monster[i] = CreateUnit(Player(1), 'hmpr', Area_X, Area_Y, 90)
elseif i > 14 and i <= 16 then
set Monster[i] = CreateUnit(Player(1), 'hsor', Area_X, Area_Y, 90)
elseif i > 16 and i <= 18 then
set Monster[i] = CreateUnit(Player(1), 'hkni', Area_X, Area_Y, 90)
elseif i > 18 and i <= 20 then
set Monster[i] = CreateUnit(Player(1), 'hmtm', Area_X, Area_Y, 90)
elseif i > 20 and i <= 21 then
set Monster[i] = CreateUnit(Player(1), Hero[GetRandomInt(1,7)], Area_X, Area_Y, 90)
endif
set Monster[i] = null
set i = i + 1
endloop
set keep = null
endfunction
Name | Type | is_array | initial_value |
//TESH.scrollpos=848
//TESH.alwaysfold=0
//**********************
// Pets System *
//**********************
globals
multiboard Form = null
unit pet = null
dialog chief = DialogCreate()
dialog assist = DialogCreate()
button array select
button array opt
integer array via
integer array state
integer array count
integer array skill
string array art
string array symbol
integer sample = 0
integer sort = 0
string password = "123456"
integer I = 0
integer N = 1
endglobals
//****************************
// Defined Functions *
//****************************
function AnimalCount takes nothing returns integer
return 6//Shows the number of pets.
endfunction
function Molecule takes nothing returns real
//You can modify the value in according to prompts below.
return 0.083//As a result,what a pity,each of sides has a omit.It`s better to gain a integer numerical value.
//----------------------------------------------
// 100 / { Max[column] - Min[column] } |
//----------------------------------------------
endfunction
function ProvokeScope takes nothing returns real
return 300.00//It means a distance that between location of the caster and position of the stockman.
endfunction
function UnKnownSign takes nothing returns string
return "ReplaceableTextures\\CommandButtons\\BTNSelectHeroOn.blp"
endfunction
function Equipage takes nothing returns string
return "ReplaceableTextures\\CommandButtonsDisabled\\DISBTNBackpack.BLP"
endfunction
function GetStockUnit takes nothing returns unit
//Pet Stockman | You can replace it and make sure that it`s invulnerable.
return gg_unit_hspt_0010
//-------------------------------
// Points For Attention |
//-------------------------------
// - If you use a global variable of unit category to account it,you will lose the value and gain a void in vain.
// - In fact,We could record it to difined function and make use of it by utilizing process in a degree.
endfunction
function Fountainhead takes nothing returns unit
return gg_unit_nfoh_0007//Fountain Of Health
endfunction
function Hedge takes nothing returns real
return 0.15//Probability of avoiding the risk of dangerous.
endfunction
function Countenance takes string embed returns string
return "|cffff0000" + embed + "|r"//Inquire color table,please.
endfunction
// - Data Binding -
function GetIcon takes string category returns string
// --- Concise writing ---
return GetValueString("ItemIcons",category)
endfunction
function GetNum takes string derivative returns integer
return S2I(GetValueString("Preface",derivative))
endfunction
function GetText takes string word returns string
return GetValueString("Descript",word)
endfunction
function Excretion takes nothing returns nothing
// --- Destroy all dialog so that you only have one pet. ---
call DialogDestroy(chief)
call DialogDestroy(assist)
// --- Make the cache empty. ---
call FlushHandleValue(chief)
//call FlushCache("Prelude") | still need to be recorded.
endfunction
function Identity takes nothing returns boolean
return GetTriggerUnit() == pet//Check Status
endfunction
function Murderer takes nothing returns boolean
return GetKillingUnit() == pet//Also Approval Status | That is, $ != or == %
endfunction
// - Determine whether they are enemies or not.
// - Including three conditions below.
function IsHero takes nothing returns boolean
return IsUnitType(GetTriggerUnit(), UNIT_TYPE_HERO) == true
endfunction
function IsNotHero takes nothing returns boolean
return IsUnitType(GetTriggerUnit(), UNIT_TYPE_HERO) == false
endfunction
function IsEnemy takes nothing returns boolean
return IsUnitEnemy(GetTriggerUnit(), GetOwningPlayer(GetKillingUnit())) == true
endfunction
//************************
// Reserve Files *
//************************
function BasicResources takes nothing returns nothing
local string key = "ItemIcons"
local string seq = "Preface"
local string tex = "Descript"
//----------------------------
// All Kinds of Pets |
//----------------------------
set via[1] = 'Nalc'
set via[2] = 'Nngs'
set via[3] = 'Ntin'
set via[4] = 'Nplh'
set via[5] = 'Nfir'
set via[6] = 'Npbm'
//---------------------------------------
// Boundary Process Demonstrate |
//---------------------------------------
set art[1] = "war3mapImported\\emptyL.tga"
set art[2] = "war3mapImported\\emptyR.tga"
set art[3] = "war3mapImported\\empty.tga"
set art[4] = "war3mapImported\\redBL.tga"
set art[5] = "war3mapImported\\redBR.tga"
set art[6] = "war3mapImported\\red.tga"
set art[7] = "war3mapImported\\greenBL.tga"
set art[8] = "war3mapImported\\greenBR.tga"
set art[9] = "war3mapImported\\green.tga"
set art[10] = "war3mapImported\\blueBL.tga"
set art[11] = "war3mapImported\\blueBR.tga"
set art[12] = "war3mapImported\\blue.tga"
//------------------------
// Article Icons |
//------------------------
call SetValueString(key,I2S('stel'),"ReplaceableTextures\\CommandButtons\\BTNStaffOfTeleportation.blp") //传送权杖
call SetValueString(key,I2S('gcel'),"ReplaceableTextures\\CommandButtons\\BTNGlove.blp") //加速手套
call SetValueString(key,I2S('mcou'),"ReplaceableTextures\\CommandButtons\\BTNMedalionOfCourage.blp") //勇气勋章
call SetValueString(key,I2S('rhth'),"ReplaceableTextures\\CommandButtons\\BTNPeriapt1.blp") //卡嘉医疗宝石
call SetValueString(key,I2S('kpin'),"ReplaceableTextures\\CommandButtons\\BTNPipeOfInsight.blp") //卡嘉长萧
call SetValueString(key,I2S('ajen'),"ReplaceableTextures\\CommandButtons\\BTNJanggo.blp") //古之忍耐姜歌
call SetValueString(key,I2S('dsum'),"ReplaceableTextures\\CommandButtons\\BTNDarkSummoning.blp") //召唤钻石
call SetValueString(key,I2S('sbch'),"ReplaceableTextures\\CommandButtons\\BTNBoneChimes.blp") //天灾骨钟
call SetValueString(key,I2S('belv'),"ReplaceableTextures\\CommandButtons\\BTNBoots.blp") //奎尔萨拉斯之靴 +6
call SetValueString(key,I2S('rde1'),"ReplaceableTextures\\CommandButtons\\BTNRingGreen.blp") //守护指环 +2
call SetValueString(key,I2S('rde2'),"ReplaceableTextures\\CommandButtons\\BTNRingGreen.blp") //守护指环 +3
call SetValueString(key,I2S('rde3'),"ReplaceableTextures\\CommandButtons\\BTNRingGreen.blp") //守护指环 +4
call SetValueString(key,I2S('bgst'),"ReplaceableTextures\\CommandButtons\\BTNBelt.blp") //巨人力量腰带+6
call SetValueString(key,I2S('clsd'),"ReplaceableTextures\\CommandButtons\\BTNCloak.blp") //影子风衣
call SetValueString(key,I2S('rlif'),"ReplaceableTextures\\CommandButtons\\BTNRingSkull.blp") //恢复指环
call SetValueString(key,I2S('ward'),"ReplaceableTextures\\CommandButtons\\BTNDrum.blp") //战歌之鼓
call SetValueString(key,I2S('ratc'),"ReplaceableTextures\\CommandButtons\\BTNClawsOfAttack.blp") //攻击之爪 +12
call SetValueString(key,I2S('rat6'),"ReplaceableTextures\\CommandButtons\\BTNClawsOfAttack.blp") //攻击之爪 +6
call SetValueString(key,I2S('rat9'),"ReplaceableTextures\\CommandButtons\\BTNClawsOfAttack.blp") //攻击之爪 +9
call SetValueString(key,I2S('rag1'),"ReplaceableTextures\\CommandButtons\\BTNSlippersOfAgility.blp") //敏捷便鞋 +3
call SetValueString(key,I2S('rin1'),"ReplaceableTextures\\CommandButtons\\BTNMantleOfIntelligence.blp") //智力斗篷 +3
call SetValueString(key,I2S('lgdh'),"ReplaceableTextures\\CommandButtons\\BTNHornOfDoom.blp") //毁灭之角
call SetValueString(key,I2S('crys'),"ReplaceableTextures\\CommandButtons\\BTNCrystalBall.blp") //水晶球
call SetValueString(key,I2S('ssil'),"ReplaceableTextures\\CommandButtons\\BTNStaffOfSilence.blp") //沉默权杖
call SetValueString(key,I2S('ciri'),"ReplaceableTextures\\CommandButtons\\BTNRobeOfTheMagi.blp") //法师长袍 +6
call SetValueString(key,I2S('clfm'),"ReplaceableTextures\\CommandButtons\\BTNCloakOfFlames.blp") //火焰风衣
call SetValueString(key,I2S('hcun'),"ReplaceableTextures\\CommandButtons\\BTNHoodOfCunning.blp") //灵巧头巾
call SetValueString(key,I2S('prvt'),"ReplaceableTextures\\CommandButtons\\BTNPeriapt.blp") //生命护身符
call SetValueString(key,I2S('brac'),"ReplaceableTextures\\CommandButtons\\BTNRunedBracers.blp") //神秘腰带
call SetValueString(key,I2S('penr'),"ReplaceableTextures\\CommandButtons\\BTNPendantOfEnergy.blp") //能量垂饰
call SetValueString(key,I2S('rwiz'),"ReplaceableTextures\\CommandButtons\\BTNSobiMask.blp") //艺人面罩
call SetValueString(key,I2S('hval'),"ReplaceableTextures\\CommandButtons\\BTNHelmOfValor.blp") //英勇面具
call SetValueString(key,I2S('cnob'),"ReplaceableTextures\\CommandButtons\\BTNCirclet.blp") //贵族圆环
call SetValueString(key,I2S('bspd'),"ReplaceableTextures\\CommandButtons\\BTNBootsOfSpeed.blp") //速度之靴
call SetValueString(key,I2S('evtl'),"ReplaceableTextures\\CommandButtons\\BTNTalisman.blp") //闪避护符
call SetValueString(key,I2S('afac'),"ReplaceableTextures\\CommandButtons\\BTNAlleriaFlute.blp") //阿利亚之笛
call SetValueString(key,I2S('lhst'),"ReplaceableTextures\\CommandButtons\\BTNLionHorn.blp") //风暴狮角
call SetValueString(key,I2S('rst1'),"ReplaceableTextures\\CommandButtons\\BTNGauntletsOfOgrePower.blp") //食人鬼手套 +3
call SetValueString(key,I2S('pmna'),"ReplaceableTextures\\CommandButtons\\BTNPendantOfMana.blp") //魔法垂饰
call SetValueString(key,I2S('spsh'),"ReplaceableTextures\\CommandButtons\\BTNSpellShieldAmulet.blp") //魔法护盾护身符
call SetValueString(key,I2S('odef'),"ReplaceableTextures\\CommandButtons\\BTNOrbOfDarkness.blp") //黑暗之球
call SetValueString(key,I2S('pomn'),"ReplaceableTextures\\CommandButtons\\BTNPotionOfOmniscience.blp") //全知药水
call SetValueString(key,I2S('shar'),"ReplaceableTextures\\CommandButtons\\BTNIceShard.blp") //冰冻碎片
call SetValueString(key,I2S('hlst'),"ReplaceableTextures\\CommandButtons\\BTNHealthStone.blp") //医疗石
call SetValueString(key,I2S('srrc'),"ReplaceableTextures\\CommandButtons\\BTNSnazzyScroll.blp") //复活卷轴
call SetValueString(key,I2S('pghe'),"ReplaceableTextures\\CommandButtons\\BTNPotionGreen.blp") //大生命药水
call SetValueString(key,I2S('pgma'),"ReplaceableTextures\\CommandButtons\\BTNPotionBlueBig.blp") //大魔法药水
call SetValueString(key,I2S('wswd'),"ReplaceableTextures\\CommandButtons\\BTNSentryWard.blp") //岗哨守卫
call SetValueString(key,I2S('fgrg'),"ReplaceableTextures\\CommandButtons\\BTNRockGolem.blp") //岩石印记
call SetValueString(key,I2S('will'),"ReplaceableTextures\\CommandButtons\\BTNWand.blp") //幻象权杖
call SetValueString(key,I2S('wshs'),"ReplaceableTextures\\CommandButtons\\BTNWandOfShadowSight.blp") //影子权杖
call SetValueString(key,I2S('sres'),"ReplaceableTextures\\CommandButtons\\BTNScrollOfHealing.blp") //恢复卷轴
call SetValueString(key,I2S('pres'),"ReplaceableTextures\\CommandButtons\\BTNPotionOfRestoration.blp") //恢复药水
call SetValueString(key,I2S('rej3'),"ReplaceableTextures\\CommandButtons\\BTNRejuvPotion.blp") //恢复药水
call SetValueString(key,I2S('infs'),"ReplaceableTextures\\CommandButtons\\BTNInfernalStone.blp") //恶魔岩石
call SetValueString(key,I2S('fgdg'),"ReplaceableTextures\\CommandButtons\\BTNDoomGuard.blp") //恶魔雕像
call SetValueString(key,I2S('sand'),"ReplaceableTextures\\CommandButtons\\BTNSnazzyScrollPurple.blp") //操作死尸卷轴
call SetValueString(key,I2S('pnvu'),"ReplaceableTextures\\CommandButtons\\BTNGreaterInvulneralbility.blp") //无敌药水
call SetValueString(key,I2S('fgsk'),"ReplaceableTextures\\CommandButtons\\BTNBookOfTheDead.blp") //死亡之书
call SetValueString(key,I2S('whwd'),"ReplaceableTextures\\CommandButtons\\BTNHealingWard.blp") //治疗守卫
call SetValueString(key,I2S('pdiv'),"ReplaceableTextures\\CommandButtons\\BTNPotionOfDivinity.blp") //神圣药水
call SetValueString(key,I2S('fgrd'),"ReplaceableTextures\\CommandButtons\\BTNRedDragon.blp") //红龙之卵
call SetValueString(key,I2S('ankh'),"ReplaceableTextures\\CommandButtons\\BTNAnkh.blp") //重生十字章
call SetValueString(key,I2S('sror'),"ReplaceableTextures\\CommandButtons\\BTNSnazzyScrollGreen.blp") //野兽卷轴
call SetValueString(key,I2S('totw'),"ReplaceableTextures\\CommandButtons\\BTNStone.blp") //野性护符
call SetValueString(key,I2S('wild'),"ReplaceableTextures\\CommandButtons\\BTNAmuletOftheWild.blp") //野性护身符
call SetValueString(key,I2S('fgfh'),"ReplaceableTextures\\CommandButtons\\BTNFelHound.blp") //长钉衣领
call SetValueString(key,I2S('wlsd'),"ReplaceableTextures\\CommandButtons\\BTNStarWand.blp") //闪电护盾权杖
call SetValueString(key,I2S('wcyc'),"ReplaceableTextures\\CommandButtons\\BTNWandOfCyclone.blp") //飓风权杖
call SetValueString(key,I2S('woms'),"ReplaceableTextures\\CommandButtons\\BTNWandOfManaSteal.blp") //魔法盗取权杖
call SetValueString(key,I2S('mnst'),"ReplaceableTextures\\CommandButtons\\BTNManaStone.blp") //魔法石
call SetValueString(key,I2S('ckng'),"ReplaceableTextures\\CommandButtons\\BTNHelmutPurple.blp") //国王之冠 +5
call SetValueString(key,I2S('rde4'),"ReplaceableTextures\\CommandButtons\\BTNRingGreen.blp") //守护指环 +5
call SetValueString(key,I2S('ratf'),"ReplaceableTextures\\CommandButtons\\BTNClawsOfAttack.blp") //攻击之爪 +15
call SetValueString(key,I2S('modt'),"ReplaceableTextures\\CommandButtons\\BTNMaskOfDeath.blp") //死亡面罩
call SetValueString(key,I2S('desc'),"ReplaceableTextures\\CommandButtons\\BTNDaggerOfEscape.blp") //科勒恩的逃脱匕首
call SetValueString(key,I2S('tkno'),"ReplaceableTextures\\CommandButtons\\BTNTomeRed.blp") //能量之书
call SetValueString(key,I2S('ofro'),"ReplaceableTextures\\CommandButtons\\BTNOrbOfFrost.blp") //霜冻之球
call SetValueString(key,I2S('wneu'),"ReplaceableTextures\\CommandButtons\\BTNWandOfNeutralization.blp") //中和权杖
call SetValueString(key,I2S('tret'),"ReplaceableTextures\\CommandButtons\\BTNTomeOfRetraining.blp") //再训练之书
call SetValueString(key,I2S('pclr'),"ReplaceableTextures\\CommandButtons\\BTNPotionOfClarity.blp") //净化药水
call SetValueString(key,I2S('hslv'),"ReplaceableTextures\\CommandButtons\\BTNHealingSalve.blp") //医疗剂
call SetValueString(key,I2S('shea'),"ReplaceableTextures\\CommandButtons\\BTNScrollOfTownPortal.blp") //医疗卷轴
call SetValueString(key,I2S('sneg'),"ReplaceableTextures\\CommandButtons\\BTNStaffOfNegation.blp") //否决权杖
call SetValueString(key,I2S('wneg'),"ReplaceableTextures\\CommandButtons\\BTNWandSkull.blp") //否决权杖
call SetValueString(key,I2S('vamp'),"ReplaceableTextures\\CommandButtons\\BTNPotionOfVampirism.blp") //吸血药水
call SetValueString(key,I2S('stwp'),"ReplaceableTextures\\CommandButtons\\BTNScrollUber.blp") //回城卷轴
call SetValueString(key,I2S('spro'),"ReplaceableTextures\\CommandButtons\\BTNScroll.blp") //守护卷轴
call SetValueString(key,I2S('plcl'),"ReplaceableTextures\\CommandButtons\\BTNLesserClarityPotion.blp") //小净化药水
call SetValueString(key,I2S('tgrh'),"ReplaceableTextures\\CommandButtons\\BTNGreathall.blp") //小型的大厅
call SetValueString(key,I2S('tcas'),"ReplaceableTextures\\CommandButtons\\BTNTinyCastle.blp") //小城堡
call SetValueString(key,I2S('rnec'),"ReplaceableTextures\\CommandButtons\\BTNRodOfNecromancy.blp") //巫术妖棍
call SetValueString(key,I2S('sreg'),"ReplaceableTextures\\CommandButtons\\BTNScrollOfRegenerationGreen.blp") //恢复卷轴
call SetValueString(key,I2S('moon'),"ReplaceableTextures\\CommandButtons\\BTNMoonStone.blp") //月亮石
call SetValueString(key,I2S('mcri'),"ReplaceableTextures\\CommandButtons\\BTNMechanicalCritter.blp") //机械类的小玩艺
call SetValueString(key,I2S('skul'),"ReplaceableTextures\\CommandButtons\\BTNSacrificialSkull.blp") //献祭头骨
call SetValueString(key,I2S('phea'),"ReplaceableTextures\\CommandButtons\\BTNPotionGreenSmall.blp") //生命药水
call SetValueString(key,I2S('silk'),"ReplaceableTextures\\CommandButtons\\BTNSpiderSilkBroach.blp") //蜘蛛丝饰针
call SetValueString(key,I2S('tsct'),"ReplaceableTextures\\CommandButtons\\BTNHumanWatchTower.blp") //象牙塔
call SetValueString(key,I2S('pnvl'),"ReplaceableTextures\\CommandButtons\\BTNLesserInvulneralbility.blp") //较小的无敌药水
call SetValueString(key,I2S('shas'),"ReplaceableTextures\\CommandButtons\\BTNScrollOfHaste.blp") //速度卷轴
call SetValueString(key,I2S('ssan'),"ReplaceableTextures\\CommandButtons\\BTNStaffOfSanctuary.blp") //避难权杖
call SetValueString(key,I2S('pinv'),"ReplaceableTextures\\CommandButtons\\BTNLesserInvisibility.blp") //隐形药水
call SetValueString(key,I2S('sman'),"ReplaceableTextures\\CommandButtons\\BTNScrollOfProtection.blp") //魔法卷轴
call SetValueString(key,I2S('pman'),"ReplaceableTextures\\CommandButtons\\BTNPotionBlueSmall.blp") //魔法药水
call SetValueString(key,I2S('k3m3'),"ReplaceableTextures\\CommandButtons\\BTN3M3.blp") //三月之钥
call SetValueString(key,I2S('k3m2'),"ReplaceableTextures\\CommandButtons\\BTN3M2.blp") //三月之钥的另外一个部分
call SetValueString(key,I2S('gopr'),"ReplaceableTextures\\CommandButtons\\BTNGlyph.blp") //净化浮雕
call SetValueString(key,I2S('glsk'),"ReplaceableTextures\\CommandButtons\\BTNGuldanSkull.blp") //古尔丹之颅
call SetValueString(key,I2S('ledg'),"ReplaceableTextures\\CommandButtons\\BTNSorceressMaster.blp") //吉拉德的帐本
call SetValueString(key,I2S('azhr'),"ReplaceableTextures\\CommandButtons\\BTNHeartOfAszune.blp") //埃苏尼之心
call SetValueString(key,I2S('kysn'),"ReplaceableTextures\\CommandButtons\\BTNSunKey.blp") //太阳钥匙
call SetValueString(key,I2S('ches'),"ReplaceableTextures\\CommandButtons\\BTNCheese.blp") //奶酪
call SetValueString(key,I2S('gmfr'),"ReplaceableTextures\\CommandButtons\\BTNGem.blp") //宝石碎片
call SetValueString(key,I2S('sorf'),"ReplaceableTextures\\CommandButtons\\BTNOrbOfDarkness.blp") //影子之球碎片
call SetValueString(key,I2S('wtlg'),"ReplaceableTextures\\CommandButtons\\BTNWirtsLeg.blp") //怀特之腿
call SetValueString(key,I2S('wolg'),"ReplaceableTextures\\CommandButtons\\BTNWirtsOtherLeg.blp") //怀特的另一条腿
call SetValueString(key,I2S('kymn'),"ReplaceableTextures\\CommandButtons\\BTNMoonKey.blp") //月之钥匙
call SetValueString(key,I2S('k3m1'),"ReplaceableTextures\\CommandButtons\\BTN3M1.blp") //月亮水晶
call SetValueString(key,I2S('phlt'),"ReplaceableTextures\\CommandButtons\\BTNUndeadShrine.blp") //李维特
call SetValueString(key,I2S('ktrm'),"ReplaceableTextures\\CommandButtons\\BTNUrnOfKelThuzad.blp") //泰瑞纳斯国王的骨灰瓮
call SetValueString(key,I2S('bzbf'),"ReplaceableTextures\\CommandButtons\\BTNVialFull.blp") //盛满泉水的瓶子
call SetValueString(key,I2S('sclp'),"ReplaceableTextures\\CommandButtons\\BTNSelectHeroOn.blp") //秘密关卡激活
call SetValueString(key,I2S('bzbe'),"ReplaceableTextures\\CommandButtons\\BTNVialEmpty.blp") //空瓶
call SetValueString(key,I2S('jpnt'),"ReplaceableTextures\\CommandButtons\\BTNScrollOfProtection.blp") //给吉安娜?普罗德摩尔的便条
call SetValueString(key,I2S('shwd'),"ReplaceableTextures\\CommandButtons\\BTNShimmerWeed.blp") //荧光草
call SetValueString(key,I2S('mort'),"ReplaceableTextures\\CommandButtons\\BTNSpy.blp") //莫哥林的报告
call SetValueString(key,I2S('sehr'),"ReplaceableTextures\\CommandButtons\\BTNHeartOfSearinox.blp") //赛瑞诺克斯之心
call SetValueString(key,I2S('cnhn'),"ReplaceableTextures\\CommandButtons\\BTNHornOfCenarius.blp") //赛纳留斯的号角
call SetValueString(key,I2S('dthb'),"ReplaceableTextures\\CommandButtons\\BTNManaFlareOff.blp") //雷电花芯
call SetValueString(key,I2S('dphe'),"ReplaceableTextures\\CommandButtons\\BTNThunderLizardEgg.blp") //雷霆凤凰蛋
call SetValueString(key,I2S('dkfw'),"ReplaceableTextures\\CommandButtons\\BTNBarrel.blp") //雷霆水桶
call SetValueString(key,I2S('thle'),"ReplaceableTextures\\CommandButtons\\BTNThunderLizardEgg.blp") //雷霆蜥蜴之蛋
call SetValueString(key,I2S('skrt'),"ReplaceableTextures\\CommandButtons\\BTNOrbOfCorruption.blp") //骸骨宝物
call SetValueString(key,I2S('engs'),"ReplaceableTextures\\CommandButtons\\BTNEnchantedGemstone.blp") //魔法宝石
call SetValueString(key,I2S('mgtk'),"ReplaceableTextures\\CommandButtons\\BTNBlood&GhostKey.blp") //魔法钥匙串
call SetValueString(key,I2S('kygh'),"ReplaceableTextures\\CommandButtons\\BTNGhostKey.blp") //魔鬼钥匙
call SetValueString(key,I2S('kybl'),"ReplaceableTextures\\CommandButtons\\BTNBloodKey.blp") //鲜血钥匙
call SetValueString(key,I2S('uflg'),"ReplaceableTextures\\CommandButtons\\BTNUndeadCaptureFlag.blp") //不死族旗帜
call SetValueString(key,I2S('sfog'),"ReplaceableTextures\\CommandButtons\\BTNHornOfFog.blp") //乌云号角
call SetValueString(key,I2S('flag'),"ReplaceableTextures\\CommandButtons\\BTNHumanCaptureFlag.blp") //人族旗帜
call SetValueString(key,I2S('rnsp'),"ReplaceableTextures\\CommandButtons\\BTNGoldRing.blp") //优越之戒
call SetValueString(key,I2S('spre'),"ReplaceableTextures\\CommandButtons\\BTNStaffOfPreservation.blp") //保存权杖
call SetValueString(key,I2S('fgun'),"ReplaceableTextures\\CommandButtons\\BTNFlare.blp") //信号枪
call SetValueString(key,I2S('axas'),"ReplaceableTextures\\CommandButtons\\BTNWitchDoctorMaster.blp") //先祖权杖
call SetValueString(key,I2S('oflg'),"ReplaceableTextures\\CommandButtons\\BTNOrcCaptureFlag.blp") //兽族旗帜
call SetValueString(key,I2S('fwss'),"ReplaceableTextures\\CommandButtons\\BTNGrimWard.blp") //冰霜巨龙头骨护盾
call SetValueString(key,I2S('oslo'),"ReplaceableTextures\\CommandButtons\\BTNOrbofSlowness.blp") //减速之球
call SetValueString(key,I2S('asbl'),"ReplaceableTextures\\CommandButtons\\BTNDaggerOfEscape.blp") //刺客佩刀
call SetValueString(key,I2S('blba'),"ReplaceableTextures\\CommandButtons\\BTNArmorGolem.blp") //剑刃护甲
call SetValueString(key,I2S('mlst'),"ReplaceableTextures\\CommandButtons\\BTNHammer.blp") //力量之锤
call SetValueString(key,I2S('tmmt'),"ReplaceableTextures\\CommandButtons\\BTNEntrapmentWard.blp") //力量图腾
call SetValueString(key,I2S('schl'),"ReplaceableTextures\\CommandButtons\\BTNPriestAdept.blp") //医疗权杖
call SetValueString(key,I2S('amrc'),"ReplaceableTextures\\CommandButtons\\BTNAmulet.blp") //召唤护身符
call SetValueString(key,I2S('gobm'),"ReplaceableTextures\\CommandButtons\\BTNGoblinLandMine.blp") //地精地雷
call SetValueString(key,I2S('tels'),"ReplaceableTextures\\CommandButtons\\BTNTelescope.blp") //地精夜视镜
call SetValueString(key,I2S('esaz'),"ReplaceableTextures\\CommandButtons\\BTNHeartOfAszune.blp") //埃苏尼之精髓
call SetValueString(key,I2S('gldo'),"ReplaceableTextures\\CommandButtons\\BTNUsedSoulGem.blp") //基尔加丹之球
call SetValueString(key,I2S('rej6'),"ReplaceableTextures\\CommandButtons\\BTNGreaterRejuvScroll.blp") //大型恢复卷轴
call SetValueString(key,I2S('rej4'),"ReplaceableTextures\\CommandButtons\\BTNGreaterRejuvPotion.blp") //大型恢复药水
call SetValueString(key,I2S('pgin'),"ReplaceableTextures\\CommandButtons\\BTNGreaterInvisibility.blp") //大隐形药水
call SetValueString(key,I2S('ram1'),"ReplaceableTextures\\CommandButtons\\BTNRingJadeFalcon.blp") //大魔法师指环
call SetValueString(key,I2S('ram4'),"ReplaceableTextures\\CommandButtons\\BTNRingJadeFalcon.blp") //大魔法师指环
call SetValueString(key,I2S('ram3'),"ReplaceableTextures\\CommandButtons\\BTNRingJadeFalcon.blp") //大魔法师指环
call SetValueString(key,I2S('ram2'),"ReplaceableTextures\\CommandButtons\\BTNRingJadeFalcon.blp") //大魔法师指环
call SetValueString(key,I2S('rde0'),"ReplaceableTextures\\CommandButtons\\BTNRingGreen.blp") //守护指环 +1
call SetValueString(key,I2S('rej5'),"ReplaceableTextures\\CommandButtons\\BTNLesserRejuvScroll.blp") //小型恢复卷轴
call SetValueString(key,I2S('rej2'),"ReplaceableTextures\\CommandButtons\\BTNLesserRejuvPotion.blp") //小型恢复药水
call SetValueString(key,I2S('rej1'),"ReplaceableTextures\\CommandButtons\\BTNMinorRejuvPotion.blp") //小型恢复药水
call SetValueString(key,I2S('dust'),"ReplaceableTextures\\CommandButtons\\BTNDustOfAppearance.blp") //尘土之影
call SetValueString(key,I2S('vddl'),"ReplaceableTextures\\CommandButtons\\BTNShadowPact.blp") //巫毒玩偶
call SetValueString(key,I2S('sor1'),"ReplaceableTextures\\CommandButtons\\BTNOrbOfDarkness.blp") //影子之球 +1
call SetValueString(key,I2S('sora'),"ReplaceableTextures\\CommandButtons\\BTNOrbOfDarkness.blp") //影子之球 +10
call SetValueString(key,I2S('sor2'),"ReplaceableTextures\\CommandButtons\\BTNOrbOfDarkness.blp") //影子之球 +2
call SetValueString(key,I2S('sor3'),"ReplaceableTextures\\CommandButtons\\BTNOrbOfDarkness.blp") //影子之球 +3
call SetValueString(key,I2S('sor4'),"ReplaceableTextures\\CommandButtons\\BTNOrbOfDarkness.blp") //影子之球 +4
call SetValueString(key,I2S('sor5'),"ReplaceableTextures\\CommandButtons\\BTNOrbOfDarkness.blp") //影子之球 +5
call SetValueString(key,I2S('sor6'),"ReplaceableTextures\\CommandButtons\\BTNOrbOfDarkness.blp") //影子之球 +6
call SetValueString(key,I2S('sor7'),"ReplaceableTextures\\CommandButtons\\BTNOrbOfDarkness.blp") //影子之球 +7
call SetValueString(key,I2S('sor8'),"ReplaceableTextures\\CommandButtons\\BTNOrbOfDarkness.blp") //影子之球 +8
call SetValueString(key,I2S('sor9'),"ReplaceableTextures\\CommandButtons\\BTNOrbOfDarkness.blp") //影子之球 +9
call SetValueString(key,I2S('tlum'),"ReplaceableTextures\\CommandButtons\\BTNHumanLumberMill.blp") //微型伐木场
call SetValueString(key,I2S('tbar'),"ReplaceableTextures\\CommandButtons\\BTNHumanBarracks.blp") //微型兵营
call SetValueString(key,I2S('tfar'),"ReplaceableTextures\\CommandButtons\\BTNFarm.blp") //微型农场
call SetValueString(key,I2S('tbak'),"ReplaceableTextures\\CommandButtons\\BTNAltarOfKings.blp") //微型国王祭坛
call SetValueString(key,I2S('tbsm'),"ReplaceableTextures\\CommandButtons\\BTNBlacksmith.blp") //微型铁匠铺
call SetValueString(key,I2S('dtsb'),"ReplaceableTextures\\CommandButtons\\BTNSorceressMaster.blp") //德雷克萨尔魔法书
call SetValueString(key,I2S('drph'),"ReplaceableTextures\\CommandButtons\\BTNDust.blp") //德鲁伊布袋
call SetValueString(key,I2S('mnsf'),"ReplaceableTextures\\CommandButtons\\BTNBrilliance.blp") //心灵权杖
call SetValueString(key,I2S('lure'),"ReplaceableTextures\\CommandButtons\\BTNMonsterLure.blp") //怪兽诱捕守卫
call SetValueString(key,I2S('btst'),"ReplaceableTextures\\CommandButtons\\BTNOrcBattleStandard.blp") //战斗标准
call SetValueString(key,I2S('stwa'),"ReplaceableTextures\\CommandButtons\\BTNOrcMeleeUpOne.blp") //战斧
call SetValueString(key,I2S('hbth'),"ReplaceableTextures\\CommandButtons\\BTNUnholyAura.blp") //战舰之舵
call SetValueString(key,I2S('pams'),"ReplaceableTextures\\CommandButtons\\BTNSnazzyPotion.blp") //抗体药水
call SetValueString(key,I2S('rat3'),"ReplaceableTextures\\CommandButtons\\BTNClawsOfAttack.blp") //攻击之爪 +3
call SetValueString(key,I2S('brag'),"ReplaceableTextures\\CommandButtons\\BTNRingPurple.blp") //敏捷腰带
call SetValueString(key,I2S('shen'),"ReplaceableTextures\\CommandButtons\\BTNThoriumArmor.blp") //施魔护盾
call SetValueString(key,I2S('stpg'),"ReplaceableTextures\\CommandButtons\\BTNPenguin.blp") //时钟企鹅
call SetValueString(key,I2S('gemt'),"ReplaceableTextures\\CommandButtons\\BTNGem.blp") //显形宝石
call SetValueString(key,I2S('nflg'),"ReplaceableTextures\\CommandButtons\\BTNNightElfCaptureFlag.blp") //暗夜精灵族旗帜
call SetValueString(key,I2S('shdt'),"ReplaceableTextures\\CommandButtons\\BTNLightningShield.blp") //死亡领主护盾
call SetValueString(key,I2S('crdt'),"ReplaceableTextures\\CommandButtons\\BTNRevenant.blp") //死亡领主皇冠
call SetValueString(key,I2S('oven'),"ReplaceableTextures\\CommandButtons\\BTNOrbOfVenom.blp") //毒液之球
call SetValueString(key,I2S('gvsm'),"ReplaceableTextures\\CommandButtons\\BTNSpellSteal.blp") //法术大师手套
call SetValueString(key,I2S('rots'),"ReplaceableTextures\\CommandButtons\\BTNWitchDoctorAdept.blp") //海之权杖
call SetValueString(key,I2S('ofir'),"ReplaceableTextures\\CommandButtons\\BTNOrbOfFire.blp") //火焰之球
call SetValueString(key,I2S('frhg'),"ReplaceableTextures\\CommandButtons\\BTNAdvancedUnholyStrength.blp") //火焰手套
call SetValueString(key,I2S('jdrn'),"ReplaceableTextures\\CommandButtons\\BTNRingJadeFalcon.blp") //灵巧指环
call SetValueString(key,I2S('soul'),"ReplaceableTextures\\CommandButtons\\BTNUsedSoulGem.blp") //灵魂
call SetValueString(key,I2S('cosl'),"ReplaceableTextures\\CommandButtons\\BTNUsedSoulGem.blp") //灵魂之球
call SetValueString(key,I2S('grsl'),"ReplaceableTextures\\CommandButtons\\BTNNecromancerMaster.blp") //灵魂宝物
call SetValueString(key,I2S('gsou'),"ReplaceableTextures\\CommandButtons\\BTNSoulGem.blp") //灵魂宝石
call SetValueString(key,I2S('srbd'),"ReplaceableTextures\\CommandButtons\\BTNArcaniteMelee.blp") //灼热之刀
call SetValueString(key,I2S('shrs'),"ReplaceableTextures\\CommandButtons\\BTNMonsterLure.blp") //烤肉
call SetValueString(key,I2S('tmsc'),"ReplaceableTextures\\CommandButtons\\BTNNecromancerAdept.blp") //牺牲之书
call SetValueString(key,I2S('srtl'),"ReplaceableTextures\\CommandButtons\\BTNOrcMeleeUpThree.blp") //瑟拉思尔
call SetValueString(key,I2S('rump'),"ReplaceableTextures\\CommandButtons\\BTNGatherGold.blp") //生锈的矿铲
call SetValueString(key,I2S('arsc'),"ReplaceableTextures\\CommandButtons\\BTNBansheeAdept.blp") //神秘卷轴
call SetValueString(key,I2S('rugt'),"ReplaceableTextures\\CommandButtons\\BTNImprovedUnholyStrength.blp") //神秘手套
call SetValueString(key,I2S('horl'),"ReplaceableTextures\\CommandButtons\\BTNGlyph.blp") //稀有神器
call SetValueString(key,I2S('ccmd'),"ReplaceableTextures\\CommandButtons\\BTNScepterOfMastery.blp") //统治权杖
call SetValueString(key,I2S('ocor'),"ReplaceableTextures\\CommandButtons\\BTNOrbOfCorruption.blp") //腐蚀之球
call SetValueString(key,I2S('arsh'),"ReplaceableTextures\\CommandButtons\\BTNArcaniteArmor.blp") //芒硝护盾
call SetValueString(key,I2S('shhn'),"ReplaceableTextures\\CommandButtons\\BTNHumanArmorUpThree.blp") //荣誉护盾
call SetValueString(key,I2S('shcw'),"ReplaceableTextures\\CommandButtons\\BTNShamanMaster.blp") //萨满利爪
call SetValueString(key,I2S('shtm'),"ReplaceableTextures\\CommandButtons\\BTNEntrapmentWard.blp") //萨满图腾
call SetValueString(key,I2S('sprn'),"ReplaceableTextures\\CommandButtons\\BTNRingVioletSpider.blp") //蜘蛛戒指
call SetValueString(key,I2S('bfhr'),"ReplaceableTextures\\CommandButtons\\BTNPhilosophersStone.blp") //血羽之心
call SetValueString(key,I2S('tgxp'),"ReplaceableTextures\\CommandButtons\\BTNManual3.blp") //超级经验之书
call SetValueString(key,I2S('klmm'),"ReplaceableTextures\\CommandButtons\\BTNSpiritWalkerAdeptTraining.blp") //远古战斧
call SetValueString(key,I2S('anfg'),"ReplaceableTextures\\CommandButtons\\BTNClayFigurine.blp") //远古雕像
call SetValueString(key,I2S('pspd'),"ReplaceableTextures\\CommandButtons\\BTNPotionRed.blp") //速度药水
call SetValueString(key,I2S('scul'),"ReplaceableTextures\\CommandButtons\\BTNBansheeMaster.blp") //邪恶军团卷轴
call SetValueString(key,I2S('iwbr'),"ReplaceableTextures\\CommandButtons\\BTNNatureTouchGrow.blp") //铁树枝干
call SetValueString(key,I2S('oli2'),"ReplaceableTextures\\CommandButtons\\BTNOrbOfLightning.blp") //闪电之球
call SetValueString(key,I2S('olig'),"ReplaceableTextures\\CommandButtons\\BTNOrbOfLightning.blp") //闪电之球
call SetValueString(key,I2S('sksh'),"ReplaceableTextures\\CommandButtons\\BTNGrimWard.blp") //防护面具
call SetValueString(key,I2S('lnrn'),"ReplaceableTextures\\CommandButtons\\BTNRingLionHead.blp") //雄狮之戒
call SetValueString(key,I2S('thdm'),"ReplaceableTextures\\CommandButtons\\BTNEnchantedGemstone.blp") //雷霆蜥蜴钻石
call SetValueString(key,I2S('frgd'),"ReplaceableTextures\\CommandButtons\\BTNThoriumMelee.blp") //霜冻守卫
call SetValueString(key,I2S('sbok'),"ReplaceableTextures\\CommandButtons\\BTNSpellBookBLS.blp") //魔法书
call SetValueString(key,I2S('nspi'),"ReplaceableTextures\\CommandButtons\\BTNNecklace.blp") //魔法免疫项链
call SetValueString(key,I2S('envl'),"ReplaceableTextures\\CommandButtons\\BTNVialFull.blp") //魔法小瓶
call SetValueString(key,I2S('kgal'),"ReplaceableTextures\\CommandButtons\\BTNBarrel.blp") //麦酒桶
call SetValueString(key,I2S('stre'),"ReplaceableTextures\\CommandButtons\\BTNWandSkull.blp") //鼓舞权杖
//--------------------
// Hero Icons |
//--------------------
call SetValueString(key,I2S('Nalc'),"ReplaceableTextures\\CommandButtons\\BTNArachnathidpurple.blp")
call SetValueString(key,I2S('Nngs'),"ReplaceableTextures\\CommandButtons\\BTNNetherDragon.blp")
call SetValueString(key,I2S('Ntin'),"ReplaceableTextures\\CommandButtons\\BTNSeaElemental.blp")
call SetValueString(key,I2S('Nplh'),"ReplaceableTextures\\CommandButtons\\BTNThunderLizard.blp")
call SetValueString(key,I2S('Nfir'),"ReplaceableTextures\\CommandButtons\\BTNLobstrokkBlue.blp")
call SetValueString(key,I2S('Npbm'),"ReplaceableTextures\\CommandButtons\\BTNPolarFurbolgShaman.blp")
//-----------------------
// Ability Icons |
//-----------------------
call SetValueString(key,I2S('AUfn'),"ReplaceableTextures\\CommandButtons\\BTNGlacier.blp")
call SetValueString(key,I2S('AUfu'),"ReplaceableTextures\\CommandButtons\\BTNFrostArmor.blp")
call SetValueString(key,I2S('AOws'),"ReplaceableTextures\\CommandButtons\\BTNWarStomp.blp")
call SetValueString(key,I2S('AOsh'),"ReplaceableTextures\\CommandButtons\\BTNShockWave.blp")
call SetValueString(key,I2S('AHbz'),"ReplaceableTextures\\CommandButtons\\BTNBlizzard.blp")
call SetValueString(key,I2S('AHwe'),"ReplaceableTextures\\CommandButtons\\BTNSummonWaterElemental.blp")
call SetValueString(key,I2S('AHab'),"ReplaceableTextures\\CommandButtons\\BTNBrilliance.blp")
call SetValueString(key,I2S('AEbl'),"ReplaceableTextures\\CommandButtons\\BTNBlink.blp")
call SetValueString(key,I2S('AHtb'),"ReplaceableTextures\\CommandButtons\\BTNStormBolt.blp")
call SetValueString(key,I2S('AHtc'),"ReplaceableTextures\\CommandButtons\\BTNThunderclap.blp")
call SetValueString(key,I2S('AHbh'),"ReplaceableTextures\\CommandButtons\\BTNBash.blp")
call SetValueString(key,I2S('AHav'),"ReplaceableTextures\\CommandButtons\\BTNAvatar.blp")
call SetValueString(key,I2S('AOsw'),"ReplaceableTextures\\CommandButtons\\BTNSerpentWard.blp")
call SetValueString(key,I2S('AOhx'),"ReplaceableTextures\\CommandButtons\\BTNHex.blp")
call SetValueString(key,I2S('AOae'),"ReplaceableTextures\\CommandButtons\\BTNCommand.blp")
call SetValueString(key,I2S('AOre'),"ReplaceableTextures\\CommandButtons\\BTNReincarnation.blp")
call SetValueString(key,I2S('AOwk'),"ReplaceableTextures\\CommandButtons\\BTNWindWalkOn.blp")
call SetValueString(key,I2S('AOmi'),"ReplaceableTextures\\CommandButtons\\BTNMirrorImage.blp")
call SetValueString(key,I2S('ANca'),"ReplaceableTextures\\CommandButtons\\BTNCleavingAttack.blp")
call SetValueString(key,I2S('AUls'),"ReplaceableTextures\\CommandButtons\\BTNLocustSwarm.blp")
call SetValueString(key,I2S('AOcl'),"ReplaceableTextures\\CommandButtons\\BTNChainLightning.blp")
call SetValueString(key,I2S('AEfk'),"ReplaceableTextures\\CommandButtons\\BTNFanOfKnives.blp")
call SetValueString(key,I2S('AUav'),"ReplaceableTextures\\CommandButtons\\BTNVampiricAura.blp")
call SetValueString(key,I2S('AEsf'),"ReplaceableTextures\\CommandButtons\\BTNStarfall.blp")
//--------------------------
// Ability Sequence |
//--------------------------
call SetValueString(seq,I2S('AUfn'),"4")
call SetValueString(seq,I2S('AUfu'),"6")
call SetValueString(seq,I2S('AOws'),"8")
call SetValueString(seq,I2S('AOsh'),"10")
call SetValueString(seq,I2S('AHbz'),"4")
call SetValueString(seq,I2S('AHwe'),"6")
call SetValueString(seq,I2S('AHab'),"8")
call SetValueString(seq,I2S('AEbl'),"10")
call SetValueString(seq,I2S('AHtb'),"4")
call SetValueString(seq,I2S('AHtc'),"6")
call SetValueString(seq,I2S('AHbh'),"8")
call SetValueString(seq,I2S('AHav'),"10")
call SetValueString(seq,I2S('AOsw'),"4")
call SetValueString(seq,I2S('AOhx'),"6")
call SetValueString(seq,I2S('AOae'),"8")
call SetValueString(seq,I2S('AOre'),"10")
call SetValueString(seq,I2S('AOwk'),"4")
call SetValueString(seq,I2S('AOmi'),"6")
call SetValueString(seq,I2S('ANca'),"8")
call SetValueString(seq,I2S('AUls'),"10")
call SetValueString(seq,I2S('AOcl'),"4")
call SetValueString(seq,I2S('AEfk'),"6")
call SetValueString(seq,I2S('AUav'),"8")
call SetValueString(seq,I2S('AEsf'),"10")
//-----------------------------
// Ability Description |
//-----------------------------
call SetValueString(tex,I2S('AUfn'),"能对敌人进行一轮冰冻攻击,对其造成一定伤害并使其减速。")
call SetValueString(tex,I2S('AUfu'),"使目标身上具有一层霜冻保护。")
call SetValueString(tex,I2S('AOws'),"重击地面,对周围的地面单位造成一定的伤害。")
call SetValueString(tex,I2S('AOsh'),"能发出一道向前的能量波,对一条线上的敌方地面单位造成一定的伤害。")
call SetValueString(tex,I2S('AHbz'),"能召唤出若干次冰片攻击,对目标区域内的单位造成一定的伤害。")
call SetValueString(tex,I2S('AHwe'),"召唤出一个水元素来帮大魔法师进行战斗。")
call SetValueString(tex,I2S('AHab'),"能加快周围友军单位的魔法值恢复速度。")
call SetValueString(tex,I2S('AEbl'),"能瞬间移动一段距离,从而逃离战场或者快速加入战斗。")
call SetValueString(tex,I2S('AHtb'),"向目标投掷一巨大的魔法锤,对其造成一定伤害并使其处于眩晕状态。")
call SetValueString(tex,I2S('AHtc'),"重击地面,对周围的地面单位造成伤害并减慢其移动速度和攻击速度。")
call SetValueString(tex,I2S('AHbh'),"一定概率使得对手处于眩晕状态并受到附加伤害。")
call SetValueString(tex,I2S('AHav'),"提高护甲、生命值和攻击力并使其对魔法免疫。")
call SetValueString(tex,I2S('AOsw'),"召唤出一个固定不动的毒蛇守卫来攻击。并对魔法免疫。")
call SetValueString(tex,I2S('AOhx'),"让目标单位在一定时间内变成一只随机的小动物, 废除其特殊技能的使用。")
call SetValueString(tex,I2S('AOae'),"能增加周围单位的移动速度和攻击速度。")
call SetValueString(tex,I2S('AOre'),"当雷霆蜥蜴被杀时,它就会自动复活。")
call SetValueString(tex,I2S('AOwk'),"一定时间内隐形并加快移动速度,此时攻击不再隐形但会造成更多伤害。")
call SetValueString(tex,I2S('AOmi'),"制造出一定数量的幻象迷惑敌人。同时也会驱逐掉自身所有的魔法效果。")
call SetValueString(tex,I2S('ANca'),"马库拉甲鱼同时对多个敌人单位造成伤害。")
call SetValueString(tex,I2S('AUls'),"召唤出一群蝗虫来攻击敌人,能通过返回的物质恢复生命值。")
call SetValueString(tex,I2S('AOcl'),"投掷出一道能进行跳跃的闪电。每次跳跃都会减小闪电的攻击力。")
call SetValueString(tex,I2S('AEfk'),"耐瑟龙对周围的敌人发射出锋利的尖刀进行伤害。")
call SetValueString(tex,I2S('AUav'),"附近的单位可以将对敌人的伤害值转成自己的生命值。")
call SetValueString(tex,I2S('AEsf'),"召唤出一阵阵的流星雨,每阵流星雨对敌人造50点的伤害。")
endfunction
//-------------------------
// Custom scripts |
//-------------------------
function PanelValue takes integer start,integer end,string text returns nothing
call MultiboardSetItemValue( MultiboardGetItem(Form, start, end), text )
endfunction
function PanelIcon takes integer head,integer tail,string vers returns nothing
call MultiboardSetItemIcon( MultiboardGetItem(Form, head, tail ), vers )
endfunction
function PanelStyle takes integer begin,integer over,integer genuine,integer sham returns nothing
call MultiboardSetItemStyle( MultiboardGetItem(Form, begin, over), I2B(genuine), I2B(sham) )
endfunction
function PanelWidth takes integer raise,integer expiry,real breadth returns nothing
call MultiboardSetItemWidth( MultiboardGetItem(Form, raise, expiry), breadth )
endfunction
//---------------------
// Hour Meter |
//---------------------
function Record takes nothing returns nothing
local timer t = GetExpiredTimer()
local timer s = GetExpiredTimer()
local string o = OrderId2String(GetUnitCurrentOrder(pet))
local integer i = 1
// --- Constant Values ---
set state[1] = R2I(GetUnitState(pet,UNIT_STATE_LIFE))
set state[2] = R2I(GetUnitState(pet,UNIT_STATE_MAX_LIFE))
set state[3] = R2I(GetUnitState(pet,UNIT_STATE_MANA))
set state[4] = R2I(GetUnitState(pet,UNIT_STATE_MAX_MANA))
set state[5] = R2I(100 + GetUnitLevel(pet) * 15)
call PanelValue(0,15,Countenance(I2S(state[1]))+"|cffff0000/|r"+Countenance(I2S(state[2])))
call PanelValue(1,15,Countenance(I2S(state[3]))+"|cffff0000/|r"+Countenance(I2S(state[4])))
call PanelValue(2,15,Countenance(I2S(state[5]))+"|cffff0000/|r"+Countenance(I2S(state[5])))
loop
exitwhen i > 12
if state[1] <= state[2] * i * Molecule() then
call PanelIcon(0, i+1, art[3])
elseif state[1] >= state[2] * i * Molecule() then
call PanelIcon(0, i+1, art[6])
endif
if state[3] <= state[4] * i * Molecule() then
call PanelIcon(1, i+1, art[3])
elseif state[3] >= state[4] * i * Molecule() then
call PanelIcon(1, i+1, art[12])
endif
set i = i + 1
endloop
if state[1] > 0 and state[1] < state[2] then
call PanelIcon(0, 14, art[2])
call PanelIcon(0, 1, art[4])
elseif state[1] == state[2] then
call PanelIcon(0, 14, art[5])
call PanelIcon(0, 1, art[4])
elseif state[1] <= 0 then
call PanelIcon(0, 1, art[1])
call PanelIcon(0, 14, art[2])
endif
if state[3] > 0 and state[3] < state[4] then
call PanelIcon(1, 14, art[2])
call PanelIcon(1, 1, art[10])
elseif state[3] == state[4] then
call PanelIcon(1, 14, art[11])
call PanelIcon(1, 1, art[10])
elseif state[3] <= 0 then
call PanelIcon(1, 1, art[1])
call PanelIcon(1, 14, art[2])
endif
if GetUnitState(pet, UNIT_STATE_LIFE) > 0 then
if (o == "patrol") or (o == "move") or (o == "stop") or (o == "holdposition") or (o == null) or (o == "smart") then
call PanelValue(17,1,"|cffcc5000战斗|r |cffff8080◆|r")
call PanelValue(17,2,"|cffcc5000休息|r |cffff0000◆|r")
elseif (o == "attack") or (o == "attackground") or (o == "attackonce") then
call PanelValue(17,1,"|cffcc5000战斗|r |cffff0000◆|r")
call PanelValue(17,2,"|cffcc5000休息|r |cffff8080◆|r")
endif
endif
set t = null
set s = null
endfunction
//***********************
// Details Code *
//***********************
//---------------------
// Revive Pet |
//---------------------
function HaveRevived takes nothing returns nothing
local timer h = GetExpiredTimer()
local unit l = I2U(GetHandleInt(h,"l"))
local real x = GetHandleReal(h,"x")
local real y = GetHandleReal(h,"y")
local real t = GetHandleReal(h,"t")
if t > 0 then
set t = t - 1
call SetHandleReal(h,"t",t)
call PanelValue(18,8,Countenance(I2S(R2I(t))))
else
call ReviveHero(l,x,y,true)
call PanelValue(17,4,"|cffcc5000死亡|r |cffff8080◆|r")
call PanelValue(17,5,"|cffcc5000复活|r |cffff0000◆|r")
if (GetLocalPlayer() == GetOwningPlayer(l)) then
call PanCameraToTimed(x,y,0)
endif
call FlushHandleValue(h)
call PauseTimer(h)
call DestroyTimer(h)
endif
set h = null
set l = null
endfunction
function Anabiosis takes unit l,location p,real t,string s returns nothing
local timer h = CreateTimer()
local real x = GetLocationX(p)
local real y = GetLocationY(p)
call SetHandleReal(h,"x",x)
call SetHandleReal(h,"y",y)
call SetHandleReal(h,"t",t)
call SetHandleString(h,"s",s)
call SetHandleInt(h,"l",H2I(l))
call TimerStart(h, 1, true, function HaveRevived)
set h = null
set l = null
endfunction
//---------------
// Item |
//---------------
function Acquisition takes nothing returns nothing
local integer i = 1
local item this = GetManipulatedItem()
loop
exitwhen i > 6
if GetItemTypeId(this) == GetItemTypeId(UnitItemInSlot(pet, i-1)) then
//---------------------------|
// Regular Succession |
// |
// 7[14,1]-0 8[14,2]-1 |
// 4[15,1]-2 5[15,2]-3 |
// 1[16,1]-4 2[16,2]-5 |
// |
//---------------------------|
// --- To a certain extent,finding regular pattern is more supercilious than enumeration. ---
// --- So,based on this view,we could write code about "Drop Item" function by using the same method. ---
if i-1 == 0 then
call PanelIcon(14,1,GetIcon(I2S(GetItemTypeId(this))))
call PanelValue(14,1,GetItemName(this))
elseif i-1 == 1 then
call PanelIcon(14,2,GetIcon(I2S(GetItemTypeId(this))))
call PanelValue(14,2,GetItemName(this))
elseif i-1 == 2 then
call PanelIcon(15,1,GetIcon(I2S(GetItemTypeId(this))))
call PanelValue(15,1,GetItemName(this))
elseif i-1 == 3 then
call PanelIcon(15,2,GetIcon(I2S(GetItemTypeId(this))))
call PanelValue(15,2,GetItemName(this))
elseif i-1 == 4 then
call PanelIcon(16,1,GetIcon(I2S(GetItemTypeId(this))))
call PanelValue(16,1,GetItemName(this))
elseif i-1 == 5 then
call PanelIcon(16,2,GetIcon(I2S(GetItemTypeId(this))))
call PanelValue(16,2,GetItemName(this))
endif
endif
set i = i + 1
endloop
set this = null
endfunction
function Discarded takes nothing returns nothing
local integer i = 1
local item it = GetManipulatedItem()
loop
exitwhen i > 6
if GetItemTypeId(it) == GetItemTypeId(UnitItemInSlot(pet, i-1)) then
if i-1 == 0 then
call PanelIcon(14,1,Equipage())
call PanelValue(14,1,"空物品格")
elseif i-1 == 1 then
call PanelIcon(14,2,Equipage())
call PanelValue(14,2,"空物品格")
elseif i-1 == 2 then
call PanelIcon(15,1,Equipage())
call PanelValue(15,1,"空物品格")
elseif i-1 == 3 then
call PanelIcon(15,2,Equipage())
call PanelValue(15,2,"空物品格")
elseif i-1 == 4 then
call PanelIcon(16,1,Equipage())
call PanelValue(16,1,"空物品格")
elseif i-1 == 5 then
call PanelIcon(16,2,Equipage())
call PanelValue(16,2,"空物品格")
endif
endif
set i = i + 1
endloop
set it = null
endfunction
function Prohibited takes nothing returns boolean
// --- Select Event ---
if GetTriggerUnit() == pet then
if (GetLocalPlayer() == GetTriggerPlayer()) then
call SelectUnit(GetTriggerUnit(), false)
endif
endif
return false
endfunction
function DesignatedProjects takes nothing returns nothing
call UnitRemoveItemFromSlot(pet,S2I(SubString(GetEventPlayerChatString(), 4, 5))-1)
endfunction
function Circumscription takes nothing returns nothing
call IssueTargetOrder( pet, "smart", GetEnumItem() )
endfunction
function ItemReservoir takes nothing returns nothing
local real x = GetUnitX(pet)
local real y = GetUnitY(pet)
local rect area = Rect(x-512,y-512,x+512,y+512)
call EnumItemsInRect( area, null, function Circumscription )
call RemoveRect(area)
set area = null
endfunction
function Verification takes nothing returns nothing
local integer i = 3
local integer j = 0
local location p
local unit array k
if Murderer() and IsNotHero() and IsEnemy() then
set count[1] = count[1] + 1
call PanelValue(18,2,Countenance(I2S(count[1])))
set I = I + 1
if ModuloInteger(I, 10) == 0 then
set I = 0
loop
exitwhen i > 12
call PanelValue(19,i-1,"|cff6495ed■|r" )
call PanelValue(19,15,Countenance("已满!"))
call PanelWidth(19,15,.03)
set i = i + 1
endloop
set j = 1
loop
exitwhen j > 20
set k[j] = CreateUnit(GetOwningPlayer(pet),'npng',GetUnitX(pet),GetUnitY(pet),18*j+180)
call DeliveryFunc(pet,k[j],1,.02,15,GetUnitFacing(k[j]),0,0,null,null,null,0,0)
set k[j] = null
set j = j + 1
endloop
call DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Orc\\WarStomp\\WarStompCaster.mdl",GetUnitX(pet),GetUnitY(pet)))
else
call PanelValue(19,I+1,"|cffc71585■|r" )
call PanelValue(19,15,"|cffffff00蓄气中...|r")
call PanelWidth(19,15,.04)
endif
elseif Murderer() and IsHero() and IsEnemy() then
set count[2] = count[2] + 1
call PanelValue(18,4,Countenance(I2S(count[2])))
elseif Identity() then
set p = Location(GetUnitX(GetStockUnit()),GetUnitY(GetStockUnit()))
call Anabiosis(pet,p,GetUnitLevel(pet)*5,"Revive Remaining...")
call PanelValue(17,1,"|cffcc5000战斗|r |cffff8080◆|r")
call PanelValue(17,2,"|cffcc5000休息|r |cffff8080◆|r")
call PanelValue(17,4,"|cffcc5000死亡|r |cffff0000◆|r")
call PanelValue(17,5,"|cffcc5000复活|r |cffff8080◆|r")
set count[3] = count[3] + 1
call PanelValue(18,6,Countenance(I2S(count[3])))
set count[4] = 5 + GetUnitLevel(pet) * 2
call RemoveLocation(p)
set p = null
endif
endfunction
function DropItems takes nothing returns nothing
local integer i = 1
loop
exitwhen i > 6
call UnitRemoveItemFromSlot(pet,i-1)
set i = i + 1
endloop
endfunction
//----------------------------------
// Artificial Intelligence |
//----------------------------------
//#Follow Hero AI#
function AISetItem takes nothing returns nothing
set bj_lastRemovedItem = GetEnumItem()
endfunction
function AIItemFilter takes nothing returns boolean
return IsItemVisible(GetFilterItem()) and GetWidgetLife(GetFilterItem()) > 0
endfunction
function AIHasEmptyInventorySlot takes unit u returns boolean
return UnitItemInSlot(u, 0) == null or UnitItemInSlot(u, 1) == null or UnitItemInSlot(u, 2) == null or UnitItemInSlot(u, 3) == null or UnitItemInSlot(u, 4) == null or UnitItemInSlot(u, 5) == null
endfunction
function AIFilterEnemy takes nothing returns boolean
return GetUnitState(GetFilterUnit(), UNIT_STATE_LIFE) > 0 and IsPlayerEnemy(GetOwningPlayer(GetFilterUnit()), GetOwningPlayer(pet))
endfunction
function TackTime takes nothing returns nothing
local timer corpuscle = GetExpiredTimer()
local unit leader = I2U(GetHandleInt(corpuscle,"Major"))
local unit servitor = I2U(GetHandleInt(corpuscle,"Subsidiary"))
local real disparity = GetHandleReal(corpuscle,"Distance")
local real removing = GetHandleReal(corpuscle,"Scope")
local real ox = GetUnitX(leader)
local real oy = GetUnitY(leader)
local real tx = ox + GetRandomReal(150,removing) * Cos( GetRandomReal(0,360) * .01745)
local real ty = oy + GetRandomReal(150,removing) * Sin( GetRandomReal(0,360) * .01745)
local real x
local real y
local group g
local boolexpr b
local boolexpr e
local unit f
local rect r
// --- Indroduction ---
// --- 1、distance: if distance between subject and object is greater than the value,then the object will close to his major.
// --- 2、removing: scope of activities for the object.
// --- 3、time: every 2~6 seconds,check all conditions.
//call BJDebugMsg(R2S(DistanceLink(x,y,tx,ty)))
if GetUnitState(leader, UNIT_STATE_LIFE) > 0 or GetUnitState(servitor, UNIT_STATE_LIFE) > 0 then
set x = GetUnitX(servitor)
set y = GetUnitY(servitor)
if DistanceLink(ox,oy,tx,ty) > disparity then
call IssuePointOrderById( servitor, 851986, tx, ty )//851986 means "move" order
else
set g = CreateGroup()
set b = Condition(function AIFilterEnemy)
call GroupEnumUnitsInRange(g,x,y,500,b)
set f = FirstOfGroup(g)
if f == null then
call IssuePointOrderById( servitor, 851986, tx, ty )
//Check whether a rectangle area exist a general item or not.
set r = Rect(x-500,y-500,x+500,y+500)
set e = Condition(function AIItemFilter)
set bj_lastRemovedItem = null
call EnumItemsInRect(r, e, function AISetItem)
if bj_lastRemovedItem != null and (GetItemType(bj_lastRemovedItem) == ITEM_TYPE_POWERUP or AIHasEmptyInventorySlot(servitor)) then
call IssueTargetOrder(servitor, "smart", bj_lastRemovedItem)
else
//Do Nothing
endif
call RemoveRect(r)
call DestroyBoolExpr(e)
else
call IssueTargetOrderById(servitor,851983,f)//851983 means "attack" order
endif
call DestroyGroup(g)
call DestroyBoolExpr(b)
set g = null
set b = null
set e = null
set f = null
set r = null
endif
else
call FlushHandleValue(corpuscle)
call PauseTimer(corpuscle)
call DestroyTimer(corpuscle)
set corpuscle = null
endif
set corpuscle = null
endfunction
function FollowAI takes unit leader, unit servitor, real disparity, real removing returns nothing
local timer corpuscle = CreateTimer()
call SetValueInt("Record","Timer",H2I(corpuscle))
call SetHandleInt(corpuscle,"Major",H2I(leader))
call SetHandleInt(corpuscle,"Subsidiary",H2I(servitor))
call SetHandleReal(corpuscle,"Distance",disparity)
call SetHandleReal(corpuscle,"Scope",removing)
call TimerStart(corpuscle,2,true,function TackTime)
set corpuscle = null
endfunction
function Rebirth takes nothing returns nothing
call FollowAI(gg_unit_Hpal_0011,GetRevivingUnit(),400,500)
endfunction
//#Seek Asylum Hero AI#
function HideAway takes nothing returns nothing
local timer clock = GetExpiredTimer()
local timer corpuscle = I2Tm(GetValueInt("Record","Timer"))
local unit sick = I2U(GetHandleInt(clock,"Unit"))
local unit hope = Fountainhead()
local real x = GetUnitX(hope)
local real y = GetUnitY(hope)
if GetUnitState(sick, UNIT_STATE_LIFE) < R2I(GetUnitState(sick, UNIT_STATE_MAX_LIFE)) * Hedge() then
call PauseTimer(corpuscle)
call IssuePointOrderById( sick, 851986, x, y )
elseif GetUnitStatePercent(sick, UNIT_STATE_LIFE, UNIT_STATE_MAX_LIFE) >= 100 then
call ResumeTimer(corpuscle)
endif
set clock = null
set corpuscle = null
endfunction
function Security takes unit sick returns nothing
local timer clock = CreateTimer()
call SetValueInt("Record","Clock",H2I(clock))
call SetHandleInt(clock,"Unit",H2I(sick))
call TimerStart(clock,1,true,function HideAway)
set clock = null
endfunction
//#Learn Ability#
function Dig2Str takes integer i returns string
if i == 1 then
return "1"
elseif i == 2 then
return "2"
elseif i == 3 then
return "3"
elseif i == 4 then
return "4"
elseif i == 5 then
return "5"
elseif i == 6 then
return "6"
elseif i == 7 then
return "7"
elseif i == 8 then
return "8"
elseif i == 9 then
return "9"
else
return "0"
endif
endfunction
function Int2Str takes integer ic returns string
local string s = ""
local integer i = ic
local integer ialt = 0
local boolean neg = false
if i == 0 then
return "0"
endif
if i < 0 then
set neg = true
set i = (-1)*i
endif
loop
exitwhen i == 0
set ialt = i
set i = i / 10
set s = Dig2Str( ialt - 10*i ) + s
endloop
if neg then
set s = "-"+s
endif
return s
endfunction
function StringFind takes string subject,string find,integer offset returns integer
local integer len = StringLength(find)
local integer pos = offset
local string s
local string str
if ( offset < 1 ) then
set pos = 1
endif
if ( find == "" ) then
return -1
endif
loop
set s = SubString(subject, pos-1, pos+len-1)
if ( s == find ) then
return pos
endif
if ( SubString(subject, pos-1, pos) == "" ) then
return -1
endif
set pos = pos + 1
endloop
return -1
endfunction
function RecordAbility takes integer uid,integer ab1,integer ab2,integer ab3,integer ab4 returns nothing
call SetValueInt("spell",I2S(uid)+"_1",ab1)
call SetValueInt("spell",I2S(uid)+"_2",ab2)
call SetValueInt("spell",I2S(uid)+"_3",ab3)
call SetValueInt("spell",I2S(uid)+"_4",ab4)
endfunction
function RecordLearnSequence takes integer uid,string ls1,string ls2,string ls3,string ls4 returns nothing
call SetValueString("quence",I2S(uid)+"_1",ls1)
call SetValueString("quence",I2S(uid)+"_2",ls2)
call SetValueString("quence",I2S(uid)+"_3",ls3)
call SetValueString("quence",I2S(uid)+"_4",ls4)
endfunction
function HeroLearnSkillAI takes unit hero,integer uid,integer level returns integer
local string array seq
local integer n = 4
local integer array l
local integer i = 1
set l[1] = GetValueInt("spell",I2S(uid)+"_1")
set l[2] = GetValueInt("spell",I2S(uid)+"_2")
set l[3] = GetValueInt("spell",I2S(uid)+"_3")
set l[4] = GetValueInt("spell",I2S(uid)+"_4")
set seq[1] = GetValueString("quence",I2S(uid)+"_1")
set seq[2] = GetValueString("quence",I2S(uid)+"_2")
set seq[3] = GetValueString("quence",I2S(uid)+"_3")
set seq[4] = GetValueString("quence",I2S(uid)+"_4")
loop
exitwhen i > n
if StringFind(seq[i] , "^" + Int2Str(level) + "^", 1) != -1 then
call SelectHeroSkill(hero,l[i])
call DisplayTimedTextToPlayer(GetLocalPlayer(), 0, 0, 5, ( "学习" +Countenance(GetObjectName(l[i]))+","+"当前技能等级为" +I2S(GetUnitAbilityLevel(hero,l[i]))))
call PanelValue(GetNum(I2S(l[i])),1,"|cff1e90ff"+GetObjectName(l[i])+"|r")
call PanelIcon(GetNum(I2S(l[i])),1,GetIcon(I2S(l[i])))
call PanelValue(GetNum(I2S(l[i])),3,"|cff00ff00等级 |r"+"|cff00ff00"+I2S(GetUnitAbilityLevel(hero,l[i]))+"|r")
call PanelValue(GetNum(I2S(l[i]))+1,1,GetText(I2S(l[i])))
return l[i]
endif
set i = i + 1
endloop
return 0
endfunction
function HeroMaxSkillAI takes unit hero returns nothing
local integer level = GetHeroLevel(hero)
local integer uid = GetUnitTypeId(hero)
local integer n = 4
local integer i
local integer array ski
call ModifyHeroSkillPoints(hero, bj_MODIFYMETHOD_SET, level)
call HeroLearnSkillAI(hero,uid,1)
set i = 0
loop
set i = i + 1
exitwhen i > level
call HeroLearnSkillAI(hero,uid,i)
endloop
endfunction
function EscalateLevel takes nothing returns nothing
set state[6] = GetHeroInt(pet,false)
set state[7] = GetHeroAgi(pet,false)
set state[8] = GetHeroStr(pet,false)
set state[9] = GetUnitLevel(pet)
call PanelValue(13,2,"|cff0099cc智力|r "+Countenance(I2S(state[6])))
call PanelValue(13,3,"|cff0099cc敏捷|r "+Countenance(I2S(state[7])))
call PanelValue(13,4,"|cff0099cc力量|r "+Countenance(I2S(state[8])))
call PanelValue(13,6, Countenance(I2S(state[9])))
call HeroLearnSkillAI(pet,GetUnitTypeId(pet),GetHeroLevel(pet))
endfunction
//#Use Ability#
function Emancipation takes unit k returns nothing
local integer i = GetHandleInt(k,"Count")
local integer nucleus = GetHandleInt(k,"Mercenary")
call TriggerRemoveCondition(I2TG(nucleus),I2TC(GetStoredInteger(GC(),I2S(nucleus),"Prerequisite")))
call DestroyTrigger(I2TG(nucleus))
call FlushCache(I2S(nucleus))
call FlushHandleValue(k)
endfunction
function Motion takes nothing returns boolean
local unit k = GetTriggerUnit()
local integer count = GetHandleInt(k,"Count")
local integer order
local integer pro
local integer index
local integer i = 0
local integer a = 0
loop
set pro = GetHandleInt(k,"Probability"+I2S(i))
//--------------------
// Attention |
//--------------------
// <<< In fact,this is correct probability of algorithm >>>
// <<< Correct: GetRandomInt(0,99) * pro/(a+pro) < pro >>> ------ ①
// <<< Error: GetRandomInt(0,99) < pro >>> ------ ②
// Why do I use the fallacious arithmetic,according to the test,the probability of ① is bigger than ②.
// It is the results of what we need that to ensure that the pet is smart.
if GetRandomInt(0,99) < pro then//Pay Attention To The Above Announcement
set order = GetHandleInt(k,"Order"+I2S(i))
set index = GetHandleInt(k,"Index"+I2S(i))
set a = a+pro
endif
set i = i+1
//--------------------------
// 1、Enemy Target |
// 2、Point Target |
// 3、None |
// 4、Ally |
//--------------------------
if i >=count then
if index == 1 then
call IssueTargetOrderById(k,order,GetEventTargetUnit())
elseif index == 2 then
call IssuePointOrderById(k,order,GetUnitX(GetEventTargetUnit()),GetUnitY(GetEventTargetUnit()))
elseif index == 3 then
call IssueImmediateOrderById(k, order)
elseif index == 4 then
call IssueTargetOrderById(k,order,k)
endif
exitwhen true
endif
endloop
//call Emancipation(k)
set k = null
return false
endfunction
function Stir takes unit k,string order,integer n,integer index,integer probability returns nothing
local integer i = GetHandleInt(k,"Count")
local trigger nucleus
if i==0 then
set nucleus = CreateTrigger()
if n==1 then
call TriggerRegisterUnitEvent(nucleus, k, EVENT_UNIT_TARGET_IN_RANGE)
else
call TriggerRegisterUnitEvent(nucleus, k, EVENT_UNIT_ATTACKED)
endif
call SetHandleInt(k,"Mercenary",H2I(nucleus))
call SetHandleInt(nucleus,"Prerequisite",H2I(TriggerAddCondition(nucleus,Condition(function Motion))))
endif
call SetHandleInt(k, "Order"+I2S(i), OrderId(order))
call SetHandleInt(k, "Probability"+I2S(i), probability)
call SetHandleInt(k, "Index"+I2S(i), index)
call SetHandleInt(k, "Count", i+1)
set nucleus = null
endfunction
//****************************
// Create Multiboard *
//****************************
function DesignProspect takes nothing returns nothing
local integer i
local integer j
local integer k
local string array str
set str[1] = Countenance("生命值")
set str[2] = Countenance("魔法值")
set str[3] = Countenance("体力值")
set str[4] = "|cff9400d3杀死单位|r"
set str[5] = "|cff9400d3杀死英雄|r"
set str[6] = "|cff9400d3死亡次数|r"
set str[7] = "|cff9400d3复活计时|r"
set str[8] = "|cffcc5000战斗|r |cffff8080◆|r"
set str[9] = "|cffcc5000休息|r |cffff0000◆|r"
set str[10] = "|cffcc5000无敌|r |cffff8080◆|r"
set str[11] = "|cffcc5000死亡|r |cffff8080◆|r"
set str[12] = "|cffcc5000复活|r |cffff8080◆|r"
//-------------------
// --- Formal --- |
//-------------------
set Form = CreateMultiboard()
call MultiboardSetRowCount(Form, 20)
call MultiboardSetColumnCount(Form, 16)
call MultiboardSetTitleText(Form, "Pet System v1.0")
call MultiboardDisplay(Form, true)
call MultiboardSetItemsStyle(Form, true, false)
call MultiboardMinimize( Form, true )
// --- All Icons Install ---
set i = 1
loop
exitwhen i > 3
call PanelValue(i-1,0,str[i])
call PanelStyle(i-1,0,1,0)
call PanelStyle(i-1,15,1,0)
call PanelStyle(i-1,1,0,1)
call PanelStyle(i-1,14,0,1)
call PanelWidth(i-1,0,.03)
call PanelWidth(i-1,1,.01)
call PanelWidth(i-1,14,.01)
call PanelWidth(i-1,15,.04)
set i = i + 1
endloop
set j = 3
loop
exitwhen j > 14
//--- Red Loading Slip ---
call PanelIcon(0,j-1,art[6])
call PanelStyle(0,j-1,0,1)
call PanelWidth(0,j-1,.01)
//--- Bule Loading Slip ---
call PanelIcon(1,j-1,art[12])
call PanelStyle(1,j-1,0,1)
call PanelWidth(1,j-1,.01)
//--- Green Loading Slip ---
call PanelIcon(2,j-1,art[9])
call PanelStyle(2,j-1,0,1)
call PanelWidth(2,j-1,.01)
set j = j + 1
endloop
call PanelIcon(0,1,art[4])
call PanelIcon(0,14,art[5])
call PanelIcon(1,1,art[10])
call PanelIcon(1,14,art[11])
call PanelIcon(2,1,art[7])
call PanelIcon(2,14,art[8])
// --- Abilities Propety Install ---
set i = 1
set j = 1
loop
exitwhen i > 16
call PanelStyle(3,i-1,0,0)
loop
exitwhen j > 20
call PanelStyle(j-1,i-1,1,0)
set j = j + 1
endloop
set i = i + 1
endloop
set i = 2
loop
exitwhen i > 5
call PanelStyle(2*i,1,1,1)
call PanelValue(2*i,1,"|cff1e90ff"+GetObjectName('A000')+"|r")
call PanelIcon(2*i,1,UnKnownSign())
call PanelValue(2*i,3,"|cff00ff00等级 0|r")
call PanelValue(2*i+1,1,"Abilities Introduction")
call PanelWidth(2*i,1,.1)
call PanelWidth(2*i+1,1,.2)
set i = i + 1
endloop
call PanelValue(4,0,Countenance("学习技能"))
call PanelWidth(4,0,.03)
//Then......
// --- Unit Propety Install ---
call PanelStyle(13,0,1,1)
call PanelValue(13,1,GetUnitName(pet))
call PanelIcon(13,0,GetIcon(I2S(GetUnitTypeId(pet))))
call PanelWidth(13,0,.01)
call PanelWidth(13,1,.09)
call PanelValue(13,5, Countenance("等级"))
call EscalateLevel()
// --- Article Propety Install ---
call PanelStyle(14,0,1,1)
call PanelValue(14,0,Countenance("装备"))
call PanelIcon(14,0,"ReplaceableTextures\\CommandButtons\\BTNPickUpItem.blp")
call PanelWidth(14,0,.03)
set i = 1
loop
exitwhen i > 3
call PanelStyle(13+i,1,1,1)
call PanelValue(13+i,1,"空物品格")
call PanelIcon(13+i,1,Equipage())
call PanelWidth(13+i,1,.05)
call PanelStyle(13+i,2,1,1)
call PanelValue(13+i,2,"空物品格")
call PanelIcon(13+i,2,Equipage())
call PanelWidth(13+i,2,.05)
set i = i + 1
endloop
// --- Record Install ---
call PanelStyle(18,0,1,1)
call PanelValue(18,0,Countenance("杀敌记录"))
call PanelIcon(18,0,"ReplaceableTextures\\CommandButtons\\BTNTrueShot.blp")
call PanelWidth(18,0,.05)
set i = 1
loop
exitwhen i > 4
call PanelWidth(18,2*i-1,.03)
call PanelWidth(18,2*i,.01)
call PanelValue(18,2*i,Countenance(I2S(count[i])))
call PanelValue(18,2*i-1,str[i+3])
set i = i + 1
endloop
// --- State Install ---
call PanelStyle(17,0,1,1)
call PanelValue(17,0,Countenance("状态"))
call PanelIcon(17,0,"ReplaceableTextures\\CommandButtons\\BTNScepterOfMastery.blp")
call PanelWidth(17,0,.05)
set i = 1
loop
exitwhen i > 5
call PanelValue(17,i,str[i+7])
call PanelWidth(17,i,.03)
set i = i + 1
endloop
// --- Accumulate Install ---
call PanelStyle(19,0,1,1)
call PanelValue(19,0,Countenance("蓄气值"))
call PanelIcon(19,0,"ReplaceableTextures\\CommandButtons\\BTNMagicalSentry.blp")
call PanelWidth(19,0,.05)
call PanelValue(19,1,"|cff4169e1■|r")
call PanelValue(19,12,"|cff4169e1■|r")
call PanelWidth(19,1,.003)
call PanelWidth(19,12,.003)
set i = 3
loop
exitwhen i > 12
call PanelValue(19,i-1,"|cff6495ed■|r" )
call PanelWidth(19,i-1,.003)
set i = i + 1
endloop
call PanelStyle(19,14,1,1)
call PanelValue(19,14,Countenance("蓄气状态"))
call PanelIcon(19,14,"ReplaceableTextures\\CommandButtons\\BTNUnholyAura.blp")
call PanelWidth(19,14,.05)
//========================
// --- All End -- =
//========================
endfunction
// --- Click Auxiliary Dialog ---
function ClickAuxiliaryDialog takes nothing returns boolean
local unit caster = I2U(GetHandleInt(chief,"Caster"))
local timer t = CreateTimer()
local integer i = 1
loop
exitwhen i > 6
if GetClickedButton() == opt[i] then
set pet = CreateUnit(GetOwningPlayer(caster),via[i],GetUnitX(caster),GetUnitY(caster),bj_UNIT_FACING)
call TimerStart(t,0.1,true,function Record)
call DialogClear(assist)
call Excretion()
call DesignProspect()
call FollowAI(caster,pet,400,500)
call ExecuteFunc("Initialzation")
// --- Let Pet Learn First Ability ---
call HeroLearnSkillAI(pet,GetUnitTypeId(pet),GetHeroLevel(pet))
call Security(pet)
elseif GetClickedButton() == opt[7] then
call ExecuteFunc("ChiefDialogue")
call DialogClear(assist)
endif
set i = i + 1
endloop
set caster = null
set t = null
return false
endfunction
//****************************
// Assist Appearance *
//****************************
function ClickChiefDialog takes nothing returns boolean
local unit caster = I2U(GetHandleInt(chief,"Caster"))
local timer s = CreateTimer()
if GetClickedButton() == select[1] then
//Create A Auxiliary Dialog About Pets Type.
call DialogSetMessage( assist, "Pets Details List" )
set opt[1] = DialogAddButton(assist, "Archnathidpurple", 0)
set opt[2] = DialogAddButton(assist, "Nether Dragon", 0)
set opt[3] = DialogAddButton(assist, "Sea Elemental", 0)
set opt[4] = DialogAddButton(assist, "Thunder Lizard", 0)
set opt[5] = DialogAddButton(assist, "Lobstrokk Blue", 0)
set opt[6] = DialogAddButton(assist, "Polar Furbolg Shaman", 0)
set opt[7] = DialogAddButton(assist, ">>> Come Back <<<", 0)
call DialogDisplay( Player(0), assist, true )
call DialogClear(chief)
elseif GetClickedButton() == select[2] then
// ---If you choose random mode,you can take some actions. ---
// ---From 1-6 out of a random number,assigned to the variable sample and password for the number of pets. ---
set sample = GetRandomInt(1, AnimalCount())
// --- Remove sample from the string section "password" characters, and put it into an integer. ---
// --- Sample type variable | Following an order to remove the characters from the string which is turned into an integer and use the integer subscript to create a pet. ---
set pet = CreateUnit( GetOwningPlayer(caster), via[S2I(SubString(password, sample-1, sample))], GetUnitX(caster), GetUnitY(caster), bj_UNIT_FACING )
// --- Delete the sample in order to avoid duplicating the same pet. ---
// --- Now,the password becomes "[start - sample] & [sample - end]". ---
set password = ( SubString(password, 0, sample - 1) + SubString(password, sample, AnimalCount()) )
call FollowAI(caster,pet,400,500)
call TimerStart(s,0.1,true,function Record)
call DialogClear(chief)
call Excretion()
call DesignProspect()
call FollowAI(caster,pet,400,500)
call ExecuteFunc("Initialzation")
// --- Let Pet Learn First Ability ---
call HeroLearnSkillAI(pet,GetUnitTypeId(pet),GetHeroLevel(pet))
call Security(pet)
elseif GetClickedButton() == select[3] then
call DialogClear(chief)
endif
set caster = null
set s = null
return false
endfunction
//***************************
// Chief Appearance *
//***************************
function ChiefDialogue takes nothing returns nothing
local unit caster = I2U(GetValueInt("Prelude","Caster"))
call DialogSetMessage( chief, "Adopt A Pet" )
set select[1] = DialogAddButton(chief, "Freedom Mode", 515)//Tab Button
set select[2] = DialogAddButton(chief, "Random Mode", 526)//CapsLock Button
set select[3] = DialogAddButton(chief, "Cancel", 512)//Esc Button
call DialogDisplay( GetOwningPlayer(caster), chief, true )
call SetHandleInt(chief,"Caster",H2I(caster))
set caster = null
endfunction
//*********************************
// Essential prerequisite *
//*********************************
function ForeWarning takes nothing returns boolean
local unit caster = GetTriggerUnit()
local real x = GetUnitX(caster)
local real y = GetUnitY(caster)
local real m = GetUnitX(GetStockUnit())
local real n = GetUnitY(GetStockUnit())
if GetOrderTargetUnit() == GetStockUnit() and IsUnitType(caster, UNIT_TYPE_HERO) == true and DistanceLink(x,y,m,n) <= ProvokeScope() then
call SetValueInt("Prelude","Caster",H2I(caster))
call ChiefDialogue()
endif
set caster = null
return false
endfunction
//*****************************
// Melee Initialzation *
//*****************************
function Initialzation takes nothing returns nothing
local unit vector
local integer queue
local integer grasp
local integer beau
local string behest
//----------------------------
// Matrix Revolution |
//----------------------------
// --- Polar Furbolg Shaman ---
call RecordAbility('Npbm','AUfn','AUfu','AOws','AOsh')
call RecordLearnSequence('Npbm',"^1^3^5^","^2^4^7^","^8^9^10^","^6^11^12^")
// --- Sea Elemental ---
call RecordAbility('Ntin','AHbz','AHwe','AHab','AEbl')
call RecordLearnSequence('Ntin',"^8^9^10^","^1^3^5^","^2^4^7^","^6^11^12^")
// --- Archnathidpurple ---
call RecordAbility('Nalc','AHtc','AHtb','AHbh','AHav')
call RecordLearnSequence('Nalc',"^1^3^5^","^2^4^7^","^8^9^10^","^6^")
// --- Thunder Lizard ---
call RecordAbility('Nplh','AOsw','AOhx','AOae','AOre')
call RecordLearnSequence('Nplh',"^1^3^5^","^4^7^9^","^2^8^10^","^6^11^12^")
// --- Lobstrokk Blue ---
call RecordAbility('Nfir','AOwk','AOmi','ANca','AUls')
call RecordLearnSequence('Nfir',"^1^3^5^","^4^7^10^","^2^8^9^","^6^")
// --- Nether Dragon ---
call RecordAbility('Nngs','AOcl','AEfk','AUav','AEsf')
call RecordLearnSequence('Nngs',"^1^5^7^","^2^4^10^","^3^8^9^","^6^")
if GetUnitTypeId(pet) == 'Npbm' then
call Stir(pet,"frostnova",1,1,65)//霜冻新星
call Stir(pet,"frostarmor",0,4,25)//霜冻护甲
call Stir(pet,"stomp",1,3,20)//战争践踏
call Stir(pet,"shockwave",1,2,30) //震荡波
elseif GetUnitTypeId(pet) == 'Ntin' then
call Stir(pet,"waterelemental",1,3,50)//召唤水元素
call Stir(pet,"blizzard",1,2,10)//暴风雪
call Stir(pet,"blink",0,2,20)//闪烁
elseif GetUnitTypeId(pet) == 'Nalc' then
call Stir(pet,"thunderbolt",1,1,50)//风暴之锤
call Stir(pet,"thunderclap",1,3,25)//雷霆一击
call Stir(pet,"avatar",0,3,5)//天神下凡
elseif GetUnitTypeId(pet) == 'Nplh' then
call Stir(pet,"ward",1,2,55)//毒蛇守卫
call Stir(pet,"hex",1,1,20)//妖术
elseif GetUnitTypeId(pet) == 'Nfir' then
call Stir(pet,"windwalk",1,3,45)//疾风步
call Stir(pet,"mirrorimage",0,3,20)//镜像
call Stir(pet,"Locustswarm",0,3,10)//蝗虫群
elseif GetUnitTypeId(pet) == 'Nngs' then
call Stir(pet,"chainlightning",1,1,30)//闪电链
call Stir(pet,"fanofknives",0,3,20)//刀阵旋风
call Stir(pet,"starfall",1,3,10)//群星陨落
endif
endfunction
function InitTrig_All takes nothing returns nothing
//-----------------------------------
// |
// Notice |
// |
// If you want to use this system, |
//you must indicate original author |
//and state that the system is repr-|
//int.What` more,please correct imp-|
//ortant Bug and send emial to me. |
// That`s all,thanks! |
// |
// E-mail:[email protected] |
// Msn:411134451 |
// Group:54139351 |
// |
//----------------------------------|
local trigger spark = CreateTrigger()
local integer algorithm = 0
//Give player a features that being major,as a thoroughfare to show some characters when click the stockman.
call TriggerRegisterAnyUnitEventBJ( spark, EVENT_PLAYER_UNIT_ISSUED_TARGET_ORDER )
call TriggerAddCondition( spark, Condition( function ForeWarning ) )
//Pop-up chief dialog box for stakeholders.
set spark = CreateTrigger()
call TriggerRegisterDialogEvent( spark, chief )
call TriggerAddCondition( spark, Condition(function ClickChiefDialog) )
//Pop-up auxiliary dialog box for stakeholders.
set spark = CreateTrigger()
call TriggerRegisterDialogEvent( spark, assist )
call TriggerAddCondition( spark, Condition(function ClickAuxiliaryDialog) )
//As a warehouse which storage sorts of resources and dispel the fog.
set spark = CreateTrigger()
call TriggerRegisterTimerEventSingle( spark, 0 )
call TriggerAddAction( spark, function Initialzation )
//Register that a unit enhance a level and record the valid number.
set spark = CreateTrigger()
call TriggerRegisterAnyUnitEventBJ( spark, EVENT_PLAYER_HERO_LEVEL )
call TriggerAddAction( spark, function EscalateLevel )
//Register that anybody pick up a article then show it in panel.
set spark = CreateTrigger()
call TriggerRegisterAnyUnitEventBJ( spark, EVENT_PLAYER_UNIT_PICKUP_ITEM )
call TriggerAddAction( spark, function Acquisition )
//Register that someone abandon a article then show it in the multiboard.
set spark = CreateTrigger()
call TriggerRegisterAnyUnitEventBJ( spark, EVENT_PLAYER_UNIT_DROP_ITEM )
call TriggerAddAction( spark, function Discarded )
//Forbid all players to choose his pet.
set spark = CreateTrigger()
loop
exitwhen algorithm > 11
call TriggerRegisterPlayerSelectionEventBJ( spark, Player(algorithm), true )
call TriggerAddCondition( spark, Condition( function Prohibited ) )
set algorithm = algorithm + 1
endloop
//Let pets pick up items in region around it.
set spark = CreateTrigger()
call TriggerRegisterPlayerChatEvent( spark, Player(0), "-pick", true )
call TriggerAddAction( spark, function ItemReservoir )
//Drop All Items.
set spark = CreateTrigger()
call TriggerRegisterPlayerChatEvent( spark, Player(0), "-drop", true )
call TriggerAddAction( spark, function DropItems )
//Designated Projects.
set spark = CreateTrigger()
call TriggerRegisterPlayerChatEvent( spark, Player(0), "-ag ", false )
call TriggerAddAction( spark, function DesignatedProjects )
//Points standings:
set spark = CreateTrigger()
call TriggerRegisterAnyUnitEventBJ( spark, EVENT_PLAYER_UNIT_DEATH )
call TriggerAddAction( spark, function Verification )
//Finish the task of reviving pet.
set spark = CreateTrigger()
call TriggerRegisterAnyUnitEventBJ( spark, EVENT_PLAYER_HERO_REVIVE_FINISH )
call TriggerAddAction( spark, function Rebirth )
//------------------------------
// http:warft.5d6d.com |
//------------------------------
set spark = null
endfunction
//TESH.scrollpos=0
//TESH.alwaysfold=0
//****************************************
// System:Move Another Region *
//****************************************
function DestroyTriggerAll takes trigger course returns nothing
call TriggerRemoveCondition(course,I2TC(GetHandleInt(course,"TriggerCondition")))
call DestroyTrigger(course)
call FlushHandleValue(course)
endfunction
function AudiTraverse takes nothing returns boolean
local trigger course = GetTriggeringTrigger()
local unit caster = GetTriggerUnit()
local player owner = I2P(GetHandleInt(course,"Player"))
local real x = GetHandleReal(course,"RectOutX")
local real y = GetHandleReal(course,"RectOutY")
local rect origin = I2RC(GetHandleInt(course,"Rect"))
if GetOwningPlayer(caster)!=owner then
return false
else
call IssuePointOrderById(caster, 851983, x, y)
set course = I2TG(GetHandleInt(origin,I2S(H2I(owner))))
call DestroyTriggerAll(course)
endif
set origin = null
set caster = null
set owner = null
set course = null
return false
endfunction
function Derivative takes player owner,rect origin,rect end returns nothing
local trigger course= CreateTrigger()
local real x = GetRectCenterX(end)
local real y = GetRectCenterY(end)
call SetHandleInt(course,"Player",H2I(owner))
call SetHandleReal(course,"RectOutX",x)
call SetHandleReal(course,"RectOutY",y)
call SetHandleInt(course,"Rect",H2I(origin))
call TriggerRegisterEnterRectSimple( course, origin )
call SetHandleInt(course,"TriggerCondition",H2I(TriggerAddCondition(course,Condition(function AudiTraverse))))
set course = null
endfunction
function District takes nothing returns nothing
local rect origin = gg_rct_Area
local rect end = gg_rct_Region
call Derivative(Player(1),origin,end)
call DestroyTrigger(GetTriggeringTrigger())
set origin = null
set end = null
endfunction
function InitTrig_Move_Another_Region takes nothing returns nothing
set gg_trg_Move_Another_Region = CreateTrigger()
call TriggerRegisterTimerEventSingle(gg_trg_Move_Another_Region, 0)
call TriggerAddAction(gg_trg_Move_Another_Region, function District)
endfunction