• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Need Help With Script

dualshock3

New Member
Joined
May 14, 2010
Messages
89
Reaction score
3
dudes,
i need help fixing this script, if anyone knows how to pls help.

it's a script to be teleported to the second part of a quest, if you did the first part u get an storage value (needed to step in), and then if u step in a tile u get teleported to the second part
Code:
function onStepIn(cid, item, position, lastPosition, fromPosition, toPosition, actor)
        if(getPlayerStorageValue(cid)) then
                return true
        end
    if  PlayerStorageValue(cid, 12345) then
        local destination = {x = 18856, y = 18919, z = 6}
        doTeleportThing(cid, destination, true)
        doPlayerSendTextMessage(cid, 25, "Welcome to Second Part")
        doSendMagicEffect(getPlayerPosition(cid), 10) 
           else
        doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, ".") 

end     
        return true
end
 
LUA:
function onStepIn(cid, item, pos, fromPos)
	if isPlayer(cid) then
		if getCreatureStorage(cid, 12345) == 1 then
			local destination = {x=18856, y=18919, z=6}
			doTeleportThing(cid, destination)
			doSendMagicEffect(pos, CONST_ME_TELEPORT)
			doSendMagicEffect(destination, CONST_ME_TELEPORT)
			doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, 'Welcome to Second Part')
		else
			doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, 'Message when the player doesn\'t have the quest value.')
		end
	end
end
 
Back
Top