Author Topic: TagMod 0.2  (Read 5019 times)

0 Members and 1 Guest are viewing this topic.

Offline As de Espada

  • Soldat Beta Team
  • Veteran
  • ******
  • Posts: 1493
  • Mapper
    • My maps
TagMod 0.2
« on: July 11, 2008, 08:22:17 pm »
Script Name: TagMod 0.2
Script Description: This is a new gamestyle, where one player is the tagger, and the others have to flee from him.
Only the tagger have weapons, and the others do NO damage,but they can use their nades to push the tagger, and eachother. Only playable in DeathMatch and RamboMatch (more fun).
If the server is running in Rambo Match, the tagger will ALWAYS use the FlameBow. When you start you have ScoreLimit-1 points, and they will decrease if you are tagging. If your time reaches 0 then you lost, and the map will change (you don't gain points by killing).
This gamemod can't be played together with the Anti - Weapon Drop Bug script.
Original Author(s): As de Espada
Core Version: 2.6.3
Code: The start of it, without the consts... you can get the spirit
Code: [Select]
procedure Disarm(ID: byte);
begin
    ForceWeapon(ID,NoWeapon,NoWeapon,1);
end;

procedure OnWeaponChange(ID, PrimaryNum, SecondaryNum: Byte);
begin
    if (ID<>Tagger1) and (ID<>Tagger2) then begin
        Disarm(ID);
    end else
        if (GameStyle=4) and (ID=Tagger1) then
            forceweapon(ID,FLAMEBOW,FLAMEBOW,0);
end;

procedure SwitchTagger(Before,After: integer);
var MyByte:byte;
begin
    if After=-1 then begin
        if Tagger1<>-1 then begin
            Disarm(Tagger1);
            Tagger1:=-1;
        end
        if Tagger2<>-1 then begin
            Disarm(Tagger2);
            Tagger2:=-1;
        end
    end else
        if NumPlayers>=TwoTaggers then begin
            if before<>0 then begin
                if Tagger1=before then begin
                    Disarm(Tagger1);
                    Tagger1:=after
                end else begin
                    Disarm(Tagger2);
                    Tagger2:=after;
                end;
                if (GameStyle=4) and (Tagger1=before)then
                    forceweapon(after,FLAMEBOW,FLAMEBOW,0);
            end else begin
            //before=0 here 
                if Tagger2=-1 then
                    Tagger2:=After
                else
                    if Tagger1=-1 then
                        Tagger1:=After
                    else begin
                        MyByte:=random(0,2);
                        disarm(iif(MyByte=0,Tagger1,Tagger2));
                        if MyByte=0 then
                            Tagger1:=after
                        else
                            Tagger2:=after;
                    end;
            end;
        end else begin
        //numplayers<twotaggers here
            if tagger1<>-1 then
                disarm(tagger1);
            tagger1:=after;
        end;
end;

procedure Resettagtimes;
var i:integer;
begin
    for i:=1 to Max_Players do begin
        TagTime[i]:=ScoreLimit-1;
        SetScore(i,ScoreLimit-1);
    end;
end;
Commands wheeee
Code: [Select]
function OnCommand(ID: Byte; Text: string): boolean;
var MyByte:byte;
begin
    if ID<>255 then
    case GetPiece(Text,' ',0) of
        '/help','/command','/commands':begin 
            WriteConsole(ID,'/arm               '+'/'+'/Armageddon',cDspl);
            WriteConsole(ID,'/randr             '+'/'+'/Randrom Respawn',cDspl);
            WriteConsole(ID,'/2tag #            '+'/'+'/Number of players for 2 Taggers',cDspl);
            WriteConsole(ID,'/tagban            '+'/'+'/Leaving tagger will get ban?',cDspl);
Code: [Select]
function OnPlayerCommand(ID: Byte; Text: string): boolean;
var i:integer;
begin
    case GetPiece(Text,' ',0) of
        '/help','/command','/commands':begin
            WriteConsole(ID,'When someone reaches tagtime 0, he/she looses the game,',cDspl);
            WriteConsole(ID,'and the map changes. You tag people by killing them.',cDspl);
            WriteConsole(ID,'Available commands:',cDspl);           
            WriteConsole(ID,'/weapon #          '+'/'+'/Change to Weapon (only for the Tagger)',cDspl);
            WriteConsole(ID,'/showw             '+'/'+'/Show Weapons',cDspl);

Future work on this:
support for team mod

0.1.2 -> 0.2: added: 2 taggers on DM
                            if the tagger leaves the game, he/she get banned 5 min (that can be turned off by an admin)
                   modified: now the entering player only tags when the number of the taggers is supposed to grow
                   removed: admin's teleport command

0.1.1 -> 0.1.2: fixed: random tagger will only choose active players
                             the 64k score thing is absolutely NOT happening

0.1 -> 0.1.1: fixed: sometimes peopple got 0 score in the start of a map, then they go to 64k
                           looser is now loser xD
                   added: /help on joingame
« Last Edit: July 28, 2008, 09:09:13 am by As de Espada »
All my maps | my latest map: SoldatX Racing Mappack
me making a map on youtube: ctf_FastMade

Offline Iq Unlimited

  • Flagrunner
  • ****
  • Posts: 864
  • mr. foobar2000
Re: TagMod 0.1
« Reply #1 on: July 11, 2008, 09:46:48 pm »
Pretty nice for a first script,   By the way "loser" only has one o  [retard], and the scriptingcore is v 2.6.3, unless you're testing on an enesce server.

Offline As de Espada

  • Soldat Beta Team
  • Veteran
  • ******
  • Posts: 1493
  • Mapper
    • My maps
Re: TagMod 0.1
« Reply #2 on: July 11, 2008, 10:00:55 pm »
thanks... actualy, it was version 2.2  @_@
All my maps | my latest map: SoldatX Racing Mappack
me making a map on youtube: ctf_FastMade

Offline Boblekonvolutt

  • Soldier
  • **
  • Posts: 222
  • "YOU are a CAR."
Re: TagMod 0.1
« Reply #3 on: July 11, 2008, 11:14:18 pm »
Well, it wasn't 2.2 - I don't even think that had scripting...

Offline xmRipper

  • Soldat Beta Team
  • Flagrunner
  • ******
  • Posts: 742
    • Personal
Re: TagMod 0.1
« Reply #4 on: July 12, 2008, 04:29:51 am »
...
Co-Founder / CTO @ Macellan
Founder Turkish Soldat Community

Offline shantec

  • Soldier
  • **
  • Posts: 140
  • Get ANGREH!!
Re: TagMod 0.1
« Reply #5 on: July 12, 2008, 05:42:00 am »
Ripper you're right... and we have always posted the SoldatServer version instead of script core version XD
Also Known As REIMA


Lol Happles (happy apples)

Offline As de Espada

  • Soldat Beta Team
  • Veteran
  • ******
  • Posts: 1493
  • Mapper
    • My maps
Re: TagMod 0.1
« Reply #6 on: July 12, 2008, 07:26:29 am »
Quote
[b ]Core Version:[ /b] (Version of the Dedicated Server you made this script with)
That's a little hard to understand, because we don't make a script WITH a dedicated server, we made it FOR one... and the name, core version, is pretty suggestive :)
It's the dedicated or the core version number?
All my maps | my latest map: SoldatX Racing Mappack
me making a map on youtube: ctf_FastMade

Offline Avarax

  • Veteran
  • *****
  • Posts: 1529
    • Official Hexer & MMod site
Re: TagMod 0.1
« Reply #7 on: July 12, 2008, 08:45:38 am »
2.6.3 is the current server version. 2.2 is the scriptingcore.
Server version 2.2 did not have scripting support :Q

Good to see you using object oriented coding on from the start (with all the functions and procedures)
I like to have one Martini
Two at the very most
Three I'm under the table
Four I'm under the host

Offline As de Espada

  • Soldat Beta Team
  • Veteran
  • ******
  • Posts: 1493
  • Mapper
    • My maps
Re: TagMod 0.1.1
« Reply #8 on: July 13, 2008, 05:42:05 pm »
updated!
All my maps | my latest map: SoldatX Racing Mappack
me making a map on youtube: ctf_FastMade

Offline BombSki

  • Flagrunner
  • ****
  • Posts: 927
    • Climbing-soldiers.net
Re: TagMod 0.1.1
« Reply #9 on: July 18, 2008, 09:07:11 am »
sounds interesting, can i play it somewhere?

Offline As de Espada

  • Soldat Beta Team
  • Veteran
  • ******
  • Posts: 1493
  • Mapper
    • My maps
Re: TagMod 0.1.1
« Reply #10 on: July 18, 2008, 10:31:43 am »
There's a guy that hosts the server, a brasilian one, but maybe you'll be kicked because of your ping.
Quote
Careca Cabeludo wrote:
   
pegapega.servegame.com
porta 23073

that's the server... but it's not always active :p
All my maps | my latest map: SoldatX Racing Mappack
me making a map on youtube: ctf_FastMade

Offline BombSki

  • Flagrunner
  • ****
  • Posts: 927
    • Climbing-soldiers.net
Re: TagMod 0.1.1
« Reply #11 on: July 18, 2008, 06:55:13 pm »
cant seem to even connect to that.. oh well. are u on irc? maybe we can play it sometime and perhaps ill add it to my server

Offline As de Espada

  • Soldat Beta Team
  • Veteran
  • ******
  • Posts: 1493
  • Mapper
    • My maps
Re: TagMod 0.1.1
« Reply #12 on: July 18, 2008, 08:52:50 pm »
I was uploading one extra file .BKP
tagmod is still 0.1.1, just the name is 0.1.2 to not mischanging files :p
All my maps | my latest map: SoldatX Racing Mappack
me making a map on youtube: ctf_FastMade

Offline BombSki

  • Flagrunner
  • ****
  • Posts: 927
    • Climbing-soldiers.net
Re: TagMod 0.1.1
« Reply #13 on: July 19, 2008, 08:26:51 am »
oh well i played this with a few people on my local server
a few things that i dont get:

it shows "you have -88 seconds left" and it keeps decreasing (-88, -89, -90). the caplimit was 100
it needs friendlyfire to be enabled in CTF match
it would be nice if u can see how much seconds the tagger has left
new players that join shouldnt automaticly become the tagger
a lot of bullshit admin commands which are useless imo :P

Offline As de Espada

  • Soldat Beta Team
  • Veteran
  • ******
  • Posts: 1493
  • Mapper
    • My maps
Re: TagMod 0.1.1
« Reply #14 on: July 19, 2008, 09:57:35 am »
in order

that shouldn't happen, when someone reaches 0 the map should change and all timers should reset
this mod doesn't suppor team matches yet
you can see the tag time of all palyers, by pressing f1, the tagger is the decreasing one :p
hummm... in my childhood, that's the way it worked. Do you have any suggestion?
hahaha I was just messing around with scripting, making some tests, and I didn't take them out :)

Date Posted: July 19, 2008, 12:24:58 pm
I pretend to uderstand better how the IDs change when someone leave/enters the game. I'll use the "active" thing too. That will fix various bugs.
All my maps | my latest map: SoldatX Racing Mappack
me making a map on youtube: ctf_FastMade

Offline BombSki

  • Flagrunner
  • ****
  • Posts: 927
    • Climbing-soldiers.net
Re: TagMod 0.1.1
« Reply #15 on: July 19, 2008, 10:23:05 am »
hmm, in my experience the timer started at 0 and then started decreasing

i can enable FF and force everyone to the red team with some other scripts i have on multimode, so that isnt really a problem for me

i still think it would be nice that you see the taggers name and 'seconds left' in a drawtext

my suggestion is simple: dont change the tagger when someone joins :P in a 10 slot server youll have many joins and parts, and the newcomer might not understand a damn..

Offline As de Espada

  • Soldat Beta Team
  • Veteran
  • ******
  • Posts: 1493
  • Mapper
    • My maps
Re: TagMod 0.1.1
« Reply #16 on: July 19, 2008, 10:41:09 am »
again, in order:

yeah... sometimes the timer starts at 0 and then "decreases" to 64k (UNDERFLOW).

only FF should do it, you don't get any points by killing anyone...

ok ok, I'll make that in next version

ok ok, I'll make an admin command for disable the tagger join thing. (whee finaly usefull admin commands =D)

Date Posted: July 19, 2008, 01:31:15 pm
known bug: if the maplist of the dedicated server is empty, the command "/nextmap" doesn't work at all, and the game will stop working
maybe I'll check the length of the maplist, and if it's zero then I'll do "/restart", instead of "/nextmap", but I have to test that (when I get home)

Date Posted: July 19, 2008, 01:39:27 pm
known bugs:
random tagger may choose a person that's not in the server anymore
/armageddon may enter in a loop

I'll fix those in the next days
All my maps | my latest map: SoldatX Racing Mappack
me making a map on youtube: ctf_FastMade

Offline Iq Unlimited

  • Flagrunner
  • ****
  • Posts: 864
  • mr. foobar2000
Re: TagMod 0.1.1
« Reply #17 on: July 19, 2008, 02:32:45 pm »
Here's how to fix the random tagger may not be in the server, because I had the same problem with my script.

Code: [Select]
for i := 1 to 255 do begin
Ran := Random(1, MAXPLAYER{providing you have this variable to save loop time});
if GetPlayerStat(Ran, 'Active') then begin
tagger[Ran] := true; //or whatever variable it is that makes someone it for you.
break;
end;
end;

well...its the best I could find, just have everyone ingame before it chooses the random person.

Offline As de Espada

  • Soldat Beta Team
  • Veteran
  • ******
  • Posts: 1493
  • Mapper
    • My maps
Re: TagMod 0.1.1
« Reply #18 on: July 19, 2008, 03:14:12 pm »
ok, thanks, I really have to start using that active thing. But I'll try making something better than 1 to 255 ;)
All my maps | my latest map: SoldatX Racing Mappack
me making a map on youtube: ctf_FastMade

Offline Iq Unlimited

  • Flagrunner
  • ****
  • Posts: 864
  • mr. foobar2000
Re: TagMod 0.1.1
« Reply #19 on: July 19, 2008, 03:31:28 pm »
It never really goes that high, the max I've ever seen that loop go is about 13 times with 3 people in the server.

Offline As de Espada

  • Soldat Beta Team
  • Veteran
  • ******
  • Posts: 1493
  • Mapper
    • My maps
Re: TagMod 0.1.2
« Reply #20 on: July 22, 2008, 08:29:42 pm »
now the script is checking if the player is active. I did it this way:
Code: [Select]
procedure RandomTagger(ID:byte);
var i,MyInt:integer;
begin
    if ID=0 then begin
        MyInt:=random(1,NumPlayers+1);
        for i:=1 to MyInt do
            if not(getplayerstat(i,'active')) then
                inc(MyInt,1);
    end else begin
    //ID<>0
        MyInt:=random(1,NumPlayers);
        for i:=1 to MyInt do
            if not(getplayerstat(i,'active')) or i=ID then
                inc(MyInt,1);
    end
    SwitchTagger(MyInt);
    WriteConsole(0,getplayerstat(myint,'name')+' was randomly choosed to be the new tagger',cTag);
    DrawText(Tagger,'You''re tagging now!',330,cTag,0.15,40,240);
end;
The id is there to use random tagger when someone leaves the game. In that procedure, the leaving players is still active. 0 is when you can choose anyone

Date Posted: July 22, 2008, 11:18:26 pm
(...)
my suggestion is simple: dont change the tagger when someone joins :P in a 10 slot server youll have many joins and parts, and the newcomer might not understand a damn..
Now I remembered why I did it that way. Is to avoid people exiting the server and reentering so they will not be tagging anymore. I could do a buffer list of ips, but that's too much work for now :(
All my maps | my latest map: SoldatX Racing Mappack
me making a map on youtube: ctf_FastMade

Offline BombSki

  • Flagrunner
  • ****
  • Posts: 927
    • Climbing-soldiers.net
Re: TagMod 0.1.2
« Reply #21 on: July 25, 2008, 10:21:44 am »
onleave game if ID = tagger /banip IP for 5 min


Date Posted: July 23, 2008, 05:32:25 pm
tell me if youre going to add that or not, so i can put it on my server.

Offline As de Espada

  • Soldat Beta Team
  • Veteran
  • ******
  • Posts: 1493
  • Mapper
    • My maps
Re: TagMod 0.2
« Reply #22 on: July 28, 2008, 11:36:31 am »
I will
uhhh forgot to add the time of the tagger on the screen.... sorry
v0.2.1 will have that, and an admin funtion that's not working very well will be fixed

Quote from: nuclearrambo
installed on my server
nuclearsoldat.no-ip.org:23073
« Last Edit: July 28, 2008, 04:42:42 pm by As de Espada »
All my maps | my latest map: SoldatX Racing Mappack
me making a map on youtube: ctf_FastMade