Request: Run at startup..
Posted: Wed Jul 09, 2003 10:07 pm
I was thinking if it was possible to implement a feature into MQ, that would run certain commands or perhaps an entire macro, once when logging in a character.
I was thinking that the commands to be run could be any command that can normally be used in a macro.
Add a section to the MacroQuest.ini file:
[Startup Commands]
c1=/gu Hello $char(guild), $char(name) $if(n,$strlen("$char(surname)")>0,"$char(surname)",",") at your service.
c2=/if "$char(name)"=="MyCharName" /macro Startup_MyCharName.mac
c3=/macro Startup_Global.mac
Above is just an example. My idea is that you can execute any MQ command that you can fit onto one line can be executed.
And to further make this very usefull it would be cool if there could be like a $server macro variable.
$server(id|name|shortname)
- id returns the id of the server currently logged on to.
- name returns the Long Name for the server currently logged on to.
- shortname returns (obviously enough) the shortname, ie the prefix used for when sending to chat channels on this server.
Examples:
You play on Firiona Vie
Code: /echo You are currently logged in on the $server(name) server.
Output: [MacroQuest] You are currently logged in on the Firiona Vie server.
Code: /echo People can send cross-server tells to you with the following command: > ;tell $server(shortname).$char(name) <
Output: [MacroQuest] People can send cross-server tells to you with the following command: > ;tell firiona.Mycharname <
Code: Your logfile for this character is named: eqlog_$char(name)_$server(id).txt
Output: Your logfile for this character is named: eqlog_Mycharname_90.txt
Also perhaps adding a "guild" flag to the $target and $char macroquest variables.
- guild returns the guildname of the current target/character, returns NULL if not member of any guild.
Example:
Code: /echo $target(name,clean) $if(n,$strlen("$target(surname)")>0,"$target(surname)",",") is $if("$target(guild)"!="NULL","a member of $target(guild)","not member of any guild")
Output: [MacroQuest] Somecharname Somesurname is a member of Some Guild Name
As allways, thanks for a great tool :)
I was thinking that the commands to be run could be any command that can normally be used in a macro.
Add a section to the MacroQuest.ini file:
[Startup Commands]
c1=/gu Hello $char(guild), $char(name) $if(n,$strlen("$char(surname)")>0,"$char(surname)",",") at your service.
c2=/if "$char(name)"=="MyCharName" /macro Startup_MyCharName.mac
c3=/macro Startup_Global.mac
Above is just an example. My idea is that you can execute any MQ command that you can fit onto one line can be executed.
And to further make this very usefull it would be cool if there could be like a $server macro variable.
$server(id|name|shortname)
- id returns the id of the server currently logged on to.
- name returns the Long Name for the server currently logged on to.
- shortname returns (obviously enough) the shortname, ie the prefix used for when sending to chat channels on this server.
Examples:
You play on Firiona Vie
Code: /echo You are currently logged in on the $server(name) server.
Output: [MacroQuest] You are currently logged in on the Firiona Vie server.
Code: /echo People can send cross-server tells to you with the following command: > ;tell $server(shortname).$char(name) <
Output: [MacroQuest] People can send cross-server tells to you with the following command: > ;tell firiona.Mycharname <
Code: Your logfile for this character is named: eqlog_$char(name)_$server(id).txt
Output: Your logfile for this character is named: eqlog_Mycharname_90.txt
Also perhaps adding a "guild" flag to the $target and $char macroquest variables.
- guild returns the guildname of the current target/character, returns NULL if not member of any guild.
Example:
Code: /echo $target(name,clean) $if(n,$strlen("$target(surname)")>0,"$target(surname)",",") is $if("$target(guild)"!="NULL","a member of $target(guild)","not member of any guild")
Output: [MacroQuest] Somecharname Somesurname is a member of Some Guild Name
As allways, thanks for a great tool :)