You are not logged in.

Applications: [GameMaster: OPEN] | [Volunteer Testers: OPEN]


This forum will be permanently shut down on Friday 13.07.2018
Please copy or save all important information from old forum before they will be deactivated
We have moved to new board. https://forum.runesofmagic.gameforge.com/Come join us.

1

Tuesday, August 7th 2012, 11:11pm

Posting a message.

I was wondering what are the variants of DEFAULT_CHAT_FRAME:AddMessage("") I have tried Most of the things I can think of... I am looking for something to say something in Range(say), zone, and party... If anyone can help this would be great.:confused:

2

Tuesday, August 7th 2012, 11:21pm

Add-on author (retired, but continuing maintenance)

3

Wednesday, August 8th 2012, 4:48am

trying to have something like this. /script local mainClass, subClass = UnitClass("target"); DEFAULT_CHAT_FRAME:AddMessage(UnitName("target").." is a lv"..UnitLevel("target").." "..mainClass .. "/" .. subClass.." and has "..UnitChangeHealth("target").." health." ); but have that say not default would this work if so how?

Noguai

Beginner

Posts: 5

Location: Germany

  • Send private message

4

Wednesday, August 8th 2012, 1:51pm

You need to replace the Command "DEFAULT_CHAT_FRAME:AddMessage(text)" with "SendChatMessage(text, type)"

Source code

1
/run local mainClass, subClass = UnitClass("target"); SendChatMessage(UnitName("target").." is a lv "..UnitLevel("target").." "..mainClass.."/"..subClass.." and has "..UnitChangeHealth("target").." health.", "SAY");

Just a hint: Surround code with the [NOPARSE]

Source code

1

				
[/NOPARSE] tags when you post it on the forums. This will greatly enhance the readablity.

5

Wednesday, August 8th 2012, 4:57pm

Thank you this was a great help... I do however have 1 more question if you don't mind? I have been trying to have a macro get the amount of Energy of Justic in my bag, and then say it to me. However it wont seem to work. I fear I am using the wrong command.

Source code

1
 /script SendChatMessage("I Have "..GetCountInBagByName(Energy of Justice).." EOJ", "SAY"); 

Noguai

Beginner

Posts: 5

Location: Germany

  • Send private message

6

Wednesday, August 8th 2012, 5:57pm

You did nearly everything correct. The only thing you've forgotten is that you need to surround strings with quotation marks.

Source code

1
2
3
variable = "string"
variable = 123
variable = true

You could also use the text function, which automatically returnes the localized string from a given key. Then your macro could also work with a different client language or after the item's name has changed. But I think for your purposes that would be an overkill.

Source code

1
GetCountInBankByName(TEXT("Sys201545_name"))

7

Wednesday, August 8th 2012, 6:20pm

TY again, for all of your help. I used the macro and it didn't work... Then I figured out why :) I had it set to Bank not Bag. Once again, I appreciate you helpful supportive nature.

Noguai

Beginner

Posts: 5

Location: Germany

  • Send private message

8

Wednesday, August 8th 2012, 9:06pm

Oh, I didn't saw the typo too. Ooops :eek:
I'm glad to see your problems solved.