bury
Active Member
- Joined
- Jul 27, 2008
- Messages
- 421
- Solutions
- 7
- Reaction score
- 25
Hello
Maybe someone can help me with this I think is veeery simple but I can not complete it without errors.
I use a script which if u have two storages a teleport tp you to X place. I want if you dont have your teleports but in return you got VIP it teleports you too, but to another part of the place I want be teleported (a boat near the city)
This is the script:
As you can see with the local storages, the action id will teleport you to the local teleport, I want to include now another 'if'. If you have vip (no matter you dont have that storages/quests) you'll travel to Y position (different that X). My vip door works with this 'formule':
Pd: (with another .lua it finds a duplicate action id so I think it should be all in the same script)
Thanks!
Maybe someone can help me with this I think is veeery simple but I can not complete it without errors.
I use a script which if u have two storages a teleport tp you to X place. I want if you dont have your teleports but in return you got VIP it teleports you too, but to another part of the place I want be teleported (a boat near the city)
This is the script:
LUA:
local teleport = {x= 316 , y= 1965 , z= 7 } --- where you go when enter teleport
local storages = {2020, 2021} ------ storages
local Message = "Complete the quests or buy VIP to enter this teleport " -- here Message if not teleport
function onStepIn(cid, item, position, fromPosition)
for i = 1,#storages do
if getPlayerStorageValue(cid, storages[i]) >= 1 then
doTeleportThing(cid, teleport)
doSendMagicEffect(teleport,10)
else
doTeleportThing(cid, fromPosition, false)
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, Message)
doSendMagicEffect(fromPosition,10)
end
end
return true
end
As you can see with the local storages, the action id will teleport you to the local teleport, I want to include now another 'if'. If you have vip (no matter you dont have that storages/quests) you'll travel to Y position (different that X). My vip door works with this 'formule':
LUA:
if getPlayerVipDays(cid) >= 1 then
Pd: (with another .lua it finds a duplicate action id so I think it should be all in the same script)
Thanks!
