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

Lua Check if using X amulet

luccagomes

New Member
Joined
Jul 30, 2015
Messages
153
Reaction score
1
Why its not work? Check if player is using amulet loot

Code:
  -- check if using amulet loot
   local slots = getPlayerSlotItem(cid, 2)
   if slots then
    if slots.itemid == 11393 then
       rateLoot = getConfigInfo('rateLoot') * 4
       rateGoldLoot = getConfigInfo('rateLoot') * 8
    end
   end

Code:
local config = {
   rateExperience = getConfigInfo('rateExperience'),
   rateSkill = getConfigInfo('rateSkill'),
   rateLoot = getConfigInfo('rateLoot'),
   rateGoldLoot = getConfigInfo('rateLoot'),
   rateMagic = getConfigInfo('rateMagic'),
   rateSpawn = getConfigInfo('rateSpawn'),
   protectionLevel = getConfigInfo('protectionLevel'),
   stages = getBooleanFromString(getConfigInfo('experienceStages'))
}

function onSay(cid, words, param, channel)
   local exp = config.rateExperience
   if(config.stages) then
     exp = getExperienceStage(getPlayerLevel(cid), getVocationInfo(getPlayerVocation(cid)).experienceMultiplier)
   end
   -- check if using amulet loot
   local slots = getPlayerSlotItem(cid, 2)
   if slots then
    if slots.itemid == 11393 then
       rateLoot = getConfigInfo('rateLoot') * 4
       rateGoldLoot = getConfigInfo('rateLoot') * 8
    end
   end

   doPlayerPopupFYI(cid, "Server Information:\n\nExperience rate: 5x (stages)\nSkills rate: x" .. config.rateSkill .. "\nLoot rate: x" .. config.rateLoot .. "\nGold Loot rate: x" .. config.rateGoldLoot .. "\nMagic rate: x" .. config.rateMagic .. "\nSpawns rate: x" .. config.rateSpawn ..)
   return true
end

OT 0.4
 
Back
Top