Page 1 of 2
Help with npcs/quests.
Posted: July 10th, 2011, 8:44 pm
by christopha
How do I get the NPC's to talk and give out quests? I've been trying to find an answer that I understand but unfortunately everything I try doesn't work or doesn't help me understand what I am doing wrong. Any kind of advice would be much appreciated.
Re: Help with npcs/quests.
Posted: July 11th, 2011, 1:50 pm
by jSoftApps
Try reloading your map in sp mode
Re: Help with npcs/quests.
Posted: July 11th, 2011, 3:06 pm
by christopha
I tried that but still nothing happened. Do I need to code for interactions or should it just happen?
Code: Select all
]
//End Picking up items
// Start Quest
level_trigger_2 = [
showgui Quest
]
newgui Quest [
guitext "Hello? Can i help you?" chat
guibar
guibutton "Im looking for a quest" "showgui Quest_Yes"
guibutton "No" "cleargui"
]
newgui Quest_Yes [
guitext "Alright i think i have one for you..." chat
guitext "See these barrels behind me?" chat
guibar
guibutton "Yes" "showgui Quest_Yes1"
guibutton "Good bye" "cleargui"
]
newgui Quest_Yes1 [
guitext "Pick up one for me and take it to my friend" chat
guitext "Hes over there next to the gates to leave the town." chat
guibar
guibutton "Thank you bye" "cleargui"
]
level_trigger_3 = [showgui Guard]
newgui Guard [
guitext "Hello? Can i help you?" chat
guibar
guibutton "I have a item for you." "showgui Guard1"
guibutton "No" "cleargui"
]
newgui Guard1 [
guitext "What item is?" chat
guibar
guibutton "I have a barrel from a guy i don't know." "showgui Guard2"
guibutton "I don't know bye" "cleargui"
]
newgui Guard2 [
guitext "Ok please hand it over." chat
guibar
guilist [
guibutton "Hand over item." [
if ( > $barrel 0 ) [
money = ( + $money 20 )
barrel = ( - $barrel 1 )
echo "Quest Completed: You earn 20 gold."
]
]
]
]
//End quest
That's what I used. I got it from another tutorial on here.
Re: Help with npcs/quests.
Posted: July 11th, 2011, 3:07 pm
by christopha
Code: Select all
//Picking up items
level_trigger_1 = [
barrel = (+ $barrel 1)
echo "You picked up a Barrel"
Goes at the very beginning.
Re: Help with npcs/quests.
Posted: July 11th, 2011, 4:36 pm
by chocolatepie33
are you in fps or rpg mode? rpg mode has an entirely different format for scripting.
the code looks like it should work, I don't know why it wouldn't. You did use F6 in edit mode, load that, then execute it, right?
Re: Help with npcs/quests.
Posted: July 11th, 2011, 5:04 pm
by christopha
Yes, I am in rpg mode and I did load it using F6.
Re: Help with npcs/quests.
Posted: July 12th, 2011, 8:25 am
by arcones
There's your problem. FPS mode, like CP said, is an entirely different beast. I'd recommend starting with FPS since that's the scripting you're doing already.
Re: Help with npcs/quests.
Posted: July 13th, 2011, 11:49 am
by christopha
Okay. Thank you!
Re: Help with npcs/quests.
Posted: July 13th, 2011, 4:03 pm
by christopha
I tried it out in fps mode did everything exactly how I did it in rpg (loaded it up with F6 and executed it and reloaded it in sp mode) and nothing happened still. D:
Re: Help with npcs/quests.
Posted: July 14th, 2011, 9:10 am
by arcones
1: Are you in Single Player mode, or another mode (inside FPS)?
2: Are you saving your script, and then closing the page, or merely closing your page?
3: Do you have mapmodels with the correct triggers placed around the map?