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

Windows Npc, or Teleport to vip city--Rep+

Joito

New Member
Joined
Jul 21, 2008
Messages
12
Reaction score
0
Can some one help me to make script for npc to go vip city or teleport to go vip city. the teleport if not vip teleport back to temple. for cryingdamson 3.5+
 
you can make a door that check for vip storage
who have the vip will pass and go to the tp else will have a cancel msg
 
data/action/script/vipdoor
Code:
function onUse(cid, item, frompos, item2, topos)
if getPlayerStorageValue(cid,[COLOR="Red"]number[/COLOR]) == 1 then

doCreatureSay(cid, "Wellcome Vip", TALKTYPE_ORANGE_2)
pos = getPlayerPosition(cid)
if pos.x == topos.x then
if pos.y < topos.y then
pos.y = topos.y + 1
else
pos.y = topos.y - 1
end
elseif pos.y == topos.y then
if pos.x < topos.x then
pos.x = topos.x + 1
else
pos.x = topos.x - 1
end
else
doPlayerSendTextMessage(cid,22,'Stand in front of the door.')
return 1
end

doTeleportThing(cid,pos)
doSendMagicEffect(topos,12)
else
doPlayerSendTextMessage(cid,21,'Only VIP Player Can Pass This Door.')
end
return 1
end
data/action.xml
Code:
<action uniqueid="[COLOR="Red"]number[/COLOR]" script="vipdoor.lua" />
in map editor make door with uid (number)
 
LUA:
function onUse(cid, item, frompos, item2, topos)
local config = {
oldpos = {x=32368, y=32221, z=7}
newpos = {x=32303, y=31562, z=7}
storage = 1500
}
      if item.uid == 1000 and getPlayerStorageValue(cid,config.storage) == 1 and getCreatureCondition(cid, CONDITION_INFIGHT) == FALSE then
         doTeleportThing(cid, config.newpos)
            doSendMagicEffect(config.newpos, 12)
         else
           doPlayerSendCancel(cid, "You have to have VIP to use this door.")
             doTeleportThing(cid, config.oldpos)
                 doSendMagicEffect(config.oldpos, 53)
                 end 
             return TRUE
                     end
 

Similar threads

Replies
2
Views
154
Back
Top