Official Soldat Forums
Server Talk => Scripting Releases => Topic started by: corl45 on January 16, 2009, 06:05:39 pm
-
Script Name: Weapon Shop
Script Description: Allows users to buy weapons with money, you earn money by killing people.
Original Author(s): Corl45 (aka Tyler Wight)
Core Version: 263
Code:
procedure OnPlayerKill(Killer, Victim: byte;Weapon: string);
begin
if Killer = Victim then
begin
writeConsole(Killer, 'you cant kill yourself for money you silly bear', RGB(0, 255, 255));
end else
begin
money[Killer] := money[Killer]+100;
writeConsole(Killer, 'You just got $100 your money is now: $' + inttostr(money[Killer]), RGB(0, 255, 255));
end;
end;
if you use this with SimpleZombie By: JFK http://forums.soldat.pl/index.php?topic=32103.0 (http://forums.soldat.pl/index.php?topic=32103.0) it makes a nice zombie server.
Image: http://www.4shared.com/file/81023418/5cd47f55/Weapon_shop.html (http://www.4shared.com/file/81023418/5cd47f55/Weapon_shop.html)
UPDATE 1/18/09 7:11 PM, Fixed "Money Giving"
README:
=====================
=====Weapon shop=====
=========BY:=========
=====Tyler Wight=====
==== (AKA Corl45)====
=====================
I made this script orginaly for personal use, for my localzombie server, so i cleaned it up a bit and decided to upload it. This script makes it so you earn money for each kill ($100) and you can buy your weapons. When you spawn, you choose one of the secondary weapon, and when you kill someone you earn money, and each of the primary guns, and powerups (plus stat gun) cost a certain amount of money, then you can buy them. if you open up the script in notepad, you can change the value of each gun. you can buy all powerups (flame god, preditor, ect..) all guns, except for secondary weapons (LAW, chainsaw, USSOCOM, Knife) and you can also buy a Stationary gun. in order to use this, make sure you disable all weapons execpt for secondary, and turn Disable_AntiCheat_Kick to 1 in soldat.ini, because when you buy weapons it will think your cheating. supports 32 players.
Just extract it to your <server>/scripts/ folder
COMMAND LIST:
/money - shows how much money you currently have
/shop - opens shop to see how much guns cost and gun commands
/give [Ammount | Player Name] -gives [player name] $[Ammount] of your money. (palyer name MUST be exact, it is case sensitive.)
example /give 100 Corl45 that would give Corl45 $100 of your money.
DOWNLOAD: http://soldatcentral.com/index.php?page=script&f=90
-
Awsome, just added it to my server
Thanks for releasing it ;D
-
your welcome =)
-
You could just have a /give x instead of /give 100 and all that stuff just by adding 1 variable and setting that variable GetPiece(Text, ' ', 1);
-
You could just have a /give x instead of /give 100 and all that stuff just by adding 1 variable and setting that variable GetPiece(Text, ' ', 1);
but how would i set who i want to send it to? because if i have more that 3 digits in the number im sending them, i would have somthing like <Get so because its 1 more space over? right?
EDIT:
lol nvm, i was thinking of the copy function... lol :P thanks, ill start working on that
-
nice! Reminds me of cs, and how you buy your weapons, despite this feature will not be added into soldat :(
-
has anyone found any bugs?
-
awesome i got a server too and now i saw that and i add it =) nice thank you!
-
In my local server the script works. But in my 24/7 server not. Why?
-
We can't help you when you don't show us the Error Message, you find these normally in the logs Folder in the latest Console.log.
-
corl45 , u shood think about relasing some login system so the money can be saved when u come back, also, u can make your account when u feel free and set password withouth any problem, and then the script would be GREAT, now is just AWESOME
-
corl45 , u shood think about relasing some login system so the money can be saved when u come back, also, u can make your account when u feel free and set password withouth any problem, and then the script would be GREAT, now is just AWESOME
I've been thinking about it, if I get time I'll work on it. Thanks for the idea! Sounds pretty good.
-
I found bug, teamkilling for money xD
btw nice script i use this in my serwer but only in powerup shop
-
Yea it makes my dedicated server crash when i buy guns
-
I use this:
procedure OnPlayerKill(Killer, Victim: byte;Weapon: string);
begin
if Killer = Victim then
begin
writeConsole(Killer, 'Your money is now: $' + inttostr(money[Killer]), RGB(0, 255, 255));
end else
if (Killer <>Victim) and (GetPlayerStat(Killer,'team') <> GetPlayerStat(Victim,'team')) then
begin
money[Killer] := money[Killer]+300;
writeConsole(Killer, 'You just got $300 your money is now: $' + inttostr(money[Killer]), RGB(0, 255, 255));
end;
end;
Teamkilling for money eliminated xD
-
thanks guys =) I haven't been on in a while, sorry about that, I think I'll start working on your guyz's Ideas! thanks for the feed back!
-
I use your script on my server xD
http://forums.soldat.pl/index.php?topic=35486.0
-
i modded the design because the old one doesn't looked very good
so i changed the shop list, removed the message that you earn 100$ if you make a kill and i also changed the messages if you buy weapons or dont have enough money
but still all the rest of the script belongs to corl45
so you can just call this a fanmod version
heres an example
(http://www.imgbox.de/users/public/images/i32993z232.png)
sorry for my bad English
-
dam those colours look hot. GJ!
-
thanks much dude :D
-
Well, I know I've said it before, but this time I'm actually contemplating it. haha. I'm thinking about going back and writing a save/load (or account system) for the script. Probably won't be too soon, but it'll give me something to do.
-
I have finished a rough working beta of the login system. It is very simple, as I did not have a whole lot of time to work on it. It uses your IP adress for storing information, so if you play from a different IP, you will not have your money anymore. I know I could make a "username/password" system, but, like I said, it's a rough working beta, things are subject to change. Use command "/reg" to register your ip adress, and "/log" to log back in when you join again. If someone wants to test it, reply and I'll put it up, otherwise, I'm going to clean it up a bit, and release it later