Here is a new NPC ( Kotrina )

Content and general development discussion, including quest scripts and server code. TMW Classic is a project comprising the Legacy tmwAthena server & the designated improved engine server based on evolHercules.


Forum rules

This forum houses many years of development, tracing back to some of the earliest posts that exist on the board.

Its current use is for the continued development of the server and game it has always served: TMW Classic.

Post Reply
User avatar
natsuki3
Novice
Novice
Posts: 222
Joined: 04 Jul 2010, 17:32
Location: /bin/manaplus

Here is a new NPC ( Kotrina )

Post by natsuki3 »

hello these is one of my firsts npc can some dev see it , ill go to test it

Code: Select all

//

007-1.gat,72,52,0	script	Kotrina	202,{
        mes "[Kotrina]";
	mes "\"Hi , Im Kotrina the clothes maker ?\"";
	next;
	input @name$;

        mes "[Kotrina]";
	mes "\"Hi, " + @name$ + "! can you help me?\"";
	next;

	menu
		"Yes, Sure.", -,
		"Sorry , i dont have time", -,
        close;

        mes "[Kotrina]";
	mes "\"Do you have 5 [White Fur] in your bag ?\"";
	next;

	menu
		"No , but ill go to get them.", -,
		"Sure, here they are!", L_Exchange_Exchange;
	close;

L_Same:
        mes "[Kotrina]";
	mes "\"Mine too!\"";
	close;
L_Exchange_Exchange:
if (countitem("WhiteFur") < 5) goto L_Exchange_Notenough;
	getinventorylist;
	if (@inventorylist_count == 100 && countitem("WhiteFur") > 5) goto L_Exchange_TooMany;
	delitem "WhiteFur", 5;
	getitem "CottonShorts", 1;
close;
L_Exchange_Notenough:
	mes "[Kotrina]";
	mes "\"Hey , go and get the Furs!\"";
	close;
)
Its blue like the sea.
User avatar
Crush
TMW Adviser
TMW Adviser
Posts: 8046
Joined: 25 Aug 2005, 16:08
Location: Germany

Re: Here is a new NPC ( Kotrina )

Post by Crush »

Why exactly are you posting this script? Do you want this NPC to be ingame or do you just want us to tell you what you could do better?


Just after taking a quick look I've noticed that:

- You prompt the player to enter a string without any explanation and then you assume that the player entered its name for some reason.
- You are goto-ing to a label "L_Exchange_TooMany" which doesn't appear to exist.
  • former Manasource Programmer
  • former TMW Pixel artist
  • NOT a game master

Please do not send me any inquiries regarding player accounts on TMW.


You might have heard a certain rumor about me. This rumor is completely false. You might also have heard the other rumor about me. This rumor is 100% accurate.
User avatar
bcs86
Warrior
Warrior
Posts: 259
Joined: 27 Feb 2009, 17:14
Contact:

Re: Here is a new NPC ( Kotrina )

Post by bcs86 »

If I'm reading this right, you've chosen NPC 202 "hell blaze" to be the sprite?
User avatar
natsuki3
Novice
Novice
Posts: 222
Joined: 04 Jul 2010, 17:32
Location: /bin/manaplus

Re: Here is a new NPC ( Kotrina )

Post by natsuki3 »

i put a number only :P

and Crunch what is the problem i mean what it needs the npc ?
and im starting to create npcs :D im n00b
Its blue like the sea.
Post Reply