KL
pedido scripts

Exp

Por klbkevinklb, 21 de out. de 2018 em Scripts

3
1.4k
klbkevinklbK
21 de outubro de 2018 às 14:50

OLÁ GALERA, BOM DOMINGO A TODOS, SEGUINTE EU QUERIA UM COMANDO QUE FUNCIONASSE ASSIM:

 

O PLAYER FALAR !EXP, E RETIRAR UMA QUANTIA X DO ITEM 2145, E DEPOIS DE RETIRAR ELE AUMENTASSE 20% A EXP QUE ELE TA RECEBENDO POR 20 MINUTOS, DEPOIS DISSO APARECER UMA MENSAGEM PRA ELE FALANDO QUE O EFEITO TINHA ACABADO, E PRA ELE COMPRAR NOVAMENTE...

 

 

SE PUDEREM ME AJUDAR...AGRADEÇO MUITO DE CORAÇÃO.

mordukeraM
21 de outubro de 2018 às 16:13
local config = {
storage = 102591,
}
local kevingay = {
ITEM = {2145, 10}, -- ITEM, QUANTIDADE
}




function onSay(cid, param, words, channel)

if getPlayerItemCount(cid, kevingay.ITEM[1]) >= kevingay.ITEM[2] then
setPlayerStorageValue(cid, config.storage, os.time()+param*60*60)
doPlayerRemoveMoney (cid, 2145, 10)
doBroadcastMessage("Voce comprou bonus de 50 por cento de exp durante "..param.." horas, por 10 diamonds! Aproveite.")
end
return true
end
MarshmelloM
21 de outubro de 2018 às 19:28

Em creatureScript

Crie um arquivo chamado exp.lua e cole dentro

Spoiler

function onKill(cid, target)
if isPlayer(cid) and isMonster(target) then
if getPlayerStorageValue(cid,102590) - os.time() >= 1 then
local exp = getExperienceStage(getPlayerLevel(cid), getVocationInfo(getPlayerVocation(cid)).experienceMultiplier)
local count = ((getMonsterInfo(string.lower(getCreatureName(target))).experience*6.0*exp)/2)
doPlayerAddExperience(cid, count)
addEvent(doSendAnimatedText, 500, getCreaturePosition(cid), '+'..count, math.random(50,60))
end
else
return TRUE
end
return TRUE
end

 

Registre no login.lua

registerCreatureEvent(cid, "ExpBonus")

Use a tag XML

<event type="kill" name="ExpBonus" event="script" value="exp.lua"/>

No talkactions

Crie outro arquivo chamado exp.lua e cole

Spoiler

local storage = 102591
local item = 2145


function onSay(cid, param, words, channel)

if getPlayerItemCount(cid, item) >= 10 then
setPlayerStorageValue(cid,storage, os.time()+1200)
doPlayerRemoveItem(cid, 2145, 10)
doPlayerSendTextMessage(cid, 25, "Voce comprou bonus de 50 por cento de exp durante 20 Minutos, Custo de  10 diamonds! Aproveite.")
else
doPlayerSendTextMessage(cid, 19, "Você precisa ter 10 Diamonds")
end
return true
end

 

Usando a tag 

<talkaction words="/doubleexp" event="script" value="exp.lua"/>