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

Requesting a vip typ script thing.

brendan2

Sensation black
Joined
Feb 19, 2009
Messages
507
Reaction score
1
Ok so you have x item like medal of honour and you walk over x sq
if you dont got medal of honour on you cant walk over it And it tps you to temple.

Pretty sure this is possible I dont like the vip where it makes medal go away:/
 
Data/movements/scripts/script.lua

Lua:
local medal = 5785

function onStepIn(cid, item, fromPosition, item2, toPosition)
local name = getItemNameById(medal)
    if getPlayerItemCount(cid, medal) == 1 then
	doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You may pass.")
	doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT)
        doTeleportThing(cid, {x=toPosition.x,y=toPosition.y+1,z=toPosition.z}, TRUE)
    else
	doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)
	doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You cannot pass unless you have a ".. name ..".")
        doTeleportThing(cid, {x=toPosition.x,y=toPosition.y-1,z=toPosition.z}, TRUE)
    end
    return TRUE
end
 
Not tested.
Lua:
function onStepIn(cid, item, fromPosition, item2, toPosition)
    if getPlayerGroupId >= 3 then
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You may pass.")
        doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT)
        doTeleportThing(cid, {x=toPosition.x,y=toPosition.y+1,z=toPosition.z}, TRUE)
    else
        doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You cannot pass unless you are a CM.")
        doTeleportThing(cid, {x=toPosition.x,y=toPosition.y-1,z=toPosition.z}, TRUE)
    end
    return TRUE
end
 
Lol shawak,
I just sent the same script in PM. (Couple min. ago)

COPY! (joke)
Although mine had fancier effects :wub:
 
whats wrong its not working? can u like say in steps what to do:p?


PHP:
local medal = 5785

function onStepIn(cid, item, fromPosition, item2, toPosition)
local name = getItemNameById(medal)
    if getPlayerItemCount(cid, medal) == 1 then
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You may pass.")
        doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT)
        doTeleportThing(cid, {x=toPosition.785,y=toPosition.1473,z=toPosition.7}, TRUE)
    else
        doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You cannot pass unless you have a ".. name ..".")
        doTeleportThing(cid, {x=toPosition.997,y=toPosition.1099,z=toPosition.7}, TRUE)
    end
    return TRUE
end

PHP:
	<movevent event="Equip" itemid="5785" slot="necklace" function="onEquipItem" script="medal of honour.lua"/>
	<movevent event="DeEquip" itemid="5785" slot="necklace" function="onDeEquipItem" script="medal of honour.lua"/>
 
Back
Top