• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

(ROZWIĄZANY)Problem z używaniem itemów

kurczok666

New Member
Joined
Nov 23, 2008
Messages
64
Reaction score
1
Mam problem ponieważ nie mogę używać niektórych itemów np. berserk potion, mastermind potion i bullseye potion. gdy klikam na item nic się nie dzieje ani nie wyświetla. Co może być tego przyczyna?

Mam tfs 0.3.4
 
Last edited:
Skrypt berserk_potion.lua

Code:
local condition = createConditionObject(CONDITION_ATTRIBUTES)
setConditionParam(condition, CONDITION_PARAM_TICKS, 10 * 60 * 1000) -- 10 minutes
setConditionParam(condition, CONDITION_PARAM_SKILL_MELEE, 5)
setConditionParam(condition, CONDITION_PARAM_SKILL_SHIELD, -10)

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

	if(doAddCondition(itemEx.uid, condition) ~= LUA_ERROR) then
		doSendMagicEffect(getCreaturePosition(itemEx.uid), CONST_ME_MAGIC_RED)
		doRemoveItem(item.uid)
	end

	return TRUE
end

Spis w actions.xml
Code:
	<action itemid="7439" event="script" value="liquids/berserk_potion.lua" allowfaruse="1"/>

Jeszcze wpis w items.xml

Code:
	<item id="7439" article="a" name="berserk potion">
		<attribute key="weight" value="200"/>
		<attribute key="description" value="Drinking this potion increases temporarily your fighting skill while decreasing your defense."/>
	</item>


Temat do zamknięcia, błędy w skrypcie ale już poprawione.
 
Last edited:
Back
Top