Register for your free account! | Forgot your password?

You last visited: Today at 21:07

  • Please register to post and access all features, it's quick, easy and FREE!


Scroll Of Fixed Awake Question

Reply
 
Old 08/09/2016, 09:36   #16
 
elite*gold: 0
Join Date: Mar 2008
Posts: 650
Received Thanks: 207
If the message is shown, it won't remove your scroll.



alfredico is offline  
Thanks
1 User
Old 08/09/2016, 14:40   #17
 
elite*gold: 0
Join Date: Jan 2010
Posts: 120
Received Thanks: 7
Quote:
Originally Posted by Avalion View Post
The else I showed is another else before the other end brace and the other else. You were checking the item kind type of the target but if you're using a scroll not for the item type and it is a valid item type, it would completely skip the last else -- in other words, waste a scroll when using it on the wrong item.

example: Lets say id = II_NIGGA and item kind of target = weapon
Code:
	if (Itemkind1 == weapon)
	{
		if (id == II_BS_SCROLL) somebs();
		else if(id == IIBSSCROLL2) somebs2();
		else{ return false; } //scroll not in check
	}
	else{ return false; }

Anyway, here.
Code:
//rather than sending CItemElem, we can send a const reference of the item id
bool CDPSrvr::DoUseItemTarget_WezzyFixAwakeningScroll(CUser* pUser, const unsigned long& matId, CItemElem* pTarget) 
{
	if (g_xRandomOptionProperty->GetRandomOptionKind(pTarget) >= 0)
	{
		//declare itemprop variable so we dont have to continue calling it
		ItemProp *iProp = pTarget->GetProp();
		if (iProp == NULL){ return false; }

		//lets store some variables here that we can use.
		unsigned char dst = 0; short adj = 0;

		//check type to narrow switch of scrolls. also lets lower these numbers cause high numbers is shit balance faggot.
		if (iProp->dwItemKind1 == IK1_WEAPON || iProp->dwItemKind2 == IK2_ARMORETC || iProp->dwItemKind2 == IK2_ARMOR || iProp->dwItemKind3 == IK3_SHIELD)
		{
			switch (matId)
			{
				//set variables to non 0 values if scroll is right.
				case II_SYS_N_AWAKEFIX_STR: dst = DST_STR; adj = 18;  break;
				case II_SYS_N_AWAKEFIX_STA: dst = DST_STA; adj = 18;  break;
				case II_SYS_N_AWAKEFIX_DEX: dst = DST_DEX; adj = 18;  break;
				case II_SYS_N_AWAKEFIX_INT: dst = DST_INT; adj = 18; break;
				case II_SYS_N_AWAKEFIX_ADOCH: dst = DST_CRITICAL_BONUS; adj = 12; break;
				case II_SYS_N_AWAKEFIX_SPEED: dst = DST_SPEED; adj = 9; break;
				case II_SYS_N_AWAKEFIX_INCATK: dst = DST_ATKPOWER_RATE; adj = 5; break;
				case II_SYS_N_AWAKEFIX_INCMP: dst = DST_MP_MAX_RATE; adj = 5; break;
				case II_SYS_N_AWAKEFIX_INCHP: dst = DST_HP_MAX_RATE; adj = 6; break;
				case II_SYS_N_AWAKEFIX_INCDEF: dst = DST_ADJDEF_RATE; adj = 5; break;
				default: break;
			}
		}
		else if (iProp->dwItemKind2 == IK2_JEWELRY)
		{
			switch (matId)
			{
				case II_SYS_J_AWAKEFIX_STR: dst = DST_STR; adj = 10; break;
				case II_SYS_J_AWAKEFIX_STA: dst = DST_STA; adj = 10; break;
				case II_SYS_J_AWAKEFIX_DEX: dst = DST_DEX; adj = 10; break;
				case II_SYS_J_AWAKEFIX_INT: dst = DST_INT; adj = 10; break;
				case II_SYS_J_AWAKEFIX_ADOCH: dst = DST_CRITICAL_BONUS; adj = 5; break;
				case II_SYS_J_AWAKEFIX_SPEED: dst = DST_SPEED; adj = 9; break;
				case II_SYS_J_AWAKEFIX_INCATK: dst = DST_ATKPOWER_RATE; adj = 5; break;
				case II_SYS_J_AWAKEFIX_INCMP: dst = DST_MP_MAX_RATE; adj = 5; break;
				case II_SYS_J_AWAKEFIX_INCHP: dst = DST_HP_MAX_RATE; adj = 6; break;
				case II_SYS_J_AWAKEFIX_INCDEF: dst = DST_ADJDEF_RATE; adj = 5; break;
				default: break;
			}
		}
		else if (iProp->dwItemKind2 == IK2_CLOTH || iProp->dwItemKind2 == IK2_CLOTHETC)
		{
			switch (matId)
			{
				case II_SYS_F_AWAKEFIX_STR: dst = DST_STR; adj = 10; break;
				case II_SYS_F_AWAKEFIX_STA: dst = DST_STA; adj = 10; break;
				case II_SYS_F_AWAKEFIX_DEX: dst = DST_DEX; adj = 10; break;
				case II_SYS_F_AWAKEFIX_INT: dst = DST_INT; adj = 10; break;
				case II_SYS_F_AWAKEFIX_ADOCH: dst = DST_CRITICAL_BONUS; adj = 5; break;
				case II_SYS_F_AWAKEFIX_SPEED: dst = DST_SPEED; adj = 9; break;
				case II_SYS_F_AWAKEFIX_INCATK: dst = DST_ATKPOWER_RATE; adj = 5; break;
				case II_SYS_F_AWAKEFIX_INCMP: dst = DST_MP_MAX_RATE; adj = 5; break;
				case II_SYS_F_AWAKEFIX_INCHP: dst = DST_HP_MAX_RATE; adj = 6; break;
				case II_SYS_F_AWAKEFIX_INCDEF: dst = DST_ADJDEF_RATE; adj = 5; break;
				default: break;
			}
		}
		else if (iProp->dwItemKind3 == IK3_EGG)
		{
			switch (matId)
			{
				case II_SYS_P_AWAKEFIX_STR: dst = DST_STR; adj = 10; break;
				case II_SYS_P_AWAKEFIX_STA: dst = DST_STA; adj = 10; break;
				case II_SYS_P_AWAKEFIX_DEX: dst = DST_DEX; adj = 10; break;
				case II_SYS_P_AWAKEFIX_INT: dst = DST_INT; adj = 10; break;
				case II_SYS_P_AWAKEFIX_ADOCH: dst = DST_CRITICAL_BONUS; adj = 5; break;
				case II_SYS_P_AWAKEFIX_SPEED: dst = DST_SPEED; adj = 9; break;
				case II_SYS_P_AWAKEFIX_INCATK: dst = DST_ATKPOWER_RATE; adj = 5; break;
				case II_SYS_P_AWAKEFIX_INCMP: dst = DST_MP_MAX_RATE; adj = 5; break;
				case II_SYS_P_AWAKEFIX_INCHP: dst = DST_HP_MAX_RATE; adj = 6; break;
				case II_SYS_P_AWAKEFIX_INCDEF: dst = DST_ADJDEF_RATE; adj = 5; break;
				default: break;
			}
		}
		else if (iProp->dwItemKind3 == IK3_PET)
		{
			switch (matId)
			{
				case II_SYS_V_AWAKEFIX_STR: dst = DST_STR; adj = 10; break;
				case II_SYS_V_AWAKEFIX_STA: dst = DST_STA; adj = 10; break;
				case II_SYS_V_AWAKEFIX_DEX: dst = DST_DEX; adj = 10; break;
				case II_SYS_V_AWAKEFIX_INT: dst = DST_INT; adj = 10; break;
				case II_SYS_V_AWAKEFIX_ADOCH: dst = DST_CRITICAL_BONUS; adj = 5; break;
				case II_SYS_V_AWAKEFIX_SPEED: dst = DST_SPEED; adj = 9; break;
				case II_SYS_V_AWAKEFIX_INCATK: dst = DST_ATKPOWER_RATE; adj = 5; break;
				case II_SYS_V_AWAKEFIX_INCMP: dst = DST_MP_MAX_RATE; adj = 5; break;
				case II_SYS_V_AWAKEFIX_INCHP: dst = DST_HP_MAX_RATE; adj = 6; break;
				case II_SYS_V_AWAKEFIX_INCDEF: dst = DST_ADJDEF_RATE; adj = 5; break;
				default: break;
			}
		}
		//now we check if the item is wrong by checking if dst is false
		if (!dst)
		{
			pUser->AddText("Incorrect item material or scroll.");
			return false;
		}

		//If it hasn't returned false, we can update the awakes and then return true to remove scroll
		g_xRandomOptionProperty->InitializeRandomOption(pTarget->GetRandomOptItemIdPtr());
		for (int i = 0; i < 3; ++i){ g_xRandomOptionProperty->SetParam(pTarget->GetRandomOptItemIdPtr(), dst, adj); }
		pUser->UpdateItemEx((BYTE)(pTarget->m_dwObjId), UI_RANDOMOPTITEMID, pTarget->GetRandomOptItemId());
		return true;
	}
	return false;
}
Code:
			case II_SYS_N_AWAKEFIX_STR:
			case II_SYS_N_AWAKEFIX_STA:
			case II_SYS_N_AWAKEFIX_DEX:
			case II_SYS_N_AWAKEFIX_INT:
			case II_SYS_N_AWAKEFIX_ADOCH:
			case II_SYS_N_AWAKEFIX_SPEED:
			case II_SYS_N_AWAKEFIX_INCATK:
			case II_SYS_N_AWAKEFIX_INCMP:
			case II_SYS_N_AWAKEFIX_INCHP:
			case II_SYS_N_AWAKEFIX_INCDEF:
			case II_SYS_J_AWAKEFIX_STR:
			case II_SYS_J_AWAKEFIX_STA:
			case II_SYS_J_AWAKEFIX_DEX:
			case II_SYS_J_AWAKEFIX_INT:
			case II_SYS_J_AWAKEFIX_ADOCH:
			case II_SYS_J_AWAKEFIX_INCATK:
			case II_SYS_J_AWAKEFIX_INCMP:
			case II_SYS_J_AWAKEFIX_INCHP:
			case II_SYS_J_AWAKEFIX_INCDEF:
			case II_SYS_F_AWAKEFIX_STR:
			case II_SYS_F_AWAKEFIX_STA:
			case II_SYS_F_AWAKEFIX_DEX:
			case II_SYS_F_AWAKEFIX_INT:
			case II_SYS_F_AWAKEFIX_ADOCH:
			case II_SYS_F_AWAKEFIX_SPEED:
			case II_SYS_F_AWAKEFIX_INCATK:
			case II_SYS_F_AWAKEFIX_INCMP:
			case II_SYS_F_AWAKEFIX_INCHP:
			case II_SYS_F_AWAKEFIX_INCDEF:
			case II_SYS_P_AWAKEFIX_STR:
			case II_SYS_P_AWAKEFIX_STA:
			case II_SYS_P_AWAKEFIX_DEX:
			case II_SYS_P_AWAKEFIX_INT:
			case II_SYS_P_AWAKEFIX_ADOCH:
			case II_SYS_P_AWAKEFIX_SPEED:
			case II_SYS_P_AWAKEFIX_INCATK:
			case II_SYS_P_AWAKEFIX_INCMP:
			case II_SYS_P_AWAKEFIX_INCHP:
			case II_SYS_P_AWAKEFIX_INCDEF:
			case II_SYS_V_AWAKEFIX_STR:
			case II_SYS_V_AWAKEFIX_STA:
			case II_SYS_V_AWAKEFIX_DEX:
			case II_SYS_V_AWAKEFIX_INT:
			case II_SYS_V_AWAKEFIX_ADOCH:
			case II_SYS_V_AWAKEFIX_SPEED:
			case II_SYS_V_AWAKEFIX_INCATK:
			case II_SYS_V_AWAKEFIX_INCMP:
			case II_SYS_V_AWAKEFIX_INCHP:
			case II_SYS_V_AWAKEFIX_INCDEF:
				b = DoUseItemTarget_WezzyFixAwakeningScroll(pUser, pMaterial->m_dwItemId, pTarget); //send material id instead
				break;

edit:
Also, you do not need that amount of scrolls. If you want them to have different effects based on item type, you could do something like so:
Code:
		
		int type = 0;
		if (iProp->dwItemKind1 == IK1_WEAPON || iProp->dwItemKind2 == IK2_ARMORETC || iProp->dwItemKind2 == IK2_ARMOR || iProp->dwItemKind3 == IK3_SHIELD)
			type = 1;
		else if (iProp->dwItemKind2 == IK2_JEWELRY)
			type = 2;

		if (type)
		{
			switch (matId)
			{
				case II_SYS_N_AWAKEFIX_STR:
				dst = DST_STR; 
				if (type == 1) adj = 20; 
				else if (type == 2) adj = 5;
				break;
Hi, thank you so much for putting effort in doing this. Your code is very well efficient and lesser. Thank you so much for explaining it in more detail


pakinglalat is offline  
Old 08/09/2016, 23:13   #18
 
elite*gold: 0
Join Date: Mar 2016
Posts: 9
Received Thanks: 0
Smile HELP ME

Quote:
Originally Posted by Avalion View Post
The else I showed is another else before the other end brace and the other else. You were checking the item kind type of the target but if you're using a scroll not for the item type and it is a valid item type, it would completely skip the last else -- in other words, waste a scroll when using it on the wrong item.

example: Lets say id = II_NIGGA and item kind of target = weapon
Code:
	if (Itemkind1 == weapon)
	{
		if (id == II_BS_SCROLL) somebs();
		else if(id == IIBSSCROLL2) somebs2();
		else{ return false; } //scroll not in check
	}
	else{ return false; }

Anyway, here.
Code:
//rather than sending CItemElem, we can send a const reference of the item id
bool CDPSrvr::DoUseItemTarget_WezzyFixAwakeningScroll(CUser* pUser, const unsigned long& matId, CItemElem* pTarget) 
{
	if (g_xRandomOptionProperty->GetRandomOptionKind(pTarget) >= 0)
	{
		//declare itemprop variable so we dont have to continue calling it
		ItemProp *iProp = pTarget->GetProp();
		if (iProp == NULL){ return false; }

		//lets store some variables here that we can use.
		unsigned char dst = 0; short adj = 0;

		//check type to narrow switch of scrolls. also lets lower these numbers cause high numbers is shit balance faggot.
		if (iProp->dwItemKind1 == IK1_WEAPON || iProp->dwItemKind2 == IK2_ARMORETC || iProp->dwItemKind2 == IK2_ARMOR || iProp->dwItemKind3 == IK3_SHIELD)
		{
			switch (matId)
			{
				//set variables to non 0 values if scroll is right.
				case II_SYS_N_AWAKEFIX_STR: dst = DST_STR; adj = 18;  break;
				case II_SYS_N_AWAKEFIX_STA: dst = DST_STA; adj = 18;  break;
				case II_SYS_N_AWAKEFIX_DEX: dst = DST_DEX; adj = 18;  break;
				case II_SYS_N_AWAKEFIX_INT: dst = DST_INT; adj = 18; break;
				case II_SYS_N_AWAKEFIX_ADOCH: dst = DST_CRITICAL_BONUS; adj = 12; break;
				case II_SYS_N_AWAKEFIX_SPEED: dst = DST_SPEED; adj = 9; break;
				case II_SYS_N_AWAKEFIX_INCATK: dst = DST_ATKPOWER_RATE; adj = 5; break;
				case II_SYS_N_AWAKEFIX_INCMP: dst = DST_MP_MAX_RATE; adj = 5; break;
				case II_SYS_N_AWAKEFIX_INCHP: dst = DST_HP_MAX_RATE; adj = 6; break;
				case II_SYS_N_AWAKEFIX_INCDEF: dst = DST_ADJDEF_RATE; adj = 5; break;
				default: break;
			}
		}
		else if (iProp->dwItemKind2 == IK2_JEWELRY)
		{
			switch (matId)
			{
				case II_SYS_J_AWAKEFIX_STR: dst = DST_STR; adj = 10; break;
				case II_SYS_J_AWAKEFIX_STA: dst = DST_STA; adj = 10; break;
				case II_SYS_J_AWAKEFIX_DEX: dst = DST_DEX; adj = 10; break;
				case II_SYS_J_AWAKEFIX_INT: dst = DST_INT; adj = 10; break;
				case II_SYS_J_AWAKEFIX_ADOCH: dst = DST_CRITICAL_BONUS; adj = 5; break;
				case II_SYS_J_AWAKEFIX_SPEED: dst = DST_SPEED; adj = 9; break;
				case II_SYS_J_AWAKEFIX_INCATK: dst = DST_ATKPOWER_RATE; adj = 5; break;
				case II_SYS_J_AWAKEFIX_INCMP: dst = DST_MP_MAX_RATE; adj = 5; break;
				case II_SYS_J_AWAKEFIX_INCHP: dst = DST_HP_MAX_RATE; adj = 6; break;
				case II_SYS_J_AWAKEFIX_INCDEF: dst = DST_ADJDEF_RATE; adj = 5; break;
				default: break;
			}
		}
		else if (iProp->dwItemKind2 == IK2_CLOTH || iProp->dwItemKind2 == IK2_CLOTHETC)
		{
			switch (matId)
			{
				case II_SYS_F_AWAKEFIX_STR: dst = DST_STR; adj = 10; break;
				case II_SYS_F_AWAKEFIX_STA: dst = DST_STA; adj = 10; break;
				case II_SYS_F_AWAKEFIX_DEX: dst = DST_DEX; adj = 10; break;
				case II_SYS_F_AWAKEFIX_INT: dst = DST_INT; adj = 10; break;
				case II_SYS_F_AWAKEFIX_ADOCH: dst = DST_CRITICAL_BONUS; adj = 5; break;
				case II_SYS_F_AWAKEFIX_SPEED: dst = DST_SPEED; adj = 9; break;
				case II_SYS_F_AWAKEFIX_INCATK: dst = DST_ATKPOWER_RATE; adj = 5; break;
				case II_SYS_F_AWAKEFIX_INCMP: dst = DST_MP_MAX_RATE; adj = 5; break;
				case II_SYS_F_AWAKEFIX_INCHP: dst = DST_HP_MAX_RATE; adj = 6; break;
				case II_SYS_F_AWAKEFIX_INCDEF: dst = DST_ADJDEF_RATE; adj = 5; break;
				default: break;
			}
		}
		else if (iProp->dwItemKind3 == IK3_EGG)
		{
			switch (matId)
			{
				case II_SYS_P_AWAKEFIX_STR: dst = DST_STR; adj = 10; break;
				case II_SYS_P_AWAKEFIX_STA: dst = DST_STA; adj = 10; break;
				case II_SYS_P_AWAKEFIX_DEX: dst = DST_DEX; adj = 10; break;
				case II_SYS_P_AWAKEFIX_INT: dst = DST_INT; adj = 10; break;
				case II_SYS_P_AWAKEFIX_ADOCH: dst = DST_CRITICAL_BONUS; adj = 5; break;
				case II_SYS_P_AWAKEFIX_SPEED: dst = DST_SPEED; adj = 9; break;
				case II_SYS_P_AWAKEFIX_INCATK: dst = DST_ATKPOWER_RATE; adj = 5; break;
				case II_SYS_P_AWAKEFIX_INCMP: dst = DST_MP_MAX_RATE; adj = 5; break;
				case II_SYS_P_AWAKEFIX_INCHP: dst = DST_HP_MAX_RATE; adj = 6; break;
				case II_SYS_P_AWAKEFIX_INCDEF: dst = DST_ADJDEF_RATE; adj = 5; break;
				default: break;
			}
		}
		else if (iProp->dwItemKind3 == IK3_PET)
		{
			switch (matId)
			{
				case II_SYS_V_AWAKEFIX_STR: dst = DST_STR; adj = 10; break;
				case II_SYS_V_AWAKEFIX_STA: dst = DST_STA; adj = 10; break;
				case II_SYS_V_AWAKEFIX_DEX: dst = DST_DEX; adj = 10; break;
				case II_SYS_V_AWAKEFIX_INT: dst = DST_INT; adj = 10; break;
				case II_SYS_V_AWAKEFIX_ADOCH: dst = DST_CRITICAL_BONUS; adj = 5; break;
				case II_SYS_V_AWAKEFIX_SPEED: dst = DST_SPEED; adj = 9; break;
				case II_SYS_V_AWAKEFIX_INCATK: dst = DST_ATKPOWER_RATE; adj = 5; break;
				case II_SYS_V_AWAKEFIX_INCMP: dst = DST_MP_MAX_RATE; adj = 5; break;
				case II_SYS_V_AWAKEFIX_INCHP: dst = DST_HP_MAX_RATE; adj = 6; break;
				case II_SYS_V_AWAKEFIX_INCDEF: dst = DST_ADJDEF_RATE; adj = 5; break;
				default: break;
			}
		}
		//now we check if the item is wrong by checking if dst is false
		if (!dst)
		{
			pUser->AddText("Incorrect item material or scroll.");
			return false;
		}

		//If it hasn't returned false, we can update the awakes and then return true to remove scroll
		g_xRandomOptionProperty->InitializeRandomOption(pTarget->GetRandomOptItemIdPtr());
		for (int i = 0; i < 3; ++i){ g_xRandomOptionProperty->SetParam(pTarget->GetRandomOptItemIdPtr(), dst, adj); }
		pUser->UpdateItemEx((BYTE)(pTarget->m_dwObjId), UI_RANDOMOPTITEMID, pTarget->GetRandomOptItemId());
		return true;
	}
	return false;
}
Code:
			case II_SYS_N_AWAKEFIX_STR:
			case II_SYS_N_AWAKEFIX_STA:
			case II_SYS_N_AWAKEFIX_DEX:
			case II_SYS_N_AWAKEFIX_INT:
			case II_SYS_N_AWAKEFIX_ADOCH:
			case II_SYS_N_AWAKEFIX_SPEED:
			case II_SYS_N_AWAKEFIX_INCATK:
			case II_SYS_N_AWAKEFIX_INCMP:
			case II_SYS_N_AWAKEFIX_INCHP:
			case II_SYS_N_AWAKEFIX_INCDEF:
			case II_SYS_J_AWAKEFIX_STR:
			case II_SYS_J_AWAKEFIX_STA:
			case II_SYS_J_AWAKEFIX_DEX:
			case II_SYS_J_AWAKEFIX_INT:
			case II_SYS_J_AWAKEFIX_ADOCH:
			case II_SYS_J_AWAKEFIX_INCATK:
			case II_SYS_J_AWAKEFIX_INCMP:
			case II_SYS_J_AWAKEFIX_INCHP:
			case II_SYS_J_AWAKEFIX_INCDEF:
			case II_SYS_F_AWAKEFIX_STR:
			case II_SYS_F_AWAKEFIX_STA:
			case II_SYS_F_AWAKEFIX_DEX:
			case II_SYS_F_AWAKEFIX_INT:
			case II_SYS_F_AWAKEFIX_ADOCH:
			case II_SYS_F_AWAKEFIX_SPEED:
			case II_SYS_F_AWAKEFIX_INCATK:
			case II_SYS_F_AWAKEFIX_INCMP:
			case II_SYS_F_AWAKEFIX_INCHP:
			case II_SYS_F_AWAKEFIX_INCDEF:
			case II_SYS_P_AWAKEFIX_STR:
			case II_SYS_P_AWAKEFIX_STA:
			case II_SYS_P_AWAKEFIX_DEX:
			case II_SYS_P_AWAKEFIX_INT:
			case II_SYS_P_AWAKEFIX_ADOCH:
			case II_SYS_P_AWAKEFIX_SPEED:
			case II_SYS_P_AWAKEFIX_INCATK:
			case II_SYS_P_AWAKEFIX_INCMP:
			case II_SYS_P_AWAKEFIX_INCHP:
			case II_SYS_P_AWAKEFIX_INCDEF:
			case II_SYS_V_AWAKEFIX_STR:
			case II_SYS_V_AWAKEFIX_STA:
			case II_SYS_V_AWAKEFIX_DEX:
			case II_SYS_V_AWAKEFIX_INT:
			case II_SYS_V_AWAKEFIX_ADOCH:
			case II_SYS_V_AWAKEFIX_SPEED:
			case II_SYS_V_AWAKEFIX_INCATK:
			case II_SYS_V_AWAKEFIX_INCMP:
			case II_SYS_V_AWAKEFIX_INCHP:
			case II_SYS_V_AWAKEFIX_INCDEF:
				b = DoUseItemTarget_WezzyFixAwakeningScroll(pUser, pMaterial->m_dwItemId, pTarget); //send material id instead
				break;

edit:
Also, you do not need that amount of scrolls. If you want them to have different effects based on item type, you could do something like so:
Code:
		
		int type = 0;
		if (iProp->dwItemKind1 == IK1_WEAPON || iProp->dwItemKind2 == IK2_ARMORETC || iProp->dwItemKind2 == IK2_ARMOR || iProp->dwItemKind3 == IK3_SHIELD)
			type = 1;
		else if (iProp->dwItemKind2 == IK2_JEWELRY)
			type = 2;

		if (type)
		{
			switch (matId)
			{
				case II_SYS_N_AWAKEFIX_STR:
				dst = DST_STR; 
				if (type == 1) adj = 20; 
				else if (type == 2) adj = 5;
				break;
Why the message not work ? u can edit my code and fix the message please

#ifdef __WEZZY_FIX_AWAKE_SCROLL
case II_SYS_N_AWAKEFIX_STR:
case II_SYS_N_AWAKEFIX_STA:
case II_SYS_N_AWAKEFIX_DEX:
case II_SYS_N_AWAKEFIX_INT:
case II_SYS_N_AWAKEFIX_ADOCH:
case II_SYS_N_AWAKEFIX_SPEED:

case II_SYS_F_AWAKEFIX_STR:
case II_SYS_F_AWAKEFIX_STA:
case II_SYS_F_AWAKEFIX_DEX:
case II_SYS_F_AWAKEFIX_INT:
case II_SYS_F_AWAKEFIX_ADOCH:
case II_SYS_F_AWAKEFIX_SPEED:
b = DoUseItemTarget_WezzyFixAwakeningScroll( pUser, pMaterial, pTarget );
break;
#endif // __WEZZY_FIX_AWAKE_SCROLL




#ifdef __WEZZY_FIX_AWAKE_SCROLL
BOOL CDPSrvr:oUseItemTarget_WezzyFixAwakeningScroll( CUser* pUser, CItemElem* pMaterial, CItemElem* pTarget )
{
int nRandomOptionKind = g_xRandomOptionProperty->GetRandomOptionKind( pTarget );

if( nRandomOptionKind >= 0 )
{
g_xRandomOptionProperty->InitializeRandomOption( pTarget->GetRandomOptItemIdPtr() ); //Reset awake

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////// |Weapons|Armor|Shield| /////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////


if( pTarget->GetProp()->dwItemKind1 == IK1_WEAPON || pTarget->GetProp()->dwItemKind2 == IK2_ARMORETC || pTarget->GetProp()->dwItemKind2 == IK2_ARMOR || pTarget->GetProp()->dwItemKind3 == IK3_SHIELD || pTarget->GetProp()->dwItemKind3 == IK3_EGG )
{
if( pMaterial->m_dwItemId == II_SYS_N_AWAKEFIX_STR )
{
g_xRandomOptionProperty->SetParam( pTarget->GetRandomOptItemIdPtr(), DST_STR, 300 );
g_xRandomOptionProperty->SetParam( pTarget->GetRandomOptItemIdPtr(), DST_STR, 300 );
g_xRandomOptionProperty->SetParam( pTarget->GetRandomOptItemIdPtr(), DST_STR, 300 );
}

else if( pMaterial->m_dwItemId == II_SYS_N_AWAKEFIX_STA )
{
g_xRandomOptionProperty->SetParam( pTarget->GetRandomOptItemIdPtr(), DST_STA, 300 );
g_xRandomOptionProperty->SetParam( pTarget->GetRandomOptItemIdPtr(), DST_STA, 300 );
g_xRandomOptionProperty->SetParam( pTarget->GetRandomOptItemIdPtr(), DST_STA, 300 );
}

else if( pMaterial->m_dwItemId == II_SYS_N_AWAKEFIX_DEX )
{
g_xRandomOptionProperty->SetParam( pTarget->GetRandomOptItemIdPtr(), DST_DEX, 300 );
g_xRandomOptionProperty->SetParam( pTarget->GetRandomOptItemIdPtr(), DST_DEX, 300 );
g_xRandomOptionProperty->SetParam( pTarget->GetRandomOptItemIdPtr(), DST_DEX, 300 );
}

else if( pMaterial->m_dwItemId == II_SYS_N_AWAKEFIX_INT )
{
g_xRandomOptionProperty->SetParam( pTarget->GetRandomOptItemIdPtr(), DST_INT, 300 );
g_xRandomOptionProperty->SetParam( pTarget->GetRandomOptItemIdPtr(), DST_INT, 300 );
g_xRandomOptionProperty->SetParam( pTarget->GetRandomOptItemIdPtr(), DST_INT, 300 );
}

else if( pMaterial->m_dwItemId == II_SYS_N_AWAKEFIX_ADOCH )
{
g_xRandomOptionProperty->SetParam( pTarget->GetRandomOptItemIdPtr(), DST_CRITICAL_BONUS, 300 );
g_xRandomOptionProperty->SetParam( pTarget->GetRandomOptItemIdPtr(), DST_CRITICAL_BONUS, 300 );
g_xRandomOptionProperty->SetParam( pTarget->GetRandomOptItemIdPtr(), DST_CRITICAL_BONUS, 300 );
}

else if( pMaterial->m_dwItemId == II_SYS_N_AWAKEFIX_SPEED )
{
g_xRandomOptionProperty->SetParam( pTarget->GetRandomOptItemIdPtr(), DST_SPEED, 50 );
g_xRandomOptionProperty->SetParam( pTarget->GetRandomOptItemIdPtr(), DST_SPEED, 50 );
g_xRandomOptionProperty->SetParam( pTarget->GetRandomOptItemIdPtr(), DST_SPEED, 50 );
}
}
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////// |-------|Fashions|------| //////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////


else if( pTarget->GetProp()->dwItemKind2 == IK2_CLOTH || pTarget->GetProp()->dwItemKind2 == IK2_CLOTHETC )
{
if( pMaterial->m_dwItemId == II_SYS_F_AWAKEFIX_STR )
{
g_xRandomOptionProperty->SetParam( pTarget->GetRandomOptItemIdPtr(), DST_STR, 300 );
}
else if( pMaterial->m_dwItemId == II_SYS_F_AWAKEFIX_STA )
{
g_xRandomOptionProperty->SetParam( pTarget->GetRandomOptItemIdPtr(), DST_STA, 300 );
}
else if( pMaterial->m_dwItemId == II_SYS_F_AWAKEFIX_DEX )
{
g_xRandomOptionProperty->SetParam( pTarget->GetRandomOptItemIdPtr(), DST_DEX, 300 );
}
else if( pMaterial->m_dwItemId == II_SYS_F_AWAKEFIX_INT )
{
g_xRandomOptionProperty->SetParam( pTarget->GetRandomOptItemIdPtr(), DST_INT, 300 );
}
else if( pMaterial->m_dwItemId == II_SYS_F_AWAKEFIX_ADOCH )
{
g_xRandomOptionProperty->SetParam( pTarget->GetRandomOptItemIdPtr(), DST_CRITICAL_BONUS, 300 );
}
else if( pMaterial->m_dwItemId == II_SYS_F_AWAKEFIX_SPEED )
{
g_xRandomOptionProperty->SetParam( pTarget->GetRandomOptItemIdPtr(), DST_SPEED, 100 );
}
}
else
{
pUser->AddText( "Oops! Wrong item!" );
return FALSE;
}
pUser->UpdateItemEx( (BYTE)( pTarget->m_dwObjId ), UI_RANDOMOPTITEMID, pTarget->GetRandomOptItemId() );
return TRUE;
}
return FALSE;
}
#endif // __WEZZY_FIX_AWAKE_SCROLL
kimba2015 is offline  
Old 08/09/2016, 23:35   #19
 
elite*gold: 0
Join Date: Mar 2016
Posts: 9
Received Thanks: 0
dfs

Quote:
Originally Posted by Avalion View Post
Explanation in post quoted if same issue as original poster.
you can copy paste or do it yourself.
But i prefer my code for the sample reason is already edit awakes
only you edit the code to fix message


kimba2015 is offline  
Old 08/10/2016, 00:39   #20
 
elite*gold: 0
Join Date: Jul 2016
Posts: 36
Received Thanks: 17
Quote:
Originally Posted by kimba2015 View Post
But i prefer my code for the sample reason is already edit awakes
only you edit the code to fix message
Your lazy asf, don't expect people to continue to do things for you with little to no effort!
Lodelight is offline  
Thanks
1 User
Old 08/13/2016, 18:05   #21
 
elite*gold: 0
Join Date: May 2011
Posts: 242
Received Thanks: 11
Code:
			else
                { 
                        pUser->AddText( "Please make sure its the right item" ); 
                        return FALSE; 
                }
                pUser->UpdateItemEx( (BYTE)( pTarget->m_dwObjId ), UI_RANDOMOPTITEMID, pTarget->GetRandomOptItemId() ); 
                pUser->AddDefinedText( TID_GAME_AWAKENING_SUCCESS );
				return TRUE; 

        }
		 pUser->AddText( "Please make sure its the right item" ); 
        return FALSE; 
}


jeromerz is offline  
Reply



« Arena Score System Errors Need HELP PLEASE | How to prevent lord buff stacking »

Similar Threads
[Release] Fix Awake Scroll
01/23/2017 - Flyff PServer Guides & Releases - 34 Replies
I release my custom fix awake Scroll WORLDSERVER DPSrvr.cpp Under #endif // __PET_0519 case II_SYS_SYS_SCR_LEVELDOWN01:
scroll of fix awake problem
01/14/2015 - Flyff PServer - Discussions / Questions - 4 Replies
hi have add scroll to fix awaken + 511 STR i use scroll on my item but its not work item still no awake and scroll is there still
Fix Awake Scroll Error
09/19/2014 - Flyff PServer - Discussions / Questions - 1 Replies
#CLOSED
[Request] Scroll of Fix awake
07/05/2013 - Flyff PServer - Discussions / Questions - 8 Replies
hello :) i would like to ask your help on my request some one who is nice to share his source for Scroll of fix awake x3 its just a request no bad comments please :)
flyff scroll of fix awake
12/06/2011 - Flyff PServer - Discussions / Questions - 5 Replies
plese help me



All times are GMT +1. The time now is 21:07.


Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Abuse
Copyright ©2018 elitepvpers All Rights Reserved.