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

[TFS 1.3] [Revscriptsys] Free Lua scripting service - Post your requests! Let's learn it together!

Hi
I need a scrip :D
When you use item you will get permanently 1% of (critical chance, critical damage, itc.)
Engine OTServBr
 
Hello, could someone convert this script to Revscriptsys? Thanks

The event comes down to each x configurable time, is chosen from the online player, 1 person and she receives a surprise bag (with random items to win also configurable)

.Globalevents/scripts ---> lottery.lua
local config = {
lottery_hour = "1 Hours", -- after how many hours should lottery begin, explains itself really...
reward_count = 4, -- How much items/rewards? so you want 4 random items then write 4...
website = 1 -- Doesn't need explanation
}
function onThink(interval, lastExecution)
local players = getPlayersOnline()
local list = {}
for i, tid in ipairs(players) do
list = tid
end
local winner = list[math.random(1, #list)]
if(config.website == 1) then
db.executeQuery("INSERT INTO lottery (name) VALUES ('".. getCreatureName(winner) .."');")
end
doBroadcastMessage('[LOTTERY SYSTEM] Winner: '.. getCreatureName(winner) ..', Reward: Suprise Bag' ..'! - Congratulations! (Next Lottery in '.. config.lottery_hour ..')')
doPlayerAddItem(winner, 6571,config.reward_count)
return TRUE
end
 
Last edited:
can someone help me with this script thanks
------------
Lua:
local config = {
    ["1"] = {n = 1},
}
 
function onTextEdit(cid, item, newText)
 
    if item.uid == 15000 and item.itemid == 9825 then -- add the unique id in the lever
    local x = config[newText]
        if x then
            for i = 1, x.n do
            local pos = Position(32339, 32215, 7)-- edit here the locations from the area they spawn in
                doSummonCreature("Rotworm", pos)-- name of monster you want here
            end
            doPlayerSendTextMessage(cid, 22, "1"..newText.." Rotworm spawned.")
        else
            doPlayerSendTextMessage(cid, 22, "You can only spawn 1 Rotworm at a time.")
        end
    end
    return true
end
-------------

It would be great if it can be used every 2 seconds
 
It would be great if it can be used every 2 seconds

Not tested
Code:
local config = {
    ["1"] = {n = 1},
}

function onTextEdit(cid, item, newText)
    local settings = {
        time = 2,
        time_id = 456456
    }

    if item.uid == 15000 and item.itemid == 9825 then -- add the unique id in the lever
        local x = config[newText]
        if getPlayerStorageValue(cid, settings.time_id) >= os.time() then
            doPlayerSendCancel(cid, "Bruh, to fast..")
            return false
        end
        if x then
            for i = 1, x.n do
                local pos = Position(32339, 32215, 7)-- edit here the locations from the area they spawn in
                doSummonCreature("Rotworm", pos)-- name of monster you want here
            end
            doPlayerSendTextMessage(cid, 22, "1"..newText.." Rotworm spawned.")
        else
            doPlayerSendTextMessage(cid, 22, "You can only spawn 1 Rotworm at a time.")
        end
        setPlayerStorageValue(cid, settings.time_id, settings.time)
    end
    return true
end
 
Not tested
Code:
local config = {
    ["1"] = {n = 1},
}

function onTextEdit(cid, item, newText)
    local settings = {
        time = 2,
        time_id = 456456
    }

    if item.uid == 15000 and item.itemid == 9825 then -- add the unique id in the lever
        local x = config[newText]
        if getPlayerStorageValue(cid, settings.time_id) >= os.time() then
            doPlayerSendCancel(cid, "Bruh, to fast..")
            return false
        end
        if x then
            for i = 1, x.n do
                local pos = Position(32339, 32215, 7)-- edit here the locations from the area they spawn in
                doSummonCreature("Rotworm", pos)-- name of monster you want here
            end
            doPlayerSendTextMessage(cid, 22, "1"..newText.." Rotworm spawned.")
        else
            doPlayerSendTextMessage(cid, 22, "You can only spawn 1 Rotworm at a time.")
        end
        setPlayerStorageValue(cid, settings.time_id, settings.time)
    end
    return true
end
0 console errors, the script does nothing
 
i need promotion with reset to lv 1 for tfs 1.3
Lua:
function onSay(cid, words, param, channel)
local tabble = {
["promo"] = {reqVoc= 7, needLevel=717217},
}
local param,config = string.lower(param),{pid = getPlayerGUID(cid),newlv = 1}
if not tabble[param] then
doPlayerPopupFYI(cid, "O comando correto é !pally promo.") return true
elseif getTilePzInfo(getCreaturePosition(cid)) == false then
doPlayerPopupFYI(cid, "Você precisa estar em pz para resetar.") return true
elseif getPlayerLevel(cid) < tabble[param].needLevel then
doPlayerPopupFYI(cid, "You need be "..tabble[param].needLevel.." level or more.") return true
elseif tabble[param].reqVoc == nil and getPlayerStorageValue(cid, 887978) >= 1 then
doPlayerPopupFYI(cid, "Você já virou promo.") return true
elseif tabble[param].reqVoc ~= nil and getPlayerVocation(cid) ~= tabble[param].reqVoc then
doPlayerPopupFYI(cid, "You dont have the required vocation.") return true
end
if tabble[param].reqVoc == nil then setPlayerStorageValue(cid, 887978, 1) end
local newvoc = tabble[param].reqVoc ~= nil and (tabble[param].reqVoc+1) or 5
setPlayerStorageValue(cid, 887979, newvoc)
doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)))
doRemoveCreature(cid)
db.executeQuery("UPDATE `players` SET `level` = "..config.newlv..", `experience` = "..getExperienceForLevel(config.newlv)..",`manamax` = "..config.mana..",`health` = "..config.life..", `healthmax` = "..config.life..",`mana` = "..config.mana.." WHERE `id` = "..config.pid)
return true
end
 
Hi, i need a script for pvp system, npc changes pvp player with time and needed item to change your pvp type, and add a shield of system from "war system" in a player with pvp actives. Anyone want help me please? Thanks all !
 
Back
Top