Quote:
Originally Posted by jkldogg
okay, fine i want to learn
I don't understand this part: code..
|
Those are fail-safes.
if (!this.guildaccess) - Checks if the this.guildaccess is not 0
this.guildaccess = "Guild Name" - Sets this.guildaccess to a default value if it's not defined or equals 0.
this.setshape(1, 32, 32); - My example sets the size of the npc to a blocking type (1), and to block 32 by 32 pixels (or 2 by 2 tiles since tiles are 16 pixels in width and height).
Also, yes your script is relatively small, simple, quick but lacks reuse-ability and will be a pain to have to go and replace it everywhere it's used if you want to change it's behavior.
P.S. Don't leave the code in PHP tags in your quotes, just makes it easier on people tbh.