Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::Bug Reports

Development::Bug Reports Post detailed bug reports and what you would like to see next in the emu here.

Reply
 
Thread Tools Display Modes
  #16  
Old 09-20-2005, 06:08 AM
Dakaar
Sarnak
 
Join Date: Apr 2003
Posts: 53
Default

I think i remember seeing something in the code specifically about that where it is a seperate case, buuut i cant recall right now.


Actually while my fix worked, it apparently wasnt the root of the problem, FNW put up a new fix on CVS after I told him about what I did, im testing this out now as well
Reply With Quote
  #17  
Old 09-20-2005, 08:00 AM
Dakaar
Sarnak
 
Join Date: Apr 2003
Posts: 53
Default

Okay, FNW posted a CVS change based on what was going on, and it was right, sorta =P


grab the new cvs, fix the updateclientstruct so you can actually move around, then in attack.cpp, do this:


in client::death , after addCorpse like shown

entity_list.AddCorpse(new_corpse, GetID());

+ //become a corpse
+ EQZonePacket app(OP_BecomeCorpse, sizeof(BecomeCorpse_Struct));
+ BecomeCorpse_Struct* d = (BecomeCorpse_Struct*)app.pBuffer;
+ d->spawn_id = GetID();
+ d->x = GetX();
+ d->y = GetY();
+ d->z = GetZ();
+ entity_list.QueueClients(this, &app, true);

+ this->SetID(0);


Remove the //become a corpse through entity_list.Queueclients() from the top of the file and bring it down. You will need to change the name of the app and d variables on the second packet sent in client::death, because someone forgot to name them seperately =P

Thats it! enjoy
Reply With Quote
  #18  
Old 09-20-2005, 09:00 AM
Magoth78
Discordant
 
Join Date: Jun 2003
Posts: 345
Default

Many thanks
__________________
User's projects:
-- Original EMPIRE I/II and Factions! servers
-- Web GM Portal
-- EQoffline/bots
Reply With Quote
  #19  
Old 09-20-2005, 11:13 AM
Dakaar
Sarnak
 
Join Date: Apr 2003
Posts: 53
Default

Quote:
Originally Posted by Magoth78
Many thanks
Yup

....gonna work on bards next *shudder* =P
Reply With Quote
  #20  
Old 09-20-2005, 10:52 PM
Magoth78
Discordant
 
Join Date: Jun 2003
Posts: 345
Default

too bad for me EQZonePacket is not declared in 6.0dr2
I'm gonna declare it and see how it does work.

Mag

----
Edit: Btw, just found a way to not get the "Pain and suffering" bug death. IN attack.cpp, you just have to add a case where if(other == NULL), you add a corpse.
__________________
User's projects:
-- Original EMPIRE I/II and Factions! servers
-- Web GM Portal
-- EQoffline/bots

Last edited by Magoth78; 09-21-2005 at 06:59 AM..
Reply With Quote
  #21  
Old 09-20-2005, 11:37 PM
Magoth78
Discordant
 
Join Date: Jun 2003
Posts: 345
Default

Ok, here's the fix for versions 0.6.0dr2 and mebbe dr3:

In attack.cpp, after
Code:
entity_list.AddCorpse(new_corpse, this->GetID());
add:
Code:
APPLAYER app;
  CreateSpawnPacket(&app, new_corpse);
  Corpse* dcorpse = entity_list.GetCorpseByID(GetID());
  if(dcorpse->IsPlayerCorpse())
  entity_list.QueueClients(this, &app, true);
  entity_list.RemoveFromTargets(this);
  safe_delete(trade);
  this->SetID(0);
I've tested it, it seems to work well.
Thanks again Dakaar and FNW for the direction.

Mag
__________________
User's projects:
-- Original EMPIRE I/II and Factions! servers
-- Web GM Portal
-- EQoffline/bots
Reply With Quote
  #22  
Old 09-21-2005, 06:50 AM
Dakaar
Sarnak
 
Join Date: Apr 2003
Posts: 53
Default

Can anyone help me figure out how I would have some sort of inter-zone corpse retrieval? Basically id like to after say two minutes, retrieve the corpse from the other zone to prevent corpse camping
Reply With Quote
  #23  
Old 09-22-2005, 07:00 AM
Magoth78
Discordant
 
Join Date: Jun 2003
Posts: 345
Default

I've done a thing like that on Empire. But it's not coded.

I've just added a php script on my server's website that move the corpse to a zone that I've called The Sanctuary (it must be a dynamic zone). Once the corpse is moved, the character can zone in (that will bootup the zone so the corpse will appear) and can loot it, then he will leave the zone.

Ghetto way but it's working

Mag
ps: if you want the script, just ask.
__________________
User's projects:
-- Original EMPIRE I/II and Factions! servers
-- Web GM Portal
-- EQoffline/bots
Reply With Quote
  #24  
Old 09-22-2005, 05:14 PM
Dakaar
Sarnak
 
Join Date: Apr 2003
Posts: 53
Default

Yeah I do, toss me a message next time you see me (yablargo) in #support. Lord knows ill be there for a while with all my linux issues =P
Reply With Quote
  #25  
Old 09-22-2005, 09:28 PM
Magoth78
Discordant
 
Join Date: Jun 2003
Posts: 345
Default

Code:
<?php

$host = 'dbhost';
$dbuser = 'dbuser';
$dbpass = 'dbpass';
$db = 'dbname';

$link = mysql_connect($host, $dbuser, $dbpass)
   OR die(mysql_error());

if (!mysql_select_db($db, $link))
	{
    	echo 'Unable to connect to the database.';
	echo mysql_errno($link) . ": " . mysql_error($link). "\n";
    	exit;
	}


$charname = $_POST['charname'];
$accountname = $_POST['accountname'];


$query3 = mysql_query("SELECT account_id FROM character_ WHERE name='$charname';");
	if (!$query3) {
   	die('Could not query:' . mysql_error());
	}
	$find_accountid = mysql_result($query3, 0);
	

$query3a = mysql_query("SELECT id FROM account WHERE name='$accountname';");
	if (!$query3a) {
   	die('Could not query:' . mysql_error());
	}
	$verifyaccount_id = mysql_result($query3a, 0);
	


		if($find_accountid != $verifyaccount_id)
		{
		echo ("Account name matched with this char ...  <b> Failed! </b> \r\n <br> <b> Verify your Character's name and your's Account's name!"); 
		mysql_close($link);
		exit;
		}
		

		if($find_accountid = $verifyaccount_id)
		{
			echo ("Account name matched with this char ...  <b> Ok! </b> \r\n <br>");
			$corpsemove = mysql_query("UPDATE player_corpses  SET zoneid='your_zone_id', x='0', y='0', z='0', rezzed='1'  WHERE charname='$charname';");
			if (!$corpsemove) {
   			die('Could not query:' . mysql_error());
			echo ("Error moving the corpses... \r\n");
			}
			echo "Corpse(s) moved to the sanctuary. \r\n";
			mysql_close($link);
		}

?>
Here's the script. You can change the zone where you want to move the corpse, change the locations, the rezz status etc...

You have to make a html page with a form and 2 entries: charname and accountname so it verifies if the entries match before sending the corpse.

Mag
__________________
User's projects:
-- Original EMPIRE I/II and Factions! servers
-- Web GM Portal
-- EQoffline/bots
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 01:40 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 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3