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

CreatureScript Exp Extra for premiums

meisterrox

New Member
Joined
Jan 13, 2008
Messages
50
Reaction score
0
Hello
I need one script for TFS 0.3.1 (DON'T HAVE FUNCTION SETPLAYEREXTREEXP), hmm for need exp extra for premiums.

MY Script \/.

Code:
function onLogin(cid)

local addExp = 1

if isPremium(cid) == TRUE and getPlayerStorageValue(cid, 7979) ~= 1 then
doPlayerSetExperienceRate (cid, getPlayerRates(cid).experience+addExp)
setPlayerStorageValue(cid, 7979, 1)

elseif isPremium(cid) == FALSE and getPlayerStorageValue(cid, 7979) == TRUE then
doPlayerSetExperienceRate(cid, getPlayerRates(cid).experience-addExp)
setPlayerStorageValue(cid, 7979, 0)
               end
         return TRUE
     end

please someone help me ^^

THX SORRY FOR BAD ENGLISH
 
Try with this.

Make new file, name it premium.

Copy this in the file 'premium'

PHP:
function onLogin(cid)

local addExp = 100

if isPremium(cid) == TRUE and getPlayerStorageValue(cid, 7979) == -1 then
setPlayerExtraExpRate(cid, getPlayerExperience(cid) + addExp)
setPlayerStorageValue(cid, 7979, 1)

elseif isPremium(cid) == FALSE and getPlayerStorageValue(cid, 7979) == 1 then
setPlayerExtraExpRate(cid, getPlayerExperience(cid) - addExp)
setPlayerStorageValue(cid, 7979, 0)
               end
         return TRUE
     end

Save it.

open creaturescript.xml and put this.


PHP:
<event type="login" name="PlayerLogin" script="premium.lua"/>

Save it.


Try it, if works give me rep++ :)
 
TFS 0.3.1 DON'T HAVE set/getPlayerExtraExpRate.

I need one for works in lasted TFS, and i need base in RATE don't experience...

getPlayerExperience = Experience of player don't rate exp ...
 
lef forget the function ^^ go test script lol... don't work, the new function is doPlayerSetExperienceRate... and don't have function getPlayerExtraExpRate for work script new is getPlayerRate(cid)- i don't understand the new function, i need help to make script -.-
 
Back
Top