Go Back   EQEmulator Home > EQEmulator Forums > Quests > Quests::Q&A

Quests::Q&A This is the quest support section

Reply
 
Thread Tools Display Modes
  #1  
Old 03-24-2015, 01:50 PM
Bandor
Hill Giant
 
Join Date: May 2014
Posts: 209
Default Couple Questions

Just got a couple quick questions having trouble finding info.

1) How can I make a npc give multiple items,a package deal if you will? I know I could just do summonitem multiple times but I was hoping to give them a bag of items,Could I create a spell and then have the npc selfcast the spell summoning a bag of items? What would be best way of doing this for say 2-3 bags of items.

2) How can I make it so players recieve an item in their alt currency or inventory every x amount of hours? I know it would go in my global_player but not sure asto what the code would look like.

3) And Lastly Editing books? Like recipe books. How in the world can I go about editing them can't seem to find any info on it at all.
__________________
Owner and Developer - Everquest: A New World
Reply With Quote
  #2  
Old 03-24-2015, 02:21 PM
Kingly_Krab
Administrator
 
Join Date: May 2013
Location: United States
Posts: 1,589
Default

1. Take a look at the Phantom Plate spell (summons a bag with items in it) and just have the client cast a custom version of that spell.

2. Use EVENT_CONNECT and EVENT_TIMER with an hourly timer:
Code:
sub EVENT_CONNECT {
    quest::settimer("Reward", 3600);
}

sub EVENT_TIMER {
    if ($timer eq "Reward") {
        quest::stoptimer("Reward");
        $client->AddAlternateCurrencyValue(CURRENCY ID, AMOUNT);
        $client->Message(315, "You have received AMOUNT CURRENCY for staying online for an hour!");
        quest::settimer("Reward", 3600);
    }
}
3. Books table in the database, then set the book information in the items table.
Reply With Quote
  #3  
Old 03-24-2015, 08:36 PM
Uleat's Avatar
Uleat
Developer
 
Join Date: Apr 2012
Location: North Carolina
Posts: 2,815
Default

I would **HIGHLY** recommend against giving items in bags at this time.

When a 'loaded' bag is placed on the visible cursor, a proper database save is performed and the bag and its contents remain intact.

If something occurs and the 'loaded' bag is pushed into a 'limbo' slot, there is no guarantee that the contents of the bag will be recoverable.
__________________
Uleat of Bertoxxulous

Compilin' Dirty
Reply With Quote
  #4  
Old 03-24-2015, 10:20 PM
Bandor
Hill Giant
 
Join Date: May 2014
Posts: 209
Default

Hmm. Might have to come up with a way of doing this differently. Really wanna be able to have a starting package type thing, just not sure how to go about it.
__________________
Owner and Developer - Everquest: A New World
Reply With Quote
  #5  
Old 03-24-2015, 10:42 PM
Kingly_Krab
Administrator
 
Join Date: May 2013
Location: United States
Posts: 1,589
Default

You could do it in starting_items if you want them to start with it.
Reply With Quote
  #6  
Old 03-24-2015, 10:57 PM
Bandor
Hill Giant
 
Join Date: May 2014
Posts: 209
Default

Was hoping to do it via quest. That would be a easy enough work around though, I take it /claim doesn't work?
__________________
Owner and Developer - Everquest: A New World
Reply With Quote
  #7  
Old 03-24-2015, 11:21 PM
Kingly_Krab
Administrator
 
Join Date: May 2013
Location: United States
Posts: 1,589
Default

Claim does work.
Reply With Quote
  #8  
Old 03-24-2015, 11:21 PM
Uleat's Avatar
Uleat
Developer
 
Join Date: Apr 2012
Location: North Carolina
Posts: 2,815
Default

If you ensure that nothing is on the cursor before 'summoning' a filled bag, you can probably get away with it.

It would limit the event to one bag with contents, which must go onto the cursor first, and then any 'loose' items afterwards.

You could always put in safety code to check that your bag ID is on the visible cursor, and empty, and then pile in the items
that you want in it.

If it's not visible, or empty, you could then just push the items to the cursor normally.


This is very doable..but, poses a risk of item loss if you're not 100% in-tune with what's going on behind the scenes.


EDIT: I reference the cursor explicitly because if room is not found in the 'regular' inventory, the returned available slot is always
SlotCursor.
__________________
Uleat of Bertoxxulous

Compilin' Dirty
Reply With Quote
  #9  
Old 03-26-2015, 09:39 AM
Bandor
Hill Giant
 
Join Date: May 2014
Posts: 209
Default

Would it just be safer to give multiple 'loose' items? And if so what would be considered the safe number? Figure im going to just let players purchase the items from the npc and have the npc just give 1 or 2 items. But am curious for future reference.

would the code for multiple rewards be structured like this:
Code:
quest::summonitem();
quest::summonitem();
__________________
Owner and Developer - Everquest: A New World
Reply With Quote
  #10  
Old 03-26-2015, 02:17 PM
Kingly_Krab
Administrator
 
Join Date: May 2013
Location: United States
Posts: 1,589
Default

Well you could have multiple calls or do a one-line for loop like this (if your items were 1001, 1003, 1005, etc):
Code:
sub EVENT_SAY {
    if ($text=~/Hail/) {
        quest::summonitem($_) for (1001, 1003, 1005);
    }
}
Reply With Quote
  #11  
Old 03-26-2015, 04:33 PM
Bandor
Hill Giant
 
Join Date: May 2014
Posts: 209
Default

Ok cool thank you guys
__________________
Owner and Developer - Everquest: A New World
Reply With Quote
  #12  
Old 03-26-2015, 04:47 PM
Kingly_Krab
Administrator
 
Join Date: May 2013
Location: United States
Posts: 1,589
Default

You're welcome.
Reply With Quote
  #13  
Old 03-26-2015, 09:07 PM
Uleat's Avatar
Uleat
Developer
 
Join Date: Apr 2012
Location: North Carolina
Posts: 2,815
Default

Technically, the Server 'should' allow 1000 items on the cursor.

Testing showed that it will only access up to around 102 items from the database.


Even with the lower limit, you should stick to no more than 37 items (1 visible, 36 in limbo) or you will cause serious desync issues.
And that doesn't mean adding 37 items to a cursor that already has items on it :P

All clients currently supported enforce this 1+36 limit (even RoF+ with it's differing format.)
__________________
Uleat of Bertoxxulous

Compilin' Dirty
Reply With Quote
  #14  
Old 03-27-2015, 09:38 AM
Bandor
Hill Giant
 
Join Date: May 2014
Posts: 209
Default

Awesome Uleat. I doubt I'll ever add more then 3-5 but that is very good to know,just what I was searching for. Tyvm
__________________
Owner and Developer - Everquest: A New World
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:29 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 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3