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.

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 06-11-2003, 06:47 PM
used_pawn
Sarnak
 
Join Date: Apr 2003
Posts: 53
Default Added code for locked doors, picking locks etc...

I dont know how to submit for CVS, so ill put it here (hope thats ok)
changes are to CVS code current as of june 11, 10pm CST

(/zone/doors.h) new code at line 33

//used_pawn
int16 GetKeyItem() {return keyitem;}
int16 GetLockpick() {return lockpick;}
//

(/zone/client_process.cpp) new code at line 4904

//used_pawn: Locked doors! Rogue friendly too =)
//TODO: add check for other lockpick items
if((currentdoor->GetKeyItem()==0) || (currentdoor->GetKeyItem()==this->GetItemAt(0)))
{
if(!currentdoor->IsDoorOpen())
{
currentdoor->HandleClick(this);
md->action = 0x02;
}
else
{
currentdoor->HandleClick(this);
md->action = 0x03;
}
}
else
{
if((this->GetItemAt(0)==13010)&&(this->GetSkill(35)>0))
{
if(rand()%100<2)this->SetSkill(35,this->GetSkill(35)+1);
if(rand()%currentdoor->GetLockpick()<=this->GetSkill(35))
{
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

(/zone/client_process.cpp) old code to be replaced at line 4904

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

sorry, my tabs didnt copy/paste =(
it works very well,has chance of success if skill to low on pick locks, has messages (close as i remember to eqlive) and skill increases for pick locks (chance for increase is 1% per attempt, may need adjusted)
not sure if i need to check if client is a rogue/bard (it ignores picking locks if skill = 0 )
i dont know if i need to check for maxskill on pick locks or not (i assumed the setskill() handles this, please let me know if i assumed wrong)
Also, i dont remember what all items can be used for picking locks so only the basic lockpicks are valid

EDIT: edited to reflect errors i had made in the post
Reply With Quote
 


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 12:51 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