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 08-28-2007, 10:24 PM
theHAWKER theHAWKER is offline
**FLIP OUT**
theHAWKER's Avatar
Join Date: Mar 2006
Location: canada, vancouver
Posts: 768
theHAWKER is an unknown quantity at this point
Beer Me ;D

I am making a beer barrel where when you grab it 10 times you get a beer, then u can give it to a man for cash. So when the grab count reaches 0 it should but a beer in front of you to give to the man, but when it reaches 0 it goes to -1, then back to 9 with out doing any of the clientside functions which is laying the beer...

here is the script me and Takap2p made:
PHP Code:
//NPC By theHAWKER & Taka
function onCreated(){
this.grabs 10;
setTimer(.05);
}
function 
onTimeout(){
if (
this.grabs 1){
sleep 1;
onCreated();
}
setTimer(0.05);
}
function 
onActiongrabbed() {
this.grabs -= 1;
player.chat = @ this.grabs " grabs left..";
}
//#CLIENTSIDE
function onActiongrabbed() {
player.ani pull,;
}
function 
onTimeout(){
if (
this.grabs == 0){
say2("I Made A Beer!");
putnpc(1,beer,"beer.png",49.3,20);
setTimer(0.05);
}

__________________
**FLIP OUT**
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 09:31 AM.


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