Jump to content
  • 0

freebie npc


NANORAY

Question


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

1. npc location: iz_int

2. when the player is on the range of the npc it will auto talk

3. npc will give a freebies with qty

4. after freebies had given player will be warped to prontera and save.

Link to comment
Share on other sites

8 answers to this question

Recommended Posts

  • 0

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

prontera,155,175,5	script	Freebie	4_F_KAFRA9,5,5,{
OnTouch:
	if ( #freebies ) {
		mes "Already obtained freebies.";
	}
	else {
		getitem 501,1;
		getitem 502,2;
		getitem 503,3;
		mes "Obtained freebies.";
		#freebies = 1;
		savepoint "prontera",155,181;
	}
	close2;
	warp "SavePoint",0,0;
	end;
}

simplify it ... 

 

@Aureon

  • these basic npcs, just simplify it into one NPC.
  • loadevent are unnecessary.
  • Upvote 1
Link to comment
Share on other sites

  • 1

  • Group:  Members
  • Topic Count:  34
  • Topics Per Day:  0.01
  • Content Count:  281
  • Reputation:   14
  • Joined:  10/14/13
  • Last Seen:  

Try this one:

iz_int,92,92,4	script	Freebies#rA	100,5,5,{
callsub OnMain;
end;
	OnTouch:
	OnMain:
	set @npc$,"[rAthena]";
		if (#freebies == 1) callsub OnDone;
			getitem 501,1;
			getitem 502,2;
			getitem 503,3;
			dispbottom "Freebies has been given!";
			sleep2 1000;
			warp "prontera",150,150;
			end;
OnDone:
	mes @npc$;
	mes "You already have your freebies.";
	close;
}

-	script	Warp#new	-1,{
OnPCLoadMapEvent:
	if (#freebies == 1) end;
		getmapxy(.@map$, .@x, .@y, 0);
		savepoint .@map$, .@x, .@y;
		dispbottom ""+.@map$+" is your new savepoint!";
		set #freebies,1;
		end;
}
prontera	mapflag	loadevent

change this line to whatever freebie item you may want:

getitem 501,1;
getitem 502,2;
getitem 503,3;
  • Upvote 1
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 master!

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  34
  • Topics Per Day:  0.01
  • Content Count:  281
  • Reputation:   14
  • Joined:  10/14/13
  • Last Seen:  

@Emistry sorry, my fault :)

Link to comment
Share on other sites

  • 0

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

@Emistry sorry, my fault :)

no worry, learn from the mistake and improve more.

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.00
  • Content Count:  11
  • Reputation:   0
  • Joined:  10/05/16
  • Last Seen:  

When you have to click on any cell of the map npc keep sayin you already have a freebies

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  3
  • Reputation:   0
  • Joined:  05/08/17
  • Last Seen:  

how can i copy this to winscp ? its not working when i copy to rathena/npc/custom/freebies.txt file 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  8
  • Topics Per Day:  0.00
  • Content Count:  1137
  • Reputation:   290
  • Joined:  04/29/13
  • Last Seen:  

13 minutes ago, X-FamousRO said:

how can i copy this to winscp ? its not working when i copy to rathena/npc/custom/freebies.txt file 

https://github.com/rathena/rathena/wiki/Adding-a-Script

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