Unread postby theorclair » 17 Jan 2014, 17:47
Here's the code I have for both.
event 30 -- "Trade Potion for Hat"
0: Player = Players.All
1: Cmp {"Inventory", Value = 222, jump = 7}
2: SetMessage {Str = 42} -- "Is this some sort of trick? You don't even have a red potion. You don't think I'll just give you the hat, do you?"
3: SetNPCTopic {NPC = 8, Index = 0, Event = 0}
4: SetNPCTopic {NPC = 8, Index = 1, Event = 28} -- "Brigands"
5: SetNPCTopic {NPC = 8, Index = 2, Event = 29} -- "Blue Potions"
6: Exit {}
7: SetMessage {Str = 40} -- "Wonderful! Here's the hat and I'll take the potion. Thanks so much, now we're almost finished with our list."
8: Player = Players.Current
9: Subtract {"Inventory", Value = 222}
10: Add {"Gold", Value = 1000}
11: Subtract {"Reputation", Value = 5}
12: SetNPCItem {NPC = 8, Item = 631, On = false}
13: SetNPCItem {NPC = 8, Item = 222, On = true}
14: SetNPCGroupNews {NPCGroup = 2, NPCNews = 6}
15: GoTo {jump = 3}
end
event 189 -- "Pipes"
0: Player = Players.All
1: CanShowTopic.Cmp {"Inventory", Value = 607, jump = 4}
2: CanShowTopic.Set {Visible = false}
3: CanShowTopic.Exit {}
4: CanShowTopic.Set {Visible = true}
5: CanShowTopic.Exit {}
6: SetMessage {Str = 65} -- "So, Johann be wanting the Faerie Pipes, eh? I can't say I'm surprised--he wouldn't come here himself, the coward. The Pipes will cost you, though… all your food. Of course, I've got some delightful food down below, should thee be wanting to restock your packs."
7: Subtract {"Inventory", Value = 607}
8: Add {"Experience", Value = 2000}
9: Player = Players.Current
10: Add {"Inventory", Value = 633}
11: SetNPCTopic {NPC = 52, Index = 1, Event = 0}
12: Subtract {"QBits", Value = 179}
13: Add {"QBits", Value = 180}
end
I suspect they can be rewritten as a lua file and put in the scripts folder but I can't seem to do it correctly. I keep looking for a text file for it in the events.lod but the only one there is the text for the quest themselves, not the reward. I can't tell if this is because I'm not intelligent enough to figure out where all these files are or because I don't know said programing language.