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

Pickhole problem!

Hmpfot

New Member
Joined
Apr 19, 2009
Messages
72
Reaction score
0
Hello mate's

I got a problem with the pickholes, after you've used a pick on the ground and it turns to a pickhole, the pickhole dsnt turns back too ground again, could someone help me so it does?

i use this script but i want a script so it turns to ground again after 10 seconds


PHP:
function onUse(cid, item, fromPosition, itemEx, toPosition)
	if((itemEx.uid <= 65535 or itemEx.actionid > 0) and isInArray({351, 352, 353, 354}, itemEx.itemid)) then
		doTransformItem(itemEx.uid, 383)
		doDecayItem(itemEx.uid)
		doSendMagicEffect(toPosition, CONST_ME_POFF)
		return true
	end

	if(itemEx.itemid == 7200) then
		doTransformItem(itemEx.uid, 7236)
		doSendMagicEffect(toPosition, CONST_ME_BLOCKHIT)
		return true
	end

	return false
end

thx,


yours hmpf~
 
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)

if(itemEx.uid <= 65535 or itemEx.actionid > 0) and (itemEx.itemid == 354 or itemEx.itemid == 355) then
		
doTransformItem(itemEx.uid, 392)
		
doDecayItem(itemEx.uid)
		
doSendMagicEffect(toPosition, CONST_ME_POFF)
		
return TRUE
	
end
	
return FALSE

end

It does work, but it takes about 3 minutes, maybe longer to return to normal.

EDIT: Also this script currently only works on ground ID's 354 and 355 but you can add more in anyway.
 
TitleGoesHere

If you don't have TransformTo in the items.xml it wont work.. you can use a addevent instead in that case but decayTo is much better..

LUA:
if((itemEx.uid <= 65535 or itemEx.actionid > 0) and isInArray({351, 352, 353, 354}, itemEx.itemid)) then
		doTransformItem(itemEx.uid, 383)
		addEvent(doTransformItem, 10*1000, itemEx.uid, 
		doSendMagicEffect(toPosition, CONST_ME_POFF)
		return true
	end

	if(itemEx.itemid == 7200) then
		doTransformItem(itemEx.uid, 7236)
		doSendMagicEffect(toPosition, CONST_ME_BLOCKHIT)
		return true
	end

	return false
end

and use LUA Tags for lua for gods sake..

[-LUA-]

[-/LUA-]

Without the "-"s ofc
 
Back
Top