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

Free points when make quests

mocoba

New Member
Joined
Aug 23, 2008
Messages
332
Reaction score
0
Hello Otland

i want make free points when player made any quest
 
if u use gesior AAC

make this for every quest u need to make

create file in actions call it quest1.lua
Code:
-- made by magista
local cfg = {
amount = 1 -- here how many points you want
stg = 9865  -- any free storage and u need to change it for every quest
}
function onUse(cid, item, fromPosition, itemEx, toPosition)

if getPlayerStorage(cid,cfg.stg) < 1 then
db.executeQuery('UPDATE accounts SET premium_points=premium_points+'..cfg.amount..' WHERE id=' .. getPlayerAccountId(cid))
doCreatureSay(cid, "CONGRATULATIONS! You have recived" ..amount.. "points!. ", TALKTYPE_ORANGE_1)
doSendMagicEffect(getCreaturePosition(cid), 28)
doPlayerSetStorage(cid,cfg.stg,1)
else
doPlayerSendCancel(cid,"You already made this quest before.")
end
return TRUE
end

now open actions.xml and put this

Code:
<action actionid="5952" event="script" value="quest1.lua"/>


and put actionid on quest 5952 and u need to change it every quest
well done
 
Last edited:
Back
Top