Jump to content
  • 0

rewarder for 1st 100 level 99 players


antigm2

Question


  • Group:  Members
  • Topic Count:  7
  • Topics Per Day:  0.00
  • Content Count:  18
  • Reputation:   0
  • Joined:  05/01/12
  • Last Seen:  

I would like to request this kind of npc rewarder:

-NPC that gives certain reward for example TCG Cards(7227)
-Requirement must be level 99
-The rewards are consumable meaning only 1st 100 players to get level 99 will receive reward

 

If possible:
-1st 3 players that are level 99 to click the reward npc will get different rewards for example TCG cards(7227), emperium(714)

-then the rest of the rewards are just TCG Cards(7227)

 

thank you in advance! i tried looking for similar rewarder but i keep on getting reward event npc.

 
Link to comment
Share on other sites

9 answers to this question

Recommended Posts


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


- script Sample -1,{

OnPCBaseLvUpEvent:

if( BaseLevel == 99 ){

if( $count < 3 )

getitem 714,1;

}

else if( $count < 100 ){

getitem 7227,1;

dispbottom "gained rewards..";

}

$count++;

}

end;

}

Edited by Emistry
updated.
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  7
  • Topics Per Day:  0.00
  • Content Count:  18
  • Reputation:   0
  • Joined:  05/01/12
  • Last Seen:  

thanks emistry! can we add a broadcast of how many rewards are left? for example

"Congratulations " + strcharinfo(0) + " for receiving the level 99 reward, there are only 98 rewards left!";

Link to comment
Share on other sites


  • Group:  Developer
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  2407
  • Reputation:   613
  • Joined:  07/05/12
  • Last Seen:  

		dispbottom "gained rewards..";
	}
+	$count++;
+	announce "Congratulations " + strcharinfo(0) + " for receiving the level 99 reward, there are only "+ (100-$count) +" rewards left!",0;

nb. this way a player get the prize twice, in normal and rebirth job

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  7
  • Topics Per Day:  0.00
  • Content Count:  18
  • Reputation:   0
  • Joined:  05/01/12
  • Last Seen:  

NP my server is only at second job :) thanks!



how can we limit this 1 per character only?

not 1 per account :)

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  50
  • Topics Per Day:  0.01
  • Content Count:  308
  • Reputation:   3
  • Joined:  12/18/11
  • Last Seen:  

much better if you add an option of first 99 trans job like that to avoid 2 times getting the price

Link to comment
Share on other sites


  • Group:  Developer
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  2407
  • Reputation:   613
  • Joined:  07/05/12
  • Last Seen:  


- if( BaseLevel == 99 ){

+ if( BaseLevel == 99 && $count < 100 && Upper ){

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  7
  • Topics Per Day:  0.00
  • Content Count:  18
  • Reputation:   0
  • Joined:  05/01/12
  • Last Seen:  

@capuche i tried adding and removing what you said but nothing happens when you click the npc. but there are no errors detected. can you recheck on that again? thanks!



and this problem also hehehhee

 

jlsq.jpg

Link to comment
Share on other sites


  • Group:  Developer
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  2407
  • Reputation:   613
  • Joined:  07/05/12
  • Last Seen:  

u said but nothing happens when you click the npc

the preview script only work when a player reach lvl 99, the player can't click on it

 

try this one

prontera,145,150,5	script	Sample	56,{
	if( BaseLevel == 99 && reward_lvl == 0 && Upper && .count < 100 ){
		if( .count < 3 )
			getitem 714,1;
		if( .count < 100 )
			getitem 7227,1;
		reward_lvl++;
		.count++;
		announce "Congratulations " + strcharinfo(0) + " for receiving the level 99 reward, there are only "+ (100-.count) +" rewards left!",0;
	}
	else if ( reward_lvl ) {
		mes "you already get your reward";
		close;
	}
	else if ( BaseLevel != 99 ) {
		mes "you are not lvl 99";
		close;
	}
	end;
OnInit:
	.count = query_sql( "select `value` from `global_reg_value` where `str`= 'reward_lvl'", .@value );
	if ( .count >99 ) end;
// limit to 127 players online here
	.@size = query_sql( "select `account_id` from `char` where `char_id` not in ( select `char_id` from `global_reg_value` where `str`= 'reward_lvl' ) and `online`=1", .@account_id );
	for ( .@i = 0; .@i < .@size; .@i++ ) {
		attachrid .@account_id[.@i];
		if ( reward_lvl ) {
			.count++;
			if ( .count >99 ) end;
		}
	}
	end;
}
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  59
  • Topics Per Day:  0.02
  • Content Count:  122
  • Reputation:   0
  • Joined:  06/08/14
  • Last Seen:  

not working

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