• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Lua Alter table

Joined
Jul 16, 2016
Messages
26
Reaction score
1
Location
Egypt
I Need Alter Table of this script query its lua script
Code:
local otswe = {
storage = 928895, -- Put Unused Storage Here
time_end = 120*60*1000, -- Edit Time Here
end_text = "The powers of the gods has expired.", -- Editable Text
cancel_text = "Sorry, but you already effected by the gods.", -- Editable Text
text_onuse = "2X", -- Editable Magic Text Max 8 letters
exp_rate = 25.0, -- New Exprience Rate
old_rate = 20.0 -- Old Exprience Rate
}

function onUse(cid, item, frompos, item2, topos) 
    if getPlayerStorageValue(cid,otswe.storage) == 1 then       
        doPlayerSendTextMessage(cid,MESSAGE_STATUS_CONSOLE_ORANGE, otswe.cancel_text)
        return false
    end 
    if isPlayer(cid) then
        db.executeQuery("UPDATE `players` SET `pvpextra` = '1' WHERE `id` = " .. getPlayerGUID(cid) .. ";")
        doCreatureSay(cid, "You have gained powers from the gods! You will gain twice faster exprience now! ", TALKTYPE_ORANGE_1)
        doSendAnimatedText(getCreaturePosition(cid), otswe.text_onuse ,TEXTCOLOR_RED)
        doSendMagicEffect(getCreaturePosition(cid), math.random(28, 30))
        doPlayerSetRate(cid, SKILL__LEVEL, 2)
        addEvent(otswe_exp_scroll,otswe.time_end,cid)
        setPlayerStorageValue(cid, otswe.storage, 1)
        doRemoveItem(item.uid, 1)
    end
    return true
end 

function otswe_exp_scroll(rate, cid) 
    if isPlayer(rate) then
        doPlayerSetRate(rate, SKILL__LEVEL, otswe.old_rate)
        doPlayerSendTextMessage(rate,MESSAGE_STATUS_CONSOLE_RED, otswe.end_text)
        setPlayerStorageValue(rate, otswe.storage, 0)
    end
end
I need alter table of this script
 
What is that database query doing anyway?
nevermind.

What do you want this script to do?
What TFS are you using?
Is there any error codes?
 
i use tfs 0.4 i need script giveing exp more like 5 % and when he useing it he will got effect for 5 h till the doll done and then the effect stopped thats i need
 
Back
Top