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
  #3  
Old 06-11-2003, 07:14 PM
Zern
Sarnak
 
Join Date: Nov 2002
Posts: 35
Default

Quote:
Originally Posted by Trumpcard
Post diffs if you can..

line33 in zone.h is around the zonepoint struct, im assuming you want these functions to be in the public section of the zone class...

And in client process, i cant tell if you replaced exisitng funcitons, or completely new..

Please post the changed .cpp files, or diffs, or EXACT instructions. I'll merge in what I see in COMMENTS.


Also, whats

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

You dont define keyitem or lockpick anywhere, so until those are defined, those are unknown variables....

...keyitem and lockpick are variables in the doors header file.

(I think he ment doors.h instead of zone.h --- but maybe I am wrong)


*********************************************
EDIT
*********************************************

Please note give all credit to used_pawn for the initial code - I'm just bored right now and thought I'd add some to the code provided.



The following code takes his code where it checks for if the client is holding the key for the door/object on the cursor and checks if the skill of the client is greater than zero ... also the end of his code (your sniplet used_pawn ) opens the door anyways ... which should be enclosed inside a pair of {}'s where it checks for a successful lock pick or if the client actually has the key ... but here is the code ...


else if( this->GetClass() == 8 || this->GetClass() == 9 ) //: Check if the class is a bard or a rogue
{

int16 Cursor_Item = this->GetItemAt(0);
int16 Gloves_Item = this->GetItemAt(12); // Glove/hand slot
bool Has_LockPicks = false;
float Skill_Mod = 0.0f;
float Final_PickSkill = 0.0f;


if(Cursor_Item == 13010) // Normal Lockpicks - no skill mod
Has_LockPicks = true;
else if(Cursor_Item == 16865 ) // Mechanical(spelt Mechanized in the db) lockpicks ...3% skill mod
{

Skill_Mod = 0.03f;
Has_LockPicks = true;

}

if( Gloves_Item == 19702 ) // Gloves of the brood - 3% skill mod
Skill_Mod = 0.03f;



if( Has_LockPicks == true )
{

Final_PickSkill = Skill_Mod * (GetSkill(35));
if( Final_PickSkill > currentdoor->LockPick() )
{

this->Message(4, "You have successfully picked the pick!");


if(!currentdoor->IsDoorOpen())
{

currentdoor->HandleClick(this);
md->action = 0x02;

}
else
{

currentdoor->HandleClick(this);
md->action = 0x03;

}


int8 action = md->action;
entity_list.QueueClients(this,outapp,false);
delete outapp;


if(currentdoor->GetTriggerDoorID() != 0)
{

Doors* triggerdoor = entity_list.FindDoor(currentdoor->GetTriggerDoorID());

if(triggerdoor)
{

if(!triggerdoor->IsDoorOpen())
{

triggerdoor->HandleClick(this);
action = 0x02;

}
else
{

triggerdoor->HandleClick(this);
action = 0x03;

}


outapp = new APPLAYER(OP_MoveDoor, sizeof(MoveDoor_Struct));
MoveDoor_Struct* md=(MoveDoor_Struct*)outapp->pBuffer;
md->doorid = triggerdoor->GetDoorID();
md->action = action;
entity_list.QueueClients(this,outapp,false);
delete outapp;

}
}
}


// Chance to increase the skill if it is not maxxed
if( this->GetSkill(35) < this->MaxSkill(35) )
{

sint16 Chance = 1; // 1% chance to increase the skill (not sure if this is right..)

if (rand()%100 == Chance)
SetSkill(skillid,GetSkill(35)+1);


}
}
}
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 10:42 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