Errors when a mob is dead

  • Nero
  • Nero's Avatar Topic Author
  • Offline
  • Senior Boarder
  • Senior Boarder
More
3 weeks 6 days ago #9751 by Nero
Errors when a mob is dead was created by Nero
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?
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%

Please Log in or Create an account to join the conversation.

More
3 weeks 6 days ago #9752 by Parnassus
Replied by Parnassus on topic Errors when a mob is dead
Please login to view the answers

Please Log in or Create an account to join the conversation.

Time to create page: 0.076 seconds