help with code
im trying to get corpse summoning to work so im messing with SummonBurriedPlayerCorpse quest command i changed it to not read if there IsBurried (not changed here) but anyways it works great but the bodys are still there if the zone never reloads.. so if players are in the zone or whatever all the bodys you summoned get summoned to the npc running this command plus stay in the zone where you died meaning you can dupe items. is there a way to remove the body's from the zone there in before making the new body.
i know you can get the zone the old body was in by getting the zone id from the database. i just don't know how to remove it. this is the code to summon them playercorpse.cpp Code:
Corpse* ZoneDatabase::SummonBurriedPlayerCorpse(int32 char_id, int32 dest_zoneid, float dest_x, float dest_y, float dest_z, float dest_heading) { |
can this not be done? i have been looking at this code all day and i cant think of a way to do it.. there has got to be somethign a timer that checks a global or something? there has got to be a way to depop all the corpses in the game that belong to the player this command is used on. please any help is better then im doing on my own.
|
Sorry, Spider, I would probably try to help, but I am buried up to my neck in stuff to do already. I am sure most of the other devs are as well right now, or they may just not have time to help with this issue. If it was something simple that I was already familiar with, I could probably give some pointers at least, but I don't really know anything about what you are needing and it would take a bit of research for me to even know where to start.
Basically, I am just saying that if you don't get much assistance on this issue, try not to get too upset about it :) Hopefully someone will see it and know what needs to be done. Most times, I find that if I need help with code, it is hard to get it unless it is something that another coder is interested in. I have alot of code that I have spent quite a bit of time on only to put them aside because I couldn't get it working on my own. Since this code probably isn't something that someone else is currently already wanting to work on, it is probably unlikely that anyone else will. I am not trying to be negative in any way, just trying to let you know why it may be hard to get help with this. Sorry, I couldn't be of any real assistance this time. BTW, I am sure what you are trying to do can be done. It is just a matter of how to actually do it. Maybe the code in this post can be of some use to you: http://www.eqemulator.net/forums/showthread.php?t=26610 |
i would be surprised if no one was working on this already im actually surprised its not working already to tell you the truth what im doing s trying to get corpse summoners to work. just going about it thought the summon SummonBurriedPlayerCorpse command just though i would be easier i actually have it all working sept the fact the the body stays in zones that are not reloaded.. say you die in guild lobby then summon your corpse the code makes a new corpse but then it leaves the old one also.. i need o remove the old one so players cant dupe gear then this will be all working.. i wish it worked already but well as we all know it don't.
|
They won't be able to dupe gear. It's two physical bodies, but still only one corpse in the database. As each item/coin is looted, the database is updated meaning it will be updated on each physical body.
However, take a look at the code that depops the corpse entity when its timer expires. You can probably use that to do what you need to. |
cavedude im not understanding what your saying i see the bodys i loot them the loot is on both of them so i dont get y you say it will not dupe the gear grated its not a dupe but its still 2 sets of the same gear.
as for the depop code it works on a timer tied to the corpse so im no sure how that would help with removing the corpse from a diff zone when i cant find the corpse its self. if you could give a small example even if its jsut bull that gives me an idea of what your saying maybe i can work off that but other then that im lost on how it would work? |
ok i got this mostly working but having some probs with body's still laying around that peeps can loot and get the gear off of.. so scene you guys are so busy with other things understandable i figure ill post what i got working and see if someone can find the prob or a fix with what i got.. in all my testing on a server by my self this works perfectly but when i put it on the server with everyone else i breaks so her goes..
client_packet.cpp Code:
void Client::Handle_OP_LootRequest(const EQApplicationPacket *app) Code:
so basically what this does is summons a corpse using the SummonBurriedPlayerCorpse quest command.. then it changes the corpse id and then changes the record in the database to the new id hen when you try to loot or rezz a corpse it looks in the database for that corpse id if its there lets you continue if its not there stops and fads the corpse. something is breaking after you summon the body the id changes the new corpse is lootable.. but sometimes (not all the time) when you go back to a zone where your old body was if the corpse is there it lets you loot it again and get all your gear and money all over again.. that's not supposed to happen it should be invalid at that time and not let you loot it. |
All times are GMT -4. The time now is 04:54 AM. |
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.