[Home] [Downloads] [Search] [Help/forum]


Register forum user name Search FAQ

Gammon Forum

[Folder]  Entire forum
-> [Folder]  Area Editor
. -> [Folder]  General
. . -> [Subject]  Adding a new if check in mob program

Adding a new if check in mob program

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page


Posted by Oblisgr   (123 posts)  [Biography] bio
Date Tue 31 Mar 2020 12:28 PM (UTC)
Message
Hello, i know you don't support area editor anymore but i want to ask something and maybe you can help by your experience.

I have added to my code, new if checks for mob programs but area editor does not recognize them.

Fr exmple i added MG which is the faction Mages guild and i ask if it is less than -200 to do somthing. If i edit the area file with notepad and put it, smaug recognized but the area editor eachself doesnt.

Is there any way to add it in editor?


if isPC($n)
if MG($n) < -200
say Traitor!!!
murder $n
endif
endif
[Go to top] top

Posted by Nick Gammon   Australia  (22,966 posts)  [Biography] bio   Forum Administrator
Date Reply #1 on Tue 31 Mar 2020 08:21 PM (UTC)

Amended on Tue 31 Mar 2020 08:22 PM (UTC) by Nick Gammon

Message
There is a way, if you compile it yourself. The source is here: http://www.gammon.com.au/downloads/dlareaeditor.htm

In the file CheckCommandSyntax.cpp appears to be a list of things it checks against, like "ispc" like this:



const t_specialconditions SpecialConditions [] =
  {

    // no vnums
    { "rand", eCondNone, eCondNone, true  },
    { "otypehere" },
    { "otyperoom" },
    { "otypecarry" },
    { "otypewear" },
    { "otypeinv" },
    { "number" },
    { "name" },
    

    // room argument, eg. mobinroom (10300) > 4
    { "economy", eCondRoom }, 
    { "mobinroom", eCondRoom }, 

    // mob argument
    { "timeskilled", eCondMobile }, 
    { "ismobinvis", eCondMobile, eCondNone, true },
    { "mobinvislevel", eCondMobile },
    { "ispc", eCondMobile, eCondNone, true },
    { "isnpc", eCondMobile, eCondNone, true },
    { "ispkill", eCondMobile, eCondNone, true },
    { "isdevoted", eCondMobile, eCondNone, true },
    { "canpkill", eCondMobile, eCondNone, true },
    { "ismounted", eCondMobile, eCondNone, true },
    { "isgood", eCondMobile, eCondNone, true },
    { "isneutral", eCondMobile, eCondNone, true },
    { "isevil", eCondMobile, eCondNone, true },
    { "isfight", eCondMobile, eCondNone, true },
    { "isimmort", eCondMobile, eCondNone, true },
    { "ischarmed", eCondMobile, eCondNone, true },
    { "isfollow", eCondMobile, eCondNone, true },
    { "isaffected", eCondMobile },
...


You could add new things to that list. However you would need to compile it with a compiler that supports MFC.

Microsoft previously released a free version of Visual Studio which supports MFC. See: http://www.gammon.com.au/forum/?id=13695

If that is still available, you may be able to compile with that. I don't know how easy that would be, and you need to do something with the resources. It has been so long ago (14 years!) that I can't really help much more than that, sorry.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Fiendish   USA  (2,513 posts)  [Biography] bio   Global Moderator
Date Reply #2 on Tue 31 Mar 2020 10:30 PM (UTC)

Amended on Tue 31 Mar 2020 10:31 PM (UTC) by Fiendish

Message
I believe that the latest editions of Visual Studio still support MFC, but support for Windows XP requires a special add-on configuration option (through the installer) that isn't part of the default configuration.

https://github.com/fiendish/aardwolfclientpackage
[Go to top] top

Posted by Oblisgr   (123 posts)  [Biography] bio
Date Reply #3 on Wed 01 Apr 2020 12:38 PM (UTC)
Message
Thanks guys
[Go to top] top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


11,814 views.

It is now over 60 days since the last post. This thread is closed.     [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.

[Home]


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( https://gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Hosted at HostDash]