Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.

Due to spam on this forum, all posts now need moderator approval.

 Entire forum ➜ Area Editor ➜ General ➜ 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 page


Posted by Oblisgr   (123 posts)  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
Top

Posted by Nick Gammon   Australia  (23,133 posts)  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
Top

Posted by Fiendish   USA  (2,534 posts)  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
Top

Posted by Oblisgr   (123 posts)  Bio
Date Reply #3 on Wed 01 Apr 2020 12:38 PM (UTC)
Message
Thanks guys
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.


14,304 views.

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

Go to topic:           Search the forum


[Go to top] top

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