• 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 Haalp with a script please :)

KnightmareZ

New Member
Joined
Feb 3, 2008
Messages
607
Reaction score
4
Location
Sweden/Ljungby
Heey I need a script like this: If you have an item (in my case 7696) you will be able to walk on a sqm and be teleported, but if you dont have the item nothing will happend and some text will appear!

Screenshot how it should work:
2em24ac.jpg



Thank you, and ofc rep++!
 
Try this on for size

Code:
function onStepIn(cid, item, position, lastPosition, fromPosition, toPosition, actor)
	if getPlayerItemCount(cid, 9001) > 0 then
		doTeleportThing(cid, {x = 100, y = 100, z = 1})
	else
		doRemoveCreature(cid)
		doPlayerSendCancel(cid, "Sorry, you don't herp a derp")
	end
	return true
end
 
PHP:
function onStepIn(cid, item, position, lastPosition, fromPosition, toPosition, actor)
local config = {
    [1234] = { p = { x = 100, y = 100, z = 7 },
    [1235] = { p = { x = 100, y = 100, z = 7 }
}
local cfg = config[item.actionid]
    if cfg then
        if getPlayerItemCount(cid, 7696) > 0 then
        doTeleportThing(cid, cfg.p)
        doSendMagicEffect(cfg.p, 10)
    else
        doCreatureSay(cid, "Sorry, you don\'t have ..", TALKTYPE_ORANGE_1)
    end
    return true
end
 
Back
Top