new npc = a elf
Posted: 13 Nov 2009, 18: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 .
Feel the mana power growing inside you!
https://forums.themanaworld.org/
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;
}
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;
}
Code: Select all
getitem "ChristmasElfHat", 1;
Code: Select all
getitem "ElfHat", 1;
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;
}
Code: Select all
if (@inventorylist_count > 99) goto L_TooMany;
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;
}
I think that was too much to be a hatAcnotAlpha 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.