Jump to content
  • 0

Kill MVP Quest HELP please


namerpus18

Question


  • Group:  Members
  • Topic Count:  40
  • Topics Per Day:  0.07
  • Content Count:  102
  • Reputation:   5
  • Joined:  11/15/22
  • Last Seen:  

Hello again and again everyone,

I just need some help regarding this custom quest I made where players need to slay an MVP. I have a problem though, the quest can only complete if the player is the MVP.

What I want is to happen is , as long the player hit the mob(MVP) they can complete the quest. The player can only complete one quest for each MVP Monster. I don't know what should I change in the src script or make a floating npc. Thank you so much

screenrAthena001.jpg

 

 

EDIT1:

Hello, I saw this script and I think it will work to complete the quest for players within the map. Not quite sure if I need to do checking first if the char have the quest or just straight up put "completequest <ID>{,<char_id>};" there. (But at least I want that those who only damaged the mob(MVP) to complete the quest.)) Thank you 

-   script  boss_rewards   -1,{


OnNPCKillEvent:
    if(getmonsterinfo(killedrid, MOB_MVPEXP) > 1) {
        addrid(1);
        completequest <ID>{,<char_id>};
    }
    end;
}


 

Edited by namerpus18
Link to comment
Share on other sites

7 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  3
  • Topics Per Day:  0.01
  • Content Count:  39
  • Reputation:   30
  • Joined:  06/08/23
  • Last Seen:  

1 hour ago, namerpus18 said:

as long the player hit the mob(MVP) they can complete the quest

this can't be achieved with raw code, need source mod, the source mod is related to your other thread.

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  40
  • Topics Per Day:  0.07
  • Content Count:  102
  • Reputation:   5
  • Joined:  11/15/22
  • Last Seen:  

1 hour ago, Harvin said:

this can't be achieved with raw code, need source mod, the source mod is related to your other thread.

Hi Harvin, I am just making a workaround to achieve a rewarding system for MVP. And kinda achieve it now, somehow :). 

I made 2 quests "hunt Orc Lord 1/2" and "hunt Orc Lord 2/2" Then if the mvp is killed in the map i will change the quest from 1/2 to 2/2 where you just need to talk to the npc for reward. Still, a lot to do like putting maps and MVP on VECTOR or ARRAY i think?

OnNPCKillEvent:
    if(getmonsterinfo(killedrid, MOB_MVPEXP) > 1) {
        addrid(1);
	changequest (19000,19001,getcharid(0));	
    }
    end;
}

 

I am just being resourceful and trying to use anything available for me and made this. Sorry if it's too noob code but here it is. I still want to limit the quest for each MVP to 1 per day. 

prontera,169,180,4	script	Commander#1	4_M_UNCLEKNIGHT,{
if (isbegin_quest(19001) == 0) {
mes	"You don't have the quest needed.";
close;
end;
}
if (checkquest (19001,PLAYTIME!=2,getcharid(0))){
mes	"Time limit is finished.";
close;
end;
}
else if (checkquest (19001,PLAYTIME==0,getcharid(0))){
completequest	(19001,getcharid(0));
getitem	7615,1;
mes	"Thank you.";
close2;
//.@quest$ + 1
emotion 15;
end;
}
}

 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  40
  • Topics Per Day:  0.07
  • Content Count:  102
  • Reputation:   5
  • Joined:  11/15/22
  • Last Seen:  

4 hours ago, Harvin said:

this can't be achieved with raw code, need source mod, the source mod is related to your other thread.

The more I analyze my code the more I see a lot is missing 😄.

Like, check what map and mvp the player in and if the quest fit together. Or else any mvp will just complete the 1st quest.

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  3
  • Topics Per Day:  0.01
  • Content Count:  39
  • Reputation:   30
  • Joined:  06/08/23
  • Last Seen:  

3 hours ago, namerpus18 said:

limit the quest for each MVP to 1 per day.

you should play around with the quest_db.yml config, check on TimeLimit of file ...\doc\quest_db.txt

  • Like 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  40
  • Topics Per Day:  0.07
  • Content Count:  102
  • Reputation:   5
  • Joined:  11/15/22
  • Last Seen:  

1 hour ago, Harvin said:

you should play around with the quest_db.yml config, check on TimeLimit of file ...\doc\quest_db.txt

I added timelimit to submit the quest.

 

switch(1850,1190,......................){ //mobid
case 1:
       completequest 19000,getcharid(0); //questid
       break;
case 2
       completequest 19010,getcharid(0);
       break;
case 3;
       ...
....
....
....
}

I dunno if it will work but gonna try this one to check what MVP is killed and check if the player has the quest.

Thank you so much.

 

Edited by namerpus18
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  3
  • Topics Per Day:  0.01
  • Content Count:  39
  • Reputation:   30
  • Joined:  06/08/23
  • Last Seen:  

I don't test this but maybe this help you.

quest_db.yml

  - Id: 19000
    Title: Hunt Orc Lord

  - Id: 19001
    Title: Hunt Orc Lord - Cooldown
    TimeLimit: +4h # this mean this quest will expire after 4 hour after it taken
#    TimeLimit: 4h # this mean this quest will expire after 4.00 AM

npc script

prontera,169,180,4	script	Commander#1	4_M_UNCLEKNIGHT,{
	.@report = checkquest (19001, PLAYTIME);
	if (.@report == -1 || .@report == 2)
	{
		if (.@report == 2)
			erasequest 19001;
		if (isbegin_quest(19000) == 0)
		{
			setquest 19000;
			mes	"Alright now hunt an MVP";
			mes "Then you come back to me for reporting in.";
		}
		else
		{
			mes	"Why are you here?!,";
			mes "Go hunt an MVP before talking to me again.";
		}
	}
	else if (.@report == 0 || .@report == 1)
	{
		mes "Come again some time later";
		mes "For now take a rest.";
	}
	close;

OnNPCKillEvent:
	if(getmonsterinfo(killedrid, MOB_MVPEXP) > 1)
	{
		addrid(1);
		if (isbegin_quest(19000) == 1)
			changequest(19000, 19001);	
	}
	end;
}

 

  • Love 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  40
  • Topics Per Day:  0.07
  • Content Count:  102
  • Reputation:   5
  • Joined:  11/15/22
  • Last Seen:  

11 hours ago, Harvin said:
if (isbegin_quest(19000) == 1)
			changequest(19000, 19001);	
	}
	end;

oh yah, that makes sense. this saves me a lot. Thank you so much. for now i will finish my project with this. I still have my original plan on the other thread involving source code I will come back to that after i finish this. Thank you for your help and time

 

EDIT1:

so i tested it out and added something. I am so happy with the result maybe i will also add the map where the MVP really spawn.

OnNPCKillEvent:
    if(getmonsterinfo(killedrid, MOB_MVPEXP) > 1) {
		if(killedrid == 1190 | isbegin_quest(19000) ==1) { //check if the MVP is Orc Lord
        addrid(1);
		changequest (19000,19001,getcharid(0));
		end;
		}
    }
    end;
}

 

Edited by namerpus18
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...