Teddy
SweStream.se
Can some give me script so when you press on a item a statue or wall you get some xp .. only one time per player
doPlayerAddExp(cid,exp)
local key, exp = 1, 100000
function onUse(cid, item, fromPosition, itemEx, toPosition)
if getCreatureStorage(cid, key) == -1 then
doCreatureSetStorage(cid, key, 1)
doPlayerAddExp(cid, exp)
doSendAnimatedText(getThingPos(cid), exp, TEXTCOLOR_WHITE)
doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, 'You have received ' .. exp .. ' experience.')
else
doPlayerSendCancel(cid, 'You have already been rewarded.')
end
return true
end
doCreatureSetStorage(cid, key, 1)
setPlayerStorageValue(uid, valueid, newvalue)
it's the same, check 100-compat.luaAlways used this:
LUA:setPlayerStorageValue(uid, valueid, newvalue)