Go Back   EQEmulator Home > EQEmulator Forums > Archives > Archive::Development > Archive::Development

Archive::Development Archive area for Development's posts that were moved here after an inactivity period of 90 days.

Reply
 
Thread Tools Display Modes
  #1  
Old 06-12-2003, 01:35 AM
used_pawn
Sarnak
 
Join Date: Apr 2003
Posts: 53
Default

OK.. got my groove on now..here is the 'final' version
complete with lockpick items suggested by zern and their skill mods
again, sorry about my original post, guess i shouldn't do that when im up past my bed time, hehe

(/zone/doors.h) new code at line 33
//used_pawn
int16 GetKeyItem() {return keyitem;}
int16 GetLockpick() {return lockpick;}
//

(/zone/client_process.cpp) line 4904

REPLACE this section:
if(!currentdoor->IsDoorOpen())
{
currentdoor->HandleClick(this);
md->action = 0x02;
}
else
{
currentdoor->HandleClick(this);
md->action = 0x03;
}

with this:
//used_pawn: Locked doors! Rogue friendly too =)
if((currentdoor->GetKeyItem()==0) || (currentdoor->GetKeyItem()==this->GetItemAt(0)))
{
//door not locked, or door is locked & client is using key
if(!currentdoor->IsDoorOpen())
{
currentdoor->HandleClick(this);
md->action = 0x02;
}
else
{
currentdoor->HandleClick(this);
md->action = 0x03;
}
}
else
{
//door is locked, client is NOT using key
if(this->GetSkill(35)>0) //no need to check for class, only bard/rogue will (should) have picklocks skill > 0, allows GM's to picklocks also
{
bool has_lockpicks=false;
float modskill=0.0f;

if(this->GetItemAt(0)==13010) //lockpicks
{
modskill=this->GetSkill(35); //no skill mod
has_lockpicks=true;
}
if ((this->GetItemAt(0)==16865)||(this->GetItemAt(12)==19702)) //mechanized lockpicks and gloves of the brood
{
modskill=0.3f*this->GetSkill(35)+this->GetSkill(35); //3% skill mod
has_lockpicks=true;
}
if(has_lockpicks)
{
if(rand()%100<2)this->SetSkill(35,this->GetSkill(35)+1); //1% chance skill increase
if((float)(rand()%currentdoor->GetLockpick())<=modskill)
{
if(!currentdoor->IsDoorOpen())
{
currentdoor->HandleClick(this);
md->action = 0x02;
}
else
{
currentdoor->HandleClick(this);
md->action = 0x03;
}
Message(4,"You picked the lock!");
}
else
{
Message(4,"Your skill is not high enough for this door.");
}
}
else
{
Message(4,"It's locked and you don't have the key!");
}
}
}
//end used_pawn
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 04:01 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