Python NPC Permission

04/07/2011 22:13 F i n c h i#1
Does anyone know how to add permission to this NPC,I want it to work only if you are a GM / PM.
I've tried (Client.Permission < 3) but It doesn't work.

Code:
def npc(Client, Option):
    if(Option == 0):        
        Text("I Can Send You To The GM Map Only If You Are A GM / PM")        
        Link("Sure!", 1)
        Link("Nope!", 255)
        Finish()
    if(Option == 1):
        Teleport(32, 33, 1098, Client)
    return 0
04/07/2011 23:18 pro4never#2
well that would be UNDER 3 (so 1 or 2 meaning normal player)


Should be....

Code:
 def npc(Client, Option):
    if(Option == 0):        
        Text("I Can Send You To The GM Map Only If You Are A GM / PM")        
        Link("Sure!", 1)
        Link("Nope!", 255)
        Finish()
    if(Option == 1 and Client.Permission > 2):
        Teleport(32, 33, 1098, Client)
    return 0
04/07/2011 23:31 F i n c h i#3
Quote:
Originally Posted by pro4never View Post
well that would be UNDER 3 (so 1 or 2 meaning normal player)


Should be....

Code:
 def npc(Client, Option):
    if(Option == 0):        
        Text("I Can Send You To The GM Map Only If You Are A GM / PM")        
        Link("Sure!", 1)
        Link("Nope!", 255)
        Finish()
    if(Option == 1 and Client.Permission > 2):
        Teleport(32, 33, 1098, Client)
    return 0
Thank you,It worked!
04/07/2011 23:34 F i n c h i#4
One more thing,where is the Shopping Mall located in source side?
04/07/2011 23:46 pro4never#5
Shopping mall is just a normal shop. Keep in mind right now NOTHING related to shops are checked (IE: check the price from shop.dat and that it exists before selling. Right now it just reads from the packet which is.. bullshit)