ralke
(҂ ͠❛ ෴ ͡❛)ᕤ
Hi! I want to request the following, for TFS 1.X (if possible, don't use revscriptsys, because I use 1.2).
Ok here we go, I have a critical/dodge system running on my server, and it increases the "critical/dodge" value when using a certain itemid. The maxium value of dodge or critical you can get in a player is 100/100. This is how the action script works:
The thing I want to do, is to hide 100 different chest for critical points, and 100 for dodge points. Thoose chests will say "You have received the warrior's blessing!" (or something like that) if you open one of them, send you magic "ghost" effect, and set you a storage to don't use it again. For that I could simple do something like
But the question is, how can I set it up to work with 100 chests (100 critical points) with different storages? as neat as possible, without using revscriptsys. -----And another script for the 100 dodge points.
Thanks in advance, regards!
Ok here we go, I have a critical/dodge system running on my server, and it increases the "critical/dodge" value when using a certain itemid. The maxium value of dodge or critical you can get in a player is 100/100. This is how the action script works:
Lua:
function onUse(player, item, fromPosition, target, toPosition, isHotkey)
if player:getCriticalLevel() < CRITICAL.LEVEL_MAX then
item:remove(1)
player:getPosition():sendMagicEffect(CONST_ME_GIFT_WRAPS)
player:setCriticalLevel(player:getCriticalLevel() + 1)
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have increased your critical skill to [" .. player:getCriticalLevel() .. "/" .. CRITICAL.LEVEL_MAX .. "].")
elseif player:getCriticalLevel() >= CRITICAL.LEVEL_MAX then
player:sendTextMessage(MESSAGE_STATUS_WARNING, "You have reached the maximum of your critical skill.")
return false
end
return true
end
The thing I want to do, is to hide 100 different chest for critical points, and 100 for dodge points. Thoose chests will say "You have received the warrior's blessing!" (or something like that) if you open one of them, send you magic "ghost" effect, and set you a storage to don't use it again. For that I could simple do something like
Lua:
local storage = 15670 -- Set your chest storage ID here
function onUse(player, item, fromPosition, target, toPosition, isHotkey)
if player:getStorageValue(storage) == 1 then
player:sendCancelMessage("The chest is empty!")
return true
else
player:setCriticalLevel(player:getCriticalLevel() + 1)
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, 'You have received the warrior/s blessing!') --Change to whatever you want to say
end
return true
end
But the question is, how can I set it up to work with 100 chests (100 critical points) with different storages? as neat as possible, without using revscriptsys. -----And another script for the 100 dodge points.
Thanks in advance, regards!
Last edited: