Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- hasWaterCombat = createCombatObject()
- arrzor = {{1,1,1,1,1,1,1},{1,1,1,1,1,1,1},{1,1,0,0,0,1,1},{1,1,0,2,0,1,1},{1,1,0,0,0,1,1},{1,1,1,1,1,1,1},{1,1,1,1,1,1,1}}
- setCombatArea(hasWaterCombat, createCombatArea(arrzor))
- function onTile90(cid, pos)
- local needcheck = getPlayerStorageValue(cid, 7177)
- if needcheck == 1 then
- return 1 end
- pos.stackpos = 0
- local mitem = getTileThingByPos(pos)
- if isPisoAgua(mitem.itemid) == 1 then
- setPlayerStorageValue(cid, 7177, 1)
- return 1
- end
- end
- setCombatCallback(hasWaterCombat, CALLBACK_PARAM_TARGETTILE, "onTile90")
- function hasWater(cid, porcento)
- doCombat(cid, hasWaterCombat, positionToVariant(getThingPos(cid)))
- local nearwater = getPlayerStorageValue(cid, 7177)
- if nearwater == 1 then
- setPlayerStorageValue(cid, 7177, 0)
- doPlayerSendTextMessage(cid, 25, "Using ambient water.")
- return true
- end
- if porcento > 100 then return false end
- local pouch = getPlayerSlotItem(cid, 10)
- if pouch.itemid == 4864 and (pouch.actionid == 0 and 100 or pouch.actionid-100) >= porcento then
- local newtype = (pouch.actionid == 0 and 200 or pouch.actionid) - porcento
- if newtype == 100 then doTransformItem(pouch.uid, 4863) end
- doSetItemActionId(pouch.uid, newtype)
- doPlayerSendTextMessage(cid, 25, (newtype-100).. "% Rest")
- return true
- end
- doPlayerSendTextMessage(cid, 25, "There is not enough water to perform this bending.")
- return false
- end
Advertisement
Add Comment
Please, Sign In to add comment