What's new

Skrypt na senzu

Aito12

User
Joined
Jul 16, 2008
Messages
48
Reaction score
4
Age
32
Potrzebuje skrypt na nie koncz?ce sie senzu do wodbo









Code:
function onUse(cid, item, frompos, item2, topos)

	local level = getPlayerLevel(cid)
	local mlevel = getPlayerMagLevel(cid)
	
	local exhausted_seconds = 1
	local exhausted_storagevalue = 7480
	
	local mana_minimum = 70000
	local mana_maximum = 70000

	local mana_add = math.random(mana_minimum, mana_maximum)
	
		
		if(item.type >= 100) then
			if(os.time() > getPlayerStorageValue(cid, exhausted_storagevalue)) then
				if(isPlayer(cid) == 1) then
doSendMagicEffect(topos,12)
					doPlayerAddMana(cid, mana_add)
                                        doPlayerAddHealth(cid, mana_add)
doPlayerSay(cid,":)",1)
					setPlayerStorageValue(cid, exhausted_storagevalue, os.time() + exhausted_seconds)
					doChangeTypeItem(item.uid, item.type - 0)
				else
					doSendMagicEffect(frompos, CONST_ME_POFF)
					doPlayerSendCancel(cid, "You are exchausted.")
				end
			else
				doSendMagicEffect(frompos, CONST_ME_POFF)
				doPlayerSendCancel(cid, "You are exhausted.")
			end
		else
			if(os.time() < getPlayerStorageValue(cid, exhausted_storagevalue)) then
				doSendMagicEffect(frompos, CONST_ME_POFF)
				doPlayerSendCancel(cid, "You are exhausted.")
			else
				if(isPlayer(cid) == 1) then
doSendMagicEffect(topos,12)
					doPlayerAddMana(cid, mana_add)
                                        doPlayerAddHealth(cid, mana_add*1.5)
doPlayerSay(cid,"I feel the best",1)
					setPlayerStorageValue(cid, exhausted_storagevalue, os.time() + exhausted_seconds)
					doRemoveItem(item.uid, 1)
				else
					doSendMagicEffect(frompos, CONST_ME_POFF)
					doPlayerSendCancel(cid, "You are exchausted.")
				end
			end
		end
						
	return 1
end

Notka moderatorska:
Z?y dzia?, przenosz?.
 
R

Rahim

Guest
Odp: Skrypt na senzu

Code:
function onUse(cid, item, frompos, item2, topos)
 
	local level = getPlayerLevel(cid)
	local mlevel = getPlayerMagLevel(cid)
 
	local exhausted_seconds = 1
	local exhausted_storagevalue = 7480
 
	local mana_minimum = 70000
	local mana_maximum = 70000
 
	local mana_add = math.random(mana_minimum, mana_maximum)
 
 
		if(item.type >= 100) then
			if(os.time() > getPlayerStorageValue(cid, exhausted_storagevalue)) then
				if(isPlayer(cid) == 1) then
doSendMagicEffect(topos,12)
					doPlayerAddMana(cid, mana_add)
                                        doPlayerAddHealth(cid, mana_add)
doPlayerSay(cid,":)",1)
					setPlayerStorageValue(cid, exhausted_storagevalue, os.time() + exhausted_seconds)
					else
					doSendMagicEffect(frompos, CONST_ME_POFF)
					doPlayerSendCancel(cid, "You are exchausted.")
				end
			else
				doSendMagicEffect(frompos, CONST_ME_POFF)
				doPlayerSendCancel(cid, "You are exhausted.")
			end
		else
			if(os.time() < getPlayerStorageValue(cid, exhausted_storagevalue)) then
				doSendMagicEffect(frompos, CONST_ME_POFF)
				doPlayerSendCancel(cid, "You are exhausted.")
			else
				if(isPlayer(cid) == 1) then
doSendMagicEffect(topos,12)
					doPlayerAddMana(cid, mana_add)
                                        doPlayerAddHealth(cid, mana_add*1.5)
doPlayerSay(cid,"I feel the best",1)
					setPlayerStorageValue(cid, exhausted_storagevalue, os.time() + exhausted_seconds)
					else
					doSendMagicEffect(frompos, CONST_ME_POFF)
					doPlayerSendCancel(cid, "You are exchausted.")
				end
			end
		end
 
	return 1
end
 

przecierex

Active User
Joined
Nov 2, 2008
Messages
135
Reaction score
6
Odp: Skrypt na senzu

Nie prawda to tylko daje po 70k hp i ki i jest ko?cz?ca sie
 

danielplas

User
Joined
Aug 8, 2008
Messages
44
Reaction score
0
Odp: Skrypt na senzu

A mo?e wiecie jak zrobi? na procenty np. 50% hp i mp ?eby dawa?o?
 
Top