Add linkpearl to new characters

User avatar
tagban
Posts: 352
Joined: Fri Dec 28, 2012 11:31 am
Location: Pennsylvania, USA

Re: Add linkpearl to new characters

Post by tagban » Thu Jan 08, 2015 12:59 pm

Cool, got past that part, how does it get Slot ID? Its showing undefined.

User avatar
kjLotus
Special Guest
Posts: 1813
Joined: Sun Jul 22, 2012 2:16 pm

Re: Add linkpearl to new characters

Post by kjLotus » Thu Jan 08, 2015 2:41 pm

tagban wrote:Cool, got past that part, how does it get Slot ID? Its showing undefined.
oh, that's returned from AddItem, i'll update that

User avatar
tagban
Posts: 352
Joined: Fri Dec 28, 2012 11:31 am
Location: Pennsylvania, USA

Re: Add linkpearl to new characters

Post by tagban » Thu Jan 08, 2015 9:55 pm

Seems to be working in giving the item now, but its not working properly, the item is un-droppable, unlike normal Linkshells, and its black and doesn't ACTUALLY connect. But its better than it was!

User avatar
tagban
Posts: 352
Joined: Fri Dec 28, 2012 11:31 am
Location: Pennsylvania, USA

Re: Add linkpearl to new characters

Post by tagban » Thu Jan 08, 2015 10:04 pm

Code: Select all

	if player:hasItem(515) then
		-- Do Nothing
		--player:PrintToPlayer("You have 515 (Pearl)");
	elseif player:hasItem(514) then
		-- Do Nothing
		--player:PrintToPlayer("You have 514 (Sack)");
	elseif player:hasItem(513) then
		-- Do Nothing
		--player:PrintToPlayer("You have 513 (Shell)");
	else
	--	player:AddLinkpearl("BNETcc");
	--	player:PrintToServer(string.format("%s has joined BNETcc Linkshell~", player:getName()), 0xE)
	end
Thats the code I have to give pearl, it definately gives the pearl, with the BNETcc name, but its black and unusable, un-droppable..

User avatar
kjLotus
Special Guest
Posts: 1813
Joined: Sun Jul 22, 2012 2:16 pm

Re: Add linkpearl to new characters

Post by kjLotus » Thu Jan 08, 2015 10:31 pm

yeah, i'm being dumb - i updated it again actually putting it through a compiler

User avatar
tagban
Posts: 352
Joined: Fri Dec 28, 2012 11:31 am
Location: Pennsylvania, USA

Re: Add linkpearl to new characters

Post by tagban » Thu Jan 08, 2015 10:40 pm

Honestly, I figured it was my fault, so no biggie. lol

User avatar
tagban
Posts: 352
Joined: Fri Dec 28, 2012 11:31 am
Location: Pennsylvania, USA

Re: Add linkpearl to new characters

Post by tagban » Thu Jan 08, 2015 10:48 pm

Perfect! Thanks!!!

KOSMOS
Posts: 67
Joined: Thu Jan 29, 2015 10:36 pm

Re: Add linkpearl to new characters

Post by KOSMOS » Mon Feb 22, 2016 10:44 am

I have been trying to input this function and tried all three ways listed and all come back with same or similar errors. Can anyone point me in right direction or help me out?

Code: Select all

src/map/lua/lua_baseentity.cpp:206:30: error: ‘SLOT_LINK’ was not declared in this scope
                 PChar->equip[SLOT_LINK] = invSlotID;
                              ^
src/map/lua/lua_baseentity.cpp:210:21: error: ‘linkshell’ has not been declared
                     linkshell::AddOnlineMember(PChar, PLinkshell);
                     ^
make: *** [dsgame-lua_baseentity.o] Error 1
Is the most recent error I have got.

Thanks

User avatar
kjLotus
Special Guest
Posts: 1813
Joined: Sun Jul 22, 2012 2:16 pm

Re: Add linkpearl to new characters

Post by kjLotus » Mon Feb 22, 2016 7:23 pm

SLOT_LINK was replaced with SLOT_LINK1 (because of dual linkshells)

KOSMOS
Posts: 67
Joined: Thu Jan 29, 2015 10:36 pm

Re: Add linkpearl to new characters

Post by KOSMOS » Tue Feb 23, 2016 7:32 am

kjLotus wrote:SLOT_LINK was replaced with SLOT_LINK1 (because of dual linkshells)
Awesome thank you.

Post Reply