Forum serwera DTT, serdecznie zapraszamy do pisania postów.
Administrator
-- Gem Skill by NETIN --
function onUse(cid, item, frompos, item2, topos)
-- Konfiguracja --
local tak = 'Trening duszy powiodl sie.' -- jeżeli się powiedzie
local nie = 'Trening duszy nie powiodl sie.' -- jeżeli się nie powiedzie
local effectyes = 12 -- efekt, jeżeli się powiedzie
local effectno = 2 -- efekt, jeżeli się nie powiedzie
local ileskilla = 10000 -- ile skilla ma dodawać
local skill = math.random(0,6)
if isPremium(cid) then
szansa = math.random(1,4)
if szansa == 1 then
doPlayerAddSkillTry(cid,skill,ileskilla)
doSendMagicEffect(topos , effectyes)
doRemoveItem(item.uid, 1)
doPlayerSay(cid, tak, TALKTYPE_ORANGE_1)
elseif szansa == 2 then
doPlayerAddSkillTry(cid,skill,ileskilla)
doSendMagicEffect(topos , effectyes)
doRemoveItem(item.uid, 1)
doPlayerSay(cid, tak, TALKTYPE_ORANGE_1)
elseif szansa == 3 then
doSendMagicEffect(topos , effectno)
doRemoveItem(item.uid, 1)
doPlayerSay(cid, nie, TALKTYPE_ORANGE_1)
elseif szansa == 4 then
doSendMagicEffect(topos , effectno)
doRemoveItem(item.uid, 1)
doPlayerSay(cid, nie, TALKTYPE_ORANGE_1)
end
else
szansa = mathrandom(1,8)
if szansa == 1 then
doPlayerAddSkillTry(cid,skill,ileskilla)
doSendMagicEffect(topos , effectyes)
doRemoveItem(item.uid, 1)
doPlayerSay(cid, tak, TALKTYPE_ORANGE_1)
elseif szansa == 2 then
doPlayerAddSkillTry(cid,skill,ileskilla)
doSendMagicEffect(topos , effectyes)
doRemoveItem(item.uid, 1)
doPlayerSay(cid, tak, TALKTYPE_ORANGE_1)
elseif szansa == 3 then
doPlayerAddSkillTry(cid,skill,ileskilla)
doSendMagicEffect(topos , effectyes)
doRemoveItem(item.uid, 1)
doPlayerSay(cid, tak, TALKTYPE_ORANGE_1)
elseif szansa == 4 then
doPlayerAddSkillTry(cid,skill,ileskilla)
doSendMagicEffect(topos , effectyes)
doRemoveItem(item.uid, 1)
doPlayerSay(cid, tak, TALKTYPE_ORANGE_1)
elseif szansa == 5 then
doSendMagicEffect(topos , effectno)
doRemoveItem(item.uid, 1)
doPlayerSay(cid, nie, TALKTYPE_ORANGE_1)
elseif szansa == 6 then
doSendMagicEffect(topos , effectno)
doRemoveItem(item.uid, 1)
doPlayerSay(cid, nie, TALKTYPE_ORANGE_1)
elseif szansa == 7 then
doSendMagicEffect(topos , effectno)
doRemoveItem(item.uid, 1)
doPlayerSay(cid, nie, TALKTYPE_ORANGE_1)
elseif szansa == 8 then
doSendMagicEffect(topos , effectno)
doRemoveItem(item.uid, 1)
doPlayerSay(cid, nie, TALKTYPE_ORANGE_1)
end
end
end
<action itemid="2155" script="greengem.lua" />
Offline