Page 1 of 1

No Sprint?

Posted: June 17th, 2005, 12:33 pm
by Drofder2004

Code: Select all

monitoruosprinting()
{
self notify("uosprintmonitor");
self endon("uosprintmonitor");

sprintspeed = 100; // Sprint speed in percent of default sprint speed
sprinttime = 1; // Sprint time modifier, setting it 0.5 will double the sprinttime, 2 will make it half and so on.
sprintrecovertime = 1; // Recover time modifier, setting it 0.5 will double the recovertime, 2 will make it half and so on.
oldfat = self getFatigue();

while (isAlive(self) && self.sessionstate == "playing")
{
 wait .05;  // Wait
 newfat = self getFatigue();
 deltafat = newfat - oldfat;

 if(deltafat<0) // Sprinting
 {
  if(!isdefined(self.sprinting))
  {
   self.maxspeed = 1.9 * sprintspeed;
   self.sprinting = true;
  }

  newfat = oldfat + deltafat * sprinttime;

  if(newfat<0) newfat = 0;

  self setFatigue(newfat);
 }

 if(deltafat>0) // Recovering
 {
  newfat = oldfat + deltafat * sprintrecovertime;

  if(newfat>1) newfat = 1;

  self setFatigue(newfat);
 }

 if(deltafat>=0) // Recovering and/or not sprinting
 {
  if(isdefined(self.sprinting))
  {
   self.maxspeed = 190;
   self.sprinting = undefined;
  }
 }

 oldfat = newfat;
}
}
I stole that form a post over at IWNation, if anyone knows how to implement it into a no sprint mod, it could be used on the Matrix server.

:D

Posted: June 17th, 2005, 12:42 pm
by Drofder2004
I'm still looking into this (got nothing to do :P) and if someone has any ideas it would be nice :P

Posted: June 17th, 2005, 1:08 pm
by <LT>YosemiteSam[NL]
I'm no modmaker but I'll look in to it tonight. I've made a few mods but not from scratch so copy and paste is my way :)

Posted: June 17th, 2005, 2:32 pm
by Drofder2004
I've look in every gsc file in the uo paks and not a single refference to sprinting/fatigue...

I think I am out on this one, nothing i can find.

Posted: June 17th, 2005, 2:53 pm
by <LT>YosemiteSam[NL]
The way I would try it, is get an existing mod which only changes one thing and copy/paste/modify that mod to the sprint mod. Tried it before and that worked with a few other mods I made/modified.

Posted: June 17th, 2005, 8:20 pm
by Matrix
I think i might have it,

ill get back to u on this!

Many Thanks
Matrix

Posted: June 17th, 2005, 8:33 pm
by Pedsdude
I'm sure wocoom would be interested in this ;)

Posted: June 17th, 2005, 8:36 pm
by Matrix
Nope sorry i couldnt get it working but is that script set for NO Sprint,

Cos i will get my mate to do it if he can

Many Thanks, Matrix

Posted: June 17th, 2005, 8:38 pm
by Drofder2004
Matrix wrote:Nope sorry i couldnt get it working but is that script set for NO Sprint,

Cos i will get my mate to do it if he can

Many Thanks, Matrix
No that script is just a lot of stuff that can be changed.

Posted: June 17th, 2005, 8:45 pm
by Matrix
LOL, u shud of said that before,

I have my mate gone off to do it,

He is a very persesive person and wont come back until he has done it

LOL

Many Thanks, anyway,
Matrix

Posted: June 18th, 2005, 11:01 am
by [SoE]_Zaitsev
Pedsdude wrote:I'm sure wocoom would be interested in this ;)
I also think Wocoom would be the one for this ;)

Posted: June 19th, 2005, 1:02 pm
by Koekie
/unbind alt (if that's your springbutton) :roll:

Posted: June 19th, 2005, 5:04 pm
by <LT>YosemiteSam[NL]
.Koek!e' wrote:/unbind alt (if that's your springbutton) :roll:
Lol..that would work but the thing u get with that is that people say they are not sprinting when they are :(