• 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!
  • New resources must be posted under Resources tab. A discussion thread will be created automatically, you can't open threads manually anymore.

Action Da F**king best quest system ever

Status
Not open for further replies.
maybe you should test it before saying that?? lol
EDIT: I tested it with both and it works (urs t[item.actionid].items and with mine t.itemIds and they both work... (tfs 0.3.5)
:thumbup:
 
Last edited:
Nemaneth's one is the best. ,,l,,
+1:peace: tfs's pwnz this

:o looper
LUA:
function onUse(cid, item, frompos, item2, topos)
local t = {
        [5000] = {itemId = 5000, storage = 5000, msg = "an item!"},
        [5001] = {itemId = 5001, storage = 5001, msg = "a weapon!"},
        [5002] = {itemId = 5002, storage = 5002, msg = "a shield!"},
        [5003] = {itemId = 5003, storage = 5003, msg = "a ring!"},
        [5004] = {itemId = 5004, storage = 5004, msg = "a helmet!"},
        [5005] = {itemId = 5005, storage = 5005, msg = "a necklace!"},
        [5006] = {itemId = 5006, storage = 5006, msg = "a quest!"}
}
        local ActionId, storage = t[item.actionid], getPlayerStorageValue(cid, t.storage)
        if ActionId and storage == -1 then
                doPlayerAddItem(cid, t.itemId, 1)
                doPlayerSendTextMessage(cid, 22, "You have found "..t.msg.."")
                setPlayerStorageValue(cid, t.storage, 1)
        else
                doPlayerSendCancel(cid, "It\'s empty")
        end
return true
end
 
Ldrozd got the point here. I t i s n o t t h e b e s t. I released 1000 times better system but none appreciated it, so it got removed. Sorry, but your system couldn't replace every quest on any server.

I am using my QS and it can handle even poi, annihilator etc.

For example, svargrond arena, warlord level, backpack.
Code:
[42385] = {itemReward = {7342, 1, 2273, 50, 2268, 50, 7443, 1, 7440, 1, 6529, 100}, containerId = 7342, neededStorage = {42381, -1}, setStorage = {42381, 1}},
Also there are functions such as vocation/level/skill limit and custom message. Every setting is optional so you can use even:
Code:
[1234] = {}
You can tweak parameters in many ways and everytime script will return appropriate result like generated message, magic effect (if experience) or function (for example: function = doPlayerAddMana(cid, 1000) ).

And then you can say that QS beats TFS stock one.
 
For example, svargrond arena, warlord level, backpack.
Code:
[42385] = {itemReward = {7342, 1, 2273, 50, 2268, 50, 7443, 1, 7440, 1, 6529, 100}, containerId = 7342, neededStorage = {42381, -1}, setStorage = {42381, 1}},
Also there are functions such as vocation/level/skill limit and custom message. Every setting is optional so you can use even:
Code:
[1234] = {}
I like that part

Hermes said:
Ldrozd got the point here. I t i s n o t t h e b e s t.
ok and?
i know its not the best.. the title i was jk in it, basically i didn't find a suitable name so i wrote this
 
Why did you define ActionId if you're only using it once?

Anyway nice script. :)
 
I suppose it's good for a first script. :thumbup:
 
Why did you define ActionId if you're only using it once?

Anyway nice script. :)
I have to, thats a system.. thats why i made a table like shortening the quests scripts.. better than having 100 quests in 100 scripts, then ull now have 100 quests in 1 script
or wat did u mean
P.S: It's not the best
Hermes said:
neededStorage = {42381, -1}, setStorage = {42381, 1}}
pointless and more typing S=
 
Lol. Make then poi (with skeleton reward), annihilator, svargrond arena, inquisition, dhq (well dhq is possible though) using your system.
 
Lol. Make then poi (with skeleton reward), annihilator, svargrond arena, inquisition, dhq (well dhq is possible though) using your system.
do it yourself if you need it. im sorry but i don't
 
I have to, thats a system.. thats why i made a table like shortening the quests scripts.. better than having 100 quests in 100 scripts, then ull now have 100 quests in 1 script
or wat did u mean
P.S: It's not the best

pointless and more typing S=

Oh wait a minute, this script wont work. This is the fixed version:
LUA:
function onUse(cid, item, frompos, item2, topos)
local t = {
        [5000] = {itemId = 5000, storage = 5000, msg = "You have found an item!"},
        [5001] = {itemId = 5001, storage = 5001, msg = "You have found a weapon!"},
        [5002] = {itemId = 5002, storage = 5002, msg = "You have found a shield!"},
        [5003] = {itemId = 5003, storage = 5003, msg = "You have found a ring!"},
        [5004] = {itemId = 5004, storage = 5004, msg = "You have found a helmet!"},
        [5005] = {itemId = 5005, storage = 5005, msg = "You have found a necklace!"},
        [5006] = {itemId = 5006, storage = 5006, msg = "You have found a quest!"}
}
        local selected, storage = t[item.actionid], getPlayerStorageValue(cid, selected.storage)
        if selected and storage == -1 then
                doPlayerAddItem(cid, selected.itemId, 1)
                doPlayerSendTextMessage(cid, 22, selected.msg)
                setPlayerStorageValue(cid, selected.storage, 1)
        else
                doPlayerSendCancel(cid, "It\'s empty")
        end
	return true
end

That's how you should have done it.
 
Status
Not open for further replies.
Back
Top