Jump to content
  • 0

Base Level Milestone Gift NPC


RavenThorne

Question


  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  1
  • Reputation:   0
  • Joined:  04/21/18
  • Last Seen:  

Our server wanted to implement an NPC that grants players the ability to gain base level milestone gifts after obtaining certain levels. If someone could help us craft it, that would be fantastic. Here's the features we'd like it to have. 

 

Players will receive milestone rewards at PRE-TRANS base level 50/70/90. Players can only receive these prizes 3 times per milestone per account and should be account locked. (So when their 4th character hits lvl 50, the npc will tell them "sorry you've reached your prize limit)

 

Lvl 50 Items: 

ID# 607 x5 & #610 x5

Lvl 70 Items:

ID# 607 x10 & #610 x10

Lvl 90 Items:

#607 x15

#610 x15

#616 x1

 

Let me know if you have any questions. We appreciate the help!

 

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 1

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

Link to comment
Share on other sites

  • 1

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

Spoiler

1st thing came to my mind was bit-shifting ....


prontera,155,185,5	script	bit set	1_F_MARIA,{
	while (true) {
		mes "Number is -> "+ .bit;
		for ( .@i = 0; .@i < 4; ++.@i )
			mes "Set "+( .@i +1 )+" -> "+( (.bit >> (.@i*5)) & ((1<<5)-1) );
		next;
		.@s = select( "Set 1:Set 2:Set 3:Set 4" ) -1;
		input .@num, 0, (1<<5) -1;
		.bit &= ~( ((1<<5)-1) << (.@s*5));
		.bit |= .@num << (.@s*5);
	}
}

prontera,158,185,5	script	bit increment	1_F_MARIA,{
	while (true) {
		mes "Number is -> "+ .bit;
		for ( .@i = 0; .@i < 4; ++.@i )
			mes "Set "+( .@i +1 )+" -> "+( (.bit >> (.@i*5)) & ((1<<5)-1) );
		next;
		.@s = select( "Set 1:Set 2:Set 3:Set 4" ) -1;
		.@num = ( (.bit >> (.@s*5)) & ((1<<5)-1) ) +1;
		.bit &= ~( ((1<<5)-1) << (.@s*5));
		.bit |= .@num << (.@s*5);
	}
}

then I realize bit-shifting not allow to do a simple addition or even value increment ...
hmm ... maybe use back the old school base 10 method then

-	script	Sample	-1,{
OnPCBaseLvUpEvent:
	if ( Upper & 1 ) end; // yeah PRE-TRANS ...
	else if ( BaseLevel == 90 && (#lv_milestone /1 %10) < 3 ) {
		#lv_milestone += 1;
		getitem 607, 15;
		getitem 610, 15;
		getitem 616, 1;
		dispbottom "You gained reward for level 90.";
	}
	else if ( BaseLevel == 70 && (#lv_milestone /10 %10) < 3 ) {
		#lv_milestone += 10;
		getitem 607, 10;
		getitem 610, 10;
		dispbottom "You gained reward for level 70.";
	}
	else if ( BaseLevel == 50 && (#lv_milestone /100 %10) < 3 ) {
		#lv_milestone += 100;
		getitem 607, 5;
		getitem 610, 5;
		dispbottom "You gained reward for level 50.";
	}
	end;
}

 

  • Upvote 2
Link to comment
Share on other sites

  • -3

  • Group:  Developer
  • Topic Count:  48
  • Topics Per Day:  0.01
  • Content Count:  1443
  • Reputation:   337
  • Joined:  10/17/12
  • Last Seen:  

Try this Here

  • Upvote 1
  • MVP 1
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...