Jegir Hamed Ali
Member
I Need Alter Table of this script query its lua script
I need alter table of this 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