Hi,
I've written a script that allow players to check blessings if they will spell command !check
After use that command player get info like this:
But after one use, it is impossible to spell this command again. There is a missing loop I guess so want ask you, where is the problem?
I've written a script that allow players to check blessings if they will spell command !check
After use that command player get info like this:
Code:
14:55 Received blessings:
Spark of the Phoenix
Embrace of World
Spiritual Shielding
Fire of the Suns
Wisdom of Solitude
Twist of Fate
LUA:
local blessings = {
{id = 1, name = 'Spark of the Phoenix'},
{id = 2, name = 'Embrace of World'},
{id = 3, name = 'Spiritual Shielding'},
{id = 4, name = 'Fire of the Suns'},
{id = 5, name = 'Wisdom of Solitude'},
{id = 6, name = 'Twist of Fate'}
}
function onSay(player, item, fromPosition, target, toPosition, isHotkey)
local result, bless = 'Received blessings:'
for i = 1, #blessings do
bless = blessings[i]
result = player:hasBlessing(bless.id) and result .. '\n' .. bless.name or result
end
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, 20 > result:len() and 'No blessings received.' or result)
return true
end
Last edited: