Thread: Hat system help
View Single Post
  #1  
Old 01-10-2012, 11:01 PM
r3ckless r3ckless is offline
Owner of Corinthia
Join Date: Dec 2011
Location: MAssachusetts, USA
Posts: 131
r3ckless is an unknown quantity at this point
Send a message via AIM to r3ckless Send a message via MSN to r3ckless
Hat system help

Hello, I'm trying to script part of a hat system. I have the hats, the shops etc. Im now stuck on scripting free hats you can find around the world. Something similar to UN. Below is what I have, it works except for one thing...it doesn't hide after it has been received! Could somebody please give me some tips on this/point me in the right direction for this...

PHP Code:
// NPC made by Stowen

function onCreated(){
  
blockagain();
  
setshape(1,32,32);
}

function 
onActionGrab() {
  
clientr.hat3 1;
  
client.hats.add("hat3.png");
  
player.chat "You received the Western Hat!";
  
hide;
  
hideimg 200;
}

//#CLIENTSIDE

function onPlayerEnters() {
  if (!
clientr.hat3) {
    
with(findimg(200)){
      
image "hat3.png";
      
this.x;
      
this.y;
      
partx 100;
      
party 0;
      
parth 40;
      
partw 45;
    }
  }else 
hide;
}

function 
onCreated(){
  
blockagain();
  
setshape(1,32,32);
}

function 
Hide() {
hide;

__________________

Yep.

Reply With Quote