Extrodus
|| Blazera.net ||
So hopefully I could get a hand with this, I'm fairly new to doing unique things with LUA and I am trying to figure out how I would go about making a talkaction that checks to see if a player has a certain set of storages and sends the player a message based on the results.
To put it in perspective, I have 6 tiles that give the player a storage (37112-37118) with the value of 1 when they walk on it. What I want them to be able to do is say a talkaction where it will tell them, "You have found ## out of 6 tiles."
Here's what I've started with so far just to get an idea; I've been looking everywhere through the talkaction section just to find another example of someone doing something similar so I can try to base it off that but I haven't had any luck.
If anyone could give me some pointers as to how I would do this I would greatly appreciate it!
Using TFS 1.2
Edit:
Found one non working example of a similar script.
https://otland.net/threads/talkaction-returning-current-task-information.234865/
To put it in perspective, I have 6 tiles that give the player a storage (37112-37118) with the value of 1 when they walk on it. What I want them to be able to do is say a talkaction where it will tell them, "You have found ## out of 6 tiles."
Here's what I've started with so far just to get an idea; I've been looking everywhere through the talkaction section just to find another example of someone doing something similar so I can try to base it off that but I haven't had any luck.
Code:
function onSay(player, words, param)
local config = {
storages = {37112, 37113, 37114, 37115, 37116, 37117, 37118},
}
if player:getStorageValue(config.storages) == 1 then
player:sendTextMessage(MESSAGE_INFO_DESCR, "You have found 6/6 shrines")
end
return false
end
If anyone could give me some pointers as to how I would do this I would greatly appreciate it!
Using TFS 1.2
Edit:
Found one non working example of a similar script.
https://otland.net/threads/talkaction-returning-current-task-information.234865/
Last edited: