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

Lua TP Scroll Problems!

Sweddy

Well-Known Member
Joined
Feb 14, 2009
Messages
2,907
Reaction score
93
Location
Sweden
When Ppls Relog, Then The TP Scroll Is Gone I Dont Know Why, Please Help!? :blink:


Lua:
function onUse(cid, item, fromPosition, itemEx, toPosition)
	local pos = getThingPos(cid)
	if getTileInfo(pos).protection then
		doPlayerSendCancel(cid, 'You cannot use this inside a protection zone.')
	elseif getCreatureCondition(cid, CONDITION_INFIGHT) then
		doPlayerSendCancel(cid, 'You can\'t teleport immediately after fight.')
	else
		doTeleportThing(cid, getPlayerMasterPos(cid))
		doSendMagicEffect(pos, 66)
		doSendAnimatedText(pos, 'Teleport!', 16)
		return true
	end
	return doSendMagicEffect(pos, CONST_ME_POFF)
end
 
It just can't disapear. Maybe look to the creature scripts, maybe You put something there?

Look at the scroll even without using it. Relog and check it again.
 
I think, you've put save "0" on the characters in your databse. Because items don't just dissapear when you re-logg unless they're not saved?
 
Save 1 is when it saves, save 0 is when it ain't saving.

So what excatly did you fix? My sentence wasn't incorrect. He said the item would dissapear which has to mean he has save "0".. not 1.
 
Back
Top