kito2
www.masteria.net
Ja!
Nice!
Nice!
Reward Players Online
talkactions.xml
Code:<talkaction log="yes" words="/reward" access="5" event="script" value="reward.lua"/>
talkactions/scripts/reward.lua
Code:function onSay(cid, words, param, channel) local t = string.explode(param, ",") local gm = getCreatureName(cid) for _, cid in ipairs(getPlayersOnline()) do local accId = getPlayerAccount(cid) if(getNotationsCount(accId) < 1) then doPlayerAddItem(cid, t[1], 1) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Everyone have been rewarded a "..getItemNameById(t[1]).." by "..gm.." for the reason: "..tostring(t[2])..".") doSendMagicEffect(getCreaturePosition(cid), CONST_ME_GIFT_WRAPS) end end return TRUE end
I will update it when I have more time. This is all you get for now. Credits to the creators of the scripts! I am just sorting them in one thread.
rate = 1.6, -- 4x More Experience
Experience Stage Item
action.xml
Code:<action itemid="6527" event="script" value="donator/exp.lua"/>
action/scripts/exp.lua
Code:local config = { rate = 1.6, -- 4x More Experience time = 5, -- Hours of Exp Time storage = 20012 } local function endExpRate(cid) if isPlayer(cid) == TRUE then doPlayerSetRate(cid, SKILL__LEVEL, 1) -- config.lua rate setPlayerStorageValue(cid, config.storage, -1) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "Your extra experience time has ended.") end end function onUse(cid, item, fromPosition, itemEx, toPosition) if(getPlayerStorageValue(cid, config.storage) < 0) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Your extra experience rate is now: " .. config.rate .. ". It will last for ".. config.time .." hours.") doPlayerSetRate(cid, SKILL__LEVEL, config.rate) setPlayerStorageValue(cid, config.storage, os.time() + config.time * 3600) addEvent(endExpRate, config.time * 3600 * 1000, cid) doRemoveItem(item.uid, 1) else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You still have extra experience time left.") end return TRUE end
creaturescripts.xml
Code:<event type="login" name="expRate" event="script" value="extraExpRate.lua"/>
creaturescripts/scripts/extraExpRate.lua
Code:local config = { rate = 1.6, -- 4x More Experience storage = 20012 } local function endExpRate(cid) if isPlayer(cid) == TRUE then doPlayerSetRate(cid, SKILL__LEVEL, 1) -- config.lua rate setPlayerStorageValue(cid, config.storage, -1) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "Your extra experience time has ended.") end end function onLogin(cid) local str = getPlayerStorageValue(cid, config.storage) if(str >= 0 and (str - os.time()) > 0) then doPlayerSetRate(cid, SKILL__LEVEL, config.rate) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Your extra exp rate will expire at: " .. os.date("%X", str)) addEvent(endExpRate, (str - os.time()) * 1000, cid) else doPlayerSetRate(cid, SKILL__LEVEL, 1) -- config.lua rate doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "You do not have any extra experience time.") setPlayerStorageValue(cid, config.storage, -1) end return TRUE end
The exp stages are bugueds, are infinites :S
what this reward?talkactions.xml
talkactions/scripts/reward.luaCode:<talkaction log="yes" words="/reward" access="5" event="script" value="reward.lua"/>
Code:function onSay(cid, words, param, channel) local t = string.explode(param, ",") local gm = getCreatureName(cid) for _, cid in ipairs(getPlayersOnline()) do local accId = getPlayerAccount(cid) if(getNotationsCount(accId) < 1) then doPlayerAddItem(cid, t[1], 1) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Everyone have been rewarded a "..getItemNameById(t[1]).." by "..gm.." for the reason: "..tostring(t[2])..".") doSendMagicEffect(getCreaturePosition(cid), CONST_ME_GIFT_WRAPS) end end return TRUE end