Author Topic: Climb re-coded v1.0.1  (Read 2137 times)

0 Members and 1 Guest are viewing this topic.

Offline squiddy

  • Soldat Beta Team
  • Camper
  • ******
  • Posts: 333
  • Flagger assassin
    • SoldatX
Climb re-coded v1.0.1
« on: March 09, 2013, 08:39:42 am »
Climb Script re-coded v1.0.1

(Comes in PT-BR, and please don't ask me to translate it. Do it yourself if you will)

Commands available:
  • !Top
  • !Ranking
  • !Stats <player>
  • !Map
  • !Maps
  • !Track <player>
  • /Search <map>
  • /Removetop <TopNº> {For Admins only}

What makes this script different from the other ones available?
  • It has a different drawtext HUD, which not only shows your current time, but the next top time AND it changes colors as you pass the times containted in the !top list (it slowly turns to red)
  • Apart from that, nothing really, I guess lol

Download link: http://dl.dropbox.com/u/13375204/Soldat/Climb%20re-coded%20%5Bv1.0.1%5D%20by%20Squiddy.rar
(Or in attachment)

There you go, Pist!
« Last Edit: March 09, 2013, 10:56:06 am by squiddy »
www.soldatx.com.br - The brazilian Soldat community.

Offline Moroes

  • Soldier
  • **
  • Posts: 165
    • Soldat-Game.eu
Re: Climb re-coded v1.0.1
« Reply #1 on: March 11, 2013, 03:14:47 pm »
Awesome. I was waiting for someone to repair script or make new one and post it for the community. People were asking for it a lot but noone of greedy bastards shared it.
I dont have time to help with climbs now and problem is that I dont know coding well, but this is awesome. It is the basic of climb servers. Two new climb servers are probably coming and this will really help them.
I really appreciate your work.

Offline Prodigyx

  • Soldier
  • **
  • Posts: 188
    • SoldatX Brasil
Re: Climb re-coded v1.0.1
« Reply #2 on: March 12, 2013, 10:00:12 pm »
I use this script in my server  :)
SoldatX - SX Brasil - www.soldatx.com

Offline Bonecrusher

  • Global Moderator
  • Veteran
  • *****
  • Posts: 1397
  • High above
    • Zabijaka.pl
Re: Climb re-coded v1.0.1
« Reply #3 on: March 13, 2013, 09:00:18 am »
Nice idea with the hud changing colors, gj overall.

Im chill like that

Offline rOy

  • Soldier
  • **
  • Posts: 120
Re: Climb re-coded v1.0.1
« Reply #4 on: March 14, 2013, 11:09:55 am »
Hey

Well done,Squiddy ;)

I tested your script on Windows server = no problems / success
Linux on the server doesn't see the result.
If I want to see the result: !top,!stats,!rank,!maps,/search displayed:

+---------------------------------+
||
||
||
+---------------------------------+

???
« Last Edit: March 14, 2013, 11:13:01 am by rOy »

Offline squiddy

  • Soldat Beta Team
  • Camper
  • ******
  • Posts: 333
  • Flagger assassin
    • SoldatX
Re: Climb re-coded v1.0.1
« Reply #5 on: March 14, 2013, 03:41:27 pm »
It is probably because of the pos function (that's me guessing). I will find the problem and fix it when I have the time.

Thanks for the feedback guys =D
www.soldatx.com.br - The brazilian Soldat community.

Offline rOy

  • Soldier
  • **
  • Posts: 120
Re: Climb re-coded v1.0.1
« Reply #6 on: March 17, 2013, 08:44:17 am »
It is probably because of the pos function (that's me guessing). I will find the problem and fix it when I have the time.

Thanks for the feedback guys =D
« Last Edit: May 30, 2014, 06:29:54 am by rOy »

Offline rOy

  • Soldier
  • **
  • Posts: 120
Re: Climb re-coded v1.0.1
« Reply #7 on: June 08, 2013, 09:28:15 pm »
fix it to version 1.6.4 for linux?  ???

Offline squiddy

  • Soldat Beta Team
  • Camper
  • ******
  • Posts: 333
  • Flagger assassin
    • SoldatX
Re: Climb re-coded v1.0.1
« Reply #8 on: June 09, 2013, 07:26:57 am »
About that: I'm working on a MAJOR update for this script, I don't know when it's coming out, but it is in the final stages of coding.

About the bug above: I totally forgot about this topic, but I have the fix for this bug on Linux. Just search the script for a function named RetrieveProperText (it should look like this:)

Code: [Select]
function retrievepropertext(text, linesplitter, datasplitter, nds, textontop: string; fillwith, corner, fillx, filly: char): array of string; //nds = new data splitter
Delete it in its totality and paste this one on the place the original was:

Code: [Select]
function retrievepropertext(text, linesplitter, datasplitter, nds, textontop: string; fillwith, corner, fillx, filly: char): array of string; //nds = new data splitter
var s, q, u, y, datalen: byte; bef, af: array of string; i: array of integer; d: array of array of string; sq: array of array of integer; temp: string;
begin
if (text = nil) or (linesplitter = nil) or (datasplitter = nil) or (nds = '') or (fillwith = '') or (fillx = '') or (filly = '') then exit;
setarraylength(result,0);
text := text + linesplitter; //PRECISA fazer isso
bef := explode(text,linesplitter);
while bef[getarraylength(bef)-1] = nil do setarraylength(bef,getarraylength(bef)-1); //isso TAMBÉM precisa fazer
for s := 0 to getarraylength(bef)-1 do bef[s] := bef[s] + datasplitter;
af := explode(bef[0],datasplitter); //pra poupar variáveis né.. vida de pobre dá nisso
datalen := getarraylength(af);
setarraylength(i,datalen);
setarraylength(d,getarraylength(bef));
setarraylength(sq,getarraylength(bef));
setarraylength(af,getarraylength(bef));
setarraylength(result,getarraylength(bef));
for s := 0 to getarraylength(d)-1 do setarraylength(d[s],datalen);
for s := 0 to getarraylength(sq)-1 do setarraylength(sq[s],datalen);
for s := 0 to getarraylength(af)-1 do begin //loop principal
    af[s] := '';
    for q := 0 to datalen do begin //nesse loop, retirar o velho datasplitter e adicionar o novo no lugar dele (nds)
        u := pos(datasplitter,bef[s]);
        if q < datalen then sq[s][q] := u;
        af[s] := af[s] + copy(bef[s],1,u-1) + iif(q = datalen,'',nds);
        delete(bef[s],1,u + length(datasplitter) - 1);
        end;
    bef[s] := af[s];
    for q := 0 to datalen-1 do begin //nesse loop, verificar quais são as maiores datas de cada linha
        u := pos(nds,bef[s]);
        if u-1 > i[q] then i[q] := u-1;
        delete(bef[s],1,u + length(nds) - 1);
        end;
    end;
for s := 0 to getarraylength(af)-1 do for q := 0 to datalen-1 do begin //nesse loop, adicionar os chars à variável result
    u := sq[s][q];
    for y := u-1 to i[q] do d[s][q] := d[s][q] + iif(y = i[q],'',fillwith);
    result[s] := result[s] + copy(af[s],1,u-1) + d[s][q] + iif(q = datalen-1,'',nds);
    delete(af[s],1,u + length(nds) - 1);
    end;
setarraylength(result,getarraylength(result)+2); //adicionar dois "blanks" no final da array
for s := getarraylength(result)-2 downto 1 do result[s] := result[s-1]; //e agora mover os textos para uma posição acima
result[0] := '';
i[0] := 0;
for s := 0 to getarraylength(result)-1 do if length(result[s])+2 > i[0] then i[0] := length(result[s])+2; //i[0] is now the lenghtiest motherfucking line
for s := 1 to i[0]-2 do begin
temp := result[getarraylength(result)-1];
result[getarraylength(result)-1] := temp + fillx; //put some filling
end;
for s := 1 to (((i[0]-2) div 2) - (length(textontop) div 2)) do begin
temp := result[0];
result[0] := temp + fillx; //fill before the text on top
end;
temp := result[0];
result[0] := temp + textontop; //put the text on top
for s := length(result[0]) to i[0]-3 do begin
temp := result[0];
result[0] := temp + fillx; //fill after the text on top
end;
temp := result[0];
result[0] := corner + temp + corner; //put some motherfucking corners
temp := result[getarraylength(result)-1];
result[getarraylength(result)-1] := corner + temp + corner; //put some more motherfucking corners
for s := 1 to getarraylength(result)-2 do begin
temp := result[s];
result[s] := filly + temp + filly; //and box it up to finish it!!
end;
end;

Linux users should be fine to go. ;)

Cheers!
www.soldatx.com.br - The brazilian Soldat community.