View Single Post
  #3  
Old 08-30-2008, 12:25 PM
Theeper
Discordant
 
Join Date: May 2004
Posts: 290
Default

Ya, the itemlink function for quests is broken. In fact it will crash the zone if a high itemID is used.

In the new method of linking, the first 6 bytes of that long number are the hex value of the itemID. I assume the last 8ish bytes are a hash or bitmask of something.

Here's a simple fix to link normal, unaugmented items.

Around line 887 in zone/questmgr.cpp change this ..
Code:
// MYRA - added itemlink(ID) command
	const Item_Struct* item = 0;
	int16 itemid = item_id;
	item = database.GetItem(itemid);
	initiator->Message(0, "%s tells you, '%c00%i %s%c",owner->GetName(),0x12, item->ID, item->Name, 0x12);

}
.. to this ..
Code:
// MYRA - added itemlink(ID) command
	const Item_Struct* item = 0;
	uint32 itemid = item_id;
	item = database.GetItem(itemid);
	initiator->Message(0, "%s tells you, %c%06X000000000000000000000000000000000000000%s%c",owner->GetCleanName(),0x12, item->ID, item->Name, 0x12);

}
Then you can use
Code:
quest::itemlink(1001);  // link Cloth Cap
Reply With Quote