|
@@ -395,17 +395,29 @@ elseif $ARGS[0] = 'get':
|
|
|
if $ARGS[2] = 'age':
|
|
|
result = FUNC('util_time','age',FUNC('util_npc','get',$ARGS[1],'birthday'))
|
|
|
elseif $ARGS[2] = 'bmi':
|
|
|
- if cnpc_weight > 0:
|
|
|
- result = cnpc_weight * 10000
|
|
|
- result = result / cnpc_height
|
|
|
- result = result / cnpc_height
|
|
|
+ _height = FUNC('util_npc','get',$ARGS[1],'height')
|
|
|
+ _weight = FUNC('util_npc','get',$ARGS[1],'weight')
|
|
|
+ if _weight > 0:
|
|
|
+ result = _weight * 10000
|
|
|
+ result = result / _height
|
|
|
+ result = result / _height
|
|
|
end
|
|
|
else:
|
|
|
|
|
|
if MID($ARGS[2],1,1) = '$':
|
|
|
$RESULT = DYNEVAL ('$RESULT = $cnpc_'+MID($ARGS[2],2))
|
|
|
+
|
|
|
+
|
|
|
else
|
|
|
RESULT = DYNEVAL ('RESULT = cnpc_'+$ARGS[2])
|
|
|
+
|
|
|
+
|
|
|
+ if RESULT = -1:
|
|
|
+ $_template = FUNC('util_npc','get',$ARGS[1],'$template')
|
|
|
+ RESULT = FUNC('npc_template_'+$_template,'set',$ARGS[1],$ARGS[2])
|
|
|
+ end
|
|
|
+
|
|
|
+
|
|
|
end
|
|
|
|
|
|
end
|