View Single Post
  #34  
Old 08-09-2011, 08:53 PM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
For normal NPCs 48 by 48 will do fine on server-side, and you're right on about the hit box.

The point of your shop class is to make it accept any shop id, so in your NPC you should be setting the shop id not in the class itself. I.e:

PHP Code:
function onCreated() {
  
this.shopid "basicshop";
  
this.join("shop");

In your class you can then do a check like this..

PHP Code:
// Undefined shops default to the basic shop
if (this.shop_id == NULLthis.shop_id "basicshop"
__________________
Quote:
Reply With Quote