Well this is a little code that i allways i wanted to do :D
This is allows to enter only the GM.
This was tested on 0.97d and works for all versions!
First you must choose an NPC seller (ShopX.txt), i`ve choose Shop3.txt (Lorencia Peddler) and then hook it in NpcTalk
The most important code is:
174 means GM CtlCode, in every version differs, you can simply find it in PChatProc or CGMMng::ManagementProc.Code:Mov Edx, DWord Ptr Ds:[Eax + 174H]
For 1.00.18 is 1C8
So here it is
Credits me happy coding :PCode:.Const gObjIsConnected DD 00401AA0H MsgOutput DD 00402BBCH .Data? .Data IsGmShopBuff DB 1 Dup(0) Section DB "Common", 0 Ini1 DB "MBTIsGMShop", 0 IniFile DB ".\MBT_Common.ini", 0 IsGMMsg DB "Welcome to GM Shop!", 0 NotGMMsg DB "Users are not allowed to enter this shop.", 0 .Code DllEntry Proc hInstDLL:HINSTANCE, reason:DWord, reserved1:DWord Mov Eax, TRUE Ret DllEntry EndP IniOptions Proc Invoke GetPrivateProfileInt, Addr Section, Addr Ini1, 0, Addr IniFile Mov DWord Ptr Ds:[IsGmShopBuff], Eax Ret IniOptions EndP GMShop Proc Local IsGM:DWord Local UserID:DWord Push Ebx Push Esi Push Edi .If Byte Ptr Ds:[IsGmShopBuff] != 1 Jmp Finish .EndIf Mov Eax, DWord Ptr Ss:[Ebp + 0CH] Mov Ecx, DWord Ptr Ds:[Eax] Mov UserID, Ecx Push Ecx Call gObjIsConnected Add Esp, 4 Test Eax, Eax Je Finish Mov Eax, DWord Ptr Ss:[Ebp + 0CH] Mov Edx, DWord Ptr Ds:[Eax + 174H] Mov IsGM, Edx Add Edx, 1 .If Edx == 1 OnlyGM: Lea Eax, NotGMMsg Push Eax Mov Edx, UserID Push Edx Call MsgOutput Add Esp, 0CH Jmp Finish .EndIf WelcomeGM: Lea Eax, IsGMMsg Push Eax Mov Edx, UserID Push Edx Call MsgOutput Add Esp, 0CH Finish: Pop Edi Pop Esi Pop Ebx Mov Esp, Ebp Pop Ebp Retn GMShop EndP End DllEntry
Screenshots:
Is GameMaster
Not GameMaster


Reply With Quote![[ASM] 'Real' GM Shop](http://ragezone.com/hyper728.png)

