In the Spells folder (not sure why...) are 2 scripts: commands.lua and gm_spells.lua. Scat and I used these to perform repeated tasks or special commands, for example:
Code: Select all
function cast(Caster, Target, Type)
if Type == "Examine" then
Examine(Caster, Target)
elseif Type == "Grab Soil" then
GrabSoil(Caster, Target)
elseif Type == "Plant Seeds" then
PlantSeeds(Caster, Target)
elseif Type == "Burn Tent" then
BurnTent(Caster, Target)
elseif Type == "Destroy Totem" then
DestroyTotem(Caster, Target)
elseif Type == "Smack Hive" then
SmackHive(Caster, Target)
elseif Type == "Help Down" then
HelpDown(Caster, Target)
elseif Type == "Read Gravestone" then
ReadGravestone(Caster, Target)
elseif Type == "ClimbTheBench" then
ClimbTheBench(Caster, Target)
elseif Type == "PullYourselfThroughTheFoliage" then
PullYourselfThroughTheFoliage(Caster, Target)
elseif Type == "InspectBox" then
InspectBox(Caster, Target)
elseif Type == "ThrowSnowball" then
ThrowSnowball(Caster, Target)
end
endIn the old DB Milestone 1 content, BurnTent, HelpDown, etc... those were put in 1 common place so we're not hunting for special actions in thousands of script files.
gm_spells.lua was to handle things like Moonjump, silly little things for GMs to play with that are not part of the normal scripting.
I'd like theFoof to tell me how he handled things like this in FfS, so maybe we can archive these scripts if he doesn't want to use the same method going forward.