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
  #1  
Old 11-12-2008, 04:04 PM
kayen85
Sarnak
 
Join Date: Dec 2007
Posts: 50
Default quest::creategroundobject() No charges

Using quest::creategroundobject() it will always spawn items with zero charges no matter what the item is set for in the dbase.

Is there anyway we can get something added to fix this?

Also does anyone have an example using sub EVENT_PICK_UP

I am having trouble getting it work as described.

ect where 4671 is the item that was spawned. Just doesn't work. I have this on the npc that spawns the item.
Code:
sub EVENT_PICK_UP {

  if ($picked_up_id == 4671) {
  
  quest::say("You have picked up food");
  
  }

}
Thanks.

Kayen
GM Stormhaven
Reply With Quote
  #2  
Old 11-12-2008, 04:27 PM
kayen85
Sarnak
 
Join Date: Dec 2007
Posts: 50
Default

Could it just be done like this

old
Code:
void QuestManager::CreateGroundObject(int32 itemid, float x, float y, float z, float heading, int32 decay_time)
{
	entity_list.CreateGroundObject(itemid, x, y, z, heading, decay_time);
}
new
Code:
void QuestManager::CreateGroundObject(int32 itemid, float x, float y, float z, float heading, int32 decay_time, uint8 charges)
{
	entity_list.CreateGroundObject(itemid, x, y, z, heading, decay_time, charges );
}
Reply With Quote
  #3  
Old 11-14-2008, 06:36 AM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

I confirmed that there definitely is an issue with this. Everything seems to work properly for ground spawns accept they can't have charges. I am not sure if that is an issue with creating the item, or if something happens when an item is put on the ground or when it is picked up that it removes charges automatically. I am thinking it might be set that way to remove a possible exploit to recharge items by dropping them and picking them back up (at least for tradeable items).

As for the EVENT_PICK_UP, I think that needs to be used in the player.pl only. I don't think NPCs can use that.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
  #4  
Old 11-14-2008, 07:43 AM
KLS
Administrator
 
Join Date: Sep 2006
Posts: 1,348
Default

Yeah it's player pl only, npcs have nothing to do with picking up items! When I was making it I didn't really take into account charges I thought that would get set correctly automatically, we can fix it.
Reply With Quote
  #5  
Old 11-14-2008, 02:34 PM
cavedude's Avatar
cavedude
The PEQ Dude
 
Join Date: Apr 2003
Location: -
Posts: 1,988
Default

That's partially my fault I'm sure. The sub EVENT obviously should be used with player.pl, but I put it under the normal section of the wiki. I'll fix that now as well.
Reply With Quote
  #6  
Old 11-23-2008, 03:25 AM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

Even using player.pl, I still can't get EVENT_PICK_UP to work. Here is my example player.pl file that I am using in overthere:

Code:
sub EVENT_PICK_UP {

  if ($picked_up_id == 4607) {
  quest::spawn2(2700766, 0, 0, 1925.4, 3147.5, -50, 192); 
  }

}
I pick up the item 4607 (a crate) and it is supposed to spawn a Cockatrice at the same location. But, I get nothing at all no matter how I write it.

I also confirmed that ground spawn still always have 0 charges on them if they are set to have a certain amount. They work properly if #summoned, but not if picked up from being a ground spawn.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
  #7  
Old 11-23-2008, 03:31 AM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

NOTE: - This is still a problem: I confirmed that ground spawn still always have 0 charges on them if they are set to have a certain amount. They work properly if #summoned, but not if picked up from being a ground spawn.

Nevermind on the player pick up issue though lol. I figured out the problem. Apparently, the sub is called:
Code:
sub EVENT_PLAYER_PICKUP
NOT:
Code:
sub EVENT_PICK_UP
I edited the Wiki to reflect this correction. Just took a little searching through the source to figure out the root cause lol. I am not sure where people got "EVENT_PICK_UP" from though.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!

Last edited by trevius; 11-23-2008 at 03:49 PM..
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 07:00 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