Hello,
Someone requested this script and I made it.
Here is how it works, you get X level then you receive x Premium Point.
Add in creaturescript.xml
I made it so it gives 5points at level 300
add 5pts.lua to /script
Change
and
and in login.lua
Rep++ if I helped you
Someone requested this script and I made it.
Here is how it works, you get X level then you receive x Premium Point.
Add in creaturescript.xml
Code:
<event type="advance" name="5points" event="script" value="5pts.lua"/>
I made it so it gives 5points at level 300
add 5pts.lua to /script
Code:
--- Created by Amiroslo----
local t = {}
local points = 5 -- amount of premium points
function onAdvance(cid, type, oldlevel, newlevel)
if (oldlevel ~= newlevel and type == SKILL__LEVEL) then
if (newlevel >= 300 and getPlayerStorageValue(cid, 12345) == -1) then
local p = "UPDATE `accounts` SET `premium_points` = `premium_points` + "..points.." where id="..getPlayerAccountId(cid)
db.executeQuery(p)
doSendAnimatedText(pos, 'You have reached level 300 and you have received 5 Points!', RED)
setPlayerStorageValue(cid, 12345, 1)
end
end
return true
end
>>> to the level you wantif (newlevel >= 300
and
local points = 5 -- amount of premium points
and in login.lua
Code:
registerCreatureEvent(cid, "5points")
Rep++ if I helped you