@@ -60,12 +60,16 @@ function callback.playerOnLook(player, thing, position, distance)
6060 description = string.format (" %s\n Decays to: %d" , description , decayId )
6161 end
6262 elseif thing :isCreature () then
63- local str , pId = " %s\n %s\n Health: %d / %d"
63+ local str , id = " %s\n %s\n Health: %d / %d"
6464 if thing :isPlayer () and thing :getMaxMana () > 0 then
65- pId = string.format (" Player ID: %i" , thing :getGuid ())
65+ id = string.format (" Player ID: %i" , thing :getGuid ())
6666 str = string.format (" %s, Mana: %d / %d" , str , thing :getMana (), thing :getMaxMana ())
67+ elseif thing :isMonster () then
68+ id = string.format (" Monster ID: %i" , thing :getId ())
69+ elseif thing :isNpc () then
70+ id = string.format (" NPC ID: %i" , thing :getId ())
6771 end
68- description = string.format (str , description , pId , thing :getHealth (), thing :getMaxHealth ())
72+ description = string.format (str , description , id , thing :getHealth (), thing :getMaxHealth ())
6973 end
7074
7175 description = string.format (" %s\n Position: (%d, %d, %d)" , description , position .x , position .y , position .z )
0 commit comments