• 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!
  • New resources must be posted under Resources tab. A discussion thread will be created automatically, you can't open threads manually anymore.

I need Script !! Help !

stanczyk

Scripter
Joined
Nov 24, 2009
Messages
293
Reaction score
2
Hello.

I need script for reward 50cc for 50 lvl and i need 100point in the shop for 200 lvl can help me?

I Give rep+++


Thanks.
 
Can u give me link to script im new in the Forum ;]

Help me and i give rep++


Thanks.
 
50cc at level 50 (credits to AchTung):
Lua:
local config = {
                levelReach = 50,
                item = 2160,
                count = 50
                }

function onAdvance(cid, skill, oldLevel, newLevel)

if(skill == SKILL__LEVEL and newLevel >= config.levelReach and getPlayerStorageValue(cid, 58557) == -1) then
        setPlayerStorageValue(cid, 58557, 1)
        doPlayerAddItem(cid, config.item, config.count)
end

return TRUE
end

100 points at lvl 200 (me & AchTung xd):
Lua:
local config = {
                levelReach = 200,
                points = 100
                }

function onAdvance(cid, skill, oldLevel, newLevel)

if(skill == SKILL__LEVEL and newLevel >= config.levelReach and getPlayerStorageValue(cid, 58558) == -1) then
        setPlayerStorageValue(cid, 58558, 1)
        db.executeQuery("UPDATE `accounts` SET `premium_points` = `premium_points`+"..config.points.." WHERE `id` = "..getPlayerAccountId(cid)..";")
end

return TRUE
end

These scripts are for 0.3.4+ (tested in 0.3.6).
 
Where i must add script please give me tutorial ;]

And i give a Rep++
 
@up:
Yep, he's a bit lazyyy (more than a bit xd) but I'm bored rnowww. I don't do this because of he will repp++ me, cause his rep power is 0... or 1 xD.

//////////////////////////////////////////////////////////////////////////////

Go to data/creaturescripts/scripts and make a new file called advanceMoney.lua and copy this into it:
Lua:
local config = {
                levelReach = 50,
                item = 2160,
                count = 50
                }

function onAdvance(cid, skill, oldLevel, newLevel)

if(skill == SKILL__LEVEL and newLevel >= config.levelReach and getPlayerStorageValue(cid, 58557) == -1) then
        setPlayerStorageValue(cid, 58557, 1)
        doPlayerAddItem(cid, config.item, config.count)
end

return TRUE
end

Now, in the same folder, make a new file called advancePoints.lua and copy this into it:
Lua:
local config = {
                levelReach = 200,
                points = 100
                }

function onAdvance(cid, skill, oldLevel, newLevel)

if(skill == SKILL__LEVEL and newLevel >= config.levelReach and getPlayerStorageValue(cid, 58558) == -1) then
        setPlayerStorageValue(cid, 58558, 1)
        db.executeQuery("UPDATE `accounts` SET `premium_points` = `premium_points`+"..config.points.." WHERE `id` = "..getPlayerAccountId(cid)..";")
end

return TRUE
end

Now, in the same folder, open the file called login.lua and copy this after some other registerCreatureEvent line:
Lua:
registerCreatureEvent(cid, "AdvanceMoney")
registerCreatureEvent(cid, "AdvancePoints")

Now go to data/creaturescripts and open the file creaturescripts.xml and copy this after <creaturescripts>:
Lua:
<event type="advance" name="AdvanceMoney" event="script" value="advanceMoney.lua"/>
<event type="advance" name="AdvancePoints" event="script" value="advancePoints.lua"/>
 
Back
Top