• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Requesting Tutor Quest + Npc's

Frillinde

Founder: Another Realm
Joined
Jan 16, 2012
Messages
148
Reaction score
3
Location
his computer
Using crying Damson 0.3.6pl1 8.54 with Uniserver

I'm looking for help making a tutor quest....
It should send player thru a series of npc's located at different sections of the map.Npc #1 starts quest and sends you to #2 who sends you to #3 and so on until last npc who makes you a tutor.Each npc should give some exp as you get to them.

I guess I'd need the scripts for npc 1,2(3 and so on would be the same as 2 with minor edits ) and last.

I'd also like to know more on quest making so if anyone knows good tutorials please link em for me......the 1's I've tried didnt really help.
 
How would I set it so the npcs have to be talked to in a set order (1,2,3,4 not 1,3,2,4 etc.) or they say "sorry I cant help you" if you try out of order. They would also tell you your next npc and its town..."go see bob in new york".
Im gonna have quite a few npc'c for this (13 I think).
Hoping someone can help with this.
:)
 
just make a storage check at each NPC.

like
LUA:
local quest = xxxx

if getPlayerStorageValue(cid, quest) == 0 then
 --do something
 --at the end 
   setPlayerStorageValue(cid, quest, 1)
else
   doPlayerSendTextMessage(cid, 19, "Sorry I can't help you yet.")

the next NPC would be
LUA:
local quest = xxxx

if getPlayerStorageValue(cid, quest) == 1 then
 --do something
 --at the end 
   setPlayerStorageValue(cid, quest, 2)
else
   doPlayerSendTextMessage(cid, 19, "Sorry I can't help you yet.")

Or you could put all talkings and guides in one NPC folder, copy that to every NPC in your xml and loop through it.
 
ok, so how do I setup the npc so if I say"tutor quest",he says "have you seen bob in new york?", I say "yes" and he says "ok now go see bill in cleveland." That goes in the do something spot?
lol Im clueless,sometimes I think Im getting it and sometimes I dont.
 
ok Im tryin but I only get some of the lua.
Here is my attempt at the code.....what do I need to change to make it work?

npc 1
local quest = 2005

if getPlayerStorageValue(cid, quest) == 0 then
doPlayerSendTextMessage(cid, 19, "May I help you with something?")
if msgcontains(msg, 'Tutor Quest')
then
doPlayerSendTextMessage(cid, 19, "Would you like to start the Tutor Quest?")
if msgcontains(msg, 'yes')
then
doPlayerSendTextMessage(cid, 19, "Ok then, You need to speak to Curtis in Ebanor to continue this quest.")
setPlayerStorageValue(cid, quest, 1)
else
if getPlayerStorageValue(cid, quest) == 1 then
doPlayerSendTextMessage(cid, 19, "You should go see Curtis in Ebanor to continue this quest")
else
if getPlayerStorageValue(cid, quest) == 2 then
doPlayerSendTextMessage(cid, 19, "You should go see Brunelle in Duzanne to continue this quest")
else
if getPlayerStorageValue(cid, quest) == 3 then
doPlayerSendTextMessage(cid, 19, "You should go see Gomar at the Southern Post to continue this quest")
else
if getPlayerStorageValue(cid, quest) == 4 then
doPlayerSendTextMessage(cid, 19, "You should go see Braat in Tidus to continue this quest")
else
if getPlayerStorageValue(cid, quest) == 5 then
doPlayerSendTextMessage(cid, 19, "You should go see Freesin in Rundan to continue this quest")
else
if getPlayerStorageValue(cid, quest) == 6 then
doPlayerSendTextMessage(cid, 19, "You should go see Taldorian in Numbring to continue this quest")
else
if getPlayerStorageValue(cid, quest) == 7 then
doPlayerSendTextMessage(cid, 19, "You should go see Fexnir on the Plains of Gormaak to continue this quest")
else
if getPlayerStorageValue(cid, quest) == 8 then
doPlayerSendTextMessage(cid, 19, "You should go see Jolly in Kelbin to continue this quest")
else
if getPlayerStorageValue(cid, quest) == 9 then
doPlayerSendTextMessage(cid, 19, "You should go see Poani at the Northern post to continue this quest")
else
if getPlayerStorageValue(cid, quest) == 10 then
doPlayerSendTextMessage(cid, 19, "You should go see Te'Zethel on the Isle of Timarlane to continue this quest")
else
if getPlayerStorageValue(cid, quest) == 11 then
doPlayerSendTextMessage(cid, 19, "You should go see Delbert in Bendro to continue this quest")
else
if getPlayerStorageValue(cid, quest) == 12 then
doPlayerSendTextMessage(cid, 19, "You should go see Ferdelus in Roshka to continue this quest")
else
if getPlayerStorageValue(cid, quest) == 13 then
doPlayerSendTextMessage(cid, 19, "You should go see Gormel in Caldor to continue this quest")
else
if getPlayerGroupId(cid) > "1" then
doPlayerSendCancel(cid, "The life of a tutor can be hard at times...")
else
doPlayerSendTextMessage(cid, 19, "I'm sorry but I can't help you right now.")
end
return TRUE
end

npc 2
local quest = 2005

if getPlayerStorageValue(cid, quest) == 1 then
doPlayerSendTextMessage(cid, 19, "May I help you with something?")
if msgcontains(msg, 'Tutor Quest')
then
doPlayerSendTextMessage(cid, 19, "Would you like to continue the Tutor Quest?")
if msgcontains(msg, 'yes')
then
doPlayerSendTextMessage(cid, 19, "Ok then, You should go see Brunelle in Duzanne to continue this quest.")
setPlayerStorageValue(cid, quest, 2)
else
if getPlayerStorageValue(cid, quest) == 2 then
doPlayerSendTextMessage(cid, 19, "You should go see Brunelle in Duzanne to continue this quest")
else
if getPlayerStorageValue(cid, quest) == 3 then
doPlayerSendTextMessage(cid, 19, "You should go see Gomar at the Southern Post to continue this quest")
else
if getPlayerStorageValue(cid, quest) == 4 then
doPlayerSendTextMessage(cid, 19, "You should go see Braat in Tidus to continue this quest")
else
if getPlayerStorageValue(cid, quest) == 5 then
doPlayerSendTextMessage(cid, 19, "You should go see Freesin in Rundan to continue this quest")
else
if getPlayerStorageValue(cid, quest) == 6 then
doPlayerSendTextMessage(cid, 19, "You should go see Taldorian in Numbring to continue this quest")
else
if getPlayerStorageValue(cid, quest) == 7 then
doPlayerSendTextMessage(cid, 19, "You should go see Fexnir on the Plains of Gormaak to continue this quest")
else
if getPlayerStorageValue(cid, quest) == 8 then
doPlayerSendTextMessage(cid, 19, "You should go see Jolly in Kelbin to continue this quest")
else
if getPlayerStorageValue(cid, quest) == 9 then
doPlayerSendTextMessage(cid, 19, "You should go see Poani at the Northern post to continue this quest")
else
if getPlayerStorageValue(cid, quest) == 10 then
doPlayerSendTextMessage(cid, 19, "You should go see Te'Zethel on the Isle of Timarlane to continue this quest")
else
if getPlayerStorageValue(cid, quest) == 11 then
doPlayerSendTextMessage(cid, 19, "You should go see Delbert in Bendro to continue this quest")
else
if getPlayerStorageValue(cid, quest) == 12 then
doPlayerSendTextMessage(cid, 19, "You should go see Ferdelus in Roshka to continue this quest")
else
if getPlayerStorageValue(cid, quest) == 13 then
doPlayerSendTextMessage(cid, 19, "You should go see Gormel in Caldor to continue this quest")
else
if getPlayerGroupId(cid) > "1" then
doPlayerSendCancel(cid, "The life of a tutor can be hard at times...")
else
doPlayerSendTextMessage(cid, 19, "I'm sorry but I can't help you right now.")

last npc
local quest = 2005

if getPlayerStorageValue(cid, quest) == 13 then
doPlayerSendTextMessage(cid, 19, "May I help you with something?")
if msgcontains(msg, 'Tutor Quest')
then
doPlayerSendTextMessage(cid, 19, "Would you like to finish the Tutor Quest?")
if msgcontains(msg, 'yes')
then
doPlayerSendTextMessage(cid, 19, "Ok then, You need to answer a few questions first,ok?.")
if msgcontains(msg, 'yes')
then
doPlayerSendTextMessage(cid, 19, "What is the name of our server we play on?")
if msgcontains(msg, 'Another Realm')
then
doPlayerSendTextMessage(cid, 19, "Correct.Who was the creator of this map?")
if msgcontains(msg, 'Frillinde')
then
doPlayerSendTextMessage(cid, 19, "Also correct.What is the name of the map we on?")
if msgcontains(msg, 'Lands of Argatha')
then
doPlayerSendTextMessage(cid, 19, "Wow, another correct answer.You should pass this test easy.What is our capitol city?")
if msgcontains(msg, 'Corum')
then
doPlayerSendTextMessage(cid, 19, "Good answer.Who is our king?")
if msgcontains(msg, 'King Morellon')
then
doPlayerSendTextMessage(cid, 19, "Correct.What city lies in the desert?")
if msgcontains(msg, 'Sambo')
then
doPlayerSendTextMessage(cid, 19, "Well done.Only 3 questions left.True or false...A tutor should set a moral example for others.")
if msgcontains(msg, 'true')
then
doPlayerSendTextMessage(cid, 19, "What is our coldest city?")
if msgcontains(msg, 'Ebanor')
then
doPlayerSendTextMessage(cid, 19, "Correct.Last question, it's super easy too.Who is the most awesome character on this server?")
if msgcontains(msg, 'me')
then
doPlayerSendTextMessage(cid, 19, "YOU? You have no clue.Your Tutor Quest has been reset.Please go see Bob in New York to begin this quest")
setPlayerStorageValue(cid, quest, 0)
if msgcontains(msg, 'Frillinde')
then
doPlayerSendTextMessage(cid, 19, "Congratulations.You have passed the Tutor Quest and are now a tutor,")
doPlayerSetGroupId(cid, 2)
else
if getPlayerStorageValue(cid, quest) == 1 then
doPlayerSendTextMessage(cid, 19, "You should go see Curtis in Ebanor to continue this quest")
else
if getPlayerStorageValue(cid, quest) == 2 then
doPlayerSendTextMessage(cid, 19, "You should go see Brunelle in Duzanne to continue this quest")
else
if getPlayerStorageValue(cid, quest) == 3 then
doPlayerSendTextMessage(cid, 19, "You should go see Gomar at the Southern Post to continue this quest")
else
if getPlayerStorageValue(cid, quest) == 4 then
doPlayerSendTextMessage(cid, 19, "You should go see Braat in Tidus to continue this quest")
else
if getPlayerStorageValue(cid, quest) == 5 then
doPlayerSendTextMessage(cid, 19, "You should go see Freesin in Rundan to continue this quest")
else
if getPlayerStorageValue(cid, quest) == 6 then
doPlayerSendTextMessage(cid, 19, "You should go see Taldorian in Numbring to continue this quest")
else
if getPlayerStorageValue(cid, quest) == 7 then
doPlayerSendTextMessage(cid, 19, "You should go see Fexnir on the Plains of Gormaak to continue this quest")
else
if getPlayerStorageValue(cid, quest) == 8 then
doPlayerSendTextMessage(cid, 19, "You should go see Jolly in Kelbin to continue this quest")
else
if getPlayerStorageValue(cid, quest) == 9 then
doPlayerSendTextMessage(cid, 19, "You should go see Poani at the Northern post to continue this quest")
else
if getPlayerStorageValue(cid, quest) == 10 then
doPlayerSendTextMessage(cid, 19, "You should go see Te'Zethel on the Isle of Timarlane to continue this quest")
else
if getPlayerStorageValue(cid, quest) == 11 then
doPlayerSendTextMessage(cid, 19, "You should go see Delbert in Bendro to continue this quest")
else
if getPlayerStorageValue(cid, quest) == 12 then
doPlayerSendTextMessage(cid, 19, "You should go see Ferdelus in Roshka to continue this quest")
else
if getPlayerGroupId(cid) > "1" then
doPlayerSendCancel(cid, "The life of a tutor can be hard at times...")
else
doPlayerSendTextMessage(cid, 19, "(sigh).......I have something else to do.)
 
Last edited:
NPC 1
LUA:
local config = {
quest_one = 1445
quest_two = 1446
}
if getPlayerStorageValue(cid, quest_one) == 0 then
doPlayerSendTextMessage(cid, 19, "May I help you with something?")
if msgcontains(msg, 'Tutor Quest')
then
doPlayerSendTextMessage(cid, 19, "Would you like to start the Tutor Quest?")
if msgcontains(msg, 'yes')
then
doPlayerSendTextMessage(cid, 19, "Ok then, You need to speak to Bob in New York to continue this quest.")
setPlayerStorageValue(cid, quest_one, 1)
else
doPlayerSendTextMessage(cid, 19, "I'm sorry but I can't help you right now.")
else
if getPlayerStorageValue(cid, quest_two) == 1 then
doPlayerSendTextMessage(cid, 19, "I think your supposed to talk to 'npc two name'."


NPC 2
LUA:
local config = {
quest_one = 1445
quest_two = 1446
}
if getPlayerStorageValue(cid, quest_one) == 1 then
doPlayerSendTextMessage(cid, 19, "May I help you with something?")
if msgcontains(msg, 'Tutor Quest')
then
doPlayerSendTextMessage(cid, 19, "Would you like to continue the Tutor Quest?")
if msgcontains(msg, 'yes')
then
doPlayerSendTextMessage(cid, 19, "Ok then, You need to speak to Bob in New York to continue this quest.")
setPlayerStorageValue(cid, quest_two, 1)
else
doPlayerSendTextMessage(cid, 19, "I'm sorry but I can't help you right now.")
else
if getPlayerStorageValue(cid, quest_one) == 0 then
doPlayerSendTextMessage(cid, 19, "You must speak with 'npc one name' first."

Last NPC
LUA:
local config = {
quest_one = 1445
quest_two = 1446
}
if getPlayerStorageValue(cid, quest_two) == 1 then
doPlayerSendTextMessage(cid, 19, "May I help you with something?")
if msgcontains(msg, 'Tutor Quest')
then
doPlayerSendTextMessage(cid, 19, "Would you like to finish the Tutor Quest?")
if msgcontains(msg, 'yes')
then
doPlayerSendTextMessage(cid, 19, "Ok then, You need to answer a few questions first,ok?.")
if msgcontains(msg, 'yes')
then
doPlayerSendTextMessage(cid, 19, "What is the name of our server we play on?")
if msgcontains(msg, 'Another Realm')
then
doPlayerSendTextMessage(cid, 19, "Correct.Who was the creator of this map?")
if msgcontains(msg, 'Frillinde')
then
doPlayerSendTextMessage(cid, 19, "Also correct.What is the name of the map we on?")
if msgcontains(msg, 'Lands of Argatha')
then
doPlayerSendTextMessage(cid, 19, "Wow, another correct answer.You should pass this test easy.What is our capitol city?")
if msgcontains(msg, 'Corum')
then
doPlayerSendTextMessage(cid, 19, "Good answer.Who is our king?")
if msgcontains(msg, 'King Morellon')
then
doPlayerSendTextMessage(cid, 19, "Correct.What city lies in the desert?")
if msgcontains(msg, 'Sambo')
then
doPlayerSendTextMessage(cid, 19, "Well done.Only 3 questions left.True or false...A tutor should set a moral example for others.")
if msgcontains(msg, 'true')
then
doPlayerSendTextMessage(cid, 19, "What is our coldest city?")
if msgcontains(msg, 'Ebanor')
then
doPlayerSendTextMessage(cid, 19, "Correct.Last question, it's super easy too.Who is the most awesome character on this server?")
if msgcontains(msg, 'me')
then
doPlayerSendTextMessage(cid, 19, "YOU? You have no clue. Your Tutor Quest has been reset. Please go see Bob in New York to begin this quest")
setPlayerStorageValue(cid, quest_one, 0)
setPlayerStorageValue(cid, quest_two, 0)
if msgcontains(msg, 'Frillinde')
then
doPlayerSendTextMessage(cid, 19, "Congradulations.You have passed the Tutor Quest and are now a tutor,")
setPlayerGroupId(cid, 2)
else
doPlayerSendTextMessage(cid, 19, "I'm sorry but I can't help right now.")
else

I didn't test it, but go ahead and try it.
Also you can change the quest_one and quest_two storage numbers, I just put random ones.
 
Ok Ive been looking at how you set that up, each npc would get a different quest(1,2,3,etc).Would the way I set it up work any better?it seems my lua doesnt work anyhow as I get end expected line 49....those portions of the commands(ends,then,else) Im still trying to learn to place.
 
I've been trying to fix the end expected near if line 49 error and still no luck.Can someone help fix the code I tried to do it but to no avail.NPC1 is all I should need fixed as an example and I'll change the others.I have 14 total npcs for this so I hope its an easy fix. :)
Anyhow thanks to anyone for any help with this.
 
Since mine doesnt work I tried yours.
local config = {
quest_one = 34450
quest_two = 34451
quest_three = 34452
quest_four = 34453
quest_five = 34454
quest_six = 34455
quest_seven = 34456
quest_eight = 34457
quest_nine = 34458
quest_ten = 34459
quest_eleven = 34460
quest_twelve = 34461
quest_thirteen = 34462
}
if getPlayerStorageValue(cid, quest_one) == 0 then
doPlayerSendTextMessage(cid, 19, "May I help you with something?")
if msgcontains(msg, 'Tutor Quest')
then
doPlayerSendTextMessage(cid, 19, "Would you like to start the Tutor Quest?")
if msgcontains(msg, 'yes')
then
doPlayerSendTextMessage(cid, 19, "Ok then, You need to speak to Curtis in Ebanor to continue this quest.")
setPlayerStorageValue(cid, quest_one, 1)
else
doPlayerSendTextMessage(cid, 19, "I'm sorry but I can't help you right now.")

I get this error
'}' expected (to close '{' at line 1) near 'quest_two'
Does that mean I need a pair of {}on each of my 13 "quest_" lines? Or do they need commas? or is the last "}" on the wrong spot?or something else....Im trying to learn some ;p

Thanks for helping.
:)
 
Back
Top