Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

[how to][tutorial] scroll of unbinding

Junior Spellweaver
Joined
Apr 13, 2012
Messages
140
Reaction score
32
omk so i cant take any credit for this

credits go to Shuya83 from epvp

i wanted to put this guide in english for the people who have no idea about google translate.:laugh:

anyways this is a copy and paste job. it was my 1st attempt at editing something in the blessed release source code.
sense there is no unbinding scroll in the release i went ahead an put one there.

althought this was a copy an paste job for me i am still proud that i was able to get it to work and learned a lot in the process.

i hope u enjoy.

Let's get started.

First, we open the folder in your World DPSrvr.h source server.

And look for
Code:
BOOL	DoUseItemTarget_ItemLevelDown( CUser* pUser, CItemElem* pMaterial, CItemElem* pTarget );

and add this code right under it.
Code:
BOOL    UnbindScroll( CUser* pUser, CItemElem* pMaterial, CItemElem* pTarget );

then look in DPSrvr.cpp and find this code.

Code:
	case II_SYS_SYS_SCR_LEVELDOWN01:
			case II_SYS_SYS_SCR_LEVELDOWN02:
				b	= DoUseItemTarget_ItemLevelDown( pUser, pMaterial, pTarget );
				break;
			default:
				break;
		}
		if( b )

and replace it with.
Code:
case II_SYS_SYS_SCR_LEVELDOWN01:
			case II_SYS_SYS_SCR_LEVELDOWN02:
				b	= DoUseItemTarget_ItemLevelDown( pUser, pMaterial, pTarget );
				break;
			case II_CHR_SYS_SCR_UNBIND: 
                b = UnbindScroll(pUser, pMaterial, pTarget); 
                break;  
			default:
				break;
		}
		if( b )

then find this code

Code:
else
		pUser->AddDefinedText( TID_GAME_ITEM_LEVELDOWN01 );

	return FALSE;
}

and add this code underneath is some place. i put it in the awakening section of the code and it worked great.

Code:
BOOL CDPSrvr::UnbindScroll( CUser* pUser, CItemElem* pMaterial, CItemElem* pTarget ) 
{ 
    if( pTarget->IsFlag(CItemElem::binds) && pMaterial->m_dwItemId == II_CHR_SYS_SCR_UNBIND )  
    { 
        pTarget->ResetFlag(CItemElem::binds); 
        pUser->UpdateItem( (BYTE)( pTarget->m_dwObjId ), UI_FLAG, MAKELONG( pTarget->m_dwObjIndex, pTarget->m_byFlag ) ); 

        // log 
        LogItemInfo    log; 
        log.Action    = "r"; 
        log.SendName    = pUser->GetName(); 
        log.RecvName    = "::binds"; 
        log.WorldId        = pUser->GetWorld()->GetID(); 
        log.Gold    = pUser->GetGold(); 
        log.Gold2    = pUser->GetGold(); 
        OnLogItem( log, pTarget, 1 ); 
        return TRUE; 
    } 
    else 
        pUser->AddText("Item ist bereits entbunden."); 

    return FALSE; 
}

now go to defineItem.h and define II_CHR_SYS_SCR_UNBIND

then go to your spec_item.txt file and add this.
Code:
11	II_CHR_SYS_SCR_UNBIND	IDS_ITEM_TXT_101111	1	9999	IK1_SYSTEM	IK2_SYSTEM	IK3_SCROLL	=	=	1	=	200000000	=	=	=	=	=	=	=	0	=	=	1	1	1	1	1	=	=	=	=	_NONE	0	=	=	=	=	=	=	=	=	=	=	=	=	=	=	=	=	=	=	=	=	=	=	=	=	=	=	=	=	=	=	=	=	=	=	=	=	=	=	=	=	=	=	=	=	=	=	=	=	=	=	=	=	=	EXT_ITEM	WUI_NOW	=	=	=	=	=	=	=	=	=	0	0	0	0	0	=	=	=	=	=	=	=	=	=	=	=	=	=	=	=	=	=	"""Itm_SysSysScrAwakeSafe01.dds"""	0	""""""	IDS_ITEM_TXT_101112		1	300	0	0	1	0	0	0	0	0	2	=	=	=	=	=	=	=	=	=	=	1	1	1	1	1	0
yes it is very long and can get confusing. but make sure it all correct. in the blessed release to get it to go in shop put rarity of 140 so that it shows in shop.
now go to propitem.txt.txt and add this.
Code:
IDS_ITEM_TXT_101111	Scroll of Unbinding
IDS_ITEM_TXT_101112	removes soul link from items.

oh dont forget to rebuild the code with the proper defineitem.h file and move the new defineitem.h file along with the 7 exe files in the right place in the server files.

credits to this go to Shuya83.
i dont take any credit for this what so ever. just wanted to post it here because i had not seen any tuts on how to make unbinding scroll.
ebjoy
 
Junior Spellweaver
Joined
Jan 8, 2012
Messages
100
Reaction score
25
Re: [how to][tutoria] scroll of unbinding

I replaced files but after it my worldserver/neuz.exe crash :<
 
Trust your senses
Joined
Sep 12, 2009
Messages
661
Reaction score
173
Re: [how to][tutoria] scroll of unbinding

Then fix your errors or either give up on the spurce because this is really easy to add.
 
Not working on UnitedFlyf
Loyal Member
Joined
Apr 21, 2009
Messages
1,385
Reaction score
934
Re: [how to][tutoria] scroll of unbinding

Durp. Nearly identical to mine which was created before Scroll of Unbind came to kFlyff.

Code:
BOOL CDPSrvr::DoUseItemTarget_ItemRelease( CUser* pUser, CItemElem* pMaterial, CItemElem* pTarget )
{
	if( pTarget->IsBinds() && pMaterial->m_dwItemId == II_SYS_SYS_SCR_RELEASE )
	{
		pTarget->ResetFlag( CItemElem::binds );
		pUser->UpdateItem( (BYTE)( pTarget->m_dwObjId ), UI_FLAG, MAKELONG( pTarget->m_dwObjIndex, pTarget->m_byFlag ) );
		// log
		LogItemInfo	log;
		log.Action	= "r";
		log.SendName	= pUser->GetName();
		log.RecvName	= "::ItemRelease";
		log.WorldId		= pUser->GetWorld()->GetID();
		log.Gold	= pUser->GetGold();
		log.Gold2	= pUser->GetGold();
		OnLogItem( log, pTarget, 1 );
		return TRUE;
	}
	else
		pUser->AddDefinedText( TID_GAME_ITEM_NOTBINDED );

	return FALSE;
}

Code:
IDS_DEMON_TXT_000035 Scroll of Release
IDS_DEMON_TXT_000036 This scroll releases a soulbound item from your character. The item will then be tradable.
 
Newbie Spellweaver
Joined
Oct 7, 2009
Messages
93
Reaction score
0
Im Gettin Errors like:
Code:
DPSrvr.cpp(5625) : error C2065: 'II_CHR_SYS_SCR_UNBIND' : undeclared identifier
DPSrvr.cpp(5625) : error C2051: case expression not constant
DPSrvr.cpp(11844) : error C3861: 'II_CHR_SYS_SCR_UNBIND': identifier not found, even with argument-dependent lookup
 
~FlyFF DeV~
Joined
Mar 2, 2009
Messages
579
Reaction score
113
Code:
now go to defineItem.h and define II_CHR_SYS_SCR_UNBIND
Do it.
 
~FlyFF DeV~
Joined
Mar 2, 2009
Messages
579
Reaction score
113
The source resource folder also need in defineitem.h this.
 
Owner
Loyal Member
Joined
May 13, 2011
Messages
1,497
Reaction score
157
Sorry if i necro post it.
But i got the same problem as Omersh33

I added the code in the source on the correct places. (How hard can it be since its copie paste).
Added the #define to defineitem.h(At resource in the source folder and in the server folder).

Then rebuild it.
The errors are

DPSrvr.cpp(5625) : error C2065: 'II_CHR_SYS_SCR_UNBIND' : undeclared identifier
DPSrvr.cpp(5625) : error C2051: case expression not constant
DPSrvr.cpp(11844) : error C3861: 'II_CHR_SYS_SCR_UNBIND': identifier not found, even with argument-dependent lookup

Its strange cause its defined. Maybe i can define it in the source instead.

With kind regards
 
Flyff Developer
Loyal Member
Joined
Apr 6, 2009
Messages
1,873
Reaction score
384
Make sure the name is spelled exactly right. Only thing I can say.
 
Owner
Loyal Member
Joined
May 13, 2011
Messages
1,497
Reaction score
157
Thank you for your comment ShadowDragon42
But i did something else.
I have defined it in DPSrvr.h and now its working.
 
Flyff Developer
Loyal Member
Joined
Apr 6, 2009
Messages
1,873
Reaction score
384
As long as that still works when you try to use it in-game, then go for it.
 
Back
Top