2 İşlemeler 287d52a2c0 ... a29024cb79

Yazar SHA1 Mesaj Tarih
  Scarlett Schäfer a29024cb79 Style in Description 2 yıl önce
  Scarlett Schäfer 5cc3cd296d NPC Template 2 yıl önce

+ 3 - 1
source/npc/family/dad.qsps

@@ -3,7 +3,9 @@
 $npc_id = 'family_dad'
 
 if $ARGS[0] = 'info':
-    gs 'npc_template_male','info'
+    !gs 'npc_template_male','info'
+
+    $cnpc_template = 'male'
     
     $cnpc_name_first = 'Lars'
     $cnpc_name_last = $name_last_born

+ 9 - 3
source/npc/template/male.qsps

@@ -1,7 +1,7 @@
 # npc_template_male
 
-if $ARGS[0] = 'info':
-    ! Body
+if $ARGS[0] = 'set':
+    !{ Body
         ! Genitals
             cnpc_penis_flat = 92
             cnpc_penis_erect = 131
@@ -9,8 +9,14 @@ if $ARGS[0] = 'info':
             cnpc_penis_girth_erect = 117
         ! Structure
             cnpc_height = 180
-            cnpc_weight = 85 
+            cnpc_weight = 85 }
+    if $ARGS[2] = 'height': RESULT = rand(160,200)
+    if $ARGS[2] = 'weight': RESULT = rand(60,100)
 
+    *PL '<<$ARGS[1]>>.<<$ARGS[2]>> -> <<RESULT>>'
+
+    gs 'util_npc','setInt',$ARGS[1],$ARGS[2],RESULT
+    
 end
 
 -

+ 11 - 1
source/onNewloc.qsps

@@ -101,9 +101,19 @@ $_text  = '<head><style>'+Replace($_style,'
 ','')+'</style></head><div style="display:grid; grid-template-columns: 1fr 3fr 1fr;grid-template-rows: auto;grid-auto-flow: column dense;"><div style="grid-column:2;" class="mainarea">'+ $MAINTXT + '<div style="grid-column:1;" class="sidebar sidebarLeft"><<$content_sidebarL>></div><div style="grid-column:3;" class="sidebar sidebarRight"><<$content_sidebarR>></div></div>'
 
 *CLR
+*P $_text
 
 
-*P $_text
+$_style = '
+    body{
+    }
+'
+
+$_text  = '<head><style>'+Replace($_style,'
+','')+'</style></head>'+ $STATTXT
+
+CLR
+P $_text
 
 $content_sidebarL = '' 
 $content_sidebarR = ''

+ 16 - 4
source/util/npc.qsps

@@ -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