PDA

View Full Version : quest::giveitem ?


Dave987
04-10-2004, 02:21 PM
'lo all

Just wondering if theres any plans for a kind of quest::giveitem(itemid) command, or if its possible to implement one somehow?

On the server I play on, I'm Lead Quest Developer. On our server, we dont allow the players to summon NO DROP items. Recently, I write afew turn in's for Elemental + Ornate armour.
Just for one tiny item hand in bit, it looks something like this:


sub EVENT_ITEM
{
#ornate
if($item1 == 16299){quest::summonitem(9628);} #helm

It's basically if the players hand in the mold, then they get the armour.
However, quest::summonitem() treats it as if the player summons the item... and of course, the reward is no drop, so they get the error "You are not a GM to summon this item".
Damn.

After doing this for 15 classes, for 14 pieces of armour each ... :evil:

So I was wondering, can anyone see a way round this? A kind of quest::giveitem() would be so handy...
Thank you everyone.

animepimp
04-10-2004, 03:11 PM
The only way I can think of to do this without making code changes is to create a mob that doesn't actually spawn on its own and always drops the armor piece you want to give them and then when they complete the quest for it the quest mob spawns this mob and the player can kill and loot it normally. Takes a bit more work, but I have no idea how much more work the code changes you want would be either.

Dave987
04-10-2004, 11:39 PM
Aye I thought of that also, spose thats the way it'll have be done
Thanks anyway - was just checking that there isn't another way...

Ty

Dave987
04-12-2004, 01:13 PM
Ok , I'm no code guru , but after a longer and more thorough search, this has popped up on another post::

client.h:
void SummonItem(uint16 item_id, int8 charges = 0, bool gm_overide = false)


client.cpp:
void Client::SummonItem(uint16 item_id, int8 charges, bool gm_overide)
....
// Checking to see if it is a GM only Item or not.
if ((item->IsGM() && this->Admin() < 100) && !gm_overide)
foundgm = 1;

parser.cpp:
mob->CastToClient()->SummonItem(atoi(arglist[0]),0,true);

Anyone know if that would work ? I know nothing about C++ , and don't have a compiler, so I'd like to know if it would work before taking it any further.

Thanks to bigpull! :)