0 Members and 1 Guest are viewing this topic.
procedure OnPlayerSpeak(Name,Text: string);varid: integer;beginid := NameToId(Name);if (Text = '!1') or (Text = '!2') or (Text = '!3') or (Text = '!4') then begin if (killLog[id] > 0) and (voteTime[id] <> 0) then begin if (Text = '!1') then begin SayToPlayer(killLog[id], Name +' has forgiven you'); end else if (Text = '!2') then begin SayToPlayer(killLog[id], Name +' has chosen to kill you'); Command('/kill ' + inttostr(killLog[id])); BanPoint(killLog[id]); end else if (Text = '!3') then begin BanPoint(killLog[id]); case (strtoint(FormatDate('zzz')) div 50) of 0: SayToPlayer(killLog[id],'TKers have a small penis!'); 1: SayToPlayer(killLog[id],'Trashcat is not amused!'); 2: SayToPlayer(killLog[id], IDtoName(id) + 'hates you! >:('); 3: SayToPlayer(killLog[id],'Leo himself is coming to rape you tonight.'); 4: SayToPlayer(killLog[id],'Everytime you teamkill, god kills a kitten'); 5: SayToPlayer(killLog[id],'Teamkilling makes Boogieman haunt you.'); 6: SayToPlayer(killLog[id],'Watch your damn fire!'); 7: Command('/say ' + IDtoName(killLog[id]) + ' has a small penis!'); 8: SayToPlayer(killLog[id],'You now have 1337/' + inttostr(banpointMax) + ' banpoints'); 9: SayToPlayer(killLog[id],'If it TKs, we can kick it!'); 10: SayToPlayer(killLog[id],'Son of a *****!'); 11: SayToPlayer(killLog[id],IDtoName(id) + ' wants your number. <3'); 12: begin SayToPlayer(killLog[id],'SURPRISE!!'); Command('/setteam5 ' + inttostr(killLog[id])); end; 13: SayToPlayer(killLog[id],'You evil teamkilling *****!'); 14: SayToPlayer(killLog[id],'tOMFG NOOB!!1!1'); 15: SayToPlayer(killLog[id],'<(Oo)< <(OO)> >(oO)>'); 16: SayToPlayer(killLog[id],'Poopface.'); 17: SayToPlayer(killLog[id],'TKing leads to bans, did you know?'); 18: SayToPlayer(killLog[id],'Son of a *****!'); 19: begin SayToPlayer(killLog[id],'SPAM'); SayToPlayer(killLog[id],'SPAM'); SayToPlayer(killLog[id],'SPAM'); SayToPlayer(killLog[id],'SPAM'); SayToPlayer(killLog[id],'SPAM'); SayToPlayer(killLog[id],'SPAM'); SayToPlayer(killLog[id],'SPAM'); SayToPlayer(killLog[id],'SPAM'); SayToPlayer(killLog[id],'SPAM'); SayToPlayer(killLog[id],'SPAM'); SayToPlayer(killLog[id],'SPAM'); SayToPlayer(killLog[id],'SPAM'); end; end; end else begin If survival then begin SayToPlayer(killLog[id], Name +' has chosen to kill you on next respawn'); spawnKill[killLog[id]] := 1; BanPoint(killLog[id]); end; {else begin SayToPlayer(killLog[id], Name +' has chosen to temporary remove you from the game'); BanPoint(killLog[id]); previousteam[killLog[id]]:=IDtoTeam(killLog[id]); Command('/setteam5 ' + inttostr(killLog[id])); removetimer[killLog[id]]:=removalTime; end;} end; SayToPlayer(id, 'Vote successful'); killLog[id] := 0; voteTime[id] := 0; end else begin SayToPlayer(id, 'You can not vote at the moment.'); killLog[id] := 0; voteTime[id] := 0; end;endelse If copy(text,1,10) = '!banpoints' then SayToPlayer(id,'You currently have ' + inttostr(banpointCount[id]) + '/' + inttostr(banpointMax) + ' banpoints');end;
procedure Balance(PreventLoop,pointerA,pointerB: integer);var i: integer; notdone: boolean;begin If PreventLoop < 33 then begin notdone:=true; i:=32; If (iif(AlphaPlayers > 0,AlphaPlayers-1,AlphaPlayers) > BravoPlayers) then If pointerA > 0 then begin Command('/setteam2 ' + inttostr(lastJoinedA.e[pointerA])); Command('/kill ' + inttostr(lastJoinedA.e[pointerA])); pointerA:=pointerA-1; If PreventLoop = 1 then Command('/say Teams balanced.'); Balance(PreventLoop+1,pointerA,pointerB); end else while (notdone) and (i > 0) do begin If IDtoTeam(i)=1 then begin notdone:=false; Command('/setteam2 ' + inttostr(i)); Command('/kill ' + inttostr(i)); If PreventLoop = 1 then Command('/say Teams balanced.'); Balance(PreventLoop+1,pointerA,pointerB); end else i:=i-1; end else If (iif(BravoPlayers > 0,BravoPlayers-1,BravoPlayers) > AlphaPlayers) then If pointerB > 0 then begin Command('/setteam1 ' + inttostr(lastJoinedB.e[pointerB])); Command('/kill ' + inttostr(lastJoinedB.e[pointerB])); pointerB:=pointerB-1; If PreventLoop = 1 then Command('/say Teams balanced.'); Balance(PreventLoop+1,pointerA,pointerB); end else while (notdone) and (i > 0) do begin If IDtoTeam(i)=2 then begin notdone:=false; Command('/setteam1 ' + inttostr(i)); Command('/kill ' + inttostr(i)); If PreventLoop = 1 then Command('/say Teams balanced.'); Balance(PreventLoop+1,pointerA,pointerB); end else i:=i-1; end else begin for i:=1 to 32 do begin lastJoinedA.e[i]:=0; lastJoinedB.e[i]:=0; end; lastJoinedA.l:=0; lastJoinedB.l:=0; end; end;end;
mikembm: take a look at this script. It will hopefully deal with teamhurting issue.
Doesn't work with 2.6, server doesn't start
Core Version: 2.5.4
function IDtoTeam(PlayerID: integer):integer;begin Result:= GetPlayerStat(PlayerID,'team');end;