123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381 |
- --[[
- Script Name : SpawnScripts/DoF_design_path_script/AnimationSpeedScroll.lua
- Script Author : Dorbin
- Script Date : 2023.07.18 06:07:48
- Script Purpose :
- :
- --]]
- require "SpawnScripts/Generic/DialogModule"
- local Busy = false
- local Move = false
- function spawn(NPC)
- end
- function hailed(NPC, Spawn)
- Dialog1(NPC,Spawn)
- end
- function Dialog1(NPC, Spawn)
- Dialog.New(NPC, Spawn)
- if Busy == false then
- Dialog.AddDialog("This scroll will demonstrate the effects on model animations based on movement speed and spawn size. What would you like to do?")
- Dialog.AddOption("Setup the Spawns","Setup")
- Dialog.AddOption("Nevermind")
- elseif Move == false then
- Dialog.AddDialog("What would you like to do?")
- Dialog.AddOption("Begin Movement","Movement")
- Dialog.AddOption("Change Spawn Type","SpawnType1")
- Dialog.AddOption("Change Spawn Size","Size1")
- Dialog.AddOption("Reset the Spawns","Reset")
- Dialog.AddOption("Nevermind")
- else
- Dialog.AddDialog("What would you like to do?")
- Dialog.AddOption("Change Spawn Type","SpawnType1")
- Dialog.AddOption("Change Spawn Size","Size1")
- Dialog.AddOption("Reset the Spawns","Reset")
- Dialog.AddOption("Nevermind")
- end
- Dialog.Start()
- end
- function Movement(NPC,Spawn)
- Move = true
- Say(NPC,"Movement Initiated in...")
- AddTimer(NPC,1000,"Say3")
- AddTimer(NPC,2000,"Say2")
- AddTimer(NPC,3000,"Say1")
- AddTimer(NPC,4000,"Waypoints")
- end
- function Say3(NPC,Spawn)
- Say(NPC,"3")
- end
- function Say2(NPC,Spawn)
- Say(NPC,"2")
- end
- function Say1(NPC,Spawn)
- Say(NPC,"1")
- end
- function Setup(NPC,Spawn)
- local zone = GetZone(NPC)
- local Flag1 = GetSpawnByLocationID(zone, 133785993)
- local Flag2 = GetSpawnByLocationID(zone, 133785994)
- local Speed1 = GetSpawnByLocationID(zone, 133785989)
- local Speed2 = GetSpawnByLocationID(zone, 133785990)
- local Speed4 = GetSpawnByLocationID(zone, 133785991)
- local Speed6 = GetSpawnByLocationID(zone, 133785992)
- Busy = true
-
- if Flag1 ==nil then
- SpawnByLocationID(zone, 133785993)
- end
- if Flag2 ==nil then
- SpawnByLocationID(zone, 133785994)
- end
- if Speed1 ==nil then
- SpawnByLocationID(zone, 133785989)
- end
- if Speed2 ==nil then
- SpawnByLocationID(zone, 133785990)
- end
- if Speed4 ==nil then
- SpawnByLocationID(zone, 133785991)
- end
- if Speed6 ==nil then
- SpawnByLocationID(zone, 133785992)
- end
- end
- function Reset(NPC,Spawn)
- local zone = GetZone(NPC)
- local Flag1 = GetSpawnByLocationID(zone, 133785993)
- local Flag2 = GetSpawnByLocationID(zone, 133785994)
- local Speed1 = GetSpawnByLocationID(zone, 133785989)
- local Speed2 = GetSpawnByLocationID(zone, 133785990)
- local Speed4 = GetSpawnByLocationID(zone, 133785991)
- local Speed6 = GetSpawnByLocationID(zone, 133785992)
- Busy = false
- Move = false
-
- if Flag1 ~=nil then
- Despawn(Flag1)
- end
- if Flag2 ~=nil then
- Despawn(Flag2)
- end
- if Speed1 ~=nil then
- KillSpawn(Speed1)
- end
- if Speed2 ~=nil then
- KillSpawn(Speed2)
- end
- if Speed4 ~=nil then
- KillSpawn(Speed4)
- end
- if Speed6 ~=nil then
- KillSpawn(Speed6)
- end
- end
- function Waypoints(NPC,Spawn)
- local zone = GetZone(NPC)
- local Speed1 = GetSpawnByLocationID(zone, 133785989)
- local Speed2 = GetSpawnByLocationID(zone, 133785990)
- local Speed4 = GetSpawnByLocationID(zone, 133785991)
- local Speed6 = GetSpawnByLocationID(zone, 133785992)
- if Speed1 ~=nil then
- MovementLoopAddLocation(Speed1,-20, 0, -10,1)
- MovementLoopAddLocation(Speed1,-20, 0, -40,1)
- end
- if Speed2 ~=nil then
- MovementLoopAddLocation(Speed2,-16.667, 0, -10,2)
- MovementLoopAddLocation(Speed2,-16.667, 0, -40,2)
- end
- if Speed4 ~=nil then
- MovementLoopAddLocation(Speed4,-13.333, 0, -10,4)
- MovementLoopAddLocation(Speed4,-13.333, 0, -40,4)
- end
- if Speed6 ~=nil then
- MovementLoopAddLocation(Speed6,-10, 0, -10,6)
- MovementLoopAddLocation(Speed6,-10, 0, -40,6)
- end
- end
- function SpawnType1(NPC,Spawn)
- Dialog.New(NPC, Spawn)
- Dialog.AddDialog("Controls are limited to 7 Options")
- Dialog.AddOption("Small Cat","Cat")
- Dialog.AddOption("Normal Goblin","Goblin")
- Dialog.AddOption("Large Troglodyte","Ape")
- Dialog.AddOption("A Froglok","Frog")
- Dialog.AddOption("Shadowy Fiend","Shadow")
- Dialog.AddOption("Lucan Dlere","Lucan")
- Dialog.AddOption("Magestic Unicorn","Unicorn")
- Dialog.AddOption("Reset the Spawns","Reset")
- Dialog.AddOption("Nevermind")
- Dialog.Start()
- end
- function Size1(NPC,Spawn)
- Dialog.New(NPC, Spawn)
- Dialog.AddDialog("Controls are limited to 3 Options")
- Dialog.AddOption("Smallest Size (16)","Small")
- Dialog.AddOption("Normal Size (32)","Normal")
- Dialog.AddOption("Largest Size (50)","Large")
- Dialog.AddOption("Reset the Spawns","Reset")
- Dialog.AddOption("Nevermind")
- Dialog.Start()
- end
-
- function Small(NPC,Spawn)
- local zone = GetZone(NPC)
- local Speed1 = GetSpawnByLocationID(zone, 133785989)
- local Speed2 = GetSpawnByLocationID(zone, 133785990)
- local Speed4 = GetSpawnByLocationID(zone, 133785991)
- local Speed6 = GetSpawnByLocationID(zone, 133785992)
- if Speed1 ~=nil then
- SpawnSet(Speed1,"size",16)
- end
- if Speed2 ~=nil then
- SpawnSet(Speed2,"size",16)
- end
- if Speed4 ~=nil then
- SpawnSet(Speed4,"size",16)
- end
- if Speed6 ~=nil then
- SpawnSet(Speed6,"size",16)
- end
- end
- function Normal(NPC,Spawn)
- local zone = GetZone(NPC)
- local Speed1 = GetSpawnByLocationID(zone, 133785989)
- local Speed2 = GetSpawnByLocationID(zone, 133785990)
- local Speed4 = GetSpawnByLocationID(zone, 133785991)
- local Speed6 = GetSpawnByLocationID(zone, 133785992)
- if Speed1 ~=nil then
- SpawnSet(Speed1,"size",32)
- end
- if Speed2 ~=nil then
- SpawnSet(Speed2,"size",32)
- end
- if Speed4 ~=nil then
- SpawnSet(Speed4,"size",32)
- end
- if Speed6 ~=nil then
- SpawnSet(Speed6,"size",32)
- end
- end
- function Large(NPC,Spawn)
- local zone = GetZone(NPC)
- local Speed1 = GetSpawnByLocationID(zone, 133785989)
- local Speed2 = GetSpawnByLocationID(zone, 133785990)
- local Speed4 = GetSpawnByLocationID(zone, 133785991)
- local Speed6 = GetSpawnByLocationID(zone, 133785992)
- if Speed1 ~=nil then
- SpawnSet(Speed1,"size",50)
- end
- if Speed2 ~=nil then
- SpawnSet(Speed2,"size",50)
- end
- if Speed4 ~=nil then
- SpawnSet(Speed4,"size",50)
- end
- if Speed6 ~=nil then
- SpawnSet(Speed6,"size",50)
- end
- end
- function Cat(NPC,Spawn)
- local zone = GetZone(NPC)
- local Speed1 = GetSpawnByLocationID(zone, 133785989)
- local Speed2 = GetSpawnByLocationID(zone, 133785990)
- local Speed4 = GetSpawnByLocationID(zone, 133785991)
- local Speed6 = GetSpawnByLocationID(zone, 133785992)
- if Speed1 ~=nil then
- SpawnSet(Speed1,"model_type",305)
- end
- if Speed2 ~=nil then
- SpawnSet(Speed2,"model_type",305)
- end
- if Speed4 ~=nil then
- SpawnSet(Speed4,"model_type",305)
- end
- if Speed6 ~=nil then
- SpawnSet(Speed6,"model_type",305)
- end
- end
- function Goblin(NPC,Spawn)
- local zone = GetZone(NPC)
- local Speed1 = GetSpawnByLocationID(zone, 133785989)
- local Speed2 = GetSpawnByLocationID(zone, 133785990)
- local Speed4 = GetSpawnByLocationID(zone, 133785991)
- local Speed6 = GetSpawnByLocationID(zone, 133785992)
- if Speed1 ~=nil then
- SpawnSet(Speed1,"model_type",145)
- end
- if Speed2 ~=nil then
- SpawnSet(Speed2,"model_type",145)
- end
- if Speed4 ~=nil then
- SpawnSet(Speed4,"model_type",145)
- end
- if Speed6 ~=nil then
- SpawnSet(Speed6,"model_type",145)
- end
- end
- function Ape(NPC,Spawn)
- local zone = GetZone(NPC)
- local Speed1 = GetSpawnByLocationID(zone, 133785989)
- local Speed2 = GetSpawnByLocationID(zone, 133785990)
- local Speed4 = GetSpawnByLocationID(zone, 133785991)
- local Speed6 = GetSpawnByLocationID(zone, 133785992)
- if Speed1 ~=nil then
- SpawnSet(Speed1,"model_type",151)
- end
- if Speed2 ~=nil then
- SpawnSet(Speed2,"model_type",151)
- end
- if Speed4 ~=nil then
- SpawnSet(Speed4,"model_type",151)
- end
- if Speed6 ~=nil then
- SpawnSet(Speed6,"model_type",151)
- end
- end
- function Frog(NPC,Spawn)
- local zone = GetZone(NPC)
- local Speed1 = GetSpawnByLocationID(zone, 133785989)
- local Speed2 = GetSpawnByLocationID(zone, 133785990)
- local Speed4 = GetSpawnByLocationID(zone, 133785991)
- local Speed6 = GetSpawnByLocationID(zone, 133785992)
- if Speed1 ~=nil then
- SpawnSet(Speed1,"model_type",77)
- end
- if Speed2 ~=nil then
- SpawnSet(Speed2,"model_type",77)
- end
- if Speed4 ~=nil then
- SpawnSet(Speed4,"model_type",77)
- end
- if Speed6 ~=nil then
- SpawnSet(Speed6,"model_type",77)
- end
- end
- function Shadow(NPC,Spawn)
- local zone = GetZone(NPC)
- local Speed1 = GetSpawnByLocationID(zone, 133785989)
- local Speed2 = GetSpawnByLocationID(zone, 133785990)
- local Speed4 = GetSpawnByLocationID(zone, 133785991)
- local Speed6 = GetSpawnByLocationID(zone, 133785992)
- if Speed1 ~=nil then
- SpawnSet(Speed1,"model_type",240)
- end
- if Speed2 ~=nil then
- SpawnSet(Speed2,"model_type",240)
- end
- if Speed4 ~=nil then
- SpawnSet(Speed4,"model_type",240)
- end
- if Speed6 ~=nil then
- SpawnSet(Speed6,"model_type",240)
- end
- end
- function Lucan(NPC,Spawn)
- local zone = GetZone(NPC)
- local Speed1 = GetSpawnByLocationID(zone, 133785989)
- local Speed2 = GetSpawnByLocationID(zone, 133785990)
- local Speed4 = GetSpawnByLocationID(zone, 133785991)
- local Speed6 = GetSpawnByLocationID(zone, 133785992)
- if Speed1 ~=nil then
- SpawnSet(Speed1,"model_type",4112)
- end
- if Speed2 ~=nil then
- SpawnSet(Speed2,"model_type",4112)
- end
- if Speed4 ~=nil then
- SpawnSet(Speed4,"model_type",4112)
- end
- if Speed6 ~=nil then
- SpawnSet(Speed6,"model_type",4112)
- end
- end
- function Unicorn(NPC,Spawn)
- local zone = GetZone(NPC)
- local Speed1 = GetSpawnByLocationID(zone, 133785989)
- local Speed2 = GetSpawnByLocationID(zone, 133785990)
- local Speed4 = GetSpawnByLocationID(zone, 133785991)
- local Speed6 = GetSpawnByLocationID(zone, 133785992)
- if Speed1 ~=nil then
- SpawnSet(Speed1,"model_type",268)
- end
- if Speed2 ~=nil then
- SpawnSet(Speed2,"model_type",268)
- end
- if Speed4 ~=nil then
- SpawnSet(Speed4,"model_type",268)
- end
- if Speed6 ~=nil then
- SpawnSet(Speed6,"model_type",268)
- end
- end
- function respawn(NPC)
- spawn(NPC)
- end
|