What's new

Nieko?cz?cy si? manafluida w wiadrze.

Erevius

Advanced User
Joined
Mar 15, 2009
Messages
150
Reaction score
10
Odp: Nieko?cz?cy si? manafluida w wiadrze.

Wejd? w "server\data\actions\scripts\fluids.lua", otw?rz za pomoc? notatnika i wykasuj wszystko, nast?pnie wklej to:

PHP:
local exhaust = createConditionObject(CONDITION_EXHAUSTED)
setConditionParam(exhaust, CONDITION_PARAM_TICKS, 1000)

local drunk = createConditionObject(CONDITION_DRUNK)
setConditionParam(drunk, CONDITION_PARAM_TICKS, 60000)

local poison = createConditionObject(CONDITION_POISON)
local rand = math.random(1, 10)
addDamageCondition(poison, rand, 6000, -5)
addDamageCondition(poison, rand, 6000, -4)
addDamageCondition(poison, rand, 6000, -3)
addDamageCondition(poison, rand, 6000, -2)
addDamageCondition(poison, rand, 6000, -1)

local fire = createConditionObject(CONDITION_FIRE)
addDamageCondition(fire, 1, 6000, -20)
addDamageCondition(fire, 7, 6000, -10)

function onUse(cid, item, frompos, item2, topos)
        if(hasCondition(cid, CONDITION_EXHAUSTED) == TRUE) then
		doPlayerSendDefaultCancel(cid, RETURNVALUE_YOUAREEXHAUSTED)
		return TRUE
	end
	if item2.itemid == 1 then
		if item.type == 0 then
			doPlayerSendCancel(cid, "It is empty.")
		else
			if item2.uid == cid then
				doChangeTypeItem(item.uid, 0)
				if item.type == 3 then
					doPlayerSay(cid, "Aaah...", 1)
					doTargetCombatCondition(0, cid, drunk, CONST_ME_NONE)
				elseif item.type == 4 then
					doPlayerSay(cid, "Argh!", 1)
					doTargetCombatCondition(0, cid, poison, CONST_ME_NONE)
				elseif item.type == 7 then
					doPlayerAddMana(cid, math.random(80, 160))
					doSendMagicEffect(topos, 12)
					doPlayerSay(cid, "Aaaah...", 1)
                    doAddCondition(cid, exhaust)
					doChangeTypeItem(item.uid, 7)
				elseif item.type == 10 then
					doPlayerAddHealth(cid, math.random(40, 80))
					doSendMagicEffect(topos, 12)
					doPlayerSay(cid, "Aaaah...", 1)
				elseif item.type == 13 then
					doPlayerSay(cid, "Ewww...!", 1)
					urinehp = math.random(10, 35)
					doPlayerAddHealth(cid, - urinehp)
				elseif item.type == 15 then
					doPlayerSay(cid, "Aaah...", 1)
					doTargetCombatCondition(0, cid, drunk, CONST_ME_NONE)
				elseif item.type == 26 then
					doPlayerSay(cid, "Ouch!", 1)
					doTargetCombatCondition(0, cid, fire, CONST_ME_NONE)
					lavahp = math.random(100, 350)
					doPlayerAddHealth(cid, - lavahp)
				else
					doPlayerSay(cid, "Gulp.", 1)
				end
			else
				doChangeTypeItem(item.uid, 0)
				splash = doCreateItem(2025, item.type, topos)
				doDecayItem(splash)
			end
		end
	elseif item2.itemid >= 490 and item2.itemid <= 517 
	or item2.itemid >= 618 and item2.itemid <= 629 
	or item2.itemid == 1368 or item2.itemid == 1369 
	or item2.itemid >= 4820 and item2.itemid <= 4825 
	or item2.itemid >= 4828 and item2.itemid <= 4831 
	or item2.itemid >= 4608 and item2.itemid <= 4666 then
		doChangeTypeItem(item.uid, 1)
	elseif item2.itemid == 103 then
		doChangeTypeItem(item.uid, 19)
	elseif item2.itemid >= 598 and item2.itemid < 601 
	or item2.itemid == 1509 
	or item2.itemid >= 518 and item2.itemid <= 529 then
		doChangeTypeItem(item.uid, 26)
	elseif item2.itemid >= 351 and item2.itemid <= 355 then
		doChangeTypeItem(item.uid, 19)
	elseif item2.itemid >= 602 and item2.itemid <= 605 
	or item2.itemid >= 4691 and item2.itemid <= 4755 
	or item2.itemid == 4758 then
		doChangeTypeItem(item.uid, 28)
	elseif item2.itemid == 1771 then
		doChangeTypeItem(item.uid, 1)
	elseif item2.itemid == 1772 then
		doChangeTypeItem(item.uid, 3)
	elseif item2.itemid == 1773 then
		doChangeTypeItem(item.uid, 15)
	elseif item2.itemid > 2806 and item2.itemid < 3132 
	or item2.itemid >= 4251 and item2.itemid <= 4327 then
		doChangeTypeItem(item.uid, 2)
	else
		if item.type == 0 then
			doPlayerSendCancel(cid, "It is empty.")
		else
			doChangeTypeItem(item.uid, 0)
			splash = doCreateItem(2025, item.type, topos)
			doDecayItem(splash)
		end
	end
	return 1
end

Kurde, zapomnialem ze ma byc w wiadrach...

#Down
Jakby? podmieni? to prawdopodobnie by dzia?a?o na fluidach, ale w sumie. Ej to chyba tez bedzie dziala? na wadrach. Przetestuj i napisz na privie czy dziala czy nie ;p
A, i chodzi ci tylko o manafluidy czy o health fluidy tez?
 
Last edited:

diksus94

I &#4326; Kato
Joined
Apr 19, 2008
Messages
967
Reaction score
175
Age
29
Odp: Nieko?cz?cy si? manafluida w wiadrze.

Czyli co, to nie jest do wiader?

@down.
Mo?esz si? nie udziela? w moich postach? Bo w og?le nie pomagasz, a tylko posty nabijasz.
 
Last edited:

SirGoodi

Advanced User
Joined
Dec 13, 2008
Messages
180
Reaction score
2
Odp: Nieko?cz?cy si? manafluida w wiadrze.

haha jak od razu ... po uruchomieniu silnika wyskakuj? b??dy to jak ma niby dzia?a?; o
 
Top