Niekonczace Sie Poty

Trepido

Active User
Zarejestrowany
Dołączył
Sierpień 1, 2008
Posty
128
Liczba reakcji
34
Wiek
32
sam kombionowa?em na tym ;d
skrypt ten uda?o mi sie zrobic w 1 min
testowa?em go na Evo by fronczek 1,2



Nie Skonczonce Sie Potiony A Wiec Robimy Potions.lua
Jesli ktos otrzebuje pod wieksza ver tibi napisz w temacie badz na gg "8741881
wklejamy do niego
----------------------------------------------
Kod:
local greatHealthPot = 7591
local greatManaPot = 7590
local strongHealthPot = 7588
local strongManaPot = 7589
local healthPot = 7618
local manaPot = 7620

function onUse(cid, item, frompos, item2, topos)
    if(item.itemid == healthPot) then
                doSendAnimatedText(getPlayerPosition(cid), "Aaaah...", TEXTCOLOR_ORANGE)
        if(doTargetCombatHealth(0, cid, COMBAT_HEALING, 370, 530, CONST_ME_MAGIC_BLUE) == LUA_ERROR) then
            return FALSE
        end
    elseif(item.itemid == manaPot) then
                doSendAnimatedText(getPlayerPosition(cid), "Aaaah...", TEXTCOLOR_ORANGE)
        if(doTargetCombatMana(0, cid, 380, 450, CONST_ME_MAGIC_BLUE) == LUA_ERROR) then
            return FALSE
        end
    elseif(item.itemid == strongHealthPot) then
        if getPlayerVocation(cid) == 3 or getPlayerVocation(cid) == 7 or getPlayerVocation(cid) == 4 or getPlayerVocation(cid) == 8 then
        if getPlayerLevel(cid) > 50 then
                doSendAnimatedText(getPlayerPosition(cid), "Aaaah...", TEXTCOLOR_ORANGE)
        if(doTargetCombatHealth(0, cid, COMBAT_HEALING, 550, 850, CONST_ME_MAGIC_BLUE) == LUA_ERROR) then
            return FALSE
        end
        else
        doPlayerSendTextMessage(cid, 21, "Your level is too low.")
        end
        else
        doPlayerSendTextMessage(cid, 21, "You do not have the required vocation.")
        end
    elseif(item.itemid == strongManaPot) then
        if getPlayerVocation(cid) == 1 or getPlayerVocation(cid) == 2 or getPlayerVocation(cid) == 5 or getPlayerVocation(cid) == 6 or getPlayerVocation(cid) == 3 or getPlayerVocation(cid) == 7 then
                if getPlayerLevel(cid) > 50 then
        doSendAnimatedText(getPlayerPosition(cid), "Aaaah...", TEXTCOLOR_ORANGE)
        if(doTargetCombatMana(0, cid, 6150, 7250, CONST_ME_MAGIC_BLUE) == LUA_ERROR) then
            return FALSE
        end
        else
        doPlayerSendTextMessage(cid, 21, "Your level is too low.")
        end
        else
        doPlayerSendTextMessage(cid, 21, "You do not have the required vocation.")
        end
    elseif(item.itemid == greatHealthPot) then
        if getPlayerVocation(cid) == 4 or getPlayerVocation(cid) == 8 then
        if getPlayerLevel(cid) > 80 then
                doSendAnimatedText(getPlayerPosition(cid), "Aaaah...", TEXTCOLOR_ORANGE)
        if(doTargetCombatHealth(0, cid, COMBAT_HEALING, 1050, 1650, CONST_ME_MAGIC_BLUE) == LUA_ERROR) then
            return FALSE
        end
        else
        doPlayerSendTextMessage(cid, 21, "Your level is too low.")
        end
        else
        doPlayerSendTextMessage(cid, 21, "You do not have the required vocation.")
        end
    elseif(item.itemid == greatManaPot) then
        if getPlayerVocation(cid) == 1 or getPlayerVocation(cid) == 2 or getPlayerVocation(cid) == 5 or getPlayerVocation(cid) == 6 then
                if getPlayerLevel(cid) > 80 then
        doSendAnimatedText(getPlayerPosition(cid), "Aaaah...", TEXTCOLOR_ORANGE)
        if(doTargetCombatMana(0, cid, 1250, 1350, CONST_ME_MAGIC_BLUE) == LUA_ERROR) then
            return FALSE
        end
        else
        doPlayerSendTextMessage(cid, 21, "Your level is too low.")
        end
        else
        doPlayerSendTextMessage(cid, 21, "You do not have the required vocation.")
        end
    end

    return TRUE
end
-------------------
do acions dodajemy
Kod:
-- Potions
<action itemid="7588" script="potions.lua" />
<action itemid="7589" script="potions.lua" />
<action itemid="7590" script="potions.lua" />
<action itemid="7591" script="potions.lua" />
<action itemid="7618" script="potions.lua" />
<action itemid="7620" script="potions.lua" />
---------------------

/Dodano
Kod:
[/color][/b]
 
Ostatnia edycja:
Odp: [8.10] Niekonczace Sie Poty

Odp: [8.10] Niekonczace Sie Poty

Hah dobre xD przyda si? xD
 
Odp: [8.10] Niekonczace Sie Poty

Odp: [8.10] Niekonczace Sie Poty

To jest znakomite !!!!! bardzo przydatne na robienie otsow War
Mam takie jedno pytanko Czy mozesz przerobic to tak by po zuzyciu pota nic niezostawalo ? uzyjesz pota i nic niema niema vluida
 
Odp: [8.10] Niekonczace Sie Poty

Odp: [8.10] Niekonczace Sie Poty

@up
Powwiny sie usuwac same u mnie si? usuwa?y jak cos to mzozez przerobic eq na wara i po usuwac im poty i po zostawiac tylko po 1
 
Odp: [8.10] Niekonczace Sie Poty

Odp: [8.10] Niekonczace Sie Poty

No ale wiesz projektuje ots 8.1 do gry i tagze projektuje ots war do war juz mi dales rozwiazanie ale do gry chce zeby po zuzyciu mi znikaly a nie dalej byly dasz rade przerobic ?
 
Odp: Niekonczace Sie Poty

Skrypt dzia?a tylko mo?e dla nowych graczy co 1 raz pr?buj? otsa powiedzia? bys im gdzie w?o?y? ten Potions.lua ;p
 
Odp: Niekonczace Sie Poty

1 minuta? Nie za du?o? Wystarczy usun?? linijk?:
Kod:
doTransformItem(item.uid,xxxx)
xxxx - empty potion flask
A gdy chcemy, ?eby si? kasowa?y wystarczy zamieni? t? linijk? na:
Kod:
doRemoveItem(item.uid)

Pozdro,
Gelio
 
Odp: Niekonczace Sie Poty

Dzi?ki za skrypt napewno si? przyda na moim OTS.
 
Odp: Niekonczace Sie Poty

Troch? nie kapuje po co takie co? .Je?eli si? pot nie ko?czy to nie ma tej frajdy z gry:( .Ale i tak spoko skrypt ;)
 
Odp: Niekonczace Sie Poty

A pod 8.31 mo?e by? da?
 
Odp: Niekonczace Sie Poty

Prosz? pod 8.31
Kod:
local ultimateHealthPot = 8473
local greatHealthPot = 7591
local greatManaPot = 7590
local greatSpiritPot = 8472
local strongHealthPot = 7588
local strongManaPot = 7589
local healthPot = 7618
local manaPot = 7620
local smallHealthPot = 8704
local antidotePot = 8474

local antidote = createCombatObject()
setCombatParam(antidote, COMBAT_PARAM_TYPE, COMBAT_HEALING)
setCombatParam(antidote, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
setCombatParam(antidote, COMBAT_PARAM_TARGETCASTERORTOPMOST, TRUE)
setCombatParam(antidote, COMBAT_PARAM_AGGRESSIVE, FALSE)
setCombatParam(antidote, COMBAT_PARAM_DISPEL, CONDITION_POISON)

local exhaust = createConditionObject(CONDITION_EXHAUST_HEAL)
setConditionParam(exhaust, CONDITION_PARAM_TICKS, getConfigInfo('timeBetweenExActions'))

function onUse(cid, item, fromPosition, itemEx, toPosition)
	if(itemEx.uid ~= cid or itemEx.itemid ~= 1) then
		return TRUE
	end

	if(getCreatureCondition(cid, CONDITION_EXHAUST_HEAL) == TRUE) then
		doPlayerSendDefaultCancel(cid, RETURNVALUE_YOUAREEXHAUSTED)
		return TRUE
	end

	if(item.itemid == antidotePot) then
		if(doCombat(cid, antidote, numberToVariant(cid)) == LUA_ERROR) then
			return FALSE
		end
		doAddCondition(cid, exhaust)
		doCreatureSay(cid, "Aaaah...", TALKTYPE_ORANGE_1)
	elseif(item.itemid == smallHealthPot) then
		if(doTargetCombatHealth(0, cid, COMBAT_HEALING, 50, 100, CONST_ME_MAGIC_BLUE) == LUA_ERROR) then
			return FALSE
		end
		doAddCondition(cid, exhaust)
		doCreatureSay(cid, "Aaaah...", TALKTYPE_ORANGE_1)
	elseif(item.itemid == healthPot) then
		if(doTargetCombatHealth(0, cid, COMBAT_HEALING, 200, 300, CONST_ME_MAGIC_BLUE) == LUA_ERROR) then
			return FALSE
		end
		doAddCondition(cid, exhaust)
		doCreatureSay(cid, "Aaaah...", TALKTYPE_ORANGE_1)
	elseif(item.itemid == manaPot) then
		if(doTargetCombatMana(0, cid, 470, 630, CONST_ME_MAGIC_BLUE) == LUA_ERROR) then
			return FALSE
		end
		doAddCondition(cid, exhaust)
		doCreatureSay(cid, "Aaaah...", TALKTYPE_ORANGE_1)
	elseif(item.itemid == strongHealthPot) then
		if(not(isKnight(cid) or isPaladin(cid)) or (getPlayerLevel(cid) < 50)) and not(getPlayerGroupId(cid) >= 2) then
			doCreatureSay(cid, "This potion can only be consumed by paladins and knights of level 50 or higher.", TALKTYPE_ORANGE_1)
			return TRUE
		end

		if(doTargetCombatHealth(0, cid, COMBAT_HEALING, 300, 500, CONST_ME_MAGIC_BLUE) == LUA_ERROR) then
			return FALSE
		end
		doAddCondition(cid, exhaust)
		doCreatureSay(cid, "Aaaah...", TALKTYPE_ORANGE_1)
	elseif(item.itemid == strongManaPot) then
		if(not(isSorcerer(cid) or isDruid(cid) or isPaladin(cid)) or (getPlayerLevel(cid) < 50)) and not(getPlayerGroupId(cid) >= 2) then
			doCreatureSay(cid, "This potion can only be consumed by sorcerers, druids and paladins of level 50 or higher.", TALKTYPE_ORANGE_1)
			return TRUE
		end

		if(doTargetCombatMana(0, cid, 400, 650, CONST_ME_MAGIC_BLUE) == LUA_ERROR) then
			return FALSE
		end
		doAddCondition(cid, exhaust)
		doCreatureSay(cid, "Aaaah...", TALKTYPE_ORANGE_1)
	elseif(item.itemid == greatSpiritPot) then
		if(not(isPaladin(cid)) or (getPlayerLevel(cid) < 80)) and not(getPlayerGroupId(cid) >= 2) then
			doCreatureSay(cid, "This potion can only be consumed by paladins of level 80 or higher.", TALKTYPE_ORANGE_1)
			return TRUE
		end

		if(doTargetCombatHealth(0, cid, COMBAT_HEALING, 400, 600, CONST_ME_MAGIC_BLUE) == LUA_ERROR or doTargetCombatMana(0, cid, 410, 690, CONST_ME_MAGIC_BLUE) == LUA_ERROR) then
			return FALSE
		end
		doAddCondition(cid, exhaust)
		doCreatureSay(cid, "Aaaah...", TALKTYPE_ORANGE_1)
	elseif(item.itemid == greatHealthPot) then
		if(not(isKnight(cid)) or (getPlayerLevel(cid) < 80)) and not(getPlayerGroupId(cid) >= 2) then
			doCreatureSay(cid, "This potion can only be consumed by knights of level 80 or higher.", TALKTYPE_ORANGE_1)
			return TRUE
		end

		if(doTargetCombatHealth(0, cid, COMBAT_HEALING, 600, 800, CONST_ME_MAGIC_BLUE) == LUA_ERROR) then
			return FALSE
		end
		doAddCondition(cid, exhaust)
		doCreatureSay(cid, "Aaaah...", TALKTYPE_ORANGE_1)
	elseif(item.itemid == greatManaPot) then
		if(not(isSorcerer(cid) or isDruid(cid)) or (getPlayerLevel(cid) < 80)) and not(getPlayerGroupId(cid) >= 2) then
			doCreatureSay(cid, "This potion can only be consumed by sorcerers and druids of level 80 or higher.", TALKTYPE_ORANGE_1)
			return TRUE
		end

		if(doTargetCombatMana(0, cid, 600, 1000, CONST_ME_MAGIC_BLUE) == LUA_ERROR) then
			return FALSE
		end
		doAddCondition(cid, exhaust)
		doCreatureSay(cid, "Aaaah...", TALKTYPE_ORANGE_1)
	elseif(item.itemid == ultimateHealthPot) then
		if(not(isKnight(cid)) or (getPlayerLevel(cid) < 130)) and not(getPlayerGroupId(cid) >= 2) then
			doCreatureSay(cid, "This potion can only be consumed by knights of level 130 or higher.", TALKTYPE_ORANGE_1)
			return TRUE
		end

		if(doTargetCombatHealth(0, cid, COMBAT_HEALING, 1500, 2100, CONST_ME_MAGIC_BLUE) == LUA_ERROR) then
			return FALSE
		end
		doAddCondition(cid, exhaust)
		doCreatureSay(cid, "Aaaah...", TALKTYPE_ORANGE_1)
	end
	return TRUE
end
do actions daj tak samo jak w 1 poscie
 
Odp: Niekonczace Sie Poty

Nawet dobry skrypt. Moze sie przydac na moim otsie ! :)
 
Odp: Niekonczace Sie Poty

czyli w tym przypadku to??
<action itemid="7588" script="potions.lua" />
<action itemid="8473" script="potions.lua" />
<action itemid="7591" script="potions.lua" />
<action itemid="7590" script="potions.lua" />
<action itemid="8472" script="potions.lua" />
<action itemid="7588" script="potions.lua" />
<action itemid="7589" script="potions.lua" />
<action itemid="7618" script="potions.lua" />
<action itemid="7620" script="potions.lua" />
<action itemid="8704" script="potions.lua" />
<action itemid="8474" script="potions.lua" />
 
Odp: Niekonczace Sie Poty

moze moglbym prosic o taki skrypt pod tibie 8,4 jezeli to jest mozliwe
 
Odp: Niekonczace Sie Poty

Kopia jak nic ju? widzia?em bardzo bardzo temu takie skrypty na warach.:mad:
 
Odp: Niekonczace Sie Poty

Gz ,ale czy te poty maj? exa ?!
 
Back
Do góry