SRL Archive - Other Scripts

Addy's Punch Out (exe)


addy771

2007-05-02 15:00:42

Took me a while to convert it to pascal but only because of variable types and replacing SCAR functions.

25kb executable


link removed by boreas

Boreas

2007-05-02 15:12:51

Give me source and compiler, if the source is clean, I'll compile it, get an md5 hash of it, and compare it to the one you posted. If the source is clean and the hashes are the same, I'll upload your program.

If not, I'll ban you.

addy771

2007-05-03 18:47:05

From: Boreas
Give me source and compiler, if the source is clean, I'll compile it, get an md5 hash of it, and compare it to the one you posted. If the source is clean and the hashes are the same, I'll upload your program.

If not, I'll ban you.


I used Bloodshed Dev-Pascal Compiler.

program punchout;
{Addy's Punch Out is a freely distributed script
according to the GNU public license as of 1991. If
you bought this program, you have been scammed.}
uses
crt;
var
attack,defense,hp,lvl,bcount:integer;
exp:real;
eattack,edefense,ehp,damage,decider:integer;
b:string;
oppnamea,oppnameb,oppnamec,item:string;
pref: array[1..20] of string;
oppname: array[1..30] of string;
itemstat: array[1..3] of integer;
iteminuse:boolean;
function inttostr(x:integer):string;
begin
str(x,b);
result:=(b);
end;
Procedure Fight;
begin
writeln('Fight! Your new opponent will be '+oppnamec);
delay(1000);
writeln('Your stats are the following,');
delay(500);
writeln('Attack: ',attack);
delay(500);
writeln('Defense: ',inttostr(defense));
delay(500);
writeln('HP: ',inttostr(hp));
delay(500);
writeln('Lvl: ',inttostr(lvl));
end;
function randomrange(a,b:integer):integer;
begin
repeat
randomize;
result:=random(b);
until(result>a);
end;
Procedure FightRound;
begin
if(hp>0)then
begin
randomize;
damage:=(attack-edefense)+random(4);
ehp:=ehp-damage;
delay(2000);
textcolor(green);
writeln('You have done '+inttostr(damage)+' Damage to your opponent,');
writeln(' leaving him/her with '+inttostr(ehp)+' HP left');
end;
delay(2000);
if(ehp>0)then
begin
textcolor(yellow);
writeln('They swing back at you!');
delay(2000);
randomize;
damage:=(eattack-defense)+random(4);
hp:=hp-damage;
delay(2000);
textcolor(red);
writeln('You have gotten ',inttostr(damage),' Damage, leaving you with ',inttostr(hp),' HP left');
end;
delay(2000);
textcolor(1);
end;
procedure getitem(name:string;quantity:integer;units:string; a,d,hp:integer);
begin
writeln('Your opponent has dropped ',inttostr(quantity),' ',units,' of ',name);
itemstat[1]:=a;
itemstat[2]:=d;
itemstat[3]:=hp;
end;
procedure clearitem;
begin
itemstat[1]:=0;
itemstat[2]:=0;
itemstat[3]:=0;
iteminuse:=false;
end;
procedure useitem;
var useit:shortstring;
begin
writeln('Do you wish to use the ',item,' in the next round?(yes/no)');
readln(useit);
if(useit='yes')then
begin
attack:=attack+itemstat[1];
defense:=defense+itemstat[2];
hp:=hp+itemstat[3];
end;
if(useit='no')then
writeln('Discarding item...');
delay(1000);
end;


BEGIN
TextBackground(7);
clrscr;
textcolor(red);
writeln('Copyright 2007 Addy Studios (Adam Oakley)');
textcolor(1);
pref[1]:='Mad ';
pref[2]:='Wealthy ';
pref[3]:='Fancy ';
pref[4]:='Crazy ';
pref[5]:='Humble ';
pref[6]:='Stoned ';
pref[7]:='Poor ';
pref[8]:='Modest ';
pref[9]:='Soft ';
pref[10]:='Heavy ';
pref[11]:='Little ';
pref[12]:='Fat ';
pref[13]:='Skinny ';
pref[14]:='Blazed ';
pref[15]:='Daydreaming ';
pref[16]:='Sleeping ';
pref[17]:='Snoring ';
pref[18]:='Laughing ';
pref[19]:='Lovable ';
pref[20]:='Retarted ';
oppname[1]:='Jamie';
oppname[2]:='Adam';
oppname[3]:='Nathan';
oppname[4]:='Andrew';
oppname[5]:='Stephanie';
oppname[6]:='Clara';
oppname[7]:='Paul';
oppname[8]:='Tommy';
oppname[9]:='Sterling';
oppname[10]:='Jason';
oppname[11]:='Brian';
oppname[12]:='Julian';
oppname[13]:='Morgan';
oppname[14]:='Serena';
oppname[15]:='Michelle';
oppname[16]:='Travis';
oppname[17]:='Will';
oppname[18]:='Danielle';
oppname[19]:='Jim';
oppname[20]:='Evette';
oppname[21]:='Samantha';
oppname[22]:='Maria';
oppname[23]:='Joey';
oppname[24]:='Robert';
oppname[25]:='Timmy';
oppname[26]:='George';
oppname[27]:='Christine';
oppname[28]:='Bob';
oppname[29]:='Gary';
oppname[30]:='Jerry';
attack:=randomrange(3,7);
defense:=randomrange(2,6);
lvl:=1;
hp:=randomrange(8,13);
repeat
randomize;
oppnamea:=pref[random(20)+1];
randomize;
oppnameb:=oppname[random(30)+1];
oppnamec:=oppnamea+oppnameb;
fight;
writeln('Ready to continue? (Enter)');
readln;
eattack:=randomrange(attack-3,attack+3);
edefense:=randomrange(defense-2,defense+4);
ehp:=randomrange(hp-5,hp+10);
repeat
fightround;
until(hp<1)or(ehp<1);
writeln('Round over! Ready to continue? (Enter)');
readln;
if(hp>0)then
begin
hp:=hp+10;
writeln('You have been granted 10 hp');
attack:=attack+5;
defense:=defense+5;
lvl:=lvl+1;
writeln('Your stats have also been raised.');
delay(1000);
clearitem;
randomize;
decider:=random(10);
if(decider>8)and(iteminuse=false)then
begin
getitem('energy drink',1,'bottle',10,-5,3);
useitem;
iteminuse:=true;
end;
if(decider<3)and(iteminuse=false)then
begin
getitem('Candy',1,'Bar',7,-3,6);
useitem;
iteminuse:=true;
end;
end;
bcount:=bcount+1;
exp:=exp+(eattack+edefense)*(lvl/2);
until(hp<1);
writeln('Knocked out! What a shame...');
delay(1000);
writeln('You lasted for ',inttostr(bcount),' Battles.');
delay(500);
readln;
end.

Sheesh, Spaz much?

wired16

2007-05-03 19:15:09

no he isnt spazing out.. its a general concern for the community .. a .exe file? i mean come one.. that has keylogger written all over it… i mean the smell anyways

Boreas

2007-05-03 23:09:47

http://uppit.com/d/BT4EJ
It's clean. And yea I had to check. I'm close to deleting every thread with exe's.

Good job, although being able to deal negative damage is kinda weird. And I know you weren't planning on posting source, so standards don't matter, but if you plan to SCAR script, then learn em :)

addy771

2007-05-03 23:50:14

Well I can see your concern, sorry if I caused a scare, but I didn't think it would be so much of a worry. Anyhow, I have done SCAR before, infact I've made the eliminator for Endless-Online (v4, best autokill available for the game).

Next time would you rather me email you the source and the exe so you can approve it?

Boreas

2007-05-04 00:02:47

Yea (except pm instead of email) or you can just use SCAR :) (except you can't change the color of the writeln).

addy771

2007-05-04 01:38:53

Besides, being able to make it an exe is kinda… special :D