Graal Forums

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

DragonLX2k1 03-29-2002 10:31 PM

PK Beer
 
if (playerchats&&strequals(#c,PK Beer)&&playerrupees>100||playerrupees=100&&playera p-40)
show;
this.ap=playerap;
sleep0.1;
playerap=100;
playerhearts+=5;
sleep0.1;
playerap=this.ap;
playerrupees-=100;
hide;




Now then, I made this up, and it works..but it works with anything you say, not just PK Beer.... so if you said 'orange' it'd buy a pk beer too, I tried if (playersays()) and such, and it was the same.
And would putnpc be better than hide and show?

screen_name 03-29-2002 10:55 PM

Re: PK Beer
 
NPC Code:

if (playerchats&&strequals(#c,PK Beer)&&playerrupees>=100&&playerap-40)
show;
this.ap=playerap;
sleep0.1;
playerap=100;
playerhearts+=5;
sleep0.1;
playerap=this.ap;
playerrupees-=100;
hide;
}


AlexH 03-29-2002 10:56 PM

Shouldn't you do playerrupees>99
Because with >100 means they would have to have 101 rupees to buy it and it only costs 100.

Jinx 03-29-2002 11:11 PM

Does '&&playerap-40' actually work?

I always had PK beer add 40 to the players AP, then subtract 40 once he's done.

-Jinx

everandom 03-29-2002 11:14 PM

Quote:

Originally posted by Jinx
Does '&&playerap-40' actually work?

I always had PK beer add 40 to the players AP, then subtract 40 once he's done.

-Jinx

I dun think u need to change it back, coz it would change back anyway ;) someone correct me if I do wrong

darkriders_p2p 03-29-2002 11:29 PM

Re: Re: PK Beer
 
Quote:

Originally posted by screen_name
NPC Code:

if (playerchats&&strequals(#c,PK Beer)&&playerrupees>=100&&playerap-40)
show;
this.ap=playerap;
sleep0.1;
playerap=100;
playerhearts+=5;
sleep0.1;
playerap=this.ap;
playerrupees-=100;
hide;
}


omi screen_name is unleet, he forgot the first {

Saga2001 03-30-2002 12:29 AM

Hey, just a sidenote, ap cannot be set clientside.:p

Spanko 03-30-2002 01:56 AM

Quote:

Originally posted by Saga2001
Hey, just a sidenote, ap cannot be set clientside.:p
Yeah, but there's a delay of 1/20th second before it's actually set back, which is the sole reason it's possible to make PK Beer.


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

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