Thread: Bottle Help
View Single Post
  #5  
Old 06-21-2012, 03:35 PM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Quote:
Originally Posted by xXziroXx View Post
Empty Bottle:

PHP Code:
if (playerenters) { 
  
show; 
  
setimg eman_water_potion.png; 
  
timeout = 0.05; 
}

if (
playertouchsme) { 
  
toweapons Empty Bottle; 
  
hide; 
}

if (
timeout) { 
  if (
hasweapon(Red Potion) && timeout)
    
destroy;
  
  
timeout = 0.05; 
} 
As I said, you need to do the hasweapon check in a timeout. And I know it's just GS1, but you need to work on styling your code.
I'm no expert in old GScript, but isn't this line redundant?

PHP Code:
if (hasweapon(Red Potion) && timeout) 
The "&& timeout" is extraneous; it's already nested in the timeout block.
__________________
Reply With Quote