Results 1 to 8 of 8

Thread: xcode tags

  1. #1
    Administrator James's Avatar
    Join Date
    May 2010
    Location
    on the intraweb
    Posts
    3,180

    Default xcode tags

    Some of you have seen some new tags that I have been playing around with. I wanted to make code tags look "neater" and easier to read so after some trial and error I got it working.

    If you're interested in using them, read below on instructions how to use them in your posts.

    NOTE: In the “Usage” area, make sure to remove the underscore “_” to properly use the code tags.
    Note2: In the "Usage" area you can replace the "cpp" with any of the xcode symbols below according to the language you are posting.

    Usage:
    [_xcode=cpp]
    source
    [/_xcode]

    List of Available Language Syntax support

    AppleScript

    Proper xcode symbols: ['applescript'];


    ActionScript
    Proper xcode symbols: ['actionscript3', 'as3'];


    Auto Hotkey
    Proper xcode symbols: ['ahk', 'autohotkey'];


    Asm
    Proper xcode symbols: ['nasm8086','8086','nasm','asm','masm'];


    Bash
    Proper xcode symbols: ['bash', 'shell', 'sh'];


    ColdFusion
    Proper xcode symbols: ['coldfusion','cf'];


    Cpp
    Proper xcode symbols: ['cpp', 'cc', 'c++', 'c', 'h', 'hpp', 'h++'];


    CSharp
    Proper xcode symbols: ['c#', 'c-sharp', 'csharp'];


    Css
    Proper xcode symbols: ['css'];


    Delphi
    Proper xcode symbols: ['delphi', 'pascal', 'pas'];


    Diff
    Proper xcode symbols: ['diff', 'patch'];


    Erlang
    Proper xcode symbols: ['erl', 'erlang'];


    Groovy
    Proper xcode symbols: ['groovy'];


    Java
    Proper xcode symbols: ['java'];


    JavaFX
    Proper xcode symbols: ['jfx', 'javafx'];


    JScript
    Proper xcode symbols: ['js', 'jscript', 'javascript', 'json'];


    Perl
    Proper xcode symbols: ['perl', 'Perl', 'pl'];


    Php
    Proper xcode symbols: ['php'];


    Plain
    Proper xcode symbols: ['text', 'plain'];


    PowerShell
    Proper xcode symbols: ['powershell', 'ps', 'posh'];


    Python
    Proper xcode symbols: ['py', 'python'];


    Ruby
    Proper xcode symbols: ['ruby', 'rails', 'ror', 'rb'];


    Sass
    Proper xcode symbols: ['sass', 'scss'];


    Scala
    Proper xcode symbols: ['scala'];


    Sql
    Proper xcode symbols: [‘sql’];


    TypeScript
    Proper xcode symbols: ['ts', 'typescript'];


    Vb
    Proper xcode symbols: ['vb', 'vbnet'];


    Xml
    Proper xcode symbols: ['xml', 'xhtml', 'xslt', 'html', 'plist'];

    Example using c++ syntax highlighting

    #define _CRT_SECURE_NO_WARNINGS


    #include "MHC-cache.h"
    #include <ctime>
    #include <fstream>
    #include <sys/stat.h>


    //HWND pleaseWait = FindWindow("TfrmWait", "Please Wait...");
    //HWND cancelButton = FindWindowEx( pleaseWait, NULL, NULL, "Cancel" );


    DWORD DetourPatchcall( PBYTE pSrc, PBYTE pDst, BOOL bForce )
    {
    DWORD dwOrgCallDest = 0;
    DWORD dwOldProtection = 0;
    DWORD dwRel = 0;


    if(!pSrc || !pDst)
    return (0);




    if( *pSrc == 0xE8 || bForce )
    {
    if( *pSrc == 0xE8 )
    {
    dwRel = *(DWORD*)( pSrc + 1 );
    dwOrgCallDest = ( (DWORD)pSrc + dwRel + 0x5 );
    }
    else
    {
    dwOrgCallDest = 1; // return 1 means no original call at pSrc
    }


    #ifdef WIN32


    if( !VirtualProtect( (PVOID)pSrc, 0x1000, PAGE_EXECUTE_READWRITE, &dwOldProtection ) )
    return (0);


    #else


    unprotect( GET_PAGE( pSrc ), 4096 );


    if ( ( ( (unsigned long)pSrc ) & 0xfff ) > 0xff9 )
    unprotect( GET_PAGE( pSrc + 4096 ), 4096 );


    #endif


    *pSrc = 0xE8;
    *( DWORD* )( pSrc + 1 ) = (DWORD)( pDst - pSrc - 5 );


    #ifdef WIN32
    VirtualProtect( (PVOID)pSrc, 0x1000, dwOldProtection, &dwOldProtection );
    #endif


    return dwOrgCallDest;
    }
    return (0);
    }




    //This function is called for users that toggle between host and field mode ONLY
    void __stdcall callMaintenanceForHostAndField()
    {
    HWND pleaseWait = FindWindow("TfrmWait", "Please Wait...");
    HWND cancelButton = FindWindowEx( pleaseWait, NULL, NULL, "Cancel" );


    WriteMemory( ForceCacheMaintenanceOnExitAddress, (BYTE*)"\xEB", 1 ); //0x01C9CBEA

    _asm
    {
    pushad
    pushfd
    mov edx, OffsetForHostAndField //0x1C7C4C0
    call edx
    xor ecx, ecx
    mov dl, 0
    mov ebx, callMaintenanceForHostAndFieldAddress //0x01C9CB54
    call ebx
    popfd
    popad
    }

    Sleep(250);

    // Simulate a key press
    keybd_event( VK_RETURN, 0x45, KEYEVENTF_EXTENDEDKEY | 0, 0 );

    // Simulate a key release
    keybd_event( VK_RETURN, 0x45, KEYEVENTF_EXTENDEDKEY | KEYEVENTF_KEYUP, 0);

    //Hide the Cancel button on the cache maintenance screen
    if(cancelButton)
    ShowWindow(cancelButton, SW_HIDE);
    }

  2. #2
    Administrator James's Avatar
    Join Date
    May 2010
    Location
    on the intraweb
    Posts
    3,180

    Default

    Update:

    xcode tags now support MOHAA syntax highlighting

    Usage:
    Proper xcode symbols: ['moh', 'mohaa', 'scr'];

    Remember, don't include the underscore "_" and you can replace "mohaa" with any of the other symbols above.

    [_xcode=mohaa]
    code
    [_/xcode]

    Example:



    level waittill spawn
    main:
    // it's nicest to make a table with the cvars
    // and their values (do not put this inside a while
    // loop as that would be very detrimental to
    // performance (cpu))
    local.vars = makeArray
    wambot 0
    wbmenu 0
    wb_aim1 99999
    wb_aim2 99999
    wb_pingprediction 99999
    wb_aimbot 0
    wb_autoshoot 0
    wb_fov 0
    endArray
    local.accum = 0
    local.n = 1 // this sets how many stufftexts will be sent per frame
    while(1)
    {
    for(local.i=1;local.i<=$player.size;local.i++)
    {
    // this makes sure we will be referencing the same
    // player during our check, which now
    // covers multiple server frames
    local.p = $player[local.i]

    // set all vars, one per frame
    // of course you could change this to more
    // than one per frame for faster aimbot resets
    // (by incrementing local.n),
    // just keep in mind each line adds a little bit of lag
    // you may also include more than one
    // stufftext command in a single packet:
    // local.p stufftext "set var1 a; set var2 b"
    // but I believe the game does this optimization
    // automatically (stufftexts are accumulated
    // and then sent at the end of the server frame)
    // so afaik there's no gain from
    // combining sets manually.
    for(local.j = 1; local.p && local.j <= local.vars.size; local.j++)
    {
    local.p stufftext ("set " + local.vars[local.j][1] + " " + local.vars[local.j][2])
    // this is a little 'trick' to evenly throttle the number
    // of stufftexts per frame.
    // this will work for any number of players,
    // any number of vars and any number of n
    local.accum++
    local.accum = local.accum%local.n
    if(local.accum==0)
    {
    waitframe
    }
    }
    }
    waitframe
    }
    end

  3. #3
    Purple Developer Purple Elephant1au's Avatar
    Join Date
    Feb 2012
    Location
    Australia
    Posts
    1,269

    Default

    Good work on the new code tags :P

    Only thing that i find annoying it the fact that they dont include a vertical scrollbar, so when you add the code to a post, it stretches the post the length of the code. Which is kinda the reason we want to use code tags, so to not let this happen :P

    Oh and your next project is now a Select All Button at the bottom of each code tag :P

    Purple's Playground
    OBJ :
    103.29.85.127:12203
    xfire: purpleelephant1au
    email: purpleelephant1au@gmail.com
    skydrive: PurpleElephantSkydrive




  4. #4
    Administrator James's Avatar
    Join Date
    May 2010
    Location
    on the intraweb
    Posts
    3,180

    Default

    Only thing that i find annoying it the fact that they dont include a vertical scrollbar, so when you add the code to a post, it stretches the post the length of the code. Which is kinda the reason we want to use code tags, so to not let this happen :P
    I'll work on it.

    Oh and your next project is now a Select All Button at the bottom of each code tag :P


    Double click inside the code

  5. #5

    Default

    I am a basic User, do not know logic programming, or have no idea what
    it is all of these commands. You do not have a PK3 with the commands already included and updated?

  6. #6
    Administrator James's Avatar
    Join Date
    May 2010
    Location
    on the intraweb
    Posts
    3,180

    Default

    This is a script that you would include in your game.
    You need to modify dmprecache.scr and execute the script from there.

    So then lets say you copy & paste the script above and put it in a new file. Name it MyScript.scr and put it in some folder or in (your custom pk3 -->globals folder)
    And in dmprecache (pak0.pk3 archive -->globals folder) you open up the file and put
    exec "globals\MyScript.scr"

    And that's it. Not a whole lot of logic is needed, you just need to understand the games structure and how it references files that's all.
    And for a list of cvars, the one in the script above is checking against cheaters using wambot so it forces wambot cvars to bogus values
    For other in-game cvars, you can take a look here: http://homepage.eircom.net/~abyrne/s...variables.html
    This site may be useful for you as well: http://109.70.148.92/AAAAMOHAA/conte...aa-guide-index

    Haven't messed around with MOHAA in a long time, but for the wireframe/polygon rendering that you posted in this thread: http://www.x-null.net/forums/showthr...9154#post29154
    I believe the cvar will be starting with the prefeix cg_* or r_*
    Hope this helps!

  7. #7

    Default

    Do know how to open pk3 files? most of everything here that's not in a pk3 is copy and pasted to note pad and saved as a script. What mods do you run? you can make the script and add it to one of your mods. For example I copied the script above and just pasted it to a map script so it only runs on that map. Used it to set everyone's gamma to be darker for a night map. As far as the cvars go the one's above are basic cheat things so for that r_showtris 3 thing just add r_showtris 0 to that list.

    Here is a basic mod with the cvars above and r_showtris 0 to stop that. Just so you know if any other mods use a DMprecahe.scr it will over write the one in this pk3 that's why I asked about other mods, if you do you can open this pk3 and put the cvars.scr in the global folder and add exec global/cvars.scr to the bottom of the DMprecahe.scr in your mod.

    here is a list of cvars VS-UK Admin mod checks for I didn't add any of these to the pk3 I posted because like it says above " just keep in mind each line adds a little bit of lag " but you can add them a little at a time to see how much lag if any you get.
    Code:
    r_showstaticbboxes 0
    cl_pitchspeed 70
    r_drawsun 0
    r_flares 0
    r_showtris 0
    ui_voodoo 0
    r_norefresh 0
    r_lockpvs 0
    r_drawstaticmodelpoly 1
    r_drawstaticmodels 1
    r_drawbrushmodels 1
    r_drawentities 1
    r_drawspherelights 1
    r_drawentitypoly 1
    r_nocurves 0
    r_ignorehwgamma 0
    r_intensity 1
    r_nocull 0
    r_noportals 0
    r_showhbox 0

  8. #8
    Developer RyBack's Avatar
    Join Date
    Apr 2014
    Location
    In Front of the screen
    Posts
    1,603

    Default

    [Info]
    the "noparse" tag is useful for this,
    Here, Just copy paste
    [noparse][xcode][/xcode][/noparse]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •