Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local function Novamente(cid)
- local player = Player(cid)
- if player then
- if math.random(1,2) == 1 then
- checkBot(player:getId(), false)
- end
- addEvent(Novamente, 600000, cid) --- 600000 10min
- end
- end
- local function Daponto(position, cid, stamina)
- local player = Player(cid)
- if player then
- if getPlayerStorageValue(cid,3567)+2 > os.time() or position ~= getCreaturePosition(cid) or getPlayerGroupId(cid) >= 2 then
- return true
- end
- setPlayerStorageValue(cid,3567,os.time())
- local voc = getPlayerVocation(cid)
- if isSorcerer(voc, 0) or isDruid(voc, 0) or isKnocker(voc, 0) then
- if isSorcerer(voc, 1) or isDruid(voc, 1) or isKnocker(voc, 1) then
- --Promotion 1:
- vida = 10
- mana = 35
- if isSorcerer(voc, 2) or isDruid(voc, 2) or isKnocker(voc, 2) then
- --Promotion 2:
- vida = 15
- mana = 40
- end
- else
- --Sem promotion:
- vida = 10
- mana = 30
- end
- elseif isPaladin(voc, 0) or isDrunou(voc, 0) then
- if isPaladin(voc, 1) or isDrunou(voc, 1) then
- --Promotion 1:
- vida = 20
- mana = 18
- if isPaladin(voc, 2) or isDrunou(voc, 2) then
- --Promotion 2:
- vida = 21
- mana = 25
- end
- else
- --Sem promotion:
- vida = 15
- mana = 15
- end
- elseif isKnight(voc, 0) then
- if isKnight(voc, 1) then
- --Promotion 1:
- vida = 100
- mana = 18
- if isKnight(voc, 2) then
- --Promotion 2:
- vida = 110
- mana = 21
- end
- else
- --Sem promotion:
- vida = 80
- mana = 15
- end
- elseif isInfernalist(voc, 0) then
- if isInfernalist(voc, 1) then
- --Promotion 1:
- vida = 10
- mana = 70
- if isInfernalist(voc, 2) then
- --Promotion 2:
- vida = 15
- mana = 75
- end
- else
- --Sem promotion:
- vida = 10
- mana = 60
- end
- end
- doPlayerAddMana(cid, mana)
- doCreatureAddHealth(cid, vida)
- if stamina == 30 then
- local staminaatual = getPlayerStamina(cid)
- if staminaatual < 2400 then
- stamina = 0
- doPlayerSetStamina(cid, staminaatual+1)
- end
- end
- stamina = stamina+1
- doSendMagicEffect(getPlayerPosition(cid),CONST_ME_MAGIC_BLUE)
- addpoinTs = addEvent(Daponto, 2000, position, cid, stamina)
- end
- return true
- end
- function onStepIn(cid, item, position, fromPosition)
- addpoinTs = addEvent(Daponto, 2000, position, cid, 0)
- if SERVIDOR == 5 then
- checkBot(player:getId(), false)
- addEvent(Novamente, 600000, cid) --- 600000 10min
- end
- --Funções dos pisos:
- if getPlayerGroupId(cid) < 2 then
- if item.itemid == 426 then
- doTransformItem(item.uid, 425)
- elseif item.itemid == 416 then
- doTransformItem(item.uid, 417)
- elseif item.itemid == 446 then
- doTransformItem(item.uid, 447)
- elseif item.itemid == 3216 then
- doTransformItem(item.uid, 3217)
- end
- end
- return true
- end
- function onStepOut(cid, item, position, fromPosition)
- if getPlayerGroupId(cid) < 2 then
- if item.itemid == 425 then
- doTransformItem(item.uid, 426)
- elseif item.itemid == 417 then
- doTransformItem(item.uid, 416)
- end
- end
- --stopEvent(addpoinTs)
- return true
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement