Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Bars and Beer (https://forums.graalonline.com/forums/showthread.php?t=10805)

Rone 08-31-2001 04:31 AM

Bars and Beer
 
I am a Super stupid Scripting Noob.. Not really but i cant figure out to make it so you say "Buy Drink" and it takes a graley off yer account and gives you a drink....And then the drink fills up health.. I R DUMB :grrr:

AlexH 08-31-2001 04:33 AM

Re: Bars and Beer
 
Quote:

Originally posted by Rone
I am a Super stupid Scripting Noob.. Not really but i cant figure out to make it so you say "Buy Drink" and it takes a graley off yer account and gives you a drink....And then the drink fills up health.. I R DUMB :grrr:
you aint kidding
here it is anyway

put this in the beer gfx

if (playerenters) {hide}
if (playersays(buy beer)&&playerrupees>0) {
playerrupees-=1;
show;
}
if (playertouchsme) {
playerhearts+=1}

Rone 08-31-2001 04:38 AM

Thanks for trying.. but when i say buy beer.. he doesn't lay a beer.. he only apears.. before you say buy beer.. he is inviz

AlexH 08-31-2001 04:42 AM

put the script in the beer gfx
it does work

Rone 08-31-2001 04:49 AM

Ok.. but now when i touch the beer it wont heal.. it just drains money.. and never disaperared

Rone 08-31-2001 04:52 AM

It heals.. but just stays there and everytime you touch it it takes 1 gralet

AlexH 08-31-2001 04:52 AM

arh hold on ill fix it

AlexH 08-31-2001 04:54 AM

if (playerenters) {hide}
if (playersays(buy beer)&&playerrupees>0) {
playerrupees-=1;
show;
}
if (playertouchsme) {
playerhearts+=1;
hide;}

there that'll hide it
and i have no idea why it keeps draining money

who hoo that was post 500

Rone 08-31-2001 04:54 AM

OK

Merlin 08-31-2001 05:13 AM

don't use playersays
PHP Code:

//NPC Made by Merlin
if (playerenters) {hide;}
if (
playerchats&&strequals(#c,buy beer)) {
  
if (playerrupees=>1) {
    
playerupees=-1;
    
beer();
  }
}
if (
playertouchsme) {
  
heal();
}
function 
beer() {
  
show;
}
function 
heal() {
  
hurt -3;
  
hide;



CyanideSR71 08-31-2001 10:07 AM

Hmmm... I once made a script where the bartender actually got up, and tossed the beer to you... But that's when I was a newbie scripter and didn't even know arrays...

Rone 09-01-2001 12:54 PM

Even though i doubt you can help.. Merlins scrpt was OK.. but it didn't take a gralet.. another thing is I would like the beer to be warped to right to the Right of where the player is

Merlin 09-01-2001 02:01 PM

Quote:

Originally posted by Rone
Even though i doubt you can help.. Merlins scrpt was OK.. but it didn't take a gralet.. another thing is I would like the beer to be warped to right to the Right of where the player is
PHP Code:

if (playerenters) {show;
}
if (
playerchats&&strequals(#c,buy beer) {
if (playerrupees>4) {
playerrupees=playerupees-5;
show();
}
}
function 
show() {
putnpc2 beer.txt,playerx-1,playery;
}

//in a .txt called "beer.txt"
if (created) {showimg beer.gif,thisx,thisy;
}
if (
playertouchsmeheal();

function 
heal() {
hurt -3;
destroy;


i guess

grim_squeaker_x 09-01-2001 03:53 PM

NPC Code:
if (playerchats) {
if (strequals(#c,buy beer))
if (!visible) {
if (playerrupees>=1) {
playerrupees-=1;
showlocal;
}
else say2 You don't have enough money!;
}
else say2 You already have a beer;
}
}
if (playertouchsme) {
playerhearts+=0.5;
hidelocal;
}


Enigma_GP6 09-03-2001 06:35 AM

Bars and Beer
 
NOOOO!!!!!! Rebel95[list=1][*]I wish I could help[*]I can't, my brain is dead, it has been for a while[/list=1]
I know some people who would ask this question.
Why do people mock me?
I am the great: http://graalianrebels.homestead.com/...tml/reblgo.jpg
get the picture? I would like to put some thing up on the thread, but I see that someone else has answered the question WAAAYYYYYYYYYYY be fore me. any more questions?
Quote:

"Through the greatest difficulty, there comes an oppritunity." -Albert Einstien
Quote:

"When Pigs FLY!!!!!"-My first love
:grrr: that is all I can think of.
Quote:

"I love cheese!" -me of course


All times are GMT +2. The time now is 12:52 PM.

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