EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Support::Windows Servers (https://www.eqemulator.org/forums/forumdisplay.php?f=587)
-   -   Commands.pl (https://www.eqemulator.org/forums/showthread.php?t=18131)

hitokiri572 03-16-2005 09:30 AM

Commands.pl
 
wat is commands.pl where does it go and wat is it used 4?

Cisyouc 03-16-2005 02:37 PM

It goes in your EQEMu Directory, it is used for creating '#' commands via perl.

If you dont know what it is, all it needs to contain is
Code:

sub commands_init{}

Minlail 03-17-2005 02:14 PM

ok so in short if i wanted to create a #stuck command i could do it there in perl insted of doing it in the source code?

mrea 03-17-2005 02:29 PM

I never quite understood that file, but now that I do that is awesome..

Cisyouc 03-17-2005 04:13 PM

Quote:

Originally Posted by Minlail
ok so in short if i wanted to create a #stuck command i could do it there in perl insted of doing it in the source code?

You could do this..
Code:

sub commands_init {
  command_add("stuck", "- Unsticks your character", 0);
}
sub rewind {
  @choices=(-5,-4,-3,-2,-1,1,2,3,4,5);
  $pick = $choices[int(rand(scalar @choices))];
  return $pick;
}
sub stuck {
  $client->MovePC($zoneid, $client->GetX()+rewind(), $client->GetY()+rewind(), $client->GetZ()+rewind());
  $client->Message(15, "Character moved.");
}

I take no responsibility for the functionality of this code (havent tested it), nor any exploits that may come out of it :P


All times are GMT -4. The time now is 09:50 AM.

Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.