Browse Source

[fixed] Added a failsafe to prevent bad npcgeneratec calls

anjuna krokus 1 week ago
parent
commit
d867fa36dd
1 changed files with 2 additions and 1 deletions
  1. 2 1
      locations/npcgeneratec.qsrc

+ 2 - 1
locations/npcgeneratec.qsrc

@@ -4,8 +4,9 @@
 !! You can also set their approx. home location
 !! You can also set their approx. home location
 !! All data produced is random so if you need a specific value you will have to overwrite it
 !! All data produced is random so if you need a specific value you will have to overwrite it
 
 
+if isnum($ARGS[0]): ARGS[0] = val($ARGS[0])
 
 
-if $ARGS[0] = '':
+if $ARGS[0] = '' or isnum($ARGS[0]):
 	!! npcgen_lastrun is a flag to help track whether npcgeneratec or npcpreservec has been run last
 	!! npcgen_lastrun is a flag to help track whether npcgeneratec or npcpreservec has been run last
 	!! npcgeneratec is 1
 	!! npcgeneratec is 1
 	!! npcpreservec is 2
 	!! npcpreservec is 2