()
| 165 | } |
| 166 | |
| 167 | func (s *SpellData) GetScript() string { |
| 168 | |
| 169 | scriptPath := s.GetScriptPath() |
| 170 | |
| 171 | // Load the script into a string |
| 172 | if _, err := os.Stat(scriptPath); err == nil { |
| 173 | if bytes, err := util.ReadFile(scriptPath); err == nil { |
| 174 | return string(bytes) |
| 175 | } |
| 176 | } |
| 177 | |
| 178 | return `` |
| 179 | } |
| 180 | |
| 181 | func (s *SpellData) GetScriptPath() string { |
| 182 | // Load any script for the room |