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

Make VIP on ground (like gems or something), not only on Doors

DrComet

New Member
Joined
Nov 25, 2014
Messages
63
Reaction score
3
0.3.6//forgotten server//tibia 8.60

Like in topic, I would like to use VIP script on ground yet, so it would be easier to get in VIP area.
For example: http://pl.tinypic.com/view.php?pic=nz4pcp&s=8#.VHZvmckpXcs

I have also problem with VIP doors because it teleports me on 1 sqm next to doors, when it whould tp me behind it.

This is my script:

Code:
function onUse(cid, item, fromPosition, itemEx, toPosition) local cidPosition = getCreaturePosition(cid) if (item.actionid == 5788 and getPlayerStorageValue(cid,11551) >= 1) then if cidPosition.x < toPosition.x then doTeleportThing(cid, {x=toPosition.x+1,y=toPosition.y,z=toPosition.z}, TRUE) doCreatureSay(cid, "Welcome VIP Player!", TALKTYPE_ORANGE_1) else doTeleportThing(cid, {x=toPosition.x-1,y=toPosition.y,z=toPosition.z}, TRUE) doCreatureSay(cid, "Welcome VIP Player!", TALKTYPE_ORANGE_1) end return TRUE else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Sorry, but only VIP Players can pass here! Buy VIP on the WEB.") return TRUE end return FALSE end


I've got the third problem yet. When I put doors ID 1300, it will let to pass players with 300+ lvl. But when I make it for 11000, the player must have 11000 lvl to be able to pass... What's the reason?

For example: http://pl.tinypic.com/view.php?pic=24eq9ev&s=8#.VHZw2skpXcs

Left doors works fine, the right one don't :/
When i changed sides the properties of it changed too...
 
It works like this, the required level + 1000, so then it will 2000 for level 1000.
About the stepin script, should the person be teleported to a certain area?

Code:
function onStepIn(cid, item, position, fromPosition)
     if getPlayerStorageValue(cid, 11551) >= 1 then
         doTeleportThing(cid, {x = 100, y = 100, z = 7) -- position
         doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Welcome vip player.")
     else
         doTeleportThing(cid, fromPosition)
         doPlayerSendCancel(cid, "You are not vip.")
     end
     return true
end
 
Last edited:
the difference is
function onUse(cid, item, fromPosition, itemEx, toPosition)
to
function onStepIn(cid, item, position, fromPosition)
 
You can use this script.
Code:
function onStepIn(cid, item, position, fromPosition)
     if getPlayerStorageValue(cid, 11551) >= 1 then
         doTeleportThing(cid, {x = 100, y = 100, z = 7) -- position
         doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Welcome vip player.")
     else
         doTeleportThing(cid, fromPosition)
         doPlayerSendCancel(cid, "You are not vip.")
     end
     return true
end
 
each of ur scripts doesn't work
[27/11/2014 03:18:33] [Warning - Event::loadScript] Event onUse not found (data/actions/scripts/other/vip door.lua)

btw this is my scripts
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
   local cidPosition = getCreaturePosition(cid)
     if (item.actionid == 5788 and getPlayerStorageValue(cid,11551) >= 1) then
       if cidPosition.x < toPosition.x then
         doTeleportThing(cid, {x=toPosition.x+1,y=toPosition.y,z=toPosition.z}, TRUE)
                 doCreatureSay(cid, "Welcome VIP Player!", TALKTYPE_ORANGE_1)
       else
         doTeleportThing(cid, {x=toPosition.x-1,y=toPosition.y,z=toPosition.z}, TRUE)
                 doCreatureSay(cid, "Welcome VIP Player!", TALKTYPE_ORANGE_1)
       end
       return TRUE
     else
       doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Sorry, but only VIP Players can pass here! Buy VIP on the WEB.")
       return TRUE
   end
   return FALSE
end


and this is my action id
Code:
<action actionid="5788" script="other/vip door.lua" />

i need to change it to pass on large gem
http://pl.tinypic.com/view.php?pic=nz4pcp&s=8#.VHZvmckpXcs
 
Last edited by a moderator:
each of ur scripts doesn't work
[27/11/2014 03:18:33] [Warning - Event::loadScript] Event onUse not found (data/actions/scripts/other/vip door.lua)

btw this is my scripts
Code:
       if cidPosition.x < toPosition.x then
         doTeleportThing(cid, {x=toPosition.x+1,y=toPosition.y,z=toPosition.z}, TRUE)
                 doCreatureSay(cid, "Welcome VIP Player!", TALKTYPE_ORANGE_1)
       else
         doTeleportThing(cid, {x=toPosition.x-1,y=toPosition.y,z=toPosition.z}, TRUE)
                 doCreatureSay(cid, "Welcome VIP Player!", TALKTYPE_ORANGE_1)
       end

why this? you got fromPosition
 
You can use this script.
[27/11/2014 15:42:56] [Error - LuaScriptInterface::loadFile] data/movements/scripts/Hometown/Vip Door.lua:3: '}' expected near ')'
[27/11/2014 15:42:56] [Warning - Event::loadScript] Cannot load script (data/movements/scripts/Hometown/Vip Door.lua)
[27/11/2014 15:42:56] data/movements/scripts/Hometown/Vip Door.lua:3: '}' expected near ')'

i put it on movements

<movevent type="StepIn" actionid="5788" event="script" value="Hometown/Vip Door.lua" />

and i made a Vip Door.lua on Hometown folder

and this is ur script and still not working

function onStepIn(cid, item, position, fromPosition)
if getPlayerStorageValue(cid, 11551) >= 1 then
doTeleportThing(cid, {x = 100, y = 100, z = 7) -- position
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Welcome vip player.")
else
doTeleportThing(cid, fromPosition)
doPlayerSendCancel(cid, "You are not vip.")
end
return true
end
 
Code:
function onStepIn(cid, item, position, fromPosition)
     if getPlayerStorageValue(cid, 11551) >= 1 then
         doTeleportThing(cid, {x = 100, y = 100, z = 7}) -- position
         doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Welcome vip player.")
     else
         doTeleportThing(cid, fromPosition)
         doPlayerSendCancel(cid, "You are not vip.")
     end
     return true
end
Forgot a } in the position :p
 
Code:
function onStepIn(cid, item, position, fromPosition)
     if getPlayerStorageValue(cid, 11551) >= 1 then
         doTeleportThing(cid, {x = 100, y = 100, z = 7}) -- position
         doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Welcome vip player.")
     else
         doTeleportThing(cid, fromPosition)
         doPlayerSendCancel(cid, "You are not vip.")
     end
     return true
end
Forgot a } in the position :p
working <3 thx
 
Thanks for help :)

We got one more problem yet. Doors for 300 lvl says it's for 300 lvl when We look at them, but when We look at doors 600 or above, it only says it's an gate of expertise... Nothing else. How can We change it? All doors have te same item ID.
 
Last edited:
It works like this, the required level + 1000, so then it will 2000 for level 1000.
its working now but there is one problem only that is there isnt msg on door for levle 1000+
we need it looks like this 16:33 You see a gate of expertise for level 300.
this is 1000+ doors 16:34 You see a gate of expertise.
 
You can add this to creaturescripts with type look, don't forget to register the name in login.lua.
Code:
function onLook(cid, thing, position, lookDistance)
     if getItemLevelDoor(thing.itemid) > 0 and thing.actionid >= 2000 then
         doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You see a gate of expertise for level "..(thing.actionid - getItemLevelDoor(thing.itemid))..".")
         return false
     end
     return true
end
 
Back
Top