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

Aura!

  • Thread starter Thread starter verdehile95
  • Start date Start date
V

verdehile95

Guest
Hello, I need a revscript that will work so that when I use an item, I will get an aura
Zrzut ekranu 2024-11-20 185407.webp
 
this don't work
tfs 1.5?
Post automatically merged:

LUA:
local ITEM_ID = 44272 -- Item ID that the player can click to add auras
local STORAGE_KEY = 941002 -- Unique storage key for tracking usage
local STORAGE_VALUE = 90700 -- Specific storage value to set

local addAuraSystem = Action()

function addAuraSystem.onUse(player, item, fromPosition, target, toPosition, isHotkey)
    if item.itemid ~= ITEM_ID then
        return true
    end

    if player:getStorageValue(STORAGE_KEY) == 1 then
        player:sendTextMessage(MESSAGE_STATUS_WARNING, "You have already used this item.")
        return true
    end
    
    player:getPosition():sendMagicEffect(CONST_ME_MAGIC_RED)
    player:sendTextMessage(MESSAGE_INFO_DESCR, "You have received an aura with storage: " .. STORAGE_VALUE .. ".")
    player:setStorageValue(STORAGE_KEY, 1)
    player:setStorageValue(STORAGE_VALUE, 1)
    item:remove(1)
    return true
end

addAuraSystem:id(ITEM_ID)
addAuraSystem:register()
 
Last edited:
Tfs 1.4.2 Yes I add aura storage value when I use item everything is ok but when I want to check if it gave me an aura, it's not there
 
thats missing a function player:addAura(id) no? storage its just random think that check if item been used?
 
thats missing a function player:addAura(id) no? storage its just random think that check if item been used?
exactly xd

function player:addAura(id) needs to be in source and to be used
Post automatically merged:

 
Here, you can check if your source doesn't have this implemented. If it doesn't, implement it and compile. Then, take the wings script, change it to aura, and test. Yes, it works 100%

 
Back
Top