• 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!

Lua Help with this script please rep+

FakkaHe

New Member
Joined
Feb 2, 2008
Messages
110
Reaction score
0
Hello again, fellow otlanders. I just started scripting and i just made this script but the exhaust system aint working

thanks before hand ++rep!

PHP:
local exhaust = createConditionObject(CONDITION_EXHAUST)
setConditionParam(exhaust, CONDITION_PARAM_TICKS, getConfigInfo('timeBetweenExActions'))

function onUse(cid, item, fromPosition, itemEx, toPosition)
 if(hasCondition(cid, CONDITION_EXHAUST_HEAL)) then
	doPlayerSendDefaultCancel(cid, RETURNVALUE_YOUAREEXHAUSTED)
	return true
end
	
	if getPlayerLevel(cid) >= 100 and getPlayerVocation(cid) == 6 then
	doCreatureAddMana(cid,500)
	doCreatureAddHealth(cid,900)
	doAddCondition(cid, exhaust)
	doCreatureSay(cid, "I liek weeeeedzz", TALKTYPE_ORANGE_1)
else   
	doCreatureSay(itemEx.uid, "Only vocations of level 100 or above may use this rune.", TALKTYPE_ORANGE_1)
end
	return true
end

function onUse(cid, item, fromPosition, itemEx, toPosition)	
	if getPlayerLevel(cid) >= 100 and getPlayerVocation(cid) == 1 then
	doCreatureAddMana(cid,100)
	doCreatureAddHealth(cid,200)
	doAddCondition(cid, exhaust)
	doCreatureSay(cid, "I liek weeeeedzz", TALKTYPE_ORANGE_1)
else   
	doCreatureSay(itemEx.uid, "Only vocations of level 100 or above may use this rune.", TALKTYPE_ORANGE_1)
end
	return true
end
 
Lua:
local exhaust = createConditionObject(CONDITION_EXHAUST)
setConditionParam(exhaust, CONDITION_PARAM_TICKS, 2000)
setConditionParam(exhaust, CONDITION_PARAM_SUBID, 5)

function onUse(cid, item, fromPosition, itemEx, toPosition)
	if hasCondition(cid, CONDITION_EXHAUST, 5) then
		doPlayerSendDefaultCancel(cid, RETURNVALUE_YOUAREEXHAUSTED)
	elseif getPlayerLevel(cid) < 100 or getPlayerVocation(cid) ~= 6 then
		doCreatureSay(itemEx.uid, 'Only vocations of level 100 or above may use this rune.', TALKTYPE_ORANGE_1)
	else
		doCreatureAddMana(cid, 500)
		doCreatureAddHealth(cid, 900)
		doAddCondition(cid, exhaust)
		doCreatureSay(cid, 'I liek weeeeedzz', TALKTYPE_ORANGE_1)
	end
	return true
end
 
Back
Top