Jump to content
  • 0

Freebies NPC


Quesooo

Question


  • Group:  Members
  • Topic Count:  197
  • Topics Per Day:  0.07
  • Content Count:  883
  • Reputation:   28
  • Joined:  02/13/17
  • Last Seen:  

Good day rathena help me with this script please

 

i want this to give only 1 character per account  if the player make new character on her account he cant get again

 

this is the script please modify it thank you ^_^

 

new_3-1,58,114,4	script	Freebies	832,{
    mes "Welcome to Aki Ragnarok Online";
    mes "What Service May I Offer You ?";
    next;
    menu "Get Freebies", L16;

    L16:
	if(#New_Player == 1 || Class!=Job_Novice ) goto L_Done;
	if(Class==Job_Novice && #New_Player==0) {
		mes "Good Luck on your Adventure !";
		mes "Which path do you wish to take?";
		switch(select("Swordsman:Archer:Mage:Acolyte:Merchant:Thief"))	{
			case 1://Swordsman
			getitem 13945,1;
			break;
			
			case 2://Archer
			getitem 13948,1;
			break;
				
			case 3://Mage
			getitem 13946,1;
			break;
			
			case 4://Acolyte
			getitem 13947,1;
			break;
			
			case 5://Merchant
			getitem 13949,1;
			break;
			
			case 6://Thief
			getitem 13950,1;
			break;
		}
		// Since these lines where everytime the same I put them here.
		// Also you had after those lines a "close" which ends the script
		// completely without setting the "#New_Player" variable to 1
		// A "break;" breaks the "loop" or in this case the "switch" so it ends it and continues with the script below
		getitem 12214,5;           // Convex mirror 5pcs.
		getitem 12210,5;	  // Bubble gum 5pcs.
		getitem 12263,5;	 // Manual 5pcs.
		getitem 5826,1;         // Hat 1pc.
		getitem 569,30;          // Potions 30pcs.
		getitem 12323,20;       // Novice Fly wing 20pcs.
		mes "Start your awesome journey today.";
		mes "If you need help. Please use @request / search for Game Staffs. Thank You.";
		close;
	}
    end;

	L_Done:
	mes "You Have Received the Freebies already.";
	close;

OnInit:
    waitingroom "Welcome to Aki Ragnarok Online",0;
	end;
}

// == Mapflags
new_1-2	mapflag	nowarp
new_1-2	mapflag	nowarpto
new_1-2	mapflag	noteleport
new_1-2	mapflag	nosave
new_1-2	mapflag	nomemo
new_1-2	mapflag	nobranch
new_1-2	mapflag	pvp_noparty
new_1-2	mapflag	restricted	1
new_1-2	mapflag	nosave
new_1-2	mapflag	nomemo

 

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.00
  • Content Count:  249
  • Reputation:   72
  • Joined:  10/20/12
  • Last Seen:  

Just set #New_Player to one, after the player got the items. The checks are already there.

  • Upvote 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:  

Everytime Player get item put


set #New_Player,1;

  • Upvote 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  6
  • Topics Per Day:  0.00
  • Content Count:  261
  • Reputation:   53
  • Joined:  11/11/16
  • Last Seen:  

//~~~~~NPC
new_zone01,137,122,4	script	Freebies	718,{
if( !#Freebies ){
set #Freebies,1;
mes "Welcome to MyServerNameHere, Here are your start items!";
mes "You only get this once for each account!";
getitem 31004,1;
getitem 31005,1;
getitem 31006,1;
getitem 31007,1;
getitem 31008,1;
getitem 501,10;
getitem 13599,1;
end;
}else{
mes "You have claimed the Reward already.";
end;
}

I got this off somewhere on the forums, but I lost where I found.  Credits are to them, but this works perfectly.

Link to comment
Share on other sites

  • 0

  • Group:  Developer
  • Topic Count:  50
  • Topics Per Day:  0.02
  • Content Count:  763
  • Reputation:   227
  • Joined:  02/11/17
  • Last Seen:  

new_3-1,58,114,4	script	Freebies	832,{
	mes "[Freebies NPC]";
	mes "Welcome to Server Name!!";
	if ( #NewbieGift > 0 ) goto Recieved;
	mes "Here's your freebies!";
	getitem 12214,5;
	getitem 12210,5;
	getitem 12263,5;
	getitem 5826,5;
	getitem 569,30;
	getitem 12323,20;	
	set #NewbieGift, 1;	
	next;
	mes "Please select your class specific freebies that you want to get:";
		switch(select("Swordsman:Archer:Mage:Acolyte:Merchant:Thief")) {
			case 1:
				mes "[Freebies NPC]";
				mes "Here's your freebies for Swordsman class";
				getitem 13945,1;
				goto Message1;
				end;
			case 2:
				mes "[Freebies NPC]";
				mes "Here's your freebies for Archer class";
				getitem 13948,1;
				goto Message1;
				end;	
			case 3:
				mes "[Freebies NPC]";
				mes "Here's your freebies for Mage class";
				getitem 13946,1;
				goto Message1;
				end;
			case 4:
				mes "[Freebies NPC]";
				mes "Here's your freebies for Acolyte class";
				getitem 13947,1;
				goto Message1;
				end;
			case 5:
				mes "[Freebies NPC]";
				mes "Here's your freebies for Merchant class";
				getitem 13949,1;
				goto Message1;
				end;
			case 6:
				mes "[Freebies NPC]";
				mes "Here's your freebies for Thief class";
				getitem 13950,1;
				goto Message1;
				end;
				}
	
	Message1:
	mes "[Freebies NPC]";
	mes "Start your awesome journey today.";
	mes "If you need help. Please use @request / search for Game Staffs. Thank You.";
	close;
	
	Recieved:
	mes "[Freebies NPC]";
	mes "You already recieved a freebies.";
	close;
	}

Modified your script :)) Just give it a try. /heh 

Edited by crazyarashi
Fixed the script given
  • Upvote 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...