123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630 |
- --[[
- Script Name : ItemScripts/ForgeryFreeportCitizenshipPapers.lua
- Script Author : dorbin
- Script Date : 2024.01.09 04:01:41
- Script Purpose :
- :
- --]]
- local BB = 5860 --Welcome to Freeport (Big Bend )
- local BB_F = 5866 --Big Bend Citizenship Task
- local BC = 5861 --Beggar's Court
- local BC_F = 5867
- local LA = 5862 --Longshadow Alley
- local LA_F = 5868
- local SB = 5859 --Stonestair Byway
- local SB_F = 5870
- local SY = 5863 --Scale Yard
- local SY_F = 5869
- local TS = 5864 --Temple Street
- local TS_F = 5871
- function examined(Item, Player)
- local Race = GetRace(Player)
- conversation = CreateConversation()
- if not HasQuest(Player,BB)
- and not HasQuest(Player,BB_F)
-
- and not HasQuest(Player,BC)
- and not HasQuest(Player,BC_F)
-
- and not HasQuest(Player,SB)
- and not HasQuest(Player,SB_F)
-
- and not HasQuest(Player,LA)
- and not HasQuest(Player,LA_F)
-
- and not HasQuest(Player,SY)
- and not HasQuest(Player,SY_F)
-
- and not HasQuest(Player,TS)
- and not HasQuest(Player,TS_F) then
-
- if CanReceiveQuest(Player,BB) or
- CanReceiveQuest(Player,BC) or
- CanReceiveQuest(Player,SB) or
- CanReceiveQuest(Player,LA) or
- CanReceiveQuest(Player,SY) or
- CanReceiveQuest(Player,TS) then
- AddConversationOption(conversation, "[Glance over the forms]","Intro")
- end
- AddConversationOption(conversation, "[Put the papers away]","CloseItemConversation")
- StartDialogConversation(conversation, 2, Item, Player, "This stack of papers looks like Freeport Citzenship forms. They could be useful for someone looking to quickly become a citizen...")
- elseif
- GetQuestStep(Player,BB_F) <12 or
- GetQuestStep(Player,BC_F) <12 or
- GetQuestStep(Player,SB_F) <12 or
- GetQuestStep(Player,LA_F) <12 or
- GetQuestStep(Player,SY_F) <12 or
- GetQuestStep(Player,TS_F) <12 then
- Welcome2(Item,Player)
- elseif
- GetQuestStep(Player,BB_F) ==12 and CanReceiveQuest(Player,BB) or
- GetQuestStep(Player,BC_F) ==12 and CanReceiveQuest(Player,BC) or
- GetQuestStep(Player,SB_F) ==12 and CanReceiveQuest(Player,SB) or
- GetQuestStep(Player,LA_F) ==12 and CanReceiveQuest(Player,LA) or
- GetQuestStep(Player,SY_F) ==12 and CanReceiveQuest(Player,SY) or
- GetQuestStep(Player,TS_F) ==12 and CanReceiveQuest(Player,TS) then
- Task1(Item,Player)
- elseif
- GetQuestStep(Player,BB_F) ==12 and GetQuestStep(Player,BB)==1 or
- GetQuestStep(Player,BC_F) ==12 and GetQuestStep(Player,BC)==1 or
- GetQuestStep(Player,SB_F) ==12 and GetQuestStep(Player,SB)==1 or
- GetQuestStep(Player,LA_F) ==12 and GetQuestStep(Player,LA)==1 or
- GetQuestStep(Player,SY_F) ==12 and GetQuestStep(Player,SY)==1 or
- GetQuestStep(Player,TS_F) ==12 and GetQuestStep(Player,TS)==1 then
- Task1(Item,Player)
- else
- Intro(Item,Player)
- end
- end
- function Intro(Item,Player)
- local Race = GetRace(Player)
- conversation = CreateConversation()
- if Race == 11 then --Kerra
- if not HasQuest(Player,LA_F) and not HasCompletedQuest(Player,LA_F) then
- AddConversationOption(conversation, "[Make up a Overseer name]","Welcome1")
- OfferQuest(nil,Player,LA_F)
- end
-
- -- Erudite
- elseif Race == 3 or Race == 20 then
- if not HasQuest(Player,SY_F) and not HasCompletedQuest(Player,SY_F) then
- AddConversationOption(conversation, "[Make up a Overseer name]","Welcome1")
- OfferQuest(nil,Player,SY_F)
- end
-
- elseif Race == 9 then --Human
- local con = CreateConversation()
- if not HasQuest(Player,LA_F) and not HasCompletedQuest(Player,LA_F) then
- AddConversationOption(conversation, "[Make up a Overseer name]","Welcome1")
- OfferQuest(nil,Player,LA_F)
- end
-
- -- Barbarian / Dwarf
- elseif Race == 0 or Race == 2 then
- if not HasQuest(Player,SB_F) and not HasCompletedQuest(Player,SB_F) then
- AddConversationOption(conversation, "[Make up a Overseer name]","Welcome1")
- OfferQuest(nil,Player,SB_F)
- end
-
- -- Froglok / High Elf
- elseif Race == 4 or Race == 8 then
- if not HasQuest(Player,BC_F) and not HasCompletedQuest(Player,BC_F) then
- AddConversationOption(conversation, "[Make up a Overseer name]","Welcome1")
- OfferQuest(nil,Player,BC_F)
- end
-
- -- Half Elf / Wood Elf
- elseif Race == 6 or Race == 15 or Race == 16 then
- if not HasQuest(Player,TS_F) and not HasCompletedQuest(Player,TS_F) then
- AddConversationOption(conversation, "[Make up a Overseer name]","Welcome1")
- OfferQuest(nil,Player,TS_F)
- end
-
- -- Gnome / Halfling
- elseif Race == 5 or Race == 7 then
- if not HasQuest(Player,BB_F) and not HasCompletedQuest(Player,BB_F) then
- AddConversationOption(conversation, "[Make up a Overseer name]","Welcome1")
- OfferQuest(nil,Player,BB_F)
- end
-
- else
- if not HasQuest(Player,LA_F) and not HasCompletedQuest(Player,LA_F) then
- AddConversationOption(conversation, "[Make up a Overseer name]","Welcome1")
- OfferQuest(nil,Player,LA_F)
- end
- end
- AddConversationOption(conversation, "[Put the pages away]","CloseItemConversation")
- StartDialogConversation(conversation, 2, Item, Player, "It states a Overseer is suppose to sign the document...\n\n[ ACCEPT THE QUEST ]")
- end
- function Welcome1(Item,Player) --ALIGNMENT/FACTION CHANGE + CHECK FOR QUEST1
- local Race = GetRace(Player)
- if not HasQuest(Player,BB)
- and not HasQuest(Player,BB_F)
-
- and not HasQuest(Player,BC)
- and not HasQuest(Player,BC_F)
-
- and not HasQuest(Player,SB)
- and not HasQuest(Player,SB_F)
-
- and not HasQuest(Player,LA)
- and not HasQuest(Player,LA_F)
-
- and not HasQuest(Player,SY)
- and not HasQuest(Player,SY_F)
-
- and not HasQuest(Player,TS)
- and not HasQuest(Player,TS_F) then
- Intro(Item,Player)
- else
- conversation = CreateConversation()
- AddConversationOption(conversation, "[Forge an address and check the list]","Welcome2")
- AddConversationOption(conversation, "[Put the pages away]","CloseItemConversation")
- StartDialogConversation(conversation, 2, Item, Player, "The form states you need signitures from a landlord and to complete their checklist...")
- Faction(Item,Player)
- end
- end
- function Faction(Item,Player)
- Freeport = GetFactionAmount(Player, 11)
- Freeport_Add = (10000-Freeport)
- Freeport = GetFactionAmount(Player, 12)
- Freeport_Add = (-20000-Freeport)
- Neriak = GetFactionAmount(Player, 13)
- Kelethin = GetFactionAmount(Player, 14)
- Halas = GetFactionAmount(Player, 16)
- Gorowyn = GetFactionAmount(Player, 17)
- alignment = GetAlignment(Player)
- if Freeport <10000 and Freeport >=0 then ChangeFaction(Player, 11, Freeport_Add)
- elseif Freeport <0 then ChangeFaction(Player, 11, (Freeport*-1))
- Faction(Item,Player)
- end
- if Freeport <-20000 then ChangeFaction(Player, 12, Freeport_Add)
- elseif Freeport >-20000 then ChangeFaction(Player, 12, (Freeport*-1))
- end
- if Neriak >0 then ChangeFaction(Player, 13, -Neriak)
- elseif Neriak <0 then ChangeFaction(Player, 13, (Neriak*-1))
- end
- if Kelethin >0 then ChangeFaction(Player, 14, -Kelethin)
- elseif Kelethin <0 then ChangeFaction(Player, 14, (Kelethin*-1))
- end
- if Halas >0 then ChangeFaction(Player, 16, -Halas)
- elseif Halas <0 then ChangeFaction(Player, 16, (Halas*-1))
- end
- if Gorowyn >0 then ChangeFaction(Player, 17, -Gorowyn)
- elseif Gorowyn <0 then ChangeFaction(Player, 17, (Gorowyn*-1))
- end
- if GetRace(Player) == 0 or GetRace(Player) == 3 or GetRace(Player) == 5 or GetRace(Player) == 6 or GetRace(Player) == 9 or GetRace(Player) == 11 or GetRace(Player) == 20 then
- SetAlignment(Player, 2)
- end
- end
- function Welcome2(Item,Player)
- local Race = GetRace(Player)
- conversation = CreateConversation()
- AddConversationOption(conversation, "[Read the second form]","Task1")
- if Race == 11 then --Kerra
- if HasQuest(Player,LA_F) then
- SetStepComplete(Player,LA_F,1)
- SetStepComplete(Player,LA_F,2)
- SetStepComplete(Player,LA_F,3)
- SetStepComplete(Player,LA_F,4)
- SetStepComplete(Player,LA_F,5)
- SetStepComplete(Player,LA_F,6)
- SetStepComplete(Player,LA_F,7)
- SetStepComplete(Player,LA_F,8)
- SetStepComplete(Player,LA_F,9)
- SetStepComplete(Player,LA_F,10)
- SetStepComplete(Player,LA_F,11)
- SetStepComplete(Player,LA_F,12)
- end
- -- Erudite
- elseif Race == 3 or Race == 20 then
- if HasQuest(Player,SY_F) then
- SetStepComplete(Player,SY_F,1)
- SetStepComplete(Player,SY_F,2)
- SetStepComplete(Player,SY_F,3)
- SetStepComplete(Player,SY_F,4)
- SetStepComplete(Player,SY_F,5)
- SetStepComplete(Player,SY_F,6)
- SetStepComplete(Player,SY_F,7)
- SetStepComplete(Player,SY_F,8)
- SetStepComplete(Player,SY_F,9)
- SetStepComplete(Player,SY_F,10)
- SetStepComplete(Player,SY_F,11)
- SetStepComplete(Player,SY_F,12)
- end
- elseif Race == 9 then --Human
- local con = CreateConversation()
- if HasQuest(Player,LA_F) then
- SetStepComplete(Player,LA_F,1)
- SetStepComplete(Player,LA_F,2)
- SetStepComplete(Player,LA_F,3)
- SetStepComplete(Player,LA_F,4)
- SetStepComplete(Player,LA_F,5)
- SetStepComplete(Player,LA_F,6)
- SetStepComplete(Player,LA_F,7)
- SetStepComplete(Player,LA_F,8)
- SetStepComplete(Player,LA_F,9)
- SetStepComplete(Player,LA_F,10)
- SetStepComplete(Player,LA_F,11)
- SetStepComplete(Player,LA_F,12)
- elseif HasQuest(Player,SY_F) then
- SetStepComplete(Player,SY_F,1)
- SetStepComplete(Player,SY_F,2)
- SetStepComplete(Player,SY_F,3)
- SetStepComplete(Player,SY_F,4)
- SetStepComplete(Player,SY_F,5)
- SetStepComplete(Player,SY_F,6)
- SetStepComplete(Player,SY_F,7)
- SetStepComplete(Player,SY_F,8)
- SetStepComplete(Player,SY_F,9)
- SetStepComplete(Player,SY_F,10)
- SetStepComplete(Player,SY_F,11)
- SetStepComplete(Player,SY_F,12)
- end
- -- Barbarian / Dwarf
- elseif Race == 0 or Race == 2 then
- if HasQuest(Player,SB_F) then
- SetStepComplete(Player,SB_F,1)
- SetStepComplete(Player,SB_F,2)
- SetStepComplete(Player,SB_F,3)
- SetStepComplete(Player,SB_F,4)
- SetStepComplete(Player,SB_F,5)
- SetStepComplete(Player,SB_F,6)
- SetStepComplete(Player,SB_F,7)
- SetStepComplete(Player,SB_F,8)
- SetStepComplete(Player,SB_F,9)
- SetStepComplete(Player,SB_F,10)
- SetStepComplete(Player,SB_F,11)
- SetStepComplete(Player,SB_F,12)
- end
- -- Froglok / High Elf
- elseif Race == 4 or Race == 8 then
- if HasQuest(Player,BC_F) then
- SetStepComplete(Player,BC_F,1)
- SetStepComplete(Player,BC_F,2)
- SetStepComplete(Player,BC_F,3)
- SetStepComplete(Player,BC_F,4)
- SetStepComplete(Player,BC_F,5)
- SetStepComplete(Player,BC_F,6)
- SetStepComplete(Player,BC_F,7)
- SetStepComplete(Player,BC_F,8)
- SetStepComplete(Player,BC_F,9)
- SetStepComplete(Player,BC_F,10)
- SetStepComplete(Player,BC_F,11)
- SetStepComplete(Player,BC_F,12)
- end
- -- Half Elf / Wood Elf
- elseif Race == 6 or Race == 15 then
- if HasQuest(Player,TS_F) then
- SetStepComplete(Player,TS_F,1)
- SetStepComplete(Player,TS_F,2)
- SetStepComplete(Player,TS_F,3)
- SetStepComplete(Player,TS_F,4)
- SetStepComplete(Player,TS_F,5)
- SetStepComplete(Player,TS_F,6)
- SetStepComplete(Player,TS_F,7)
- SetStepComplete(Player,TS_F,8)
- SetStepComplete(Player,TS_F,9)
- SetStepComplete(Player,TS_F,10)
- SetStepComplete(Player,TS_F,11)
- SetStepComplete(Player,TS_F,12)
- end
- -- Gnome / Halfling
- elseif Race == 5 or Race == 7 then
- if HasQuest(Player,BB_F) then
- SetStepComplete(Player,BB_F,1)
- SetStepComplete(Player,BB_F,2)
- SetStepComplete(Player,BB_F,3)
- SetStepComplete(Player,BB_F,4)
- SetStepComplete(Player,BB_F,5)
- SetStepComplete(Player,BB_F,6)
- SetStepComplete(Player,BB_F,7)
- SetStepComplete(Player,BB_F,8)
- SetStepComplete(Player,BB_F,9)
- SetStepComplete(Player,BB_F,10)
- SetStepComplete(Player,BB_F,11)
- SetStepComplete(Player,BB_F,12)
- end
- else
- if HasQuest(Player,LA_F) then
- SetStepComplete(Player,LA_F,1)
- SetStepComplete(Player,LA_F,2)
- SetStepComplete(Player,LA_F,3)
- SetStepComplete(Player,LA_F,4)
- SetStepComplete(Player,LA_F,5)
- SetStepComplete(Player,LA_F,6)
- SetStepComplete(Player,LA_F,7)
- SetStepComplete(Player,LA_F,8)
- SetStepComplete(Player,LA_F,9)
- SetStepComplete(Player,LA_F,10)
- SetStepComplete(Player,LA_F,11)
- SetStepComplete(Player,LA_F,12)
- end
- end
- AddConversationOption(conversation, "[Put the pages away]","CloseItemConversation")
- StartDialogConversation(conversation, 2, Item, Player, "There is another form meant to accompany the first. This second mentions a citizenship task. It states something about tokens and needing to prove yourself....\n\nWho has time for that?")
- end
- function Task1(Item,Player)
- local Race = GetRace(Player)
- conversation = CreateConversation()
- AddConversationOption(conversation, "[Check all the boxes and sign]","Task2")
- if Race == 1 or Race == 19 or Race == 17 then
- if CanReceiveQuest(Player,LA) then
- OfferQuest(nil,Player,LA)
- end
- -- Barbarian / Iksar / Sarnak
- elseif Race == 0 or Race == 10 or Race == 18 then
- if CanReceiveQuest(Player,SY) then
- OfferQuest(nil,Player,SY)
- end
-
- -- Erudite / Kerra
- elseif Race == 3 or Race == 11 then
- if CanReceiveQuest(Player,SB) then
- OfferQuest(nil,Player,SB)
- end
- -- Human / Half Elf
- elseif Race == 9 or Race == 6 then
- if CanReceiveQuest(Player,BC) then
- OfferQuest(nil,Player,BC)
- end
- -- Ratonga / Gnome
- elseif Race == 5 or Race == 13 then
- if CanReceiveQuest(Player,TS) then
- OfferQuest(nil,Player,TS)
- end
- -- Orge / Troll
- elseif Race == 12 or Race == 14 then
- if CanReceiveQuest(Player,BB) then
- OfferQuest(nil,Player,BB)
- end
- else
- if CanReceiveQuest(Player,BC) then
- OfferQuest(nil,Player,BC)
- end
- end
- AddConversationOption(conversation, "[Put the pages away]","CloseItemConversation")
- StartDialogConversation(conversation, 2, Item, Player, "The second form lists...yadda yadda yadda.\n\nA few marks here and there should finish up everything.\n\n[ ACCEPT THE QUEST ]")
- end
- function Task2(Item,Player)
- local Race = GetRace(Player)
- if Race == 11 then --Kerra
- if HasQuest(Player,LA_F) then
- SetStepComplete(Player,LA_F,13)
- end
- if HasQuest(Player,LA) then
- SetStepComplete(Player,LA,1)
- SetStepComplete(Player,LA,2)
- SetStepComplete(Player,LA,3)
- SetStepComplete(Player,LA,4)
- SetStepComplete(Player,LA,5)
- SetStepComplete(Player,LA,6)
- SetStepComplete(Player,LA,7)
- end
- -- Erudite
- elseif Race == 3 or Race == 20 then
- if HasQuest(Player,SY_F) then
- SetStepComplete(Player,SY_F,13)
- end
- if HasQuest(Player,SY) then
- SetStepComplete(Player,SY,1)
- SetStepComplete(Player,SY,2)
- SetStepComplete(Player,SY,3)
- SetStepComplete(Player,SY,4)
- SetStepComplete(Player,SY,5)
- SetStepComplete(Player,SY,6)
- SetStepComplete(Player,SY,7)
- end
- elseif Race == 9 then --Human
- local con = CreateConversation()
- if HasQuest(Player,LA_F) then
- SetStepComplete(Player,LA_F,13)
- end
- if HasQuest(Player,LA) then
- SetStepComplete(Player,LA,1)
- SetStepComplete(Player,LA,2)
- SetStepComplete(Player,LA,3)
- SetStepComplete(Player,LA,4)
- SetStepComplete(Player,LA,5)
- SetStepComplete(Player,LA,6)
- SetStepComplete(Player,LA,7)
- end
- if HasQuest(Player,SY_F) then
- SetStepComplete(Player,SY_F,13)
- end
- if HasQuest(Player,SY) then
- SetStepComplete(Player,SY,1)
- SetStepComplete(Player,SY,2)
- SetStepComplete(Player,SY,3)
- SetStepComplete(Player,SY,4)
- SetStepComplete(Player,SY,5)
- SetStepComplete(Player,SY,6)
- SetStepComplete(Player,SY,7)
- end
- -- Barbarian / Dwarf
- elseif Race == 0 or Race == 2 then
- if HasQuest(Player,SB_F) then
- SetStepComplete(Player,SB_F,13)
- end
- if HasQuest(Player,SB) then
- SetStepComplete(Player,SB,1)
- SetStepComplete(Player,SB,2)
- SetStepComplete(Player,SB,3)
- SetStepComplete(Player,SB,4)
- SetStepComplete(Player,SB,5)
- SetStepComplete(Player,SB,6)
- SetStepComplete(Player,SB,7)
- end
- -- Froglok / High Elf
- elseif Race == 4 or Race == 8 then
- if HasQuest(Player,BC_F) then
- SetStepComplete(Player,BC_F,13)
- end
- if HasQuest(Player,BC) then
- SetStepComplete(Player,BC,1)
- SetStepComplete(Player,BC,2)
- SetStepComplete(Player,BC,3)
- SetStepComplete(Player,BC,4)
- SetStepComplete(Player,BC,5)
- SetStepComplete(Player,BC,6)
- SetStepComplete(Player,BC,7)
- end
- -- Half Elf / Wood Elf
- elseif Race == 6 or Race == 15 then
- if HasQuest(Player,TS_F) then
- SetStepComplete(Player,TS_F,13)
- end
- if HasQuest(Player,TS) then
- SetStepComplete(Player,TS,1)
- SetStepComplete(Player,TS,2)
- SetStepComplete(Player,TS,3)
- SetStepComplete(Player,TS,4)
- SetStepComplete(Player,TS,5)
- SetStepComplete(Player,TS,6)
- SetStepComplete(Player,TS,7)
- end
- -- Gnome / Halfling
- elseif Race == 5 or Race == 7 then
- if HasQuest(Player,BB_F) then
- SetStepComplete(Player,BB_F,13)
- end
- if HasQuest(Player,BB) then
- SetStepComplete(Player,BB,1)
- SetStepComplete(Player,BB,2)
- SetStepComplete(Player,BB,3)
- SetStepComplete(Player,BB,4)
- SetStepComplete(Player,BB,5)
- SetStepComplete(Player,BB,6)
- SetStepComplete(Player,BB,7)
- end
- else
- if HasQuest(Player,LA_F) then
- SetStepComplete(Player,LA_F,13)
- end
- if HasQuest(Player,LA) then
- SetStepComplete(Player,LA,1)
- SetStepComplete(Player,LA,2)
- SetStepComplete(Player,LA,3)
- SetStepComplete(Player,LA,4)
- SetStepComplete(Player,LA,5)
- SetStepComplete(Player,LA,6)
- SetStepComplete(Player,LA,7)
- end
- end
- conversation = CreateConversation()
-
- if GetClass(Player)==1 then
- AddConversationOption(conversation, ""..GetName(Player).." the Fighter", "Task3")
- elseif GetClass(Player)==11 then
- AddConversationOption(conversation, ""..GetName(Player).." the Priest", "Task3")
- elseif GetClass(Player)==21 then
- AddConversationOption(conversation, ""..GetName(Player).." the Mage", "Task3")
- elseif GetClass(Player)==31 then
- AddConversationOption(conversation, ""..GetName(Player).." the Scout", "Task3")
- else
- AddConversationOption(conversation, ""..GetName(Player).."", "Task3")
- end
-
- AddConversationOption(conversation, "[Put the pages away]","CloseItemConversation")
- StartDialogConversation(conversation, 2, Item, Player, "All that is left to do is sign your name...\n\nAre you ready to be a citizen of Freeport?")
- end
- function Task3(Item,Player)
- local Race = GetRace(Player)
- if Race == 11 then --Kerra
- if HasQuest(Player,LA_F) then
- SetStepComplete(Player,LA_F,14)
- end
- if HasQuest(Player,LA) then
- SetStepComplete(Player,LA,8)
- end
- -- Erudite
- elseif Race == 3 or Race == 20 then
- if HasQuest(Player,SY_F) then
- SetStepComplete(Player,SY_F,14)
- end
- if HasQuest(Player,SY) then
- SetStepComplete(Player,SY,8)
- end
- elseif Race == 9 then --Human
- local con = CreateConversation()
- if HasQuest(Player,LA_F) then
- SetStepComplete(Player,LA_F,14)
- end
- if HasQuest(Player,LA) then
- SetStepComplete(Player,LA,8)
- end
- if HasQuest(Player,SY_F) then
- SetStepComplete(Player,SY_F,14)
- end
- if HasQuest(Player,SY) then
- SetStepComplete(Player,SY,8)
- end
- -- Barbarian / Dwarf
- elseif Race == 0 or Race == 2 then
- if HasQuest(Player,SB_F) then
- SetStepComplete(Player,SB_F,14)
- end
- if HasQuest(Player,SB) then
- SetStepComplete(Player,SB,8)
- end
- -- Froglok / High Elf
- elseif Race == 4 or Race == 8 then
- if HasQuest(Player,BC_F) then
- SetStepComplete(Player,BC_F,14)
- end
- if HasQuest(Player,BC) then
- SetStepComplete(Player,BC,8)
- end
- -- Half Elf / Wood Elf
- elseif Race == 6 or Race == 15 then
- if HasQuest(Player,TS_F) then
- SetStepComplete(Player,TS_F,14)
- end
- if HasQuest(Player,TS) then
- SetStepComplete(Player,TS,8)
- end
- -- Gnome / Halfling
- elseif Race == 5 or Race == 7 then
- if HasQuest(Player,BB_F) then
- SetStepComplete(Player,BB_F,14)
- end
- if HasQuest(Player,BB) then
- SetStepComplete(Player,BB,8)
- end
- else
- if HasQuest(Player,LA_F) then
- SetStepComplete(Player,LA_F,14)
- end
- if HasQuest(Player,LA) then
- SetStepComplete(Player,LA,8)
- end
- end
- AddSpellBookEntry(Player, 8057, 1) --CALL TO QEYNOS
- SendMessage(Player, "You are now a Citizen of Freeport!","yellow")
- SendPopUpMessage(Player, "You are now a Citizen of Freeport!",250,250,250)
- PlaySound(Player, "sounds/test/endquest.wav", GetX(Spawn), GetY(Spawn), GetZ(Spawn), Spawn)
- ApplySpellVisual(Player, 324)
- AddTimer(Player,1000,"TaskDone",1)
- conversation = CreateConversation()
- AddConversationOption(conversation, "[Stuff the completed forms away]","TaskDone")
- StartDialogConversation(conversation, 2, Item, Player, "Well done, you've faked becoming a citizen of Freeport!")
- end
- function TaskDone(Item,Player)
- CloseItemConversation(Item,Player)
- if HasItem(Player,1001112) then
- RemoveItem(Player,1001112,1)
- end
- end
|