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

need script - rune

aenone

New Member
Joined
Nov 8, 2008
Messages
23
Reaction score
0
Hello everyone,

I need a rune, that will change looktype to 159 until player change it. Anyone know how to do that?
 
data/actions/actions.xml
XML:
<action itemid="xxxx" event="script" value="outfit rune.lua"/> ----- Put item id at 'xxxx'

data/actions/scripts/outfit rune.lua
Lua:
function onUse(cid, item, frompos, item2, topos)
doSetCreatureOutfit(cid, 159)
return true
end

Try it.
 
functionu.png




hmm wrong fx??
 
Lua:
function onUse(cid, item, fromPosition, itemEx, toPosition)
	local v = getCreatureOutfit(cid)
	if v.lookType ~= 159 then
		v.lookType = 159
		doCreatureChangeOutfit(cid, v)
		doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_RED)
	else
		doPlayerSendCancel(cid, 'You already have this outfit.')
	end
	return true
end
 
Lua:
function onUse(cid, item, fromPosition, itemEx, toPosition)
	local v = getCreatureOutfit(cid)
	if v.lookType ~= 159 then
		v.lookType = 159
		doCreatureChangeOutfit(cid, v)
		doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_RED)
		doRemoveItem(item.uid)
	else
		doPlayerSendCancel(cid, 'You already have this outfit.')
	end
	return true
end
 
Back
Top