Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Config
- local storage = 99956
- local area = {
- {0,0,0},
- {0,3,0},
- {0,0,0},
- }
- function iniNikudan(cid)
- mayNotMove(cid, true)
- doSetCreatureOutfit(cid, {lookType = 427}, 500)
- addEvent(doSetCreatureOutfit, 200, cid, {lookType = 428}, 500)
- addEvent(doSetCreatureOutfit, 400, cid, {lookType = 429}, 500)
- addEvent(mayNotMove, 500, cid, false)
- addEvent(doSetCreatureOutfit, 600, cid, {lookType = 422}, -1)
- addEvent(doCreatureSay, 700, cid, "Nikudan Sensha!", TALKTYPE_MONSTER)
- end
- function nikudanSensha(cid, chakra)
- if not isCreature(cid) or getPlayerStorageValue(cid, storage) < 1 then
- return false
- end
- local minDmg = -(getPlayerSkill(cid, 0) * 1)
- local maxDmg = -(getPlayerSkill(cid, 0) * 1.2)
- local efeito = CONST_ME_NONE
- local poslook = getCreatureLookPosition(cid)
- poslook.stackpos = STACKPOS_TOP_MOVEABLE_ITEM_OR_CREATURE
- if isWalkable(poslook, false, false, false) then
- if isCreature(getThingfromPos(poslook).uid) then
- doMoveCreature(cid, getPlayerLookDirection(cid))
- doAreaCombatHealth(cid, COMBAT_PHYSICALDAMAGE, getCreaturePosition(cid), area, minDmg, maxDmg, efeito)
- end
- end
- doPlayerAddMana(cid, chakra)
- addEvent(nikudanSensha, 350, cid, chackra)
- end
- function onUse(cid, item, frompos, item2, topos)
- if(getPlayerStorageValue(cid,storage) == 0) then
- iniNikudan(cid)
- setPlayerStorageValue(cid, storage, 1)
- addEvent(nikudanSensha, 800, cid, -3)
- else
- setPlayerStorageValue(cid, storage, 0)
- doRemoveCondition(cid, CONDITION_OUTFIT)
- end
- return true
- end
Advertisement
Add Comment
Please, Sign In to add comment