new npc = a elf

All development of pixel art and graphics
User avatar
lien
Novice
Novice
Posts: 446
Joined: 30 Oct 2008, 09:59
Location: France

new npc = a elf

Post by lien » 13 Nov 2009, 19:15

card number "25 1" has no npc should add one for a quest as such as having the elf hat. good short I add the npc eye for a minimum of realism .
gif.gif
gif.gif (2.91 KiB) Viewed 2545 times
Image
User avatar
lien
Novice
Novice
Posts: 446
Joined: 30 Oct 2008, 09:59
Location: France

Re: new npc = a elf

Post by lien » 14 Nov 2009, 11:44

i think to ad in

Code: Select all

29 64 map 25 1 
00000000000.png
00000000000.png (197.46 KiB) Viewed 2483 times
Image
User avatar
lien
Novice
Novice
Posts: 446
Joined: 30 Oct 2008, 09:59
Location: France

Re: new npc = a elf

Post by lien » 15 Nov 2009, 16:09

Code: Select all

 025-1.gat,29,64,0	script	elf	?,{
  if( eflquest == 1) goto L_thank;
  mes "[elf]";
  mes "\"Hello, have you got a Question ?AND...";
  mes "you like my hat ?\"";
  next;
L_Menu:
  menu
   "your  hat are very good ",L_good;
   "what your history why are you a elf" , L_question;
   "Bye",-,
     mes "[elf]";
  mes "\"BYe ...";
  mes " BYE \"";
  close;
L_question:
  mes "[elf]";
   mes "\"You think I'm the only elf in the vast forest that's true I'm alone.";
   mes "  \"";
  next;
 mes "[elf]";
   mes "\"there many years we lived in community
We, the elves, but one day the lumberjacks came into our shelter and we were.";
   mes "  \"";
   next;
   mes "[elf]";
   mes "\"... massacred. I hide in the forest to escape death and I am alone forever and I am very annoyed because I have no shoe or other object useful to my horrible life.";
   mes "  \"";
    next;
menu
  "can i help you ?",L_help;
  "repeat please ", L_question;
 "Zzzz...", -;
 "you are crazy ?", L_death;
    mes "[elf]";
  mes "\"...?";
  mes " you go to sleep elsewhere\"";
  close;
L_help:
     mes "[elf]";
  mes "\"i want a new boots and a new hat please a fancy hat because i like the orange ...";
  mes "  \"";
next;
     mes "[elf]";
  mes "\"and 2 snake skin and 2 dark cristal ";
  mes " you are sure ? \"";
menu
"yes", L_yes;
"no" , L_death;
L_death:
 mes "[elf]";
  mes "\"BYe ...";
  mes " BYE \"";
next;

	gmcommand strcharinfo(0)+":@die ";
close;
L_yes
if(countitem("snake skin") < 2) goto L_NoItem;
if(countitem("fancy hat") < 1) goto L_NoItem;
if(countitem("dark crystal") < 2) goto L_NoItem;
if(countitem("boots") < 1) goto L_NoItem;
delitem "snake skin", 2;
delitem "fancy hat", 1;
delitem "dark cristal", 2;
delitem "boots", 1;
if (@inventorylist_count > 99) goto L_TooMany;
getitem "ElfHat", 1;
set eflquest, 1;
L_Toomany:
  mes "[elf]";
  mes "\"this item is too big for you";
  mes " sorry \"";
close;
L_noItem:
  mes "[elf]";
  mes "\"sorry but you haven't the required object";
  mes " BYE \"";
close;
L_good:
  mes "[elf]";
  mes "\"thank ";
  mes " you are kind \"";
goto L_menu
L_thank:
mes "[elf]";
  mes "\"thank ";
  mes " for your help \""
close;
}
Image
AcnotAlpha
Peon
Peon
Posts: 55
Joined: 29 Oct 2009, 13:52

Re: new npc = a elf

Post by AcnotAlpha » 18 Nov 2009, 19:51

I like your idea, but your code is quite messy. Maybe something more like this:

Code: Select all

025-1.gat,29,64,0   script   Elf   ?,{
  if( elfquest == 1) goto L_complete;
  mes "[Elf]";
  mes "\"Hello. Do you like my hat? \"";
  next;
L_Menu:
  menu
   "Yes, it's a nice hat.",L_good;
   "Who are you?" , L_question;
   "Bye",-,
   close;
L_question:
  mes "[Elf]";
   mes "\"I'm an elf, probably the only one left.";
   mes "Many years ago, there were thousands of us.  \"";
  next;
mes "[Elf]";
   mes "\"We all lived quite happily, until one day the lumberjacks came.";
   mes "They discovered our village, and destroyed it. \"";
   next;
   mes "[Elf]";
   mes "\"A couple hundred other elves and I were all that was left.";
   mes "The other elves decided to fight, but they were hopelessly outnumbered.";
   mes "They were all killed by the lumberjacks, and I am all that's left. \"";
   next;
menu
  "Is there anything I can do to help?",L_help;
  "Repeat, please ", L_question;
  "You are crazy!", L_death;
  "Zzzz...", -;
  mes "[elf]";
  mes "\"You aren't even listening.";
  mes " Go away.\"";
  close;
L_help:
     mes "[elf]";
  mes "\"Actually, yes. I fled the camp, and didn't have time to get anything but these clothes.";
  mes "I could use some new boots. Get me some, and I will make you a hat like this one.\"";
next;
     mes "[Elf]";
  mes "\"I will need 2 [Snake Skin]s, 2 [Dark Crystal]s, and 1 [Fancy Hat] for your hat.";
  mes "Noe, go and get these things for me. \"";
menu
"Ok.", L_yes;
"No way!" , L_death;
L_death:
mes "[Elf]";
  mes "\"You should be polite to your betters.";
  mes "Maybe this will help you remember.\"";
next;
   gmcommand strcharinfo(0)+":@die ";
close;
L_yes
if(countitem("SnakeSkin") < 2) goto L_NoItem;
if(countitem("FancyHat") < 1) goto L_NoItem;
if(countitem("DarkCrystal") < 2) goto L_NoItem;
if(countitem("Boots") < 1) goto L_NoItem;
delitem "SnakeSkin", 2;
delitem "FancyHat", 1;
delitem "DarkCrystal", 2;
delitem "Boots", 1;
if (@inventorylist_count > 99) goto L_TooMany;
getitem "ChristmasElfHat", 1;
set elfquest, 2;
L_Toomany:
  mes "[Elf]";
  mes "\"You have too much stuff; this hat won't fit.";
  mes " Come back later after removing some stuff. \"";
close;
L_noItem:
  mes "[Elf]";
  mes "\"I'm sorry, but you don't have all the items I asked for.";
  mes " Come back later when you have them all. \"";
close;
L_good:
  mes "[Elf]";
  mes "\"Thank you, I think it is too.";
goto L_menu
L_complete:
mes "[Elf]";
  mes "\"Thank you for your help. \""
close;
}
Ingame: Kra'Toth
User avatar
Lizandra
Novice
Novice
Posts: 275
Joined: 08 Mar 2009, 22:02
Location: Germany

Re: new npc = a elf

Post by Lizandra » 19 Nov 2009, 01:08

lol programmer conversation =) cute^^

i cant see how clear it is...it seems chinese to me...but i would like an elf ^^ maybe next to the swamp it could be an elven forest or something, in the future^^
"Genetics is the main difference between you and a shrimp" by A.

Level 75!
https://trello.com/themanaworld
http://sourceforge.net/projects/cometz/
User avatar
lien
Novice
Novice
Posts: 446
Joined: 30 Oct 2008, 09:59
Location: France

Re: new npc = a elf

Post by lien » 19 Nov 2009, 14:43

thank Acnot alpha but there is a error :
you wrote

Code: Select all

getitem "ChristmasElfHat", 1;
and
but it is

Code: Select all

getitem "ElfHat", 1;
because this item is a elf hat not a christmas elf hat here
Image
AcnotAlpha
Peon
Peon
Posts: 55
Joined: 29 Oct 2009, 13:52

Re: new npc = a elf

Post by AcnotAlpha » 20 Nov 2009, 00:15

Yes, that's true. The reason for that is, when I wrote that, I hadn't read the topic about the Elf Hat item, so I thought you were thinking of the [Christmas Elf Hat].
Ingame: Kra'Toth
AcnotAlpha
Peon
Peon
Posts: 55
Joined: 29 Oct 2009, 13:52

Re: new npc = a elf

Post by AcnotAlpha » 20 Nov 2009, 00:30

Here's a revised version:

Code: Select all

025-1.gat,29,64,0   script   Elf   ?,{
  if(elfquest == 1) goto L_makehat;
  if(elfquest == 2) goto L_complete;
  mes "[Elf]";
  mes "\"Hello. Do you like my hat? \"";
  next;
L_Menu:
  menu
   "Yes, it's a nice hat.",L_good;
   "Who are you?" , L_question;
   "Bye",-,
   close;
L_question:
  mes "[Elf]";
   mes "\"I'm an elf, probably the only one left.";
   mes "Many years ago, there were thousands of us.  \"";
  next;
mes "[Elf]";
   mes "\"We all lived quite happily, until one day the lumberjacks came.";
   mes "They discovered our village, and destroyed it. \"";
   next;
   mes "[Elf]";
   mes "\"A couple hundred other elves and I were all that was left.";
   mes "The other elves decided to fight, but they were hopelessly outnumbered.";
   mes "They were all killed by the lumberjacks, and I am all that's left. \"";
   next;
menu
  "Is there anything I can do to help?",L_help;
  "Repeat, please ", L_question;
  "You are crazy!", L_death;
  "Zzzz...", -;
  mes "[Elf]";
  mes "\"You aren't even listening.";
  mes " Go away.\"";
  close;
L_help:
     mes "[Elf]";
  mes "\"Actually, yes. I fled the camp, and didn't have time to get anything but these clothes.";
  mes "I could use some new boots. Get me some, and I will make you a hat like this one.\"";
next;
     mes "[Elf]";
  mes "\"I will need 2 [Snake Skin]s, 2 [Dark Crystal]s, and 1 [Fancy Hat], to make your hat.";
  mes "Will you get these for me?. \"";
menu
"Ok.", L_yes;
"No way!" , L_death;
"I am too busy to help you.", -;
close;
L_death:
mes "[Elf]";
  mes "\"You should be polite to your betters.";
  mes "Maybe this will help you remember.\"";
next;
   gmcommand strcharinfo(0)+":@die ";
close;
L_yes
  mes "[Elf]";
  mes "\"Now go bring me the items.\"";
  set elfquest, 1;
close;
L_makehat
  mes "[Elf]";
  mes "\"Did you bring me the items I asked for?\"";
  next;
if(countitem("SnakeSkin") < 2) goto L_NoItem;
if(countitem("FancyHat") < 1) goto L_NoItem;
if(countitem("DarkCrystal") < 2) goto L_NoItem;
if(countitem("Boots") < 1) goto L_NoItem;
delitem "SnakeSkin", 2;
delitem "FancyHat", 1;
delitem "DarkCrystal", 2;
delitem "Boots", 1;
if (@inventorylist_count > 99) goto L_TooMany;
getitem "ElfHat", 1;
set elfquest, 2;
L_Toomany:
  mes "[Elf]";
  mes "\"You have too much stuff; this hat won't fit.";
  mes " Come back later after removing some stuff. \"";
close;
L_noItem:
  mes "[Elf]";
  mes "\"I'm sorry, but you don't have all the items I asked for.";
  mes " Please bring 1 [Boots], 2 [Snake Skin]s, 2 [Dark Crystal]s, and 1 [Fancy Hat]."
  mes " Come back later when you have them. \"";
close;
L_good:
  mes "[Elf]";
  mes "\"Thank you, I think it is too.";
goto L_menu
L_complete:
mes "[Elf]";
  mes "\"Thank you for your help. \""
close;
}
Ingame: Kra'Toth
User avatar
Kage
Warrior
Warrior
Posts: 927
Joined: 02 May 2009, 19:12

Re: new npc = a elf

Post by Kage » 22 Nov 2009, 22:35

it should be noted that this line is not needed because you free up AT LEST two item slots just above it

Code: Select all

if (@inventorylist_count > 99) goto L_TooMany;
<Kage_Jittai> ... are you saying I am elite :D
<thorbjorn> Yes. :P
AcnotAlpha
Peon
Peon
Posts: 55
Joined: 29 Oct 2009, 13:52

Re: new npc = a elf

Post by AcnotAlpha » 23 Nov 2009, 16:21

Okay, here's YAR (yet another revision).

Code: Select all

025-1.gat,29,64,0   script   Elf   ?,{
  if(elfquest == 1) goto L_makehat;
  if(elfquest == 2) goto L_complete;
  mes "[Elf]";
  mes "\"Hello. Do you like my hat? \"";
  next;
L_Menu:
  menu
   "Yes, it's a nice hat.",L_good;
   "Who are you?" , L_question;
   "Bye",-,
   close;
L_question:
  mes "[Elf]";
   mes "\"I'm an elf, probably the only one left.";
   mes "Many years ago, there were thousands of us.  \"";
  next;
mes "[Elf]";
   mes "\"We all lived quite happily, until one day the lumberjacks came.";
   mes "They discovered our village, and destroyed it. \"";
   next;
   mes "[Elf]";
   mes "\"A couple hundred other elves and I were all that was left.";
   mes "The other elves decided to fight, but they were hopelessly outnumbered.";
   mes "They were all killed by the lumberjacks, and I am all that's left. \"";
   next;
menu
  "Is there anything I can do to help?",L_help;
  "Repeat, please ", L_question;
  "You are crazy!", L_death;
  "Zzzz...", -;
  mes "[Elf]";
  mes "\"You aren't even listening.";
  mes " Go away.\"";
  close;
L_help:
     mes "[Elf]";
  mes "\"Actually, yes. I fled the camp, and didn't have time to get anything but these clothes.";
  mes "I could use some new boots. Get me some, and I will make you a hat like this one.\"";
next;
     mes "[Elf]";
  mes "\"I will need 2 [Snake Skin]s, 2 [Dark Crystal]s, and 1 [Fancy Hat], to make your hat.";
  mes "Will you get these for me?. \"";
menu
"Ok.", L_yes;
"No way!" , L_death;
"I am too busy to help you.", -;
close;
L_death:
mes "[Elf]";
  mes "\"You should be polite to your betters.";
  mes "Maybe this will help you remember.\"";
next;
   gmcommand strcharinfo(0)+":@die ";
close;
L_yes
  mes "[Elf]";
  mes "\"Now go bring me the items.\"";
  set elfquest, 1;
close;
L_makehat
  mes "[Elf]";
  mes "\"Did you bring me the items I asked for?\"";
  next;
if(countitem("SnakeSkin") < 2) goto L_NoItem;
if(countitem("FancyHat") < 1) goto L_NoItem;
if(countitem("DarkCrystal") < 2) goto L_NoItem;
if(countitem("Boots") < 1) goto L_NoItem;
delitem "SnakeSkin", 2;
delitem "FancyHat", 1;
delitem "DarkCrystal", 2;
delitem "Boots", 1;
getitem "ElfHat", 1;
set elfquest, 2;
L_noItem:
  mes "[Elf]";
  mes "\"I'm sorry, but you don't have all the items I asked for.";
  mes " Please bring 1 [Boots], 2 [Snake Skin]s, 2 [Dark Crystal]s, and 1 [Fancy Hat]."
  mes " Come back later when you have them. \"";
close;
L_good:
  mes "[Elf]";
  mes "\"Thank you, I think it is too.";
goto L_menu
L_complete:
mes "[Elf]";
  mes "\"Thank you for your help. \""
close;
}
Ingame: Kra'Toth
User avatar
Doulos
Novice
Novice
Posts: 189
Joined: 26 Jan 2009, 18:23

Re: new npc = a elf

Post by Doulos » 23 Nov 2009, 20:45

woo woo!!

Huge thumbs up! Code and Pixels!

Sweeeet
AcnotAlpha
Peon
Peon
Posts: 55
Joined: 29 Oct 2009, 13:52

Re: new npc = a elf

Post by AcnotAlpha » 27 Nov 2009, 19:45

I have been reviewing the code a little, and I think a few mods are in order.
Currently, the hat costs 2 [Snake Skin]s, 1 [Fancy Hat], and 2 [Dark Crystal]s. I think we should change it to something like 10 [Snake Skin]s, 1 [Fancy Hat], 1 [Green Dye], 2 [Dark Crystal]s, 10 [Cotton Cloth]s, and 10 or 20k gp. It would be harder to get, but that's kind of the point with quests. As another compensation, we could have it give the player exp, maybe 10k-20k or so. I'd like to hear some thoughts on this.
Ingame: Kra'Toth
User avatar
lien
Novice
Novice
Posts: 446
Joined: 30 Oct 2008, 09:59
Location: France

Re: new npc = a elf

Post by lien » 27 Nov 2009, 20:32

AcnotAlpha wrote:I have been reviewing the code a little, and I think a few mods are in order.
Currently, the hat costs 2 [Snake Skin]s, 1 [Fancy Hat], and 2 [Dark Crystal]s. I think we should change it to something like 10 [Snake Skin]s, 1 [Fancy Hat], 1 [Green Dye], 2 [Dark Crystal]s, 10 [Cotton Cloth]s, and 10 or 20k gp. It would be harder to get, but that's kind of the point with quests. As another compensation, we could have it give the player exp, maybe 10k-20k or so. I'd like to hear some thoughts on this.
I think that was too much to be a hat
simply because I thought that a hat would be 6 or 7 defense and +1 mana bonus
I think that (even if is was I who added) the snakes skins are useless as would leather and leather made malus mana. the cotton cloth is very well thought but ten cotton cloth
it's a bit too I think 5 because the hat is small. if the dye is very well thought
and at the money that would be 10 000 gp and exp I think 0 or 1 000 exp for a hat that because this quest is not very heroic
Image
AcnotAlpha
Peon
Peon
Posts: 55
Joined: 29 Oct 2009, 13:52

Re: new npc = a elf

Post by AcnotAlpha » 27 Nov 2009, 20:56

Okay, so 5 cloths, a green dye, a fancy hat, 2 dark crystals, and 10k gp. 7 def, but it would be nice to have the mana bonus more like 5, could be an ideal mage hat. Devs might not like it as well though. Then 1k exp to top it off. Sound about right?
Ingame: Kra'Toth
User avatar
lien
Novice
Novice
Posts: 446
Joined: 30 Oct 2008, 09:59
Location: France

Re: new npc = a elf

Post by lien » 27 Nov 2009, 21:10

elves are often little mages, archers, but most often it is a little magician and a little warrior, a paladin
this bonus (magic bonus) is + 2 ?? no + 5 ??
Image
Post Reply