I am having an issue with dg_script.
I have a mob that will summon another mob once it reaches a certain hitprcnt
The problem is if the players have already killed mob B, it returns an error.
How can I prevent the DG_Script from returning an error if the mob(s) are already dead?
Code:
Name: 'Kyoma Call For Help', VNum: [ 1211], RNum: [ 284]
Trigger Intended Assignment: Mobiles
Trigger Type: HitPrcnt , Numeric Arg: 90, Arg list: None
Commands:
* stop the fight and do Kyoma's emotes
emote utters a weak cry for help.
mgoto 1237
eval goroalive 0
%echo% Starting GoroAlive: %goroalive%
wait 1s
eval room %self.room%
set target_char %room.people%
while %target_char%
set next_target %target_char.next_in_room%
%echo% %target_char.name%
if %target_char.name% /= Chieftain
eval goroalive 1
end
set target_char %next_target%
done
%echo% Final GoroAlive: %goroalive%
* IF Goro is alive ...
if %goroalive%
* switch trigger to Goro and start his emotes in his room
%force% goro emote hears his son's cry for help and crashes out of the hut!
* move Goro into Kyoma's room and have him start fight with actor
%teleport% goro 1239
mgoto 1239
%force% goro emote crashes through the wall of the hut to rescue his son!
wait 1s
%force% goro mkill %actor%
else
* and if he's not ...
mgoto 1239
%force% %actor% kill kyoma
end
detach 1211 %self.id%