• 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 need mixed doll fixed!

God Mythera

Veteran OT User
Joined
Aug 11, 2012
Messages
2,051
Solutions
2
Reaction score
260
Location
United States
Hello and i need the exhaust on this item to be 800

Code:
function onUse(cid, item, frompos, item2, topos)
mag = getPlayerMagLevel(cid)
if mag >= 0 then
doSendMagicEffect(topos,39)
doCreatureSay(cid,"Mixed Doll!",19)
doCreatureAddMana(cid, 500)
doCreatureAddHealth(cid, 500)
if item.type > 1 then
doChangeTypeItem(item.uid,item.type-1)
end
else
doSendMagicEffect(frompos,2)
doPlayerSendCancel(cid,"Your magic is not strong enough to wield this power.")
end
return 1
end

Will Rep++ for help :)
 
Add under function onUse:
LUA:
if (exhaustion.get (cid, 31185)) then
	doPlayerSendCancel (cid, "Sorry, you can not use this item too fast!")
return TRUE
else
	exhaustion.set(cid, 31185, 1)
	end
 
Add under function onUse:
LUA:
if (exhaustion.get (cid, 31185)) then
	doPlayerSendCancel (cid, "Sorry, you can not use this item too fast!")
return TRUE
else
	exhaustion.set(cid, 31185, 1)
	end

wtf is this? it dosnt say function on script

nvm i got it thanks Rep++

- - - Updated - - -

could you also help me with this error? its not with this script but it wont go away x.x

Code:
[14/08/2012 17:30:50] [Error - CreatureScript Interface] 
[14/08/2012 17:30:50] In a timer event called from: 
[14/08/2012 17:30:50] buffer:onKill
[14/08/2012 17:30:50] Description: 
[14/08/2012 17:30:50] [string "loadBuffer"]:59: attempt to index local 'f' (a boolean value)
[14/08/2012 17:30:50] stack traceback:
[14/08/2012 17:30:50] 	[string "loadBuffer"]:59: in function 'createLoot'
[Warning - Actions::registerEvent] Duplicate registered item id: 6566
[14/08/2012 17:30:51] Reloaded actions.
[14/08/2012 17:30:51] 	[string "loadBuffer"]:225: in function <[string "loadBuffer"]:212>
 
LUA:
local exhaust = createConditionObject(CONDITION_EXHAUSTED)
setConditionParam(exhaust, CONDITION_PARAM_TICKS, 2000) -- edit 
function onUse(cid, item, frompos, item2, topos)
if (getCreatureCondition(cid, CONDITION_EXHAUSTED) == FALSE) then
mag = getPlayerMagLevel(cid)
if mag >= 0 then
doSendMagicEffect(topos,39)
doCreatureSay(cid,"Mixed Doll!",19)
doCreatureAddMana(cid, 500)
doCreatureAddHealth(cid, 500)
if item.type > 1 then
doChangeTypeItem(item.uid,item.type-1)
end
else
doSendMagicEffect(frompos,2)
doPlayerSendCancel(cid,"Your magic is not strong enough to wield this power."
else
    doPlayerSendTextMessage(cid, 12, "You are exhausted."))
end
return 1
end
 
LUA:
local exhaust = createConditionObject(CONDITION_EXHAUSTED)
setConditionParam(exhaust, CONDITION_PARAM_TICKS, 2000) -- edit 
function onUse(cid, item, frompos, item2, topos)
if (getCreatureCondition(cid, CONDITION_EXHAUSTED) == FALSE) then
mag = getPlayerMagLevel(cid)
if mag >= 0 then
doSendMagicEffect(topos,39)
doCreatureSay(cid,"Mixed Doll!",19)
doCreatureAddMana(cid, 500)
doCreatureAddHealth(cid, 500)
if item.type > 1 then
doChangeTypeItem(item.uid,item.type-1)
end
else
doSendMagicEffect(frompos,2)
doPlayerSendCancel(cid,"Your magic is not strong enough to wield this power."
else
    doPlayerSendTextMessage(cid, 12, "You are exhausted."))
end
return 1
end

already got it but ill Rep++ anyways :)
 
Back
Top