Creating item depending of job

04/29/2020 13:09 pipirucho#1
Hello everyone, I was just wondering if there is a way to create an item depending of the job they choose using the Quick Job Change system?

I want each job to get a weapon whenever they click on the new job change.

Thanks.
04/29/2020 13:18 sebariio#2
Set the job in base value and set his default inventory
04/29/2020 13:29 pipirucho#3
Quote:
Originally Posted by sebariio View Post
Set the job in base value and set his default inventory
Where exactly I can do that?
04/29/2020 20:18 Tweeney#4
Rework your SetLevelUpGift on event.lua

like this

Code:
SetLevelUpGift( 60, "all", "II_SYS_SYS_SCR_BX_PET_LAWOLF7", 1, 2, LEGEND_CLASS_NORMAL, JOB_KNIGHT )
04/30/2020 02:22 pipirucho#5
Quote:
Originally Posted by Tweeney View Post
Rework your SetLevelUpGift on event.lua

like this

Code:
SetLevelUpGift( 60, "all", "II_SYS_SYS_SCR_BX_PET_LAWOLF7", 1, 2, LEGEND_CLASS_NORMAL, JOB_KNIGHT )
I am going to try this, I didn't know you can set jobs inside the Event.lua. Thank you!
04/30/2020 09:18 Tweeney#6
you must need to rework your eventlua.cpp/h first. like puting the njobs on the function of SetLevelUpGift.

SetLevelUpGift( nLevel, strAccount, strItemId, nItemNum, byFlag, nJob ) //example
04/30/2020 12:09 Knusper02#7
Or go to Mover.cpp CMover::InitFastJobChange and do it like this:
Code:
if( nJob == JOB_MENTALIST_HERO || nJob == JOB_FORCEMASTER_HERO )
{
	CItemElem itemelem;
	itemelem.m_nItemNum = 1;
	itemelem.m_bCharged = TRUE;
	BYTE nID;

	if( nJob == JOB_MENTALIST_HERO )
		itemelem.m_dwItemId = II_WEA_BOOK_BOKROMAIN;
	if( nJob == JOB_FORCEMASTER_HERO )
		itemelem.m_dwItemId = II_ARM_ARM_SHI_ZEMBATO;
	( ( CUser*)this)->CreateItem( &itemelem, &nID );
}
05/01/2020 02:01 pipirucho#8
THANK YOU! It is really working.

Another question: What if I want to do it depending of the character sex? Some items for male and some others for female?
05/03/2020 17:12 xToffer#9
Quote:
Originally Posted by pipirucho View Post
THANK YOU! It is really working.

Another question: What if I want to do it depending of the character sex? Some items for male and some others for female?
Maybe change the nJob to nSex.