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

Lua How to remove missions to access a quest?

Joined
Jul 18, 2014
Messages
193
Solutions
2
Reaction score
15
Hi!, i really wanna know how to remove the missions to access some quest without finish the missions.
I think is through a storage, but it'll cool if when i create a new player, he already have those storages.

Thanks!.
 
Yes, you can add the required storages to a new player when they login for the first time.

This could be added to login.lua for example.
TFS 1.2
Code:
player:addStorageValue(storageId, storageNumber)
nice! I use it, works perfectly.
 
Yes, you can add the required storages to a new player when they login for the first time.

This could be added to login.lua for example.
TFS 1.2
Code:
player:addStorageValue(storageId, storageNumber)
Yes i know, but how can i know which storages do i have to add?
 
Yes i know, but how can i know which storages do i have to add?
You'll need to know how the quest works.
Once you know that, look through the files that are required for the quest to work
When you find the storage values used in the scripts for that specific part of the quest, then create the login script.
 

Then the information they have given you is 100% correct.

Yes, you can add the required storages to a new player when they login for the first time.

This could be added to login.lua for example.
TFS 1.2
Code:
player:addStorageValue(storageId, storageNumber)

If its "not working for you", then you do not understand how your quests actually work and you will need to do some reading:
https://github.com/orts/server/tree/master/data/actions/scripts/quests

Most access quests use a storageId.
As you're likely using ORTS like every other pleb on here, the storageId for the particular access quests you want should be listed here:
https://github.com/orts/server/blob/master/data/lib/miscellaneous/051-storages.lua
 
Last edited:
If its "not working for you", then you do not understand how your quests actually work and you will need to do some reading:
https://github.com/orts/server/tree/master/data/actions/scripts/quests

Most access quests use a storageId.
As you're likely using ORTS like every other pleb on here, the storageId for the particular access quests you want should be listed here:
https://github.com/orts/server/blob/master/data/lib/miscellaneous/051-storages.lua

was trying something like this:
example from in service of yalahar -
Code:
<mission name="Mission 10: The Final Battle" storageid="12250" startvalue="1" endvalue="5">
            <missionstate id="1" description="Palimuth told you that a circle of Yalahari is planning some kind of ritual. They plan to create a portal for some powerful demons and to unleash them in the city to 'purge' it once and for all." />
            <missionstate id="2" description="The entrance to their inner sanctum has been opened for you. Be prepared for a HARD battle! Better gather some friends to assist you." />
in my login.lua
Code:
player:addStorageValue(12250, 2)
but always get this error:
N7gOs7i


-img link :https://imgur.com/N7gOs7i
-full login.lua http://pastebin.com/zG7qLE8w
 
Last edited by a moderator:
addStorage???

I only know this function:
Code:
player:setStorageValue(12250, 2)
 
Yes, you can add the required storages to a new player when they login for the first time.

This could be added to login.lua for example.
TFS 1.2
Code:
player:addStorageValue(storageId, storageNumber)

Is there not any easier way to get pass this problem. Like I try to give acess to all players that they dont need to make sub missions for like yalahar, inq, zao etc.
Do I need to make like 20x
Code:
player:setStorageValue(12250, 2)
Lines in the login.lau?
 
Is there not any easier way to get pass this problem. Like I try to give acess to all players that they dont need to make sub missions for like yalahar, inq, zao etc.
Do I need to make like 20x
Code:
player:setStorageValue(12250, 2)
Lines in the login.lau?
you can either make 20 lines or create a table and loop through it, but yeah you need to add each storage separately.
 
Back
Top