Generate Lag

Get Help on scripting in POL with configurations, config setups, script trouble shooting, etc.
Post Reply
Unfaithful
Neophyte Poster
Posts: 38
Joined: Mon Jun 11, 2007 1:35 pm

Generate Lag

Post by Unfaithful »

There is a way to generate lag on concrete player?
Yukiko
Distro Developer
Posts: 2826
Joined: Thu Feb 02, 2006 1:41 pm

Post by Yukiko »

Do you mean generating a log file when players are created?

If that is your question, yes.

Just include:
use file;
in your "use" statements at the beginning of the oncreate script and then use the function call LogToFile passing the info you wish to the function.
Unfaithful
Neophyte Poster
Posts: 38
Joined: Mon Jun 11, 2007 1:35 pm

Post by Unfaithful »

no i mean

function generatelag(who)
var tgt := Target(who)
makelag(tgt);
endfunction

sth like this ... dont u know what lag mean?
User avatar
Tritan
Grandmaster Poster
Posts: 147
Joined: Sat Feb 04, 2006 8:17 am

Post by Tritan »

Do you just want to slow them down or make it harder for them to move?
Xenawar
New User
Posts: 13
Joined: Thu May 03, 2007 2:23 pm

Post by Xenawar »

There's a secret key combo to do it but it only works while you are a GM or higher in game. Just press Alt-F4, then target the player.
User avatar
OldnGrey
POL Expert
Posts: 657
Joined: Sat Feb 04, 2006 6:26 pm

Post by OldnGrey »

I'd suggest an external utility that uses cpu cycles. Running winrar to compress a directory is a good one. It will nicely lag all players on the shard.

It's easy enough to script in something that takes 100% cput - just about anything with a foreach loop searching the world will do it if you put in the sleeps you want.

These lag everyone, but I've no idea how to do it for one player though.
mr bubbles
Grandmaster Poster
Posts: 120
Joined: Thu Jan 18, 2007 2:34 am

Post by mr bubbles »

Would bombarding him with an update packet do the job?
Unfaithful
Neophyte Poster
Posts: 38
Joined: Mon Jun 11, 2007 1:35 pm

Post by Unfaithful »

wich packet ;d
Yukiko
Distro Developer
Posts: 2826
Joined: Thu Feb 02, 2006 1:41 pm

Post by Yukiko »

I thought maybe you had mis-typed your question. Yes unfaithful, I do know what lag is but usually lag is something we want to eliminate, not create!!!

Anyway, enjoy.
User avatar
tekproxy
Forum Regular
Posts: 352
Joined: Thu Apr 06, 2006 5:11 pm

Post by tekproxy »

You could probably do it but it may lag the server. You'd also have to be very careful of crashing the client. If you do packet hooks, you know what I'm talking about. If you want to just be nasty, it would be easy to write a function like CrashClient().

If you could find out a client process that is resource intensive for the client but not the server. I know whenever a client has to select where to place a multi it's fairly CPU intensive. But newer CPUs can handle that with no problem. You -could- hook some packets, and delay them, but that's a really weird way to go about an even weirder idea.
Unfaithful
Neophyte Poster
Posts: 38
Joined: Mon Jun 11, 2007 1:35 pm

Post by Unfaithful »

;]]
thx Tekproxy
Pierce
Forum Regular
Posts: 420
Joined: Thu Feb 02, 2006 8:33 am

Post by Pierce »

Maybee a dumb question. But why will you create lag on a player? If you don't like him, simply delete his account.
Gnafu
Grandmaster Poster
Posts: 136
Joined: Thu Feb 02, 2006 7:29 am

Post by Gnafu »

Simply write a script that freeze and unfreeze the player very often.
(Useless to delay speach and stand-still-actions..)
runtest
Grandmaster Poster
Posts: 194
Joined: Sat Aug 05, 2006 11:43 am

Post by runtest »

Scary People, but try to write a script like.

Code: Select all

Program lagloop( Chr )

var Chry := GetObjProperty( Chr,"#Chr.y" )
var Chrx := GetObjProperty( Chr,"#Chr.x" )
var WaitTime := GetObjProperty( Chr,"#WaitTime" )
var Timer := ReadGameClock()

If( Timer > WaitTime )
Chry := Chry - 1
Chrx := Chrx - 10
SetObjProperty( Chr,"#WaitTime", ReadGameClock()+RandomDiceRoll(6)
Endif

Endprogram
Would this work?
User avatar
ncrsn
Grandmaster Poster
Posts: 255
Joined: Fri Feb 10, 2006 12:15 am

Post by ncrsn »

I thought something like this (~pseudo).

Code: Select all

// Launch with Start_Script("lagwarp", who) on logon

use os;
use uo;
use util;

program lagwarp( who )
	
	while (who.connected)
		
		var lastx := who.x;
		var lasty := who.y;
		var lastz := who.z;
		
		SleepMS(200 + RandomInt(200));
		
		MoveObjectToLocation(who, lastx, lasty, lastz, who.realm, MOVEOBJECT_FORCELOCATION);
		
	endwhile
	
endprogram
Unfaithful
Neophyte Poster
Posts: 38
Joined: Mon Jun 11, 2007 1:35 pm

Post by Unfaithful »

funny script but could work ;]
runtest
Grandmaster Poster
Posts: 194
Joined: Sat Aug 05, 2006 11:43 am

Post by runtest »

I figure you want to use this a punishment, lag is simply when the player performs actions and every once and a bit it reverses becauses signal can not be sent fast enough. So, have the script sleep for say six seconds then reverse actions back a recorded step. Hard to explain.
Justae
Expert Poster
Posts: 79
Joined: Thu May 24, 2007 2:12 pm

Post by Justae »

To the Author of this thread :

I would question your motives.

1. Is the lag on player to be caused as an effect to a custom spell ?
2. Is it to gain an advantage over the player during a PvP session ?

#1 is Doable in a proper manner.
#2 - shut your shard down.
Post Reply