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

Outfit Condition

Aarthec

w0000t
Joined
Apr 25, 2009
Messages
129
Reaction score
0
Location
Sweden
Could someone give me a script to create a outfit condition?

So I can use:
doAddCondition(cid, condition)
to change a players outfit ^^


EDIT:
I also need a condition to change the players speed by 70%

Thanks.
 
Last edited:
Code:
local condition = createConditionObject(CONDITION_OUTFIT)
setConditionParam(condition, CONDITION_PARAM_TICKS, 20 * 1000)
addOutfitCondition(condition, 0, 329, 0, 0, 0, 0)
setCombatCondition(combat, condition)

doAddCondition(cid, condition)
Alternatively,
Code:
doSetCreatureOutfit(cid, {lookType = 329, lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0, lookTypeEx = 0, lookAddons = 0}, 20 * 1000)
 
Thanks, could you make the other one too?

Also instead of 20 * 1000 could I put something like -1 to make the player keep the condition until I've used "doRemoveCondition"?
 
@Cyko, it doesn't work. I have the "local condition" over:
function onStepIn(cid, item, position, fromPosition)

and doAddCondition under it.

Crying Damson 0.3.6
 
Last edited:
@up
The line before doAddCondition is not really necessary.. There's no value identified as 'combat'.. It's not a spell..

Use this:

Lua:
local condition = createConditionObject(CONDITION_OUTFIT)
setConditionParam(condition, CONDITION_PARAM_TICKS, 20 * 1000)
addOutfitCondition(condition, 0, 329, 0, 0, 0, 0)

And doAddCondition(cid, condition).
 
Lua:
local condition = createConditionObject(CONDITION_OUTFIT)
	setConditionParam(condition, CONDITION_PARAM_TICKS, 20 * 1000)
	addOutfitCondition(condition, 0, 329, 0, 0, 0, 0) 
	
function onStepIn(cid, item, position, fromPosition)
	if getGlobalStorageValue(9000) == 1 then
		if getGlobalStorageValue(9002) >= getGlobalStorageValue(9001) then
			doTeleportThing(cid, {x=4972, y=5072, z=9})
			doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT)
			doSendMagicEffect(fromPosition, CONST_ME_POFF)
			setPlayerStorageValue(cid, 9000, 1)
			setGlobalStorageValue(9001, getGlobalStorageValue(9001)+1)
			doAddCondition(cid, condition)
			doPlayerSendTextMessage(cid, 28, "You joined the orcs!")
		else
			doTeleportThing(cid, fromPosition)
			doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)
			doPlayerSendTextMessage(cid, 28, "[AUTO-TEAMBALANCE] There are too many orcs!")
		end
	else
		doTeleportThing(cid, fromPosition)
		doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)
		doPlayerSendTextMessage(cid, 28, "Capture the Flag is closed.")
	end
return true
end

Error message:
[14/12/2009 23:35:23] Description:
[14/12/2009 23:35:23] attempt to index a number value
[14/12/2009 23:35:23] [Warning - Event::loadScript] Cannot load script (data/movements/scripts/
 
Back
Top