Hi,
I got MoonOts v3. There is Vip Acces. looks like Vip Medal, and its work, but... its for ever.
So i try to do Vip Medal for 30, 15, 5 days, its work but... its dont work with Vip Door and Vip Floor.
I dont know why >.< if some1 Can help me. Rep ++
vipaccess.lua
vipmedal.lua
vipdoor.lua
vipdoor.lua
i dont know why but i have 2 script vipdoor.lua ; )
My actions.xml is too long so i dont show it this.
Please help me. really need it.
I got MoonOts v3. There is Vip Acces. looks like Vip Medal, and its work, but... its for ever.
So i try to do Vip Medal for 30, 15, 5 days, its work but... its dont work with Vip Door and Vip Floor.
I dont know why >.< if some1 Can help me. Rep ++
vipaccess.lua
function onUse(cid, item, frompos, item2, topos)
if item.itemid == 5785 then
if (getPlayerStorageValue(cid,21444) < 1) then
local playerpos = getCreaturePosition(cid)
doRemoveItem(item.uid,5785)
setPlayerStorageValue(cid,21444,1)
doSendMagicEffect(playerpos, 29)
doCreatureSay(cid, "Gratulacje! Teraz jestes posiadaczem VIP Access!", TALKTYPE_ORANGE_1)
else
doCreatureSay(cid, "Posiadasz juz VIP access.", TALKTYPE_ORANGE_1)
end
end
end
vipmedal.lua
-- Vip medal by Kekox
function onUse(cid, item, fromPosition, itemEx, toPosition)
if getPlayerVipDays(cid) > 365 then
doPlayerSendCancel(cid, "You can only have 1 year of vip account or less.")
else
doAddVipDays(cid, 30)
doCreatureSay(cid, "VIP")
doPlayerPopupFYI(cid, "We have added 30 vip days to your account!\nEnjoy it!.")
doRemoveItem(item.uid)
end
return true
end
vipdoor.lua
function onUse(cid, item, frompos, item2, topos)
viparea = {x=1137, y=812, z=6}
gracz = getCreaturePosition(cid)
if (getPlayerStorageValue(cid,21444) > 0) or (getPlayerLevel(cid) < 250) then
doTeleportThing(cid, viparea)
doSendMagicEffect(gracz,2)
doSendMagicEffect(viparea,10)
else
doPlayerSendCancel(cid, "Nie masz VIP Access.")
doSendMagicEffect(gracz,2)
end
return true
end
vipdoor.lua
function onUse(cid, item, frompos, item2, topos)
local storageValue = 21444
vipstatus = getPlayerStorageValue(cid,storageValue)
if vipstatus == 1 then
doTransformItem(item.uid, item.itemid + 1)
playerpos = getPlayerPosition(cid)
doorpos = {x = frompos.x, y = frompos.y, z = frompos.z, stackpos = 253}
if playerpos.y == doorpos.y + 1 and playerpos.x == doorpos.x then
doMoveCreature(cid, 0)
doMoveCreature(cid, 0)
elseif playerpos.x == doorpos.x - 1 and playerpos.y == doorpos.y then
doMoveCreature(cid, 1)
elseif playerpos.y == doorpos.y - 1 and playerpos.x == doorpos.x then
doMoveCreature(cid, 2)
doMoveCreature(cid, 2)
elseif playerpos.y == doorpos.y and playerpos.x == doorpos.x + 1 then
doMoveCreature(cid, 3)
elseif playerpos.x == doorpos.x + 1 and playerpos.y == doorpos.y - 1 then
doMoveCreature(cid, 4)
doMoveCreature(cid, 2)
elseif playerpos.x == doorpos.x - 1 and playerpos.y == doorpos.y - 1 then
doMoveCreature(cid, 5)
doMoveCreature(cid, 2)
elseif playerpos.x == doorpos.x + 1 and playerpos.y == doorpos.y + 1 then
doMoveCreature(cid, 6)
doMoveCreature(cid, 0)
elseif playerpos.x == doorpos.x - 1 and playerpos.y == doorpos.y + 1 then
doMoveCreature(cid, 7)
doMoveCreature(cid, 0)
end
else
doCreatureSay(cid, "Nie posiadasz VIPa.", TALKTYPE_ORANGE_1)
end
return 1
end
i dont know why but i have 2 script vipdoor.lua ; )
My actions.xml is too long so i dont show it this.
Please help me. really need it.