Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   GK Suggestions (https://forums.graalonline.com/forums/forumdisplay.php?f=39)
-   -   GK login macro? (autotag?) (https://forums.graalonline.com/forums/showthread.php?t=72168)

ReBorn_Spirit 02-13-2007 07:59 AM

GK login macro? (autotag?)
 
Can we add in some automatic way to put the kingdom tag on (optionally) like a basic macro to say "/kingdom tag"?? I do not know about you, but for me, I have an unstable graal client still. Saying "/kingdom tag" 50 times a day, every day I play graal gets extremely redundant. Sometimes I don't even bother trying to keep my actual tag on because it's only going to crash in the next 15 minutes again. A small limited macro on login, or even better yet, auto-kingdomtag could be put into effect rather effectively. Users could even just turn it off if they so desired with a command. Just say.. "/autotag" and it would put your tag on for you when you logged in. I think it would be nice.

jonnyrocks2 02-13-2007 08:04 AM

I agree, I find it annoying to have to put my tag on as well due to how repetitive it is.

Googi 02-13-2007 08:16 AM

It probably wouldn't be too hard to script something to automatically re-add the tag after it's automatically removed.

cyan3 02-13-2007 09:12 AM

What about if when you say /autotag a bar will come up and you can choose your nickname and set it to if you want it to come on when you log or come on if you press a key.

Draenin 02-13-2007 04:35 PM

It would be nicer if you didn't have to do anything at all. Even if you log off, your nickname is saved in the client login screen, but you get booted off tag immediately if you try logging back on to GK. The weird part is that you can log in to other servers like zone, and it doesn't boot you off tag.

Chris 02-13-2007 04:40 PM

Or they could bring back /bind

I miss using it for /clear /kingdom tag and other commands. :frown:

cbk1994 02-13-2007 11:09 PM

Quote:

Originally Posted by cyan3 (Post 1276949)
What about if when you say /autotag a bar will come up and you can choose your nickname and set it to if you want it to come on when you log or come on if you press a key.

That would be nice, and it wouldn't be hard to script either. I'd script that, but if I tryed to give it to Bjorn or Stefan, they'd hate it somehow, and throw it away.

Tigairius 02-22-2007 06:31 AM

You could just make your own Graal launcher program that when you log on to GK it automatically presses tab and types /kingdom tag

ReBorn_Spirit 02-22-2007 08:50 AM

Or we could just have stefan add in "/autotag on" "/autotag off" like I allready talked to him about on debug. Or even "/kingdom autotag" -> Auto tag on in bottom right corner of screen

cutelilmurderer 02-26-2007 04:48 AM

The idea about bringing back /bind is a really good one. I would LOVE to have a key that /clear especially during kwars.

Gambet 02-26-2007 07:12 PM

Quote:

Originally Posted by Draenin (Post 1277010)
It would be nicer if you didn't have to do anything at all. Even if you log off, your nickname is saved in the client login screen, but you get booted off tag immediately if you try logging back on to GK. The weird part is that you can log in to other servers like zone, and it doesn't boot you off tag.


That's because I would assume kingdom tags are not stored in guild text files, but rather, some sort of a Database.

The Graal client only allows you to keep global/local guild tags on when you log on -- local guild tags would only be those stored in guild text files.


Anywho, regarding this macro thing, I'll script something now and post the script in this thread when I'm done. Considering I'm doing this out of pure boredom and in hopes that it would be used for you players, it won't be very fancy, but rather, it will just do the job of not having to say /kingdom tag all the time.

Gambet 02-26-2007 07:59 PM

Ok, here you go:

wNPC:

PHP Code:

//Nickname Storage
//By: Gambet

function onActionServerSide()
{
 if (
params[0] == "StoreNick")
   {
    if (
params[1][1] != player.nick)
     {
      echo(
"[Hacker Detection]: " player.account " is attempting to bypass the trigger for the Nickname Storage!");
     } else
      {
        
clientr.stored_nickname params[1];
        
this.temp clientr.stored_nickname;
        if (
this.temp[0] == "on")
         {
           
//This part should be changed so that it doesn't set the player's chat, rather, shows on              
           //the bottom of the screen
           
player.chat "The stored nickname: " this.temp[1] @ " will automatically be set upon login! (Press shift+2 to set your nickname to it)";
         } else
          {
            
//This part should be changed so that it doesn't set the player's chat, rather, shows on              
            //the bottom of the screen
            
player.chat "Successfully stored the nickname: " this.temp[1] @ " (Press shift+2 to set your nickname to it)";
          }
      }
   } elseif (
params[0] == "SetNick")
    {
     
player.nick clientr.stored_nickname[1];
    }
}    

//#CLIENTSIDE
function onPlayerChats()

 if (
player.chat == ":savenick")
  {
   
Initialize();
   
init_text2.text player.nick;
  }
}

function 
Initialize()
{
  new 
GuiWindowCtrl("init_window"
  {
    
profile GuiBlueWindowProfile;
    
= (screenwidth/2-100);
    
= (screenheight/2-100);
    
width 250;
    
height 130;
    
canclose canmaximize canminimize canresize "false";
    
text "Nickname Storage";
   new 
GuiButtonCtrl("init_close"
    {
      
profile GuiBlueButtonProfile;
      
145;
      
104.5;
      
width 50;
      
height 20;
      
text "Cancel";
    }
   new 
GuiButtonCtrl("init_button"
    {
      
profile GuiBlueButtonProfile;
      
55;
      
104.5;
      
width 50;
      
height 20;
      
text "Store";
    }
   new 
GuiTextCtrl("init_text"
    {   
      
profile GuiBlueTextProfile;
      
10;
      
20;
      
height 20;
      
text "Would you like to store the following nickname: ";
    } 
   new 
GuiTextCtrl("init_text2"
    {   
      
profile GuiBlueTextProfile;
      
10;
      
40;
      
height 20;
    } 
   new 
GuiCheckBoxCtrl("init_checkbox"
    {
     
profile GuiBlueCheckBoxProfile;
     
10;
     
71.5;
     
width 100;
     
height 20;
     
text "Auto-set on Login?";
    }
  }
}

function 
init_close.onAction()
{
 
init_window.destroy();
}

function 
init_button.onAction()
{
 if (
init_checkbox.checked)
  {
    
this.tosave = {"on",player.nick};
  } else
   {
     
this.tosave = {"off",player.nick};
   }
  
triggerserver("gui",name,"StoreNick",this.tosave);


function 
onKeyPressed(code,key)
{
 if (
code == 306)
  {
   if (
clientr.stored_nickname != "")
    {
     
triggerserver("gui",name,"SetNick");
    }
  }


Control-NPC:

PHP Code:

function onActionPlayerOnline()
{
  if (
clientr.stored_nickname[0] == "on")
   {
     
player.nick clientr.stored_nickname[1];
   }



Commands:

-Say :savenick to initialize the gui.

-Press shift+2 to automatically set your nickname to the stored nickname.



NOTE: Storing your nickname will allow you to toggle it using shift+2. As an add-on, while storing your nickname, you can choose to have it automatically set upon logging in or not.


Now, I know that you can easily save a nickname for a Kingdom, leave the Kingdom, join another Kingdom, and toggle between the two Kingdom tags even though you arn't in both kingdoms via this system the way it currently is. This can easily be fixed, but I don't know how the Kingdom systems works, thus, I couldn't add that part on to this system, but it should be an easy addition for Stefan or any of the Kingdom staff.


Screenshot:





^^

ReBorn_Spirit 02-26-2007 08:26 PM

You should present this code to GK staff first and see what they think of the idea.

Gambet 02-26-2007 08:30 PM

Quote:

Originally Posted by ReBorn_Spirit (Post 1282382)
You should present this code to GK staff first and see what they think of the idea.


Meh, feel free to direct any of the staff to my post with the code if you'd like.


I just figured I'd do a few people a favor and script it myself -- the rest is out of my hands.

Cubical 02-26-2007 09:49 PM

Hmm, is it too hard to say /kingdom tag?


All times are GMT +2. The time now is 06:49 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.