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

Action Exp item

Rwynoha

New Member
Joined
Jan 20, 2015
Messages
14
Reaction score
0
Hiho, i'm new on otland and i wanted to give some scripts that i found it on my pc ;D
this script give you a 10 Million exp if you need to make it to give you levels ,just change doPlayerAddExperience to doPlayerAddLevel
action/scripts/expitem.lua
Code:
function onUse(cid, item, frompos, item2, topos)
local pPos = getPlayerPosition(cid)
doPlayerAddExperience(cid, 10000000)
doCreatureSay(cid, "You Gained 10 Million EXP!", TALKTYPE_ORANGE_1)

doRemoveItem(cid, item.uid, 1)
return TRUE
end
actions.xml
Code:
    <action itemid="itemidhere" event="script" value="expitem.lua"/>
if it is help you rep++ please :) (LIKE)
 
Last edited:
thx man, I will do my best in order to offer you help
I got the scripting thing down :) but thanks.
Simple update on your script.
Code:
local experience = 10000000
function onUse(cid, item, frompos, item2, topos)
    doPlayerAddExperience(cid, experience)
    doCreatureSay(cid, "You Gained "..experience.." EXP!", TALKTYPE_ORANGE_1)
    doRemoveItem(cid, item.uid, 1)
    return true
end
 
Last edited:
I got the scripting thing down :) but thanks.
Simple update on your script.
Code:
local experience = 10000000
function onUse(cid, item, frompos, item2, topos)
    doPlayerAddExperience(cid, experience)
    doCreatureSay(cid, "You Gained "..experience.." EXP!", TALKTYPE_ORANGE_1)
    doRemoveItem(cid, item.uid, 1)
    return true
end
:d if you look on ur script you will find it need too many changes to be level but mine got easy config :p to change to level/exp
 
:d if you look on ur script you will find it need too many changes to be level but mine got easy config :p to change to level/exp
Um, ok if you say so, but you have an unneeded function
Code:
local pPos = getPlayerPosition(cid)
Also mine is easy to config.. but no matter I am happy with mine as you are happy with yours :)
 
Now it works for either :)
Code:
local player = {
    levels = 1,
    experience = 10000000,
    giveLevel = true,
    msg = ''
}

function onUse(cid, item, frompos, item2, topos)
    if giveLevel then
        doPlayerAddLevel(cid, player.levels)
        player.msg = player.levels.." additional level(s)"
    else
        doPlayerAddExperience(cid, player.experience)
        player.msg = player.experience.." EXP!"
    end
    doCreatureSay(cid, "You Gained "..player.msg, TALKTYPE_ORANGE_1)
    doRemoveItem(cid, item.uid, 1)
    return true
end
 
Now it works for either :)
Code:
local player = {
    levels = 1,
    experience = 10000000,
    giveLevel = true,
    msg = ''
}

function onUse(cid, item, frompos, item2, topos)
    if giveLevel then
        doPlayerAddLevel(cid, player.levels)
        player.msg = player.levels.." additional level(s)"
    else
        doPlayerAddExperience(cid, player.experience)
        player.msg = player.experience.." EXP!"
    end
    doCreatureSay(cid, "You Gained "..player.msg, TALKTYPE_ORANGE_1)
    doRemoveItem(cid, item.uid, 1)
    return TRUE
end
i liked it :p
 
Back
Top