當前位置: 首頁>>代碼示例>>Python>>正文


Python BetterMUD.account方法代碼示例

本文整理匯總了Python中BetterMUD.account方法的典型用法代碼示例。如果您正苦於以下問題:Python BetterMUD.account方法的具體用法?Python BetterMUD.account怎麽用?Python BetterMUD.account使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在BetterMUD的用法示例。


在下文中一共展示了BetterMUD.account方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: setup

# 需要導入模塊: import BetterMUD [as 別名]
# 或者: from BetterMUD import account [as 別名]
def setup( id ):
    c = BetterMUD.character( id )
    a = BetterMUD.account( c.GetAccount() )
    l = a.AccessLevel();



    if( l >= 0 ):
        c.AddCommand( "north" )
        c.AddCommand( "east" )
        c.AddCommand( "south" )
        c.AddCommand( "west" )
        c.AddCommand( "northeast" )
        c.AddCommand( "northwest" )
        c.AddCommand( "southeast" )
        c.AddCommand( "southwest" )
        c.AddCommand( "up" )
        c.AddCommand( "down" )
        c.AddCommand( "ne" )
        c.AddCommand( "nw" )
        c.AddCommand( "se" )
        c.AddCommand( "sw" )
        c.AddCommand( "get" )
        c.AddCommand( "give" )
        c.AddCommand( "drop" )
        c.AddCommand( "go" )
        c.AddCommand( "commands" )
        c.AddCommand( "look" )
        c.AddCommand( "quit" )
        c.AddCommand( "action" )
        c.AddCommand( "chat" )
        c.AddCommand( "say" )
        c.AddCommand( "quiet" )
        c.AddCommand( "receive" )
        c.AddCommand( "pies" )
        c.AddCommand( "inventory" )
        c.AddCommand( "arm" )
        c.AddCommand( "disarm" )
        c.AddCommand( "read" )
        c.AddCommand( "attack" )
        c.AddCommand( "breakattack" )

    if( l >= 2 ):
        c.AddCommand( "kick" )
        c.AddCommand( "announce" )

    if( l >= 3 ):
        c.AddCommand( "emulate" )
        c.AddCommand( "shutdown" )
        c.AddCommand( "addcommand" )
        c.AddCommand( "delcommand" )
        c.AddCommand( "addplayerlogic" )
        c.AddCommand( "delplayerlogic" )
        c.AddCommand( "reloadscript" )
        c.AddCommand( "pythonexec" )
        c.AddCommand( "spawnitem" )
        c.AddCommand( "spawncharacter" )
        c.AddCommand( "destroyitem" )
        c.AddCommand( "destroyitem" )
        c.AddCommand( "visual" )
        c.AddCommand( "loaddatabase" )
        c.AddCommand( "savedatabase" )


    c.SetRoom( 1 )
    c.SetRegion( 1 )



                                
開發者ID:JaguarMantid,項目名稱:bettermud,代碼行數:68,代碼來源:logon.py


注:本文中的BetterMUD.account方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。