Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::Server Code Submissions

Reply
 
Thread Tools Display Modes
  #1  
Old 06-16-2010, 08:27 AM
steve
Discordant
 
Join Date: Jan 2002
Posts: 305
Default

I guess I don't understand what exactly this is/does.
Reply With Quote
  #2  
Old 06-16-2010, 09:39 AM
Secrets's Avatar
Secrets
Demi-God
 
Join Date: May 2007
Location: b
Posts: 1,449
Default

Quote:
Originally Posted by steve View Post
I guess I don't understand what exactly this is/does.
Allows the objects (tradeskill containers, which can be substituted with door models) in the world to be controlled via perl. There's an objects class which controls all of that. Since doors cannot be despawned and respawned easily in code without a complete rework, (they are loaded from the database exclusively), I chose this instead. For example, if you wanted to move a forge around with db ID 24 to an NPC, you would do something similar to this:

Code:
sub EVENT_SAY {
if($text=~/hail/i)
{
my $ent = entity_list.GetObjectByDBID(24);
if($ent)
{
$ent->SetLocation($npc->GetX(), $npc->GetY(), $npc->GetZ());
$ent->SetHeading($npc->GetHeading());
quest::say("Object moved to my location!");
}
}
}
Reply With Quote
  #3  
Old 06-20-2010, 12:48 PM
Secrets's Avatar
Secrets
Demi-God
 
Join Date: May 2007
Location: b
Posts: 1,449
Default

Updated first post again, added object functions SetX, SetY, SetZ, SetHeading, GetX, GetY, GetZ, GetHeading, SetModelName, GetModelName, and added a new quest command (int16 CreateGroundObjectFromModel, quest::creategroundobjectfrommodel(string modelname, x, y, z, heading, int8 [type]))

All of the set commands update in realtime via a despawn/respawn packet.
Reply With Quote
  #4  
Old 06-20-2010, 01:54 PM
Secrets's Avatar
Secrets
Demi-God
 
Join Date: May 2007
Location: b
Posts: 1,449
Default

Upon further inspection... what i was trying to do with objects could be accomplished by adding functions to doors. ._.

So i'll probably keep this here for reference and start a new topic with door perl.
Reply With Quote
Reply

Thread Tools
Display Modes

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:41 PM.


 

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