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

Simple LUA help...

kito2

www.masteria.net
Joined
Mar 9, 2009
Messages
3,764
Solutions
1
Reaction score
227
Location
Chile, Santiago
Hi there... I need help for a simple script for POI (seals).

When a player stepIn on a large throne (id.5915) it checks uid of this and add it as a storagevalue = 1.

Just simple, something on movements but I dont know how to do this xD

Help please :)


EDIT:

I made this, but it doesnt give the message type that I want, it doesnt send magic effects and it also doesnt add the storage value =(=(
What's wrong?

*The message type that I want is over the player with orange letters.

LUA:
SUX =(
 
Last edited:
Finally made it, but some problems...

Just one problem... How to add animation when stepin?

LUA:
function onStepIn(cid, item, pos)
if(item.itemid == 5915) then
doCreatureSay(cid, "Seal completed!", TALKTYPE_ORANGE_1)
setPlayerStorageValue(cid,item.uid,1)
doSendMagicEffect(thingPos, 66)
else
doCreatureSay(cid, "Already completed.", TALKTYPE_ORANGE_1)
doSendMagicEffect(thingPos, CONST_ME_POFF)
end
return true
end

function onStepOut(cid, item, pos)
return true
end
 
Last edited:
It gives me an error when stepIn...

[Error - Movements Interface]
data/movements/seal.lua:onStepIn
Description:
attempt to index a nil value
stack traceback:
[C]: in function 'doSendMagicEffect'
data/movements/scripts/seal.lua:5 in function blababal
 
Code:
function onStepIn(cid, item, position, fromPosition)
	if getPlayerStorageValue(cid, item.uid) < 1 then
		doCreatureSay(cid, "Seal completed!", TALKTYPE_ORANGE_1, false, cid)
		setPlayerStorageValue(cid, item.uid, 1)
		doSendMagicEffect(position, CONST_ME_BATS)
	else
		doCreatureSay(cid, "Already completed.", TALKTYPE_ORANGE_1, false, cid)
		doSendMagicEffect(position, CONST_ME_POFF)
	end
end

function onStepIn(cid, item, position, fromPosition) end
 
Your script was bugged... I fixed mine with some of your ideas....

LUA:
function onStepIn(cid, item, position, fromPosition)
if getPlayerStorageValue(cid, item.uid) < 1 then
doCreatureSay(cid, "Seal completed!", TALKTYPE_ORANGE_1, false, cid)
setPlayerStorageValue(cid, item.uid, 1)
doSendMagicEffect(position, CONST_ME_BATS)
else
doCreatureSay(cid, "Already completed.", TALKTYPE_ORANGE_1, false, cid)
doSendMagicEffect(position, CONST_ME_POFF)
end
end

function onStepIn(cid, item, position, fromPosition) end
 
Back
Top