Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 09-01-2002, 09:00 AM
Lit Lit is offline
Registered User
Join Date: Jul 2002
Location: none
Posts: 41
Lit is on a distinguished road
Send a message via AIM to Lit Send a message via Yahoo to Lit
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.
Reply With Quote
  #2  
Old 09-01-2002, 09:02 AM
Lit Lit is offline
Registered User
Join Date: Jul 2002
Location: none
Posts: 41
Lit is on a distinguished road
Send a message via AIM to Lit Send a message via Yahoo to Lit
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;
}
Reply With Quote
  #3  
Old 09-01-2002, 09:08 AM
Torankusu Torankusu is offline
Elite Member
Torankusu's Avatar
Join Date: Jun 2001
Posts: 10,065
Torankusu is a jewel in the roughTorankusu is a jewel in the rough
well. yeah.
damn.
if you need any explanations on that, i'd be more than willing to help.
Reply With Quote
  #4  
Old 09-01-2002, 10:09 AM
Lit Lit is offline
Registered User
Join Date: Jul 2002
Location: none
Posts: 41
Lit is on a distinguished road
Send a message via AIM to Lit Send a message via Yahoo to Lit
I just need it fixed thats all........
Reply With Quote
  #5  
Old 09-01-2002, 04:31 PM
Spark910 Spark910 is offline
Ex-Graal Global
Spark910's Avatar
Join Date: Oct 2001
Location: England
Posts: 10,892
Spark910 has a spectacular aura about
He has a point people!
Reply With Quote
  #6  
Old 09-01-2002, 09:57 PM
WanDaMan WanDaMan is offline
Master Tux
WanDaMan's Avatar
Join Date: Aug 2002
Location: England, United Kingdom
Posts: 5,571
WanDaMan is a jewel in the roughWanDaMan is a jewel in the rough
Send a message via MSN to WanDaMan
Red face

Stealing gets u know were=/
__________________
V$:CONFL16T
Reply With Quote
  #7  
Old 09-05-2002, 12:34 AM
osrs osrs is offline
Graalian since 1998
osrs's Avatar
Join Date: Mar 2002
Location: Brazil
Posts: 2,724
osrs is on a distinguished road
Send a message via ICQ to osrs Send a message via AIM to osrs Send a message via MSN to osrs Send a message via Yahoo to osrs
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...
__________________
"Ability is what you are capable of doing. Motivation determines what you do. Attitude determines how well you do it."
Facebook: facebook.com/raysilvadotnet /
Reply With Quote
Reply


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 09:21 AM.


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