Jump to content

Question

Posted (edited)

Hi,

I am looking for help of how to remove quest from transform_teacher class so people do not need to make "More Than Meets the Eye" quest to learn subclass specification skills.
 

Edit: title addition and grammar fix

Edited by LineageLover

7 answers to this question

Recommended Posts

  • 0
Posted
2 hours ago, LineageLover said:

Hi,

I am looking for help of how to remove quest from transform_teacher class so people do not need to make "More Than Meets the Eye" quest to learn subclass specification skills.
 

Edit: title addition and grammar fix

 

Could you share with us your code?

  • 0
Posted (edited)
42 minutes ago, HugoBoss said:

 

Could you share with us your code?

Sure thing!

Here is ai.obj class https://pastebin.com/9wWF5eb2
Here is same .nasc class https://pastebin.com/2XDQhsLc

I am still pretty green at this and I am not sure whether it requires quest or item obtained from a quest in order to start learning skills from her(avant-garde)

edit:
long story short - I finished leveling up my subclass - got all the subclass certification skill books - went to learn skills and was asked to do a quest. Finished a quest - was able to learn. 

my goal is to remove this requirement to finish the quest and learn skills straight away

Edited by LineageLover
  • 0
Posted

set_compiler_opt base_event_type(@NTYPE_NPC_EVENT)

class transform_teacher : citizen {
parameter:
	int	quest_num = -1;
	int	flag_subjob_start = 10255;
	int	flag_subjob_end = 10266;
	int	fee_delete_subjob = 10000000;
	int	skill_acquire = 4;
	int	multisell = -1;
	int	skill_acquire2 = 5;
	int	skill_book_id1 = 0;
	int	skill_book_id15 = 0;
	int	skill_book_id16 = 10612;
	string	fnHi3 = "master_transformation008.htm";
	string	fnHi4 = "master_transformation008.htm";
	string	fnHi5 = "master_transformation007.htm";
	string	fnHi6 = "master_transformation009no.htm";
	string	fnHi7 = "master_transformation008no.htm";
	string	fnHi8 = "master_transformation010no.htm";

handler:
	EventHandler MENU_SELECTED(talker,ask,reply,i0,i1)
	{
		if( ask == -299 )
		{
			if( reply == 0 )
			{
				ShowEtcSkillList(talker, skill_acquire, "");
			}
			else if( reply == 1 )
			{
				if( multisell > -1 )
				{
					ShowMultisell(multisell, talker);
				}
			}
		}
		else if( ask == -282 )
		{
			if( reply == 0 )
			{
				i0 = 0;
				i1 = 0;
				if( talker.subjob_id != 0 )
				{
					ShowPage(talker, fnHi3);
					return;
				}
				for( i0 = skill_book_id1; i0 < skill_book_id15 + 1; ++i0 )
				{
					if( OwnItemCount(talker, i0) > 0 )
					{
						i1 = i1 + 1;
					}
				}
				if( OwnItemCount(talker, skill_book_id16) > 0 )
				{
					i1 = i1 + 1;
				}
				if( i1 == 0 )
				{
					ShowPage(talker, fnHi4);
					return;
				}
				if( GetOneTimeQuestFlag(talker, quest_num) == 0 )
				{
					ShowPage(talker, fnHi5);
					return;
				}
				ShowEtcSkillList(talker, skill_acquire2, "");
			}
			else if( reply == 1 )
			{
				i0 = 0;
				i1 = 0;
				if( talker.subjob_id != 0 )
				{
					ShowPage(talker, fnHi3);
					return;
				}
				if( OwnItemCount(talker, @adena) < fee_delete_subjob )
				{
					ShowPage(talker, fnHi7);
					return;
				}
				if( GetOneTimeQuestFlag(talker, quest_num) == 0 )
				{
					ShowPage(talker, fnHi5);
					return;
				}
				for( i0 = flag_subjob_start; i0 < flag_subjob_end + 1; ++i0 )
				{
					if( GetOneTimeQuestFlag(talker, i0) == 1 )
					{
						i1 = i1 + 1;
					}
				}
				if( i1 == 0 )
				{
					ShowPage(talker, fnHi8);
					return;
				}
				DeleteItem1(talker, @adena, fee_delete_subjob);
				for( i0 = skill_book_id1; i0 < skill_book_id15 + 1; ++i0 )
				{
					if( OwnItemCount(talker, i0) > 0 )
					{
						DeleteItem1(talker, i0, OwnItemCount(talker, i0));
					}
				}
				if( OwnItemCount(talker, skill_book_id16) > 0 )
				{
					DeleteItem1(talker, skill_book_id16, OwnItemCount(talker, skill_book_id16));
				}
				for( i0 = flag_subjob_start; i0 < flag_subjob_end + 1; ++i0 )
				{
					if( GetOneTimeQuestFlag(talker, i0) == 1 )
					{
						SetOneTimeQuestFlag(talker, i0, 0);
					}
				}
				DeleteAcquireSkills(talker, skill_acquire2);
				AddLogByNpc(899, talker, fee_delete_subjob, 0);
				ShowPage(talker, fnHi6);
			}
		}
	}

	EventHandler ONE_SKILL_SELECTED(talker,skill_name_id,need_quest,i0)
	{
		ShowGrowEtcSkillMessage(talker, skill_name_id, i0, "");
	}
}

 

Test it.

  • 0
Posted

Thank you for your help but I found a way to do it without editing Ai.obj.

As learning skills require 2 quests - subclass(id=235) and  More Than Meets the Eye(id=136) i changed {[quest_num]=136} to {[quest_num]=235} inside npcdata for master_transformation npc. 

 

I hope it makes sense.

 

Solved.

  • 0
Posted
33 minutes ago, LineageLover said:

Thank you for your help but I found a way to do it without editing Ai.obj.

As learning skills require 2 quests - subclass(id=235) and  More Than Meets the Eye(id=136) i changed {[quest_num]=136} to {[quest_num]=235} inside npcdata for master_transformation npc. 

 

I hope it makes sense.

 

Solved.

 

It does, and its also a clean solution to your problem.

 

I am glad that you could have been able to solve it!

  • 0
Posted
On 3/20/2020 at 9:09 PM, LineageLover said:

Thank you for your help but I found a way to do it without editing Ai.obj.

As learning skills require 2 quests - subclass(id=235) and  More Than Meets the Eye(id=136) i changed {[quest_num]=136} to {[quest_num]=235} inside npcdata for master_transformation npc. 

 

I hope it makes sense.

 

Solved.

Topic lock request.

Guest
This topic is now closed to further replies.


  • Posts

    • Vilmis is the biggest scammer in history. He bans his members when they complain about something. I know more than one who's banned him. He updates shit, but he charges you like he's doing something serious.
    • I did not want to, but I will tell a few things (just because of other members that might understand something wrong): 1. Nothing held as hostage some kinda customer of yours. I think even now could find your donate panel code at my source code. So, stop spreading a lie because of your head progressive diseases. 2. Don't use my old customer's post as counterargument. We all had the worst customers which think they are the righest ones no matter what. He was one of them. He caused a lot of problems to me. Also, he was rude and disrespectful. 3. You're just simply hater. No matter what good I'm gonna say you gonna say in reverse. Smarter people sees the truth. 4. Look, you don't like me, I don't like you, but it's unnecessary to comment all post about my project and write everything worst just because you hate me. 😉
    • I've seen this many times, to be honest, let's hope that this time it will actually happen. I would suggest building something that helps develop trust within the community's sales. It could be something similar to FunPay, for example, which ensures secure trades for both the seller and the buyer, along with a rating system for both parties. I would also recommend doing something about the voting site, which has been paused for I don't know how many years since the Fiverr failure. Last but not least, I’d suggest creating an open blog or at least publishing weekly articles that can attract more people to the forum or encourage members to return and read them. The topics of these articles could include overviews and opinions on L2 or GTA V servers, PUBG, Fortnite, tech news, coding updates, or even general news that the author finds interesting.   How could you know such an information? 🤔 And yeah I agree on the part about the poor management
    • ➡ Discount for your purchase: JUNE2025 (10% discount) ➡ Our Online Shop: https://socnet.store  ➡ Our SMM-Boosting Panel: https://socnet.pro  ➡ Telegram Shop Bot: https://socnet.shop  ➡ Telegram Support: https://t.me/solomon_bog  ➡ Telegram Channel: https://t.me/accsforyou_shop  ➡ Discord Support: @AllSocialNetworksShop  ➡ Discord Server: https://discord.gg/y9AStFFsrh  ➡ WhatsApp Support: https://wa.me/79051904467 ➡ WhatsApp Channel: https://whatsapp.com/channel/0029Vau0CMX002TGkD4uHa2n  ➡ Email Support: solomonbog@socnet.store 
    • there are extenders that already have all that included ingame 🙂 for example GX-EXT
  • Topics

×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock