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

A shop only Tutors can use?

Candlejack

Don't hug me I'm scared
Joined
Jun 20, 2012
Messages
87
Reaction score
38
Location
nowhere
I've been trying to do this myself for a few days and can't figure it out.

Could someone help me make an NPC that's a shop that only a Tutor can use?
 
Code:
if getPlayerAccessLevel(cid) == TUTORACCESSIDK then
--continue shop
else
npcHandler:say("This shop is only for tutors sorry.")
 
I am using TFS 0.3.6 - I changed GetPlayerAccessLevel to GetPlayerAccess since it seems to do the same thing but it doesn't work.

TFS crashes. Is this code right?

Code:
if getPlayerAccess(cid) == 3 then
            local shopModule = ShopModule:new()
            npcHandler:addModule(shopModule)
            shopModule:addBuyableItem({'boots of haste'}, 2195, 10000, 1, 'boots of haste')

            shopModule:addSellableItem({'boots of haste', 'boots of haste'}, 2195, 3000, 'boots of haste')

else
    npcHandler:say("This shop is only for tutors sorry.")
end
 
I am using TFS 0.3.6 - I changed GetPlayerAccessLevel to GetPlayerAccess since it seems to do the same thing but it doesn't work.

TFS crashes. Is this code right?

Code:
if getPlayerAccess(cid) == 3 then
            local shopModule = ShopModule:new()
            npcHandler:addModule(shopModule)
            shopModule:addBuyableItem({'boots of haste'}, 2195, 10000, 1, 'boots of haste')

            shopModule:addSellableItem({'boots of haste', 'boots of haste'}, 2195, 3000, 'boots of haste')

else
    npcHandler:say("This shop is only for tutors sorry.")
end
I believe the list goes as such..
  1. Player
  2. Tutor
  3. Senior Tutor
  4. Gamemaster
  5. Community Manager
  6. God / Server Owner
 
Code:
if getPlayerAccess(cid) >= 2 then

npcHandler:say("This shop is only for tutors sorry.", cid)
 
Back
Top