Page 1 of 1

Here is a new NPC ( Kotrina )

Posted: 19 Dec 2010, 15:00
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;
)

Re: Here is a new NPC ( Kotrina )

Posted: 19 Dec 2010, 15:08
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.

Re: Here is a new NPC ( Kotrina )

Posted: 19 Dec 2010, 15:09
by bcs86
If I'm reading this right, you've chosen NPC 202 "hell blaze" to be the sprite?

Re: Here is a new NPC ( Kotrina )

Posted: 19 Dec 2010, 15:11
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