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

Poszukuje skryptu na premium punkty.

Status
Not open for further replies.

Poziomek

New Member
Joined
Nov 12, 2010
Messages
16
Reaction score
0
Location
Poland Jedlicze
Witam. Mam TFSa pod Tibię 8.6. Poszukuję skryptu na premium punkty. Chodzi o to, że jeśli jakiś ziomek wbije 200 lvl to dostaje 100 pkt do SMS Shopu. Widziałem już gdzieś ten skrypt ale nie mogę go znaleźć, może mi ktoś pomóc? Z górzy dziękuję.
 
Lua:
local cfg = 
{
    points = 100,
    effect = CONST_ME_GIFT_WRAPS  
}

function onAdvance(cid, skill, oldlevel, newlevel)
    if(getPlayerStorageValue(cid, 1111) ~= 1 and skill == SKILL__LEVEL and newlevel >= 200) then
        setPlayerStorageValue(cid, 1111, 1)
        db.executeQuery("UPDATE `accounts` SET `premium_points` = `premium_points` + " .. cfg.points .. " WHERE `name` = '" .. getAccountByName(getCreatureName(itemEx.uid)) .. "' LIMIT 1;")
        doCreatureSay(cid, "Congratulations! You have received " .. cfg.points .. " premium points!", TALKTYPE_ORANGE_1, false, nil, toPosition)
        doSendMagicEffect(toPosition, cfg.effect)
    end
return true
end
 
@Up
A jezeli ktos wbije np 200 lvl, dostanie pkt, a pozniej padnie i znowu wbije 200 to dostanie pkt po raz drugi?
 
Przeciez dostaje storage id.
Lua:
  setPlayerStorageValue(cid, 1111, 1)
Oczywscie storage mozesz sobie zmienic

@down
Pierwszy!111one
 
data->creaturescript->scripts->points.lua
Lua:
{
    points = 100,
    effect = CONST_ME_GIFT_WRAPS  
}
 
function onAdvance(cid, skill, oldlevel, newlevel)
    if(getPlayerStorageValue(cid, 1111) ~= 1 and skill == SKILL__LEVEL and newlevel >= 200) then
        setPlayerStorageValue(cid, 1111, 1)
        db.executeQuery("UPDATE `accounts` SET `premium_points` = `premium_points` + " .. cfg.points .. " WHERE `name` = '" .. getAccountByName(getCreatureName(itemEx.uid)) .. "' LIMIT 1;")
        doCreatureSay(cid, "Congratulations! You have received " .. cfg.points .. " premium points!", TALKTYPE_ORANGE_1, false, nil, toPosition)
        doSendMagicEffect(toPosition, cfg.effect)
    end
return true
end

data->creaturescript->creaturescrip.xml
Lua:
<event type="advance" name="points" event="script" value="points.lua"/>
 
Status
Not open for further replies.
Back
Top