Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local exp = 0.2
- local expfinal = 1 --Não mude, isso é para a experiencia voltar ao normal.
- local tempo = 24*60*60 -- 1000 = 1s
- local time = os.time() + tempo
- local pos = {x=160, y=54, z=7}
- function onUse(cid)
- if getPlayerStorageValue(cid, 82037) == 2 then
- doPlayerSendTextMessage(cid, 30, "Você já usou esta alavanca.")
- return true
- end
- if getPlayerGuildId(cid) > 0 then
- for _, pid in pairs(getPlayersOnline()) do
- if getPlayerGuildId(pid) == getPlayerGuildId(cid) and pid ~= cid then
- setPlayerStorageValue(pid, 82037, 2)
- setPlayerStorageValue(cid, 82037, 2)
- setPlayerStorageValue(cid, 82039, os.time() + tempo)
- setPlayerStorageValue(pid, 82039, os.time() + tempo)
- doBroadcastMessage("O jogador "..getCreatureName(cid).." da guild " ..getPlayerGuildName(cid).. " venceu o castle experience ", MESSAGE_INFO_DESCR)
- doBroadcastMessage("O jogador "..getCreatureName(cid).." da guild " ..getPlayerGuildName(cid).. " venceu o castle experience ", MESSAGE_INFO_DESCR)
- doBroadcastMessage("O jogador "..getCreatureName(cid).." da guild " ..getPlayerGuildName(cid).. " venceu o castle experience ", MESSAGE_INFO_DESCR)
- doBroadcastMessage("O jogador "..getCreatureName(cid).." da guild " ..getPlayerGuildName(cid).. " venceu o castle experience ", MESSAGE_INFO_DESCR)
- doBroadcastMessage("O jogador "..getCreatureName(cid).." da guild " ..getPlayerGuildName(cid).. " venceu o castle experience ", MESSAGE_INFO_DESCR)
- doPlayerSendTextMessage(cid, 30, "O jogador ("..getCreatureName(cid)..") da sua guild ganhou, voce tem 20% a mais de exp por 24 horas.")
- doPlayerSendTextMessage(pid, 30, "O jogador ("..getCreatureName(cid)..") da sua guild ganhou, voce tem 20% a mais de exp por 24 horas.")
- doTeleportThing(cid, pos)
- doSendMagicEffect(cid, 6)
- end
- end
- else
- doPlayerSendCancel(cid, "Você não tem guild.")
- end
- return true
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement