Jump to content
  • 0

Freebies NPC


NANORAY

Question


  • Group:  Members
  • Topic Count:  95
  • Topics Per Day:  0.02
  • Content Count:  210
  • Reputation:   3
  • Joined:  12/20/11
  • Last Seen:  

good day! anyone here has a freebies npc that gives freebies when achieving certain job level? can someone share it with me thanks!

Link to comment
Share on other sites

9 answers to this question

Recommended Posts

  • 1

  • Group:  Content Moderator
  • Topic Count:  55
  • Topics Per Day:  0.02
  • Content Count:  1676
  • Reputation:   702
  • Joined:  12/21/14
  • Last Seen:  

@Poring King didn't notice that xD , thanks.

 

this for job level 10

-	script	scriptname#100	-1,{
OnPCJobLvUpEvent:
	if(JobLevel == 10){
		getitem 1002,1;
	}
}

however if you don't want the player to get the reward again (after rebirth and changing the job) do this

-	script	scriptname#100	-1,{
OnPCJobLvUpEvent:
	if(JobLevel == 10){
		if(!freeItems){
			getitem 1002,1;
			freeItems = true;
		}	
	}
}

 

Edited by sader1992
  • Love 1
Link to comment
Share on other sites

  • 0

  • Group:  Content Moderator
  • Topic Count:  55
  • Topics Per Day:  0.02
  • Content Count:  1676
  • Reputation:   702
  • Joined:  12/21/14
  • Last Seen:  

prontera,152,187,3	script	npcname	444,{
  if(!#freeItems){
    if(class == 4010){	//high wizrd
      getitem 1002,1;
    }
    //add more classes here
    #freeItems == true;
  }else{
  	mes "you already got free items :P";
  }
  close;
}

also if you want to make it when the player change his job

make #freeItems to int and make the script as function than call it in every job changer you have in the server

 

Edited by sader1992
  • Like 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  61
  • Topics Per Day:  0.02
  • Content Count:  911
  • Reputation:   166
  • Joined:  11/27/14
  • Last Seen:  

7 minutes ago, sader1992 said:

prontera,152,187,3	script	npcname	444,{
  if(!#freeItems){
    if(class == 4010){	//high wizrd
      getitem 1002,1;
    }
    //add more classes here
    #freeItems == true;
  }else{
  	mes "you already got free items :P";
  }
  close;
}

also if you want to make it when the player change his job

make #freeItems to int and make the script as function than call it in every job changer you have in the server

 

He is referring for job level not for a job.

Change the conditional statement given by @sader1992 change the "class" into "Joblevel" == "Joblevel X"

Edited by Poring King
  • Like 2
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  95
  • Topics Per Day:  0.02
  • Content Count:  210
  • Reputation:   3
  • Joined:  12/20/11
  • Last Seen:  

thanks guys this is so helpful! but how to make it for example player reach job level 10 the player will automatically receive a certain freebies?

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  95
  • Topics Per Day:  0.02
  • Content Count:  210
  • Reputation:   3
  • Joined:  12/20/11
  • Last Seen:  

Just now, sader1992 said:

@Poring King didn't notice that xD , thanks.

 


-	script	scriptname#100	-1,{
OnPCJobLvUpEvent:
	if(JobLevel == 70){
		getitem 1002,1;
	}
}

 

imma try this one thanks all!

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  61
  • Topics Per Day:  0.02
  • Content Count:  911
  • Reputation:   166
  • Joined:  11/27/14
  • Last Seen:  

5 minutes ago, NANORAY said:

thanks guys this is so helpful! but how to make it for example player reach job level 10 the player will automatically receive a certain freebies?

Like what i said since @sader1992 already give a simple script but it is a job . change it into a job then inside the condition if he meet the condition what will script do ? then add your desire thing that you really want to do.

Edited by Poring King
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  95
  • Topics Per Day:  0.02
  • Content Count:  210
  • Reputation:   3
  • Joined:  12/20/11
  • Last Seen:  

also can i set this in multiple job level? for example i want it job level 10,50,70?

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  61
  • Topics Per Day:  0.02
  • Content Count:  911
  • Reputation:   166
  • Joined:  11/27/14
  • Last Seen:  

4 minutes ago, sader1992 said:

@Poring King didn't notice that xD , thanks.

 


-	script	scriptname#100	-1,{
OnPCJobLvUpEvent:
	if(JobLevel == 10){
		getitem 1002,1;
	}
}

 

This is good . but i prefer to give him an idea what he should do so he will know the basic scripting. Giving the script for newbie for me is not a good one because he will not learn the basic. its so important to learn the conditional statement because he will use it everyday that he will do scripting .

Link to comment
Share on other sites

  • 0

  • Group:  Content Moderator
  • Topic Count:  55
  • Topics Per Day:  0.02
  • Content Count:  1676
  • Reputation:   702
  • Joined:  12/21/14
  • Last Seen:  

1 minute ago, NANORAY said:

also can i set this in multiple job level? for example i want it job level 10,50,70?

if(JobLevel == 10 || JobLevel == 20 || JobLevel == 30)
	//SAME REWARD IF YOU WANT THAT


if(JobLevel == 10){
//job level 10 reward
}else if(JobLevel == 20){
//job level 20 reward
}else if(JobLevel == 30){
//job level 30 reward
}

 

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