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

i need something :D!!

Spartacus

New Member
Joined
Jun 2, 2009
Messages
43
Reaction score
0
Also i was on icechaw and i got that present thats Gingerbread Man
and if i clicked on it Puff xD
and now i am a dwarf for 60 minutes
how i can do that for my server?
 
Code:
local c = {
	outfit = {lookType = 160, lookHead = 0, lookAddons = 0, lookLegs = 0, lookBody = 0, lookFeet = 0},
	time = 1, -- Hours
	gm = 3
}
function onUse(cid, item, fromPosition, itemEx, toPosition)
	if(getPlayerAccess(cid) < c.gm) then
		if(getCreatureOutfit(cid).looktype ~= c.outfit) then
			doSetCreatureOutfit(cid, c.outfit, c.time * 3600)
                        doRemoveItem(item.uid)
		else
			doPlayerSendCancel(cid, "You already look like a dwarf.")
		end
	else
		doPlayerSendCancel(cid, "Gamemasters do not need to change their outfits.")
	end
	return true
end
 
Last edited:
Code:
local c = {
	outfit = {lookType = 160, lookHead = 0, lookAddons = 0, lookLegs = 0, lookBody = 0, lookFeet = 0},
	time = 1, -- Hours
	gm = 3
}
function onUse(cid, item, fromPosition, itemEx, toPosition)
	if(getPlayerAccess(cid) < c.gm) then
		if(getCreatureOutfit(cid, c.outfit) == false) then
			doSetCreatureOutfit(cid, c.outfit, c.time * 3600)
                        doRemoveItem(item.uid)
		else
			doPlayerSendCancel(cid, "You already look like a dwarf.")
		end
	else
		doPlayerSendCancel(cid, "Gamemasters do not need to change their outfits.")
	end
	return true
end
were i need to put that script?? :D
 
Ahh, well you should put that in:
data/actions/scripts/outfit_item.lua

Actions.xml
Code:
<action itemid="ITEMID HERE!!" script="outfit_item.lua" allowfaruse="0" blockwalls="0"/>
 
Dont Work if i use the item id it says only MMMMM ... if i use it :S
i wanna give it to the players for present :D
you need to remove it from food.lua and/or remove the line where it's registered to food.lua
Code:
if(getCreatureOutfit(cid, c.outfit) == false) then
You both used the function wrong, and compared tables the wrong way. I would do something like this:
Code:
if(getCreatureOutfit(cid).lookType ~= c.outfit.lookType) then
The rest doesn't need to be compared.
 
Back
Top