View Single Post
  #12  
Old 11-15-2001, 10:55 AM
entravial entravial is offline
Registered User
entravial's Avatar
Join Date: Mar 2001
Posts: 825
entravial is on a distinguished road
Send a message via ICQ to entravial Send a message via AIM to entravial Send a message via Yahoo to entravial
~AlphaFlame~

I can't lower myself to Liquid's level, but here's some help... I'm not 100% sure it'll work since I'm not using the graal editor to check everything, but it should.

//The Main NPC
1- set an array of the x's you want
2- set an array of the y's you want
3- check the position based on the number said
4- put an npc there
5- add donation acceptances
6- add money withdrawal

//The Beer.txt NPC
1- check if the player touchs
2- Take some money from the player
3- Add it to a string


Finished script:

//The Main NPC
if (playerenters){
this.x={30,30,33,41,46,46};
this.y={17,21,24,24,21,17};
}
if (playerchats){
if (strequals(#g,Owner) || strequals(#g,GTManager) || strequals(#g,GTStaff)){
if (strequals(#g,Owner)){
if (strequals(#c,take donations)){
playerrupees+=strtofloat(#s(server.barrupees));
setstring server.barrupees,;
}
if (strequals(#c,see donations)){
message strtofloat(#s(server.barrupees)) rupees;
}
}
tokenize #c;
if (strequals(#t(0),Sell)){
this.put=strtofloat(#t(1))-1;
putnpc beer.gif,,this.x[this.put],this.y[this.put]
}
if (strequals(#t(0),Free)){
for (this.put=-1;this.put<arraylen(this.x);this.put++){
putnpc beer.gif,,this.x[this.put],this.y[this.put];
}
}
}
}
if (playerchats && startswith(donate,#c)){
tokenize #c;
if (playerrupees>=strtofloat(#t(1))){
setstring server.barrupees,#v(strtofloat(#s(server.barrupees ))+strtofloat(#t(1)));
}
}

//The Beer.txt
if (playertouchsme && playerrupees>=5){
playerhearts+=2;
playerrupees-=5;
setplayerprop #c,Ahhh... feels good!;
setstring server.barrupees,#v(strtofloat(#s(server.barrupees ))+5);
sleep .5;
putleaps 5,x+0.5,y+0;
destroy;
}
__________________


If the post says ~AlphaFlame~, that's who's posting. If not, it's Entravial (owner)
Reply With Quote