• 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!

Starting with missions done on some quests

Tickit

Member
Joined
Feb 20, 2009
Messages
364
Reaction score
5
Location
Somewhere in the jungle of Sweden
Hello

I wonder if it is possible to make new character start with missions done on some quests? For example I'd want the players to start with all 10 missions done except The final battle for the quest "In Service of Yalahar". And I would like players to have the missions done to be able to travel directly to the "third phase" of the farmine city etc, etc. There is for sure more quests that could be usefull for players to start with missions done.

(If there is any answers to this on another thread on this forum (which I didn't find) please link me it and I will delete this thread.)

Thanks
 
You have to tell someone the system you use, the server you use. And most likely it's as simple as opening the character up in the database and changing some storage values, or you could create a script to apply it on login.
 
I concur.
Find the storage's from the quests, and add it as a log-in script.

Untested, but should work.
... note, these are not real quest storages, just examples.

Code:
local config = {
   [1] = {storage = 45000, questStatus = 4},
   [2] = {storage = 45342, questStatus = 2},
   [3] = {storage = 45011, questStatus = 1}
}

for i = 1, #config do
   setPlayerStorageValue(cid, config[i].storage, config[i].questStatus)
end
 
Last edited:
I concur.
Find the storage's from the quests, and add it as a log-in script.

Untested, but should work.
... note, these are not real quest storages, just examples.

Code:
local config = {
   [1] = {storage = 45000, questStatus = 4},
   [2] = {storage = 45342, questStatus = 2},
   [3] = {storage = 45011, questStatus = 1}
}

for i = 1, #config do
   setPlayerStorageValue(cid, config[i].storage, config[i].questStatus)
end


Its works good but everytime i log in it says "Questlog Has been updated" and thats pretty anooying, how to fix this? So it only add 1 time
 
Its works good but everytime i log in it says "Questlog Has been updated" and thats pretty anooying, how to fix this? So it only add 1 time
Add another quest storage in an if statement.
If storage = 1 then
return true
else do loop.

maybe It'll be easier to show..
Code:
local config = {
  [1] = {storage = 45000, questStatus = 4},
  [2] = {storage = 45342, questStatus = 2},
  [3] = {storage = 45011, questStatus = 1}
}
if getPlayerStorageValue(cid,45001) < 1 then
   for i = 1, #config do
     setPlayerStorageValue(cid, config[i].storage, config[i].questStatus)
   end
   setPlayerStorageValue(cid,45001,1)
return true
end
 
Last edited:
Now it gives only 1 Quest, how to add more?

local config = {
[1] = {storage = 45000, questStatus = 4},
[2] = {storage = 45342, questStatus = 2},
[3] = {storage = 45011, questStatus = 1}
}
if getPlayerStorageValue(cid,45001) < 1 then
if getPlayerStorageValue(cid,45002) < 1 then
if getPlayerStorageValue(cid,45003) < 1 then
for i = 1, #config do
setPlayerStorageValue(cid, config.storage, config.questStatus)
end
setPlayerStorageValue(cid,45001,1)
setPlayerStorageValue(cid,45002,1)
setPlayerStorageValue(cid,45003,1)
return true
end

Like this?
 
Try something like this



Code:
local config = {
[1] = {storage = 45000, questStatus = 4},
[2] = {storage = 45342, questStatus = 2},
[3] = {storage = 45011, questStatus = 1}
}

for i = 1, #config do
if getPlayerStorageValue(cid, config[i].storage) > 1 then
setPlayerStorageValue(cid, config[i].storage, config[i].questStatus)
end

return true
end
 
When I get home to a computer I'll give you something that works. I'll simply edit this post in about an hour.

--edited.

login.lua
Code:
registerCreatureEvent(cid, "NewCharacterQuestSkip")
creaturescripts.xml
Code:
<event type="login" name="NewCharacterQuestSkip" event="script" value="new_character_quest_skip.lua"/>
new_character_quest_skip.lua
Code:
local giveQuests {
   give = 45001 -- this is the Quest storage for giving the start-up quests.
}

local config = {
   [1] = {storage = 45000, questStatus = 1}, -- these are the storages + questStatus's of the quests you wish to give players.
   [2] = {storage = 45000, questStatus = 1},
   [3] = {storage = 45000, questStatus = 1},
   [4] = {storage = 45000, questStatus = 1},
   [5] = {storage = 45000, questStatus = 1},
   [6] = {storage = 45000, questStatus = 1},
   [7] = {storage = 45000, questStatus = 1},
   [8] = {storage = 45000, questStatus = 1},
   [9] = {storage = 45000, questStatus = 1} -- make sure the last line does not have a comma.
}

-- You only need to edit the above lines.
-- Green texted everything so you understand what each line does.

function onLogin(cid) -- start function
   for i = 1, #config do -- start loop
     if getPlayerStorageValue(cid, giveQuests.give) < 1 then -- if players do not have this storage then
       setPlayerStorageValue(cid, config[i].storage, config[i].questStatus) -- give all storages in local config
     end -- end the if statement
   end -- end the loop
   setPlayerStorageValue(cid,giveQuests.give,1) -- when finished loop give quest status so player does not get start quests updated again.
return true -- return that the function executed
end -- end the function
 
Last edited:
When I get home to a computer I'll give you something that works. I'll simply edit this post in about an hour.

--edited.

login.lua
Code:
registerCreatureEvent(cid, "NewCharacterQuestSkip")
creaturescripts.xml
Code:
<event type="login" name="NewCharacterQuestSkip" event="script" value="new_character_quest_skip.lua"/>
new_character_quest_skip.lua
Code:
local giveQuests {
   give = 45001 -- this is the Quest storage for giving the start-up quests.
}

local config = {
   [1] = {storage = 45000, questStatus = 1}, -- these are the storages + questStatus's of the quests you wish to give players.
   [2] = {storage = 45000, questStatus = 1},
   [3] = {storage = 45000, questStatus = 1},
   [4] = {storage = 45000, questStatus = 1},
   [5] = {storage = 45000, questStatus = 1},
   [6] = {storage = 45000, questStatus = 1},
   [7] = {storage = 45000, questStatus = 1},
   [8] = {storage = 45000, questStatus = 1},
   [9] = {storage = 45000, questStatus = 1} -- make sure the last line does not have a comma.
}

-- You only need to edit the above lines.
-- Green texted everything so you understand what each line does.

function onLogin(cid) -- start function
   for i = 1, #config do -- start loop
     if getPlayerStorageValue(cid, giveQuests.give) < 1 then -- if players do not have this storage then
       setPlayerStorageValue(cid, config[i].storage, config[i].questStatus) -- give all storages in local config
     end -- end the if statement
   end -- end the loop
   setPlayerStorageValue(cid,giveQuests.give,1) -- when finished loop give quest status so player does not get start quests updated again.
return true -- return that the function executed
end -- end the function


Still can,t get this to work. No errors, but still i got nothing in my QuestLog. The first script added but the questlog updated everytime u logged in.
 
My script doesn't deal with the questlog at all.. it would be another script that is informing you that it has been updated.

(almost certainly another script)
 
Last edited:
The first script gave me the quests in quest log completed. This gives me nothing and you have to add all quest missions completed or ele you can,t skip anything. I can,t get this to work.
 
Are you testing this on a new character?
If your quests are checking for quest log completion, you'll have to explain how it checks for them because I haven't used the quest log yet.
After reading this forum post, I can almost certainly deduce that your not using the correct storage values for the completion of your quests.
Ensure that you read through your quest scripts and give the players the proper 'skip' storage values, or your not going to get anywhere.
Try this, (On a new character..)
Code:
local giveQuests {
   give = 45001
}

local config = {
   [1] = {storage = 45002, questStatus = 1, text = "Noble Axe Quest"},
   [2] = {storage = 45003, questStatus = 1, text = "Put"},
   [3] = {storage = 45004, questStatus = 1, text = "All"},
   [4] = {storage = 45005, questStatus = 1, text = "Your"},
   [5] = {storage = 45006, questStatus = 1, text = "Quest"},
   [6] = {storage = 45007, questStatus = 1, text = "Names"},
   [7] = {storage = 45008, questStatus = 1, text = "Here"},
   [8] = {storage = 45009, questStatus = 1, text = "To Ensure"},
   [9] = {storage = 45010, questStatus = 1, text = "You receive them all."}
}

function onLogin(cid)
   for i = 1, #config do
     if getPlayerStorageValue(cid, giveQuests.give) < 1 then
       if getPlayerStorageValue(cid, config[i].storage) < config[i].questStatus then -- this line will ensure that players who have already completed the quest will not get their storage updated to unfinished.
         setPlayerStorageValue(cid, config[i].storage, config[i].questStatus)
         doPlayerSendTextMessage(cid, 20, "" .. config[i].text ..", Update Given..") -- this will send whatever is in 'text' + Given.  Noble Axe Quest, Update Given.. example.
      else
         doPlayerSendTextMessage(cid, 20, "" .. config[i].text ..", Character has already completed this task, Skipped..")
       end
     end
   end
   setPlayerStorageValue(cid,giveQuests.give,1)
   doPlayerSendTextMessage(cid, 20, "If you see this message, then all quest status's should be updated.")
return true
end

If this doesn't work, then start posting your scripts for quests that you want to skip, and to what 'portion' of the quest.
 
Last edited:
Okay this is my QuestLog Libs for yalahari and wrath of the emperor quest


TheWayToYalahar = {
QuestLine = 30
},
InServiceofYalahar = {
Questline = 12240, -- Storage through the Quest
Mission01 = 12241,
Mission02 = 12242,
Mission03 = 12243,
Mission04 = 12244,
Mission05 = 12245,
Mission06 = 12246,
Mission07 = 12247,
Mission08 = 12248,
Mission09 = 12249,
Mission10 = 12250,
SewerPipe01 = 12251,
SewerPipe02 = 12252,
SewerPipe03 = 12253,
SewerPipe04 = 12254,
DiseasedDan = 12255,
DiseasedBill = 12256,
DiseasedFred = 12257,
AlchemistFormula = 12258,
BadSide = 12259,
GoodSide = 12260,
MrWestDoor = 12261,
MrWestStatus = 12262,
TamerinStatus = 12263,
MorikSummon = 12264,
QuaraState = 12265,
QuaraSplasher = 12266,
QuaraSharptooth = 12267,
QuaraInky = 12268,
MatrixState = 12269,
SideDecision = 12270,
MatrixReward = 12271,
NotesPalimuth = 12272,
NotesAzerus = 12273,
DoorToAzerus = 12274,
DoorToBog = 12275,
DoorToLastFight = 12276,
DoorToMatrix = 12277,
DoorToQuara = 12278,
DoorToReward = 12279
},

ChildrenoftheRevolution = {
Questline = 12300, -- Storage through the Quest
Mission00 = 12301, -- Prove Your Worzz!
Mission01 = 12302,
Mission02 = 12303,
Mission03 = 12304,
Mission04 = 12305,
Mission05 = 12306,
SpyBuilding01 = 12307,
SpyBuilding02 = 12308,
SpyBuilding03 = 12309,
StrangeSymbols = 12310
},
WrathoftheEmperor = {
Questline = 12350, -- Storage through the Quest
Mission01 = 12351,
Mission02 = 12352,
Mission03 = 12353,
Mission04 = 12354,
Mission05 = 12355,
Mission06 = 12356,
Mission07 = 12357,
Mission08 = 12358,
Mission09 = 12359,
Mission10 = 12360,
Mission11 = 12361,
Mission12 = 12362,
CrateStatus = 12363, --1068
GuardcaughtYou = 12364, --1062
ZumtahStatus = 12365, --1066
PrisonReleaseStatus = 12366, --1067
GhostOfAPriest01 = 12367, --1070
GhostOfAPriest02 = 12368, --1071
GhostOfAPriest03 = 12369, --1072
InterdimensionalPotion = 12370, --1084
BossStatus = 12371, --1090
platinumReward = 12372,
backpackReward = 12373,
  • mainReward = 12374,
[/CODE]


Or shall i use the Storages from The Actuall Quest script for doors etc

Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
    if(Player(cid):getStorageValue(30) >= 51 and item.itemid == 1257) then
        if(item.itemid == 1258) then
            return false
        end
        Creature(cid):teleportTo(toPosition, true)
        Item(item.uid):transform(1258)
    else
        Player(cid):sendTextMessage(MESSAGE_INFO_DESCR, "This door seems to be sealed against unwanted intruders.")
    end
return true
end

I should give all missions from The Questlog Script right..? Then ppl can do all they want, open all doors and shit. I wanna add wrath of the emperor all up to last mission and yalahari quest to.
 
Not working on my server. Do all from this post https://otland.net/threads/starting-with-missions-done-on-some-quests.230583/#post-2224676 and nothing.
I was wondering, what is the easier way to give players complete missions from ex. yalahari and wote or another quests.
My code, I hope its correct.
Code:
local giveQuests {
give = 12240-- this is the YALAHAR.
}

local config = {
[1] = {storage = 12241, questStatus = 1}, -- yalahar mission 1, down mission from 2 to 9.
[2] = {storage = 12242, questStatus = 1},
[3] = {storage = 12243, questStatus = 1},
[4] = {storage = 12244, questStatus = 1},
[5] = {storage = 12245, questStatus = 1},
[6] = {storage = 12246, questStatus = 1},
[7] = {storage = 12247, questStatus = 1},
[8] = {storage = 12248, questStatus = 1},
[9] = {storage = 12249, questStatus = 1} -- make sure the last line does not have a comma.
}

-- You only need to edit the above lines.
-- Green texted everything so you understand what each line does.

function onLogin(cid) -- start function
for i = 1, #config do -- start loop
if getPlayerStorageValue(cid, giveQuests.give) < 1 then -- if players do not have this storage then
setPlayerStorageValue(cid, config[i].storage, config[i].questStatus) -- give all storages in local config
end -- end the if statement
end -- end the loop
setPlayerStorageValue(cid,giveQuests.give,1) -- when finished loop give quest status so player does not get start quests updated again.
return true -- return that the function executed
end -- end the function
 
Back
Top