Thread: Item System
View Single Post
  #9  
Old 09-23-2008, 03:26 PM
xXziroXx xXziroXx is offline
Malorian
xXziroXx's Avatar
Join Date: May 2004
Posts: 5,289
xXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant future
Quote:
Originally Posted by Inverness View Post
First, if the npc name is ItemCache then you can simply use ItemCache.varname rather than findnpc("ItemCache").varname.
I prefer declaring findNPC() manually for code readability. Doesn't really matter.


Quote:
Originally Posted by Inverness View Post
Second, would be a bit more efficient to check if an object is existing by using varname.type() == 2 rather than varname.objecttype() == "TStaticVar".
I honestly don't think it makes any difference.
__________________
Follow my work on social media post-Graal:Updated august 2025.
Reply With Quote