Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #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
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 06:37 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.