Graal Forums

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

Lit 09-01-2002 09:00 AM

Beer NPC
 
I need a simple beer NPC but......... heres the catch i need the server string to have beer_trw_gralats so i can take the money that was bought from it i know how to do some of it but i can not complete it......... someone help please.

Lit 09-01-2002 09:02 AM

This is what i have please fix
 
// NPC made by Korp Âttíçûš
if (playerchats&&startswith(take,#c)&&strequals(#g,TR W)){
if (strtofloat(#s(server.beer_trw_gralats))>=abs(int( strtofloat(#e(5,-1,#c))))){
setstring server.beer_trw_gralats,#v(strtofloat(#s(server.be er_trw_gralats))-abs(int(strtofloat(#e(5,-1,#c)))));
playerrupees+=3000;
}
}
if (playerchats&&startswith(buy beer)) {
if (int(strtofloat(#e(7,-1,#c)))>0){
if (playerrupees>=int(strtofloat(#e(7,-1,#c)))){
playerrupees-=abs(int(strtofloat(#e(7,-1,#c))));
setstring server.beer_trw_gralats,#v(strtofloat(#s(server.be er_trw_gralats))+abs(int(strtofloat(#e(7,-1,#c)))));
say2 Heres Ur Beer#b
#a.;
show;
}else{say2
You dont have that much.;
}
}
if (playertouchsme) {
hurt -20;
playerupees=-3000;
}

Torankusu 09-01-2002 09:08 AM

well. yeah.
damn.
if you need any explanations on that, i'd be more than willing to help.

Lit 09-01-2002 10:09 AM

I just need it fixed thats all........

Spark910 09-01-2002 04:31 PM

He has a point people!

WanDaMan 09-01-2002 09:57 PM

Stealing gets u know were=/

osrs 09-05-2002 12:34 AM

Re: This is what i have please fix
 
Quote:

Originally posted by Lit
// NPC made by Korp Âttíçûš
if (playerchats&&startswith(take,#c)&&strequals(#g,TR W)){
if (strtofloat(#s(server.beer_trw_gralats))>=abs(int( strtofloat(#e(5,-1,#c))))){
setstring server.beer_trw_gralats,#v(strtofloat(#s(server.be er_trw_gralats))-abs(int(strtofloat(#e(5,-1,#c)))));
playerrupees+=3000;
}
}
if (playerchats&&startswith(buy beer)) {
if (int(strtofloat(#e(7,-1,#c)))>0){
if (playerrupees>=int(strtofloat(#e(7,-1,#c)))){
playerrupees-=abs(int(strtofloat(#e(7,-1,#c))));
setstring server.beer_trw_gralats,#v(strtofloat(#s(server.be er_trw_gralats))+abs(int(strtofloat(#e(7,-1,#c)))));
say2 Heres Ur Beer#b
#a.;
show;
}else{say2
You dont have that much.;
}
}
if (playertouchsme) {
hurt -20;
playerupees=-3000;
}

Use [code] for scripts dude...


All times are GMT +2. The time now is 01:26 AM.

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