Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting > Old Scripting Engine (GS1)
FAQ Members List Calendar Today's Posts

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #3  
Old 06-21-2012, 03:29 PM
E_Man E_Man is offline
E-Man
E_Man's Avatar
Join Date: Jun 2012
Posts: 81
E_Man will become famous soon enough
Quote:
Originally Posted by xXziroXx View Post
I believe it can be solved by running your hasweapon checks in a timeout.
Ok, I tried that on the empty bottle first, it worked perfectly, but then I tried to fix the red potion and it messed up again, they both won't delete now. I'll show you what I have now.

Empty Bottle:
PHP Code:
if (playerenters) {
show;
setimg eman_water_potion.png;
timeout=0.05;
}
if (
playertouchsme) {
toweapons Empty Bottle;
hide;
}
if (
hasweapon(Red Potion) && timeout) {
destroy;
}
if (
timeout) {
timeout=0.05;

Red Potion:
PHP Code:
// NPC made by E-Man
if (playerenters) {
  
show;
  
setimg eman_red_potion.png;
  
x=24;
  
y=29.9;
  
timeout 0.05;
  
this.redpotion 1;
}
if (!
hasweapon(Empty Bottle) && playertouchsme) {
  
say2
  You 
require an Empty Bottle;
}
if (
hasweapon(Empty Bottle) && playertouchsme) {
  
toweapons Red Potion;
  
this.redpotion 1;
  
hide;
}
if (
weaponfired && this.redpotion 1) {
  
playerhearts=100;
  
setplayerprop #c, *gulp*;
  
this.redpotion 0;
}
if (
this.redpotion && timeout) {
  
setimg eman_water_potion.png;
  
toweapons Empty Bottle;
}
if (
timeout) {
  
timeout 0.05;

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 02:45 PM.


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