Official Soldat Forums

Server Talk => Scripting Discussions and Help => Topic started by: mich1103 on June 13, 2010, 06:02:36 pm

Title: % of hit !
Post by: mich1103 on June 13, 2010, 06:02:36 pm
How can i modify % of hit when a player hit another ?
like hexer mod ,ZRPG other ...
Title: Re: % of hit !
Post by: the halo fan on June 13, 2010, 06:19:22 pm
do you mean for 1.5.1.15 beta?
Title: Re: % of hit !
Post by: mich1103 on June 13, 2010, 06:22:21 pm
no XD
Title: Re: % of hit !
Post by: Furai on June 13, 2010, 06:25:41 pm
He probably means how to increase damage dealt by weapons.
Title: Re: % of hit !
Post by: the halo fan on June 13, 2010, 06:28:53 pm
use the weapons.ini file.....?
Title: Re: % of hit !
Post by: mich1103 on June 13, 2010, 06:33:06 pm
I just want a lvl thing !
In DrawText will be written xp/maxxp
each kill or flag score he will gain xp
when he lvl up
he hit 1% more
and all is saved by nickname or ip !
Title: Re: % of hit !
Post by: DorkeyDear on June 13, 2010, 06:37:23 pm
Or maybe % chance of the weapon doing no damage to doing it's normal damage.

http://enesce.com/help/index.html?Events/OnPlayerDamage.html (for beta only), otherwise:
function OnPlayerDamage(Victim, Shooter: byte; Damage: integer): integer;

You can use the Random function to do chances...
function Random(Min, Max: integer): integer; (not 100% sure about the types)
I think Max is now inclusive, but cannot say with 100% certainty.
Title: Re: % of hit !
Post by: mich1103 on June 13, 2010, 06:39:46 pm
i just want like HTZRPG !
damage multiplicater %
Title: Re: % of hit !
Post by: Hacktank on June 13, 2010, 07:14:23 pm
Code: [Select]
var
enabled: boolean;
dmgmult: array[1..32] of single;

procedure ActivateServer();
begin
enabled := true;
end;

function OnCommand(ID: byte; text: string): boolean;
var f: string; target: byte; temp: single;
begin
f := getpiece(text,' ',0);
if f = '/damage' then begin
enabled := not enabled;
writeconsole(0,'Damage modulation '+iif(enabled=true,'en','dis')+'abled!',$ffffffff);
end;
if f = '/setdamage' then try
target := strtoint(getpiece(text,' ',1));
temp := dmgmult[target];
dmgmult[target] := strtofloat(getpiece(text,' ',2));
writeconsole(ID,getplayerstat(target,'name')+'''s damage multiplier changed from '+floattostr(roundto(temp,2))+' to '+floattostr(roundto(dmgmult[target],2)),$ffffffff);
except
writeconsole(ID,'You must enter in this format: /setdamage ID DAMAGE',$ffffffff);
end;
end;

function OnPlayerDamage(Victim,Shooter: Byte;Damage: Integer) : integer;
begin
result := damage;
if enabled then result := round(damage * dmgmult[shooter]);
end;

Enable/disable using /damage. Then use /setdamage ID AMMOUNT to set someones damage multiplier.
Title: Re: % of hit !
Post by: mich1103 on June 13, 2010, 07:18:57 pm
i dont understand the script :S
Title: Re: % of hit !
Post by: Hacktank on June 13, 2010, 07:27:32 pm
What do you mean? If your ID # 1 then do /setdamage 1 1.5 for 150% damage.
Title: Re: % of hit !
Post by: mich1103 on June 13, 2010, 07:28:58 pm
thats gentle but i dont want that ...
i only want this :
Code: [Select]
I just want a lvl thing !
In DrawText will be written xp/maxxp
each kill or flag score he will gain xp
when he lvl up
he hit 1% more
and all is saved by nickname or ip !
Title: Re: % of hit !
Post by: Hacktank on June 13, 2010, 08:32:30 pm
You can use what i made to make that yourself. I am not gunna do it, maby u can get someone else to.
Title: Re: % of hit !
Post by: mich1103 on June 14, 2010, 06:00:15 am
Ok i'll try to do it !
but if i need help i'll ask to you ! :D

From: June 14, 2010, 06:04:28 am
How can i do account for that ?
Title: Re: % of hit !
Post by: Stuffy on June 14, 2010, 06:11:47 am
Your're asking for a whole zrpg-script. Learn scripting yourself.
Title: Re: % of hit !
Post by: mich1103 on June 14, 2010, 06:25:13 am
I only have 13 years old.
I'm not native english speaker
I just asked the procedure of damage multiplicater !
Anyway i don't care about that cause if i continue to learn each day i will be like Hack tank .
Title: Re: % of hit !
Post by: DarkCrusade on June 14, 2010, 07:55:23 am
lol

lol

lol

Yeah go on please

user warned for spam. Actually, on second thought:
http://forums.soldat.pl/index.php?topic=38375.0
Title: Re: % of hit !
Post by: Centurion on June 14, 2010, 11:56:03 am
It's damn hard for you if you can't speak English decently.
Title: Re: % of hit !
Post by: Swompie on June 14, 2010, 12:28:14 pm
Yes.. it actually is, but he's really asking way to much instead of trying to learn it imo.
Title: Re: % of hit !
Post by: squiddy on June 16, 2010, 02:22:15 pm
Yes.. it actually is, but he's really asking way to much instead of trying to learn it imo.

Agreed and supported.

Mich, I'm sure you can be as better as HackTank, or whoever you want to be as good as. But you really gotta stop asking other peoples to solve your problems.

Sure, it's okay if you don't know anything about it, but try making it yourself first.

http://www.enesce.com/help/ <- Here is everything you shall need first. Once you advance, explore other websites and stuff.

Good luck for now, but try to work harder instead of asking.