Replaced hs_*.int scripts in example mods with normal global scripts with register_hook.

This commit is contained in:
NovaRain
2017-07-06 21:01:35 +08:00
parent f0e93450f6
commit e7e286013f
8 changed files with 35 additions and 29 deletions
@@ -0,0 +1,24 @@
procedure start;
// adjust include paths if needed
#include "..\..\scripting_docs\headers\sfall.h"
#define RESULT_SUCCESS (1)
#define RESULT_FAIL (0)
procedure start begin
if game_loaded then begin
register_hook(HOOK_STEAL);
end else begin
variable
thief := get_sfall_arg,
target := get_sfall_arg,
item := get_sfall_arg,
action := get_sfall_arg,
result := RESULT_SUCCESS;
if (thief == dude_obj) then begin
display_msg(sprintf(mstr_skill(570 + result + action*2), obj_name(item)));
set_sfall_return(result);
end
end
end