Go Back   EQEmulator Home > EQEmulator Forums > Support > Support::Windows Servers

Support::Windows Servers Support forum for Windows EQEMu users.

Reply
 
Thread Tools Display Modes
  #1  
Old 03-16-2005, 09:30 AM
hitokiri572
Fire Beetle
 
Join Date: Mar 2005
Posts: 3
Default Commands.pl

wat is commands.pl where does it go and wat is it used 4?
Reply With Quote
  #2  
Old 03-16-2005, 02:37 PM
Cisyouc
Demi-God
 
Join Date: Jun 2004
Location: Heaven.
Posts: 1,260
Default

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{}
__________________
namespace retval { template <class T> class ReturnValueGen { private: T x; public: ReturnValueGen() { x = 0; }; T& Generator() { return x; }; }; } int main() { retval::ReturnValueGen<int> retvalue; return retvalue.Generator(); }
C++ is wonderful.
Reply With Quote
  #3  
Old 03-17-2005, 02:14 PM
Minlail
Sarnak
 
Join Date: Mar 2005
Posts: 38
Default

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?
Reply With Quote
  #4  
Old 03-17-2005, 02:29 PM
mrea
Discordant
 
Join Date: Sep 2004
Location: Camp Hill,PA
Posts: 370
Default

I never quite understood that file, but now that I do that is awesome..
Reply With Quote
  #5  
Old 03-17-2005, 04:13 PM
Cisyouc
Demi-God
 
Join Date: Jun 2004
Location: Heaven.
Posts: 1,260
Default

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
__________________
namespace retval { template <class T> class ReturnValueGen { private: T x; public: ReturnValueGen() { x = 0; }; T& Generator() { return x; }; }; } int main() { retval::ReturnValueGen<int> retvalue; return retvalue.Generator(); }
C++ is wonderful.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 11:46 AM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3