Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Personal bank script. (https://forums.graalonline.com/forums/showthread.php?t=23057)

joseyisleet 02-04-2002 08:17 PM

Personal bank script.
 
-=Josey=-
Ok, a friend asked me to make this for him. You may not edit this code, use it to get hired on a server, or use it on your own server without asking me and getting my express written consent. This code is merely for learning purposes.



// NPC made by Josey Hunt
if (playerenters) {
toweapons Items/Bank;
}
if (weaponfired){
say2 This is your personal bank!#bCommands are:#bdeposit <ammounthere>:deposits.#bwithdraw <ammounthere>:deposits.#bShow banked gralat:shows your#bgralat in your bank.#bThat's all!;
}
if (isweapon){
if (playerchats){
if (startswith(withdraw,#c)){
tokenize #c;
if (tokenscount==2){
if (strtofloat(#s(client.banked))=>strtofloat(#t(1))) {
playerrupees+=strtofloat(#t(1));
setstring client.banked,#v(strtofloat(#s(client.banked))-strtofloat(#t(1)));
setplayerprop #c,You withdraw #t(1) from your bank. You now have #s(client.banked) gralat left in your bank.;
}
if (!strtofloat(#s(client.banked))=>strtofloat(#t(1)) ){
setplayerprop #c,You dont have #t(1) gralat in the bank!;
}
}
}
if (startswith(deposit,#c)){
tokenize #c;
if (tokenscount==2){
if (strtofloat(#v(playerrupees))=>strtofloat(#t(1))){
playerrupees-=strtofloat(#t(1));
setstring client.banked,#v(strtofloat(#s(client.banked))+str tofloat(#t(1)));
setplayerprop #c,You deposited #t(1) into your bank. You now have #s(client.banked) gralat in your bank.;
}
}
}
if (strequals(#c,show banked gralat)){
setplayerprop #c,You have #s(client.banked) gralat in your bank.;
}
}
}


I know it's not the best, but, it works. ;D

joseyisleet 02-04-2002 08:26 PM

-=Chicken=-
 
Muahha josey im eveo,Nah nice script =D not the best but it will do the job

Slaktmaster 02-04-2002 08:30 PM

It would work, yes.

joseyisleet 02-04-2002 09:14 PM

-=Josey=-
All I was going for is for it to "work" correctly. Which it does, quite nicely also. Chicken make your posting colour in green fool!

Saga2001 02-04-2002 11:52 PM

Quote:

Originally posted by joseyisleet
-=Josey=-
All I was going for is for it to "work" correctly. Which it does, quite nicely also. Chicken make your posting colour in green fool!

i think that really your just one person and you like compliment yourself, do you have multiple personalities?

Ultima_P2P 02-05-2002 11:21 AM

Quote:

Originally posted by Saga2001


i think that really your just one person and you like compliment yourself, do you have multiple personalities?

No, I talk to Chicken and Josey all the time and I see both of them on graal moving around =\

Unless he can like,do ESP or some whack sh*t like that :rolleyes:

nyghtGT 02-05-2002 11:49 AM

Quote:

Originally posted by Ultima_P2P


No, I talk to Chicken and Josey all the time and I see both of them on graal moving around =\

Unless he can like,do ESP or some whack sh*t like that :rolleyes:

i can do ESPN, channel 76 ...

nyghtGT 02-05-2002 11:51 AM

Re: Personal bank script.
 
Quote:

Originally posted by joseyisleet
-=Josey=-
Ok, a friend asked me to make this for him. You may not edit this code, use it to get hired on a server, or use it on your own server without asking me and getting my express written consent. This code is merely for learning purposes.

// The long NPC

I know it's not the best, but, it works. ;D

Its nice, but, remember that anything clientside can always
be tampered with ...

Saga2001 02-05-2002 01:18 PM

yes, i remember when i was kalton and armodian on n-pulse... funny beans.

joseyisleet 02-05-2002 10:39 PM

-=Josey=-
Quote:

Originally posted by Saga2001


i think that really your just one person and you like compliment yourself, do you have multiple personalities?

You know you're quite humorous. ;D I'm Josey Hunt. Josh moved in with me a few weeks ago, that's why I called him an idiot when he asked for Graal2001 scripts. Chicken is a good friend of mine, and also my levels admin. I don't compliment myself, either, I try to help people. Unless they're just to lazy to try themselves. You only posted that so you would get some attention your way.
- Shrugs. I guess any idiot would do so, though.

Saga2001 02-05-2002 11:35 PM

Quote:

Originally posted by joseyisleet
-=Josey=-


You know you're quite humorous. ;D I'm Josey Hunt. Josh moved in with me a few weeks ago, that's why I called him an idiot when he asked for Graal2001 scripts. Chicken is a good friend of mine, and also my levels admin. I don't compliment myself, either, I try to help people. Unless they're just to lazy to try themselves. You only posted that so you would get some attention your way.
- Shrugs. I guess any idiot would do so, though.

i'd love some attention...ne one got ne?
just curious...because u post and than seeming 3 minutes later someone with a different name on the same account posts? crazy...absolutly psycho. We could get a long...:asleep:

Saga2001 02-05-2002 11:37 PM

Quote:

in josey's sig
If the post is in black it's Josey, if it's in blue it's Josh, and if it's green it's Chicken!
why don't you post in any diff colors than?

joseyisleet 02-05-2002 11:45 PM

-=Josey=-
Why do you think that I told Chicken to post in green? Because, he wasn't! Lol. Let's let this thread die now. - Daydreams. - Sees a little IcePick browsing the forums and saying "ooooooh! looky a bank script i can use! im gonna be soooo leet now :D". Lol. Boredom owns us all. ;\


All times are GMT +2. The time now is 09:27 PM.

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