• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

[MyAAC 0.8.13+][Plugin] Guild Wars for TFS 1.0+ and Canary

slaw

Software Developer
Joined
Aug 27, 2007
Messages
3,768
Solutions
132
Reaction score
1,246
Location
Germany
GitHub
slawkens
OK, so here I come to present you the guild wars plugin for myaac 0.8:

It's based on this script, written by @Gesior.pl

Requirements:​

  • MyAAC 0.8.13 or higher
  • TFS 1.0+
  • or Canary

Installation:​

  1. Install included .zip file in this post, in your myaac admin panel page
  2. (only if myaac lower than 0.8.18)
  3. (only if TFS 1.0+, not canary)
    • Open data/globalevents/scripts/startup.lua
    • After
    • Code:
      db.query("DELETE FROM `guild_wars` WHERE `status` = 0")
    • Add
    • Code:
      db.query("UPDATE `guild_wars` SET `status` = 4, `ended` = " .. os.time() .. " WHERE `status` = 1 AND (`started` + 86400 * 7) < " .. os.time())

Screenshots:​

1717006695531.png

1717007551332.png

Brough to you by (sponsors):
- wolfblade.eu Team
and
-Admin of fencore.net

They both donated to make this plugin possible. Thanks again!
 

Attachments

hi slavkens,
OK, so here I come to present you the guild wars plugin for myaac 0.8:

It's based on this script, written by @Gesior.pl

Requirements:​

  • MyAAC 0.8.13 or higher
  • TFS 1.0+
  • or Canary

Installation:​

  1. Install included .zip file in this post, in your myaac admin panel page
  2. (only if myaac lower than 0.8.18)
  3. (only if TFS 1.0+, not canary)
    • Open data/globalevents/scripts/startup.lua
    • After
    • Code:
      db.query("DELETE FROM `guild_wars` WHERE `status` = 0")
    • Add
    • Code:
      db.query("UPDATE `guild_wars` SET `status` = 4, `ended` = " .. os.time() .. " WHERE `status` = 1 AND (`started` + 86400 * 7) < " .. os.time())

Screenshots:​

View attachment 84995

View attachment 84996

Brough to you by (sponsors):
- wolfblade.eu Team
and
-Admin of fencore.net

They both donated to make this plugin possible. Thanks again!


edit:
i just fixed added only form on top page in twig.html to get response from captcha
PHP:
<form id="form" action="{{ getLink('account/change-email') }}" method="post">
MY ACC v.1.0 - sory for mistake in thread...

How can i add new action for captcha "change-email.php"? I have already added the action to the google-recaptcha.json as well as the necessary pages and hooks in global.php. Additionally i created a new account-change-email-post.php i also included a display hook in twig.html. I can see the new CAPTCHA on the page but the error always returns 0. This happens because my new post script account-change-email-post.php does not recognize the change-email action. How can i properly add the new captcha to change-email.php so that it correctly handles the change-email action? currently the action is missing and i cannot figure out why.

I would like to add that when i include captcha HOOK validation in change-email.php for example on line 28 (right after the if ($_POST['changeemailsave']...), the captcha always returns 0 failed. However if i add it at the very end of the page change-email.php captcha does not display any errors at all as if it is not being processed by account-change-email-post.php


JSON:
"google-recaptcha-after-change-email": {

        "type": "ACCOUNT_AFTER_CHANGE_EMAIL",

        "file": "plugins/google-recaptcha/hooks/display-recaptcha.php"

},

"google-recaptcha-change-email-post": {

        "type": "ACCOUNT_CHANGE_EMAIL_POST",

        "file": "plugins/google-recaptcha/hooks/account-change-email-post.php"

}

$hooks->trigger(HOOK_ACCOUNT_CHANGE_EMAIL_POST); - account-change-email-post.php

PHP:
<?php

defined('MYAAC') or die('Direct access not allowed!');

require_once DIR . '/../init.php';


if(GoogleReCAPTCHA::enabled()) {

    if (!GoogleReCAPTCHA::verify('change-email')) {

      global $errors, $logged;


        //$errors['verification'] = GoogleReCAPTCHA::getErrorMessage();

        $errors['verification'] = "Please confirm that you're not a robot. Huj w robota";

        return false;

    }

    else {

        global $errors, $logged;

        $errors['verification'] = "Success.";

    }

}

and {{ hook('HOOK_ACCOUNT_AFTER_CHANGE_EMAIL') }}
i put bellow password form </tr>
 
Last edited:
Back
Top