Author Topic: Idea for a script, is it feasible?  (Read 6366 times)

0 Members and 1 Guest are viewing this topic.

Offline Gizd

  • Flagrunner
  • ****
  • Posts: 586
  • (Re)tired
    • Eat-this! community site
Re: Idea for a script, is it feasible?
« Reply #20 on: December 17, 2009, 09:54:41 am »
Yea, it will be possible to kill your teammates even if you set damage to 0. That's how these f**king m79 bullets work.
Bulls**t.

Offline Londonbrig0

  • Major(1)
  • Posts: 38
  • despite my experience, I'm a noob, deal with it
Re: Idea for a script, is it feasible?
« Reply #21 on: December 17, 2009, 12:06:23 pm »
Yea, it will be possible to kill your teammates even if you set damage to 0. That's how these f**king m79 bullets work.

Oh, I didn't know that. Do grenades and the Law do the same thing, or is just the m79? It wouldn't really be a problem, if someone gets killed by their teammate they would just respawn on the same team. I would just have to make sure that in the script a teamkill resulting in the death of the leader doesn't screw everything up.
I could have sworn I had something witty to put here...

Offline Gizd

  • Flagrunner
  • ****
  • Posts: 586
  • (Re)tired
    • Eat-this! community site
Re: Idea for a script, is it feasible?
« Reply #22 on: December 17, 2009, 01:07:27 pm »
Yea, it will be possible to kill your teammates even if you set damage to 0. That's how these f**king m79 bullets work.

Oh, I didn't know that. Do grenades and the Law do the same thing, or is just the m79? It wouldn't really be a problem, if someone gets killed by their teammate they would just respawn on the same team. I would just have to make sure that in the script a teamkill resulting in the death of the leader doesn't screw everything up.
Yea, it will be possible to kill your teammates even if you set damage to 0. That's how these f**king m79 bullets work.
Bulls**t.

Offline Londonbrig0

  • Major(1)
  • Posts: 38
  • despite my experience, I'm a noob, deal with it
Re: Idea for a script, is it feasible?
« Reply #23 on: December 17, 2009, 01:27:58 pm »
Well so far I've got one person telling me it's true and another telling me it's false, looks like I'll have to find out myself.
I could have sworn I had something witty to put here...

Offline Gizd

  • Flagrunner
  • ****
  • Posts: 586
  • (Re)tired
    • Eat-this! community site
Re: Idea for a script, is it feasible?
« Reply #24 on: December 18, 2009, 11:12:58 am »
When I'm sure it's false - it's false.

Offline Serial K!ller

  • Camper
  • ***
  • Posts: 408
    • Soldat Mods Archive
Re: Idea for a script, is it feasible?
« Reply #25 on: December 18, 2009, 11:35:37 am »
I tried it for my friendly-fire script and it is possible to kill players with law/m79 even when the damage is set to 0 in onplayerdamage(), but only on direct hits because it's hard coded in the server...

Same reason why the m79/law is always stays a 1-hit kill weapon when changing the damage value in weapons.ini even if it's negative damage.
« Last Edit: December 18, 2009, 02:51:27 pm by Serial K!ller »

Offline Gizd

  • Flagrunner
  • ****
  • Posts: 586
  • (Re)tired
    • Eat-this! community site
Re: Idea for a script, is it feasible?
« Reply #26 on: December 18, 2009, 02:17:50 pm »
I set it to 0 and direct hits didn't kill.  :o

Offline Neosano

  • Camper
  • ***
  • Posts: 253
  • IIAWAK!
Re: Idea for a script, is it feasible?
« Reply #27 on: December 19, 2009, 06:15:08 am »
Gizd, Serial K!ller server versions??
KAWAAAAAAAIIIIIIIIII

Offline tk

  • Soldier
  • **
  • Posts: 235
Re: Idea for a script, is it feasible?
« Reply #28 on: December 19, 2009, 06:15:41 am »
2.6.5+

Offline Keldorn

  • Soldier
  • **
  • Posts: 177
Re: Idea for a script, is it feasible?
« Reply #29 on: December 19, 2009, 06:54:14 am »
Just a question about the game mode itself...

If victory can only be achieved by being the leader of the winning team...why would anyone actually play. I mean, if you get killed by someone, you join their team.
Now, unless either your team leader dies you can't win.
So every player who "joins" another team will just try to get their leader killed.
So pretty much the only way to win is if you kill everyone really quickly, while everyone on your "team" is trying to fuck you up.
That seems...I dunno...counter-intuitive?
Anyone play KOL?

Offline Gizd

  • Flagrunner
  • ****
  • Posts: 586
  • (Re)tired
    • Eat-this! community site
Re: Idea for a script, is it feasible?
« Reply #30 on: December 19, 2009, 07:17:54 am »
Just a question about the game mode itself...

If victory can only be achieved by being the leader of the winning team...why would anyone actually play. I mean, if you get killed by someone, you join their team.
Now, unless either your team leader dies you can't win.
So every player who "joins" another team will just try to get their leader killed.
So pretty much the only way to win is if you kill everyone really quickly, while everyone on your "team" is trying to f**k you up.
That seems...I dunno...counter-intuitive?
I doubt that...

Offline Neosano

  • Camper
  • ***
  • Posts: 253
  • IIAWAK!
Re: Idea for a script, is it feasible?
« Reply #31 on: December 19, 2009, 11:49:58 am »
If the leader got killed - all his team is moving to another team or only the leader?
First one will solve this.
KAWAAAAAAAIIIIIIIIII

Offline Londonbrig0

  • Major(1)
  • Posts: 38
  • despite my experience, I'm a noob, deal with it
Re: Idea for a script, is it feasible?
« Reply #32 on: December 19, 2009, 12:44:27 pm »
If the leader got killed - all his team is moving to another team or only the leader?
First one will solve this.

If the leader gets killed, the leader is now a member of the team who killed him, and everyone who was on his team are now free, fighting for themselves and free to grow their own team.

Just a question about the game mode itself...

If victory can only be achieved by being the leader of the winning team...why would anyone actually play. I mean, if you get killed by someone, you join their team.
Now, unless either your team leader dies you can't win.
So every player who "joins" another team will just try to get their leader killed.
So pretty much the only way to win is if you kill everyone really quickly, while everyone on your "team" is trying to f**k you up.
That seems...I dunno...counter-intuitive?

In my experience playing this game in real life, there are always "agents of chaos" as we call them, who run around trying to prolong the game by targeting team leaders. But there's not really much you can to do kill your own leader while you're on their team, so people either decide to fight for whatever team they are on as best they can, or go off on their own and try to screw things up. Either way, the games are interesting.

In addition, I think the scoring system could help. There are possible scenarios where the leader of the winning team might not have the most points (although he does have a big advantage), so I could possibly make it so that whoever has the most points wins, even if it's not the leader of the winning team.

Meanwhile, I tried to do some testing with killing while damage is set to 0, and from the limited testing I did, I found that I couldn't kill my teammates, but I could kill myself if I directly hit myself with a law or m79.
I could have sworn I had something witty to put here...

Offline Neosano

  • Camper
  • ***
  • Posts: 253
  • IIAWAK!
Re: Idea for a script, is it feasible?
« Reply #33 on: December 20, 2009, 06:09:08 am »
was it DM btw?
KAWAAAAAAAIIIIIIIIII

Offline Londonbrig0

  • Major(1)
  • Posts: 38
  • despite my experience, I'm a noob, deal with it
Re: Idea for a script, is it feasible?
« Reply #34 on: December 20, 2009, 03:56:27 pm »
I could have sworn I had something witty to put here...

Offline Gizd

  • Flagrunner
  • ****
  • Posts: 586
  • (Re)tired
    • Eat-this! community site
Re: Idea for a script, is it feasible?
« Reply #35 on: December 21, 2009, 08:46:29 am »
deathmatch

Offline ~Niko~

  • Rainbow Warrior
  • *****
  • Posts: 2410
Re: Idea for a script, is it feasible?
« Reply #36 on: December 21, 2009, 04:05:19 pm »
I gave it a try, if it works out ill tell you.

Offline Londonbrig0

  • Major(1)
  • Posts: 38
  • despite my experience, I'm a noob, deal with it
Re: Idea for a script, is it feasible?
« Reply #37 on: December 21, 2009, 11:47:04 pm »
In my testing I was in team match and unable to kill my teammate with the m79 or law
but in death match, with damage set to 0 I was able to kill myself with the m79 and law

in other news: I've got a draft of the script up, take a look at it
I could have sworn I had something witty to put here...

Offline Londonbrig0

  • Major(1)
  • Posts: 38
  • despite my experience, I'm a noob, deal with it
Re: Idea for a script, is it feasible?
« Reply #38 on: May 15, 2010, 08:00:13 pm »
After an extended hiatus due to hellacious college classes, I'm continuing to work on this project.

I've added to the script:
- now the script will know when a team wins, and there's a way for the game to end that might work, but I need to test it, or for someone to tell me if it will or won't.

However, I won't be able to test the script for a few days while I'm on the road, so there are some things I'm concerned about on which I would appreciate input:
- I'm having trouble figuring out the syntax for a few things. Namely, the giant if-then statement that begins on line 31, I'm pretty sure there are semicolon errors within the procedure.
- The DrawText function on line 59: I want it to say "Team" + (whoever won) + "wins!" I just guessed +'s might work, what should I actually use to combine those?

Any advice is much appreciated, thank you.

Code: (Pascal) [Select]
//SuperVillians Script v0.3
 //concocted and shoddily put together by Londonbrig0
 
 var
VTeam: array[1..12] of string; //VTeam is supposed to stand for "villian team"
Leader: array[1..12] of boolean; //and 12 is current max number of players
i: integer; //used for id of players
Winner: boolean; //variable used to end game when everyone is on the same team

//When someone joins, set their team to their own name, and make them a leader
procedure OnJoinGame(ID, Team: byte);
begin
VTeam[ID] := +IDToName(ID);
if VTeam[ID] = +IDToName(ID) then
Leader[ID] := true;
end;

//this is so I can check teams when I'm testing
//I'll probably leave this in to let players check the teams ingame if they want.
function OnCommand(ID: Byte; Text: string): boolean;
begin
if (Text = '/teams') then
for i := 1 to 12 do begin
WriteConsole(ID, +IDToName(i) +' is on team ' +VTeam[i], $EE81FAA1)
end;
end;

//what happens when someone is killed
procedure OnPlayerKill(Killer, Victim: byte;Weapon: byte);
begin
if VTeam[Victim] = VTeam[Killer] then //if it was somehow a team kill
SetScore(Killer,GetPlayerStat(Killer, 'Kills') - 1) //take away the point the killer got
else
begin
VTeam[Victim] := VTeam[Killer]; //they are now fighting on the team of their killer
SetScore(NameToID(VTeam[Killer]),GetPlayerStat(NameToID(VTeam[Killer]), 'Kills') + 1); //the leader of the killer's team get's a bonus point
if Leader[Victim] = true then //if the victim was a leader
begin
Leader[Victim] := false; //the victim is now no longer a leader
for i := 1 to 12 do
begin
if VTeam[i] = +IDToName(Victim) then //everyone who was fighting for the victim
begin
VTeam[i] := +IDToName(i); //are now free
Leader[i] := true //and leaders again
end;
end;
end;
end;
//There are probably issues with semicolons between line 26 and here
Winner := true; //temporarily set end game variable
for i := 1 to 12 do
begin
if VTeam[i] != +IDToName(Killer) then //is there anyone not on the killer's team?
Winner := false; //if so, no one has won yet
end;
if Winner = true then //if there is a winner
begin
DrawText(0,2,'Team' + VTeam[Killer] + 'wins!',330,RGB(255,0,0),0.20,40,240);
TimeLeft := 0; //end the game (will this work?)
end;
end;
« Last Edit: May 15, 2010, 08:58:42 pm by Londonbrig0 »
I could have sworn I had something witty to put here...

Offline squiddy

  • Soldat Beta Team
  • Camper
  • ******
  • Posts: 333
  • Flagger assassin
    • SoldatX
Re: Idea for a script, is it feasible?
« Reply #39 on: May 15, 2010, 08:58:51 pm »
[...]

Any advice is much appreciated, thank you.

[...]

Go "if Winner Then", instead of "if Winner = True". Same thing for "Leader[Victim] = True". Go "if Leader[Victim] Then"..

About the Script, I don't understand quite what you're asking.
www.soldatx.com.br - The brazilian Soldat community.