123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144 |
- --[[
- Script Name : SpawnScripts/BrawlersDojo/asecondcircleinitiate.lua
- Script Author : Dorbin
- Script Date : 2022.12.18 04:12:46
- Script Purpose :
- :
- --]]
- require "SpawnScripts/Generic/DialogModule"
- require "SpawnScripts/Generic/CombatModule"
- function spawn(NPC, Spawn)
- combatModule(NPC, Spawn)
- AddTimer(NPC, math.random(2000,5000), "EmoteLoop")
- SetTempVariable(NPC,"Talking","false")
- SetTempVariable(NPC,"Reset",nil)
- end
- function hailed(NPC, Spawn)
- if HasQuest(Spawn,5790) and GetQuestStepProgress(Spawn,5790,2)==0 then
- SetTempVariable(NPC,"Talking","true")
- FaceTarget(NPC, Spawn)
- Dialog.New(NPC, Spawn)
- Dialog.AddDialog("Ale may be the life's blood, but fighting is the soul my existence!")
- Dialog.AddVoiceover("voiceover/english/dwarf_eco_good_1/ft/dwarf/dwarf_eco_good_1_hail_gm_bd8ccf81.mp3",4220338619, 1417901850)
- PlayFlavor(NPC, "", "", "nod",0,0 , Spawn, 0)
- Dialog.AddOption("I wish to spar with you.","Dialog1")
- Dialog.Start()
- end
- end
- function Dialog1(NPC, Spawn)
- FaceTarget(NPC, Spawn)
- PlayFlavor(NPC, "", "", "nod", 0, 0, Spawn, 0)
- AddTimer(NPC,3000,"attack",1,Spawn)
- end
- function attack(NPC,Spawn)
- SpawnSet(NPC,"attackable",1)
- SpawnSet(NPC,"show_level",1)
- Attack(NPC,Spawn)
- PlayFlavor(NPC, "voiceover/english/dwarf_base_1/ft/dwarf/dwarf_base_1_1_aggro_gm_ab9057d3.mp3", "Look'n for me?", "",438949611, 3910736957, Spawn, 0)
- end
- function aggro(NPC,Spawn)
- if GetTempVariable(NPC,"Reset")== nil then
- else
- ClearHate(NPC, Spawn)
- SetInCombat(Spawn, false)
- SetInCombat(NPC, false)
- ClearEncounter(NPC)
- SetTarget(Spawn,nil)
- end
- end
- function healthchanged(NPC, Spawn)
- if GetHP(NPC) < GetMaxHP(NPC) * 0.26 then
- SpawnSet(NPC,"attackable",0)
- SpawnSet(NPC,"show_level",0)
- -- if IsInCombat(NPC,Spawn) then
- SetTempVariable(NPC,"Reset",1)
- ClearHate(NPC, Spawn)
- SetInCombat(Spawn, false)
- SetInCombat(NPC, false)
- ClearEncounter(NPC)
- SetTarget(Spawn,nil)
- -- end
- AddTimer(NPC,1500,"end2",1,Spawn)
- AddTimer(NPC,3000,"bow",1,Spawn)
- AddTimer(NPC,5000,"bow2",1,Spawn)
- end
- end
- function end2(NPC,Spawn)
- ClearHate(NPC, Spawn)
- SetInCombat(Spawn, false)
- SetInCombat(NPC, false)
- ClearEncounter(NPC)
- SetTarget(Spawn,nil)
- end
- function bow(NPC,Spawn)
- PlayFlavor(NPC, "", "", "bow", 0, 0, Spawn, 0)
- SetStepComplete(Spawn,5790,2)
- end
- function bow2(NPC,Spawn)
- Runback(NPC)
- SetTempVariable(NPC,"Talking","false")
- local zone = GetZone(NPC)
- local dummy = GetSpawnByLocationID(zone,133781317)
- FaceTarget(NPC,dummy)
- end
- function respawn(NPC)
- spawn(NPC)
- end
- function EmoteLoop(NPC)
- if GetTempVariable(NPC,"Talking")== "false"then
- SpawnSet(NPC, "action_state", 0)
- local zone = GetZone(NPC)
- local dummy = GetSpawnByLocationID(zone,133781317)
- local choice = MakeRandomInt(1,3)
- if choice == 1 then
- PlayFlavor(NPC,"","","dual_wield_attack")
- elseif choice == 2 then
- PlayFlavor(NPC,"","","dual_wield_attack01")
- elseif choice == 3 then
- PlayFlavor(NPC,"","","dual_wield_attack02")
- end
- PlayFlavor(dummy,"","","result_dust_fall")
- SpawnSet(dummy, "visual_state", 2083)
- end
- AddTimer(NPC, 2550, "Idle")
- end
-
- function Idle(NPC)
- local zone = GetZone(NPC)
- local dummy = GetSpawnByLocationID(zone,133781317)
- if GetTempVariable(NPC,"Talking")== "false"then
- SpawnSet(NPC, "action_state", 267)
- PlayAnimation(NPC, 267)
- end
- AddTimer(NPC,1000,"resetdummy",1)
- local timer = MakeRandomInt(1500,3500)
- AddTimer(NPC, timer, "EmoteLoop")
- end
- function resetdummy(NPC)
- local zone = GetZone(NPC)
- local dummy = GetSpawnByLocationID(zone,133781317)
- SpawnSet(dummy, "visual_state", 0)
- end
-
- function death(NPC,Spawn)
- Despawn(NPC)
- end
- function victory(NPC)
- SetTempVariable(NPC,"Reset",nil)
- SetTempVariable(NPC,"Talking","false")
- end
|