mirror of
https://github.com/sfall-team/sfall.git
synced 2026-07-27 16:52:34 -07:00
Added check for sfall version for gl_partycontrol and gl_npcarmor.
Changed version string because sfall 4.0 will be released in 'beta' stage first. Minor edits to some documents.
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
/*
|
||||
/*
|
||||
|
||||
NPC Combat Control
|
||||
|
||||
|
||||
Allows to take control of your party member or other NPCs during combat
|
||||
|
||||
|
||||
NOTE: this script requires compiler from sfall modderspack with -s option
|
||||
(short circuit evaluation)
|
||||
|
||||
|
||||
version 1.0
|
||||
|
||||
*/
|
||||
@@ -17,18 +17,18 @@ variable
|
||||
configSection := "CombatControl",
|
||||
controlMode,
|
||||
pidList;
|
||||
|
||||
|
||||
|
||||
procedure combatturn_handler begin
|
||||
variable
|
||||
status := get_sfall_arg,
|
||||
critter := get_sfall_arg,
|
||||
critter := get_sfall_arg,
|
||||
arg3 := get_sfall_arg,
|
||||
pid;
|
||||
|
||||
|
||||
// display_msg("Combat Turn: " + status + ", by " + obj_name(critter) + ", arg3: " + arg3);
|
||||
pid := obj_pid(critter);
|
||||
if (status == 1
|
||||
if (status == 1
|
||||
and (len_array(pidList) == 0 or scan_array(pidList, pid bwand 0xFFFFFF) != -1)
|
||||
and (controlMode == 1 or party_member_obj(pid))) then begin
|
||||
set_dude_obj(critter);
|
||||
@@ -38,13 +38,13 @@ procedure combatturn_handler begin
|
||||
end
|
||||
|
||||
procedure start begin
|
||||
if game_loaded then begin
|
||||
if game_loaded and (sfall_ver_major >= 4) then begin
|
||||
controlMode := GetConfig("CombatControl", "Mode", 0);
|
||||
if (controlMode > 2) then controlMode := 0;
|
||||
if (controlMode > 0) then begin
|
||||
pidList := GetConfigListInt("CombatControl", "PIDList");
|
||||
fix_array(pidList);
|
||||
|
||||
|
||||
register_hook_proc(HOOK_COMBATTURN, combatturn_handler);
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user