1
0
Kaynağa Gözat

[added] search by DNA

Lusticon 5 ay önce
ebeveyn
işleme
070baa247f
1 değiştirilmiş dosya ile 33 ekleme ve 3 silme
  1. 33 3
      locations/npc_finder.qsrc

+ 33 - 3
locations/npc_finder.qsrc

@@ -3,17 +3,47 @@
 *clr
 gs 'obj_din', 'cheattabs'
 '<center><a href="exec: gt ''npc_finder'', ''finder''">Enter the ID of the character.</a></center>'
+*nl
+'<center><a href="exec: gt ''npc_finder'', ''finderDNA''">Enter the DNA of the character.</a></center>'
+
 if $ARGS[0] = 'finder':
     $looking = input ('ID (like <i>A17</i>)')
+    if $looking ! '': gt 'npc_finder'
+end
+
+if $ARGS[0] = 'finderDNA':
+    $looking = input ('DNA (like <i>1594378993</i>)')
+    if $looking ! '' and isnum($looking):
+        killvar 'npctemp'
+        :npcdnafinder
+            if val($looking) = val($mid($npc_dna['A<<npctemp>>'], 1, 10)): $npctemp = 'A<<npctemp>>'
+            if $npctemp = '':
+                if val($looking) = val($mid($npc_dna['B<<npctemp>>'], 1, 10)): $npctemp = 'B<<npctemp>>'
+            end
+            if $npctemp = '':
+                if val($looking) = val($mid($npc_dna['C<<npctemp>>'], 1, 10)): $npctemp = 'C<<npctemp>>'
+            end
+        if npctemp < arrsize('$npc_dna') and $npctemp = '': npctemp += 1 & jump 'npcdnafinder'
+        $looking = $npctemp
+        killvar 'npctemp'
+    end
+    if $looking = '': msg 'Can''t find this NPC' & killvar 'looking' & exit
     gt 'npc_finder'
 end
 
 if $looking ! '':
     '<br><br>'
     'Found character:'
-    '<br>'
-    !$npc_pic[$looking]
-    '<center><img src="images/characters/shared/headshots_main/big<<mid($looking,2)>>.jpg"></center>'
+    if $mid($looking,1,1) = 'A':
+        if $npc_pic[$looking] = '':
+            '<center><img src="images/characters/shared/headshots_main/big<<mid($looking,2)>>.jpg"></center>'
+        else
+            '<center><img <<$set_imgh>> src="<<$npc_pic[$looking]>>"></center>'
+        end
+    else
+        '<center><img <<$set_imgh>> src="images/system/phone/icons/<<$npc_pic[$looking]>>"></center>'
+    end
+    '<br>ID: <<$looking>>'
     'DNA string: <<$npc_dna[$looking]>>'
     'Name: <<$npc_firstname[$looking]>>'+ iif($npc_nickname[$looking] ! '', ' "<<$npc_nickname[$looking]>>" ',' ') +'<<$npc_lastname[$looking]>> (<<$npc_usedname[$looking]>>)'
     if npc_dob[$looking] > 0: 'Birthday (YYYY-MM-DD): <<mid(npc_dob[$looking],1,4)>>-<<mid(npc_dob[$looking],5,2)>>-<<mid(npc_dob[$looking],7,2)>>'