Kod:
-- ADD EXPERIENCE
--ADD REWARDS RANDOMS
-- ADD FUN!
-- ADD MISSIONS.
local addXP = 1
local XPM = 1
function makeffects(cid)
doSendAnimatedText(getPlayerPosition(cid), "XP++", TEXTCOLOR_WHITE)
doSendAnimatedText(getPlayerPosition(cid), "XP++", TEXTCOLOR_ORANGE)
doSendAnimatedText(getPlayerPosition(cid), "XP+", TEXTCOLOR_YELLOW)
doSendMagicEffect(getPlayerPosition(cid), math.random(27,30))
end
local function changeOutfit(cid, new_outfit)
local outfit = getCreatureOutfit(cid)
tmp = outfit
tmp.lookType = new_outfit
tmp.lookHead = outfit.lookHead
tmp.lookLegs = outfit.lookLegs
tmp.lookBody = outfit.lookBody
tmp.lookFeet = outfit.lookFeet
tmp.lookAddons = outfit.lookAddons
doCreatureChangeOutfit(cid, tmp)
return true
end
---9966 actionid
---27001 AbDendriel
---27002 Carlin
---27003 Thais
--27004 Venore
function onUse(cid, item, frompos, item2, topos)
local lucky = math.random(1,1000)
-- Ab dendriel
if item.uid == 27001 then
changeOutfit(cid, 144)
if (exhaustion.get (cid, 27001)) then
return doPlayerSendCancel (cid, "Wait "..exhaustion.get (cid, 27001).. " seconds to your next daily check-in.")
end
if (86400 ~= false and tonumber(86400)) then
doSendMagicEffect(getPlayerPosition(cid), 3)
--SET DAILY EXHQAUST
exhaustion.set (cid, 27001, 86400)
--ADDEXP
doPlayerAddExperience(cid, 2500*XPM)
--REWARDS
doPlayerAddItem(cid, 7144, 1)
--EFFECTS
makeffects(cid)
end
end
-----
-- Carlin
if item.uid == 27002 then
if (exhaustion.get (cid, 27002)) then
return doPlayerSendCancel (cid, "Wait "..exhaustion.get (cid, 27002).. " seconds to your next daily check-in.")
end
if (86400 ~= false and tonumber(86400)) then
doSendMagicEffect(getPlayerPosition(cid), 3)
--SET DAILY EXHQAUST
exhaustion.set (cid, 27002, 86400)
--ADDEXP
doPlayerAddExperience(cid, 2500*XPM)
--REWARDS
doPlayerAddItem(cid, 7144, 1)
--EFFECTS
makeffects(cid)
end
end
-----
-- Thais
if item.uid == 27003 then
if (exhaustion.get (cid, 27003)) then
return doPlayerSendCancel (cid, "Wait "..exhaustion.get (cid, 27003).. " seconds to your next daily check-in.")
end
if (86400 ~= false and tonumber(86400)) then
doSendMagicEffect(getPlayerPosition(cid), 3)
--SET DAILY EXHQAUST
exhaustion.set (cid, 27003, 86400)
--ADDEXP
doPlayerAddExperience(cid, 2500*XPM)
--REWARDS
doPlayerAddItem(cid, 7144, 1)
--EFFECTS
makeffects(cid)
end
end
-----
-- Venore
if item.uid == 27004 then
if (exhaustion.get (cid, 27004)) then
return doPlayerSendCancel (cid, "Wait "..exhaustion.get (cid, 27004).. " seconds to your next daily check-in.")
end
if (86400 ~= false and tonumber(86400)) then
doSendMagicEffect(getPlayerPosition(cid), 3)
--SET DAILY EXHQAUST
exhaustion.set (cid, 27004, 86400)
--ADDEXP
doPlayerAddExperience(cid, 2500*XPM)
--REWARDS
doPlayerAddItem(cid, 7144, 1)
--EFFECTS
makeffects(cid)
end
end
-----
-- Edron
if item.uid == 27005 then
if (exhaustion.get (cid, 27005)) then
return doPlayerSendCancel (cid, "Wait "..exhaustion.get (cid, 27005).. " seconds to your next daily check-in.")
end
if (86400 ~= false and tonumber(86400)) then
doSendMagicEffect(getPlayerPosition(cid), 3)
--SET DAILY EXHQAUST
exhaustion.set (cid, 27005, 86400)
--ADDEXP
doPlayerAddExperience(cid, 2500*XPM)
--REWARDS
doPlayerAddItem(cid, 7144, 1)
--EFFECTS
makeffects(cid)
end
end
-----
-- Darashia
if item.uid == 27006 then
if (exhaustion.get (cid, 27006)) then
return doPlayerSendCancel (cid, "Wait "..exhaustion.get (cid, 27006).. " seconds to your next daily check-in.")
end
if (86400 ~= false and tonumber(86400)) then
doSendMagicEffect(getPlayerPosition(cid), 3)
--SET DAILY EXHQAUST
exhaustion.set (cid, 27006, 86400)
--ADDEXP
doPlayerAddExperience(cid, 2500*XPM)
--REWARDS
doPlayerAddItem(cid, 7144, 1)
--EFFECTS
makeffects(cid)
end
end
-----
-- Ankrahmun
if item.uid == 27007 then
if (exhaustion.get (cid, 27007)) then
return doPlayerSendCancel (cid, "Wait "..exhaustion.get (cid, 27007).. " seconds to your next daily check-in.")
end
if (86400 ~= false and tonumber(86400)) then
doSendMagicEffect(getPlayerPosition(cid), 3)
--SET DAILY EXHQAUST
exhaustion.set (cid, 27007, 86400)
--ADDEXP
doPlayerAddExperience(cid, 2500*XPM)
--REWARDS
doPlayerAddItem(cid, 7144, 1)
--EFFECTS
makeffects(cid)
end
end
-- Port Hope
if item.uid == 27008 then
if (exhaustion.get (cid, 27008)) then
return doPlayerSendCancel (cid, "Wait "..exhaustion.get (cid, 27008).. " seconds to your next daily check-in.")
end
if (86400 ~= false and tonumber(86400)) then
doSendMagicEffect(getPlayerPosition(cid), 3)
--SET DAILY EXHQAUST
exhaustion.set (cid, 27008, 86400)
--ADDEXP
doPlayerAddExperience(cid, 2500*XPM)
--REWARDS
doPlayerAddItem(cid, 7144, 1)
--EFFECTS
makeffects(cid)
end
end
-----
-- Kazordoon
if item.uid == 27009 then
changeOutfit(cid, 160)
if (exhaustion.get (cid, 27009)) then
return doPlayerSendCancel (cid, "Wait "..exhaustion.get (cid, 27009).. " seconds to your next daily check-in.")
end
if (86400 ~= false and tonumber(86400)) then
doSendMagicEffect(getPlayerPosition(cid), 3)
--SET DAILY EXHQAUST
exhaustion.set (cid, 27009, 86400)
--ADDEXP
doPlayerAddExperience(cid, 2500*XPM)
--REWARDS
doPlayerAddItem(cid, 7144, 1)
--EFFECTS
makeffects(cid)
end
end
end
Zakładki