Jump to content
  • 0

Halloween/Xmas Event NPC


Jezu

Question


  • Group:  Members
  • Topic Count:  29
  • Topics Per Day:  0.01
  • Content Count:  566
  • Reputation:   34
  • Joined:  11/17/11
  • Last Seen:  

Hi rA community,

I want to request something like this, a Halloween event or Xmas Event like this.

1. Character will do a quest by talking to "Halloween NPC" and then he will be ask to kill like 2000 ghouls.

2. After killing this number of monsters, the character must talk to Halloween NPC and he/she will get a global reg value which is

set #Halloween,1;

3. There will be an NPC for "Rewards" NPC that check if the character have this global reg value before giving the rewards.

if {#Halloween == 1}

like this.... and s/he will get another global reg value of

set #Halloween_End,1;

so it will not be repeated getting the rewards again and again.

4. He will get a gift after finishing this quest. This event is account-based so it will not be repeated by any character with the same account.

For Xmas, it will be christmas goblins or something but same mechanics on halloween event.

Thanks in advance guys! Hope there is someone can lend a hand. /thx

Edited by Jezu
Link to comment
Share on other sites

8 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  72
  • Topics Per Day:  0.02
  • Content Count:  2997
  • Reputation:   1130
  • Joined:  05/27/12
  • Last Seen:  

You've already got most of the script down. You could count monster kills either through OnNPCKillEvent or a quest entry, it's your choice. You don't need 2 variables, as you can set #Halloween to "2" when finished.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  29
  • Topics Per Day:  0.01
  • Content Count:  566
  • Reputation:   34
  • Joined:  11/17/11
  • Last Seen:  

You've already got most of the script down. You could count monster kills either through OnNPCKillEvent or a quest entry, it's your choice. You don't need 2 variables, as you can set #Halloween to "2" when finished.

I only know the variables but I can't produce a script like this xD. Can you give me one sample script Mr. @Euphy ?

Edited by Jezu
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  72
  • Topics Per Day:  0.02
  • Content Count:  2997
  • Reputation:   1130
  • Joined:  05/27/12
  • Last Seen:  

{
   mes "[Halloween Event]";
   if (!#Halloween) {
       mes "Do you want to take part in the Halloween event?";
       mes "You can do this once per account, so choose wisely.";
       next;
       if (select("Yes!:No, not now.") == 2) {
           mes "[Halloween Event]";
           mes "See you around.";
           close;
       }
       mes "[Halloween Event]";
       mes "I'll need you to hunt 2,000 Ghouls.";
       mes "It's urgent, so please return quickly!";
       mes "There is a reward, of course.";
       set #Halloween,1;
       set Halloween,0;
       close;
   } else if (#Halloween == 1) {
       if (Halloween == 2000) {
           mes "Wow! You've done it!";
           mes "Here's your prize.";
           //getitem ID,Amount;
           set #Halloween,2;
           set Halloween,0;
           close;
       }
       mes ((Halloween)?"You've killed "+Halloween+" Ghouls so far.":"You haven't killed any Ghouls yet!");
       mes "Come back when you've hunted 2,000.";
       close;
   } else if (#Halloween == 2) {
       mes "Happy Halloween!";
       close;
   }

OnNPCKillEvent:
   if (#Halloween == 1 && killedrid == 1036 && Halloween < 2000) {
       set Halloween, Halloween+1;
       dispbottom "[Halloween Event] "+Halloween+" Ghouls killed!";
   }
   end;
}

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  2044
  • Reputation:   682
  • Joined:  10/09/12
  • Last Seen:  

https://rathena.svn....t_variables.txt

I believe its better to use bits to set the quest completed or not

or you can try keyworld's setbit function ... (lol I think I'm going too far)

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  72
  • Topics Per Day:  0.02
  • Content Count:  2997
  • Reputation:   1130
  • Joined:  05/27/12
  • Last Seen:  

Annie: It only requires one variable, and there isn't anything existing we can use for an account-based quest. O:

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10015
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  

@Jezu

you can try this if you want...

http://pastebin.com/raw.php?i=LnfA35rF

Only edit this part...

OnInit:
// Variable Name
set .VariableName$,"#Halloween";
// Required Monster ID + Amount
setarray .MobDB[0],1002,2000;
// Reward Item + Amount
setarray .ItemDB[0],607,100;
end;

doesnt support multiple item / monsters...

i havent test the script yet ~

maded 10 hours ago...but damn...cant connect to internet...

Edited by Emistry
  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  2044
  • Reputation:   682
  • Joined:  10/09/12
  • Last Seen:  

as you can set #Halloween to "2" when finished.
what I mean is this

prontera,156,184,5	script	quest	100,{
if ( #misc_quest & 1 ) {
	mes "happy halloween";
	halloween = #halloween = 0; // remember to reset them to 0 or else just wasting variable space
	close;
}
else if ( #halloween ) {
	if ( halloween == 10 ) {
		mes "you just complete this quest";
		halloween = #halloween = 0;
		#misc_quest |= 1; // <-- THIS LINE
	}
	else if ( halloween )
		mes "you have killed "+ halloween +" ghouls";
	else
		mes "you have to kill 2000 ghouls";
	close;
}
mes "happy halloween event";
select "take quest";
#halloween = 1;
mes "you have to kill 2000 ghouls";
close;
OnNPCKillEvent:
if ( killedrid == 1036 && #halloween && halloween < 10 )
	dispbottom "[Halloween Event] "+ halloween++ +" Ghouls killed!";
end;
}

LMAO !!!

I've been 4 years since I last written a quest script !!! LOL

I seem to get off touch writing this simple script rofl

@Emistry

omg, you script there start to looks like my mission board script

as I'm using that same technique in that script

now I mention about mission board, I do have that 'Can do: Only once' setting in that script ... hmm ....

Edited by AnnieRuru
  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  96
  • Topics Per Day:  0.02
  • Content Count:  554
  • Reputation:   14
  • Joined:  09/24/12
  • Last Seen:  

 
@Jezu

you can try this if you want...

http://pastebin.com/raw.php?i=LnfA35rF

Only edit this part...

OnInit:

// Variable Name

set .VariableName$,"#Halloween";

// Required Monster ID + Amount

setarray .MobDB[0],1002,2000;

// Reward Item + Amount

setarray .ItemDB[0],607,100;

end;

doesnt support multiple item / monsters...

i havent test the script yet ~

maded 10 hours ago...but damn...cant connect to internet...

 

Sir...Emistry,,, I trying your script and found some error.. all was working properly but... my char stuck when done talking to both npc...

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...