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

duration time in script dont work

Suxex

Member
Joined
Aug 13, 2007
Messages
391
Reaction score
5
Location
Halland - Getinge
The outfit doesnt change back, i use 0.4

Code:
[B]local common = {"orc warrior", "pirate cutthroat", "dworc voodoomaster", "dwarf guard", "minotaur mage"}
local uncommon = {"quara hydromancer", "diabolical imp", "banshee", "frost giant", "lich"}
local deluxe = {"serpent spawn", "demon", "juggernaut", "behemoth", "rahemos"}
local duration = 18000 --the time the outfit will last
function onUse(cid, item, fromPosition, itemEx, toPosition)
 
        end
 
 
	if item.itemid == 7737 then
		doSetMonsterOutfit(cid,common[math.random(#common)],duration*1000)
	elseif item.itemid == 7738 then
		doSetMonsterOutfit(cid,uncommon[math.random(#uncommon)],duration*1000)
	elseif item.itemid == 7739 then
		doSetMonsterOutfit(cid,deluxe[math.random(#deluxe)],duration*1000)
	end
	doRemoveItem(item.uid,1)
   	setPlayerStorageValue(cid, 20029, getCreatureStorage(cid, 20029) + 1)
	doSendMagicEffect(fromPosition,CONST_ME_MAGIC_BLUE)
	return TRUE
end[/B]
 
supposed to work... im not sure if dosetmonsteroufit excist never used it and just not looked in doc/fuction list. this suposed to work...

LUA:
local common = {"orc warrior", "pirate cutthroat", "dworc voodoomaster", "dwarf guard", "minotaur mage"}
local uncommon = {"quara hydromancer", "diabolical imp", "banshee", "frost giant", "lich"}
local deluxe = {"serpent spawn", "demon", "juggernaut", "behemoth", "rahemos"}
local duration = 2 --the time the outfit will last in minutes
function onUse(cid, item, fromPosition, itemEx, toPosition)
 
      
 
 
	if item.itemid == 7737 then
		doSetMonsterOutfit(cid,common[math.random(#common)],duration* 60 * 1000)
	elseif item.itemid == 7738 then
		doSetMonsterOutfit(cid,uncommon[math.random(#uncommon)],duration* 60 * 1000)
	elseif item.itemid == 7739 then
		doSetMonsterOutfit(cid,deluxe[math.random(#deluxe)],duration* 60 * 1000)
	end
	doRemoveItem(item.uid,1)
   	setPlayerStorageValue(cid, 20029, getCreatureStorage(cid, 20029) + 1)
	doSendMagicEffect(fromPosition,CONST_ME_MAGIC_BLUE)
	return TRUE
end
 
Back
Top