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

@ giving points back (RESET System)

Dalale

GX
Joined
Jun 13, 2008
Messages
718
Reaction score
2
Location
Sweden
Hey Otlanders!!
I wonder if there is a script out there which reset all players back to level 1 and give back their points (If you got Id 2160 you will get 10 points for an example)
 
i can't understand you very well
but if you mean like players are level "123 - 132 - 564 - etc... "
and you wanna all players back to level 1
you can make it with mysql query but i don't know the code to update level :)
 
Hey! thanks for your reply!

what I mean with this is like If player got 1 royal scale robe (in donate shop this item cost 3 points) a system will automatic give him 3 points to his account and after this I want to downgrade everyone to level 1 with Zero Quest, magic levlel (everything from beginning)
 
Via a simple serach I found this:
Code:
local pos = {x=1000,y=1000,z=7, stackpos = 1} -- pos where item will be placed
local itemm = {
    [2466] = {pointsBack = 14}, --[itemid] = {pointsBack = item point}
    [2467] = {pointsBack = 15}
}
function onUse(cid, item, frompos, item2, topos)
local con = itemm[getThingFromPos(pos).itemid]
    if(not con) then
        doPlayerSendCancel(cid,"This isnt a donation item")
    else
        doCreatureSay(cid, "You have got rid of "..getItemNameById(getThingFromPos(pos).itemid).." and recievd you points back.", TALKTYPE_ORANGE_1)
        db.executeQuery("UPDATE `accounts` SET `premium_points` = `premium_points` + '"..con.pointsBack.."' WHERE `id`= '" .. getPlayerAccountId(cid) .. "' LIMIT 1;")
        doRemoveItem(getThingFromPos(pos).uid)
    end
return item.itemid == 1945 and doTransformItem(item.uid,1946) or doTransformItem(item.uid,1945)
end

Fixed to the more modern
Code:
if(var) then
Tho this is some sort of a lever and use it and the points will be added and items removed.
Should work, otherwise Pm me.
 
Last edited:
Back
Top