WoW Macros Forums  

Go Back   WoW Macros Forums > Macro Talk
Register FAQ Members List Calendar Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 11-05-2008, 02:12 AM
Junior Member
 
Join Date: Nov 2008
Posts: 5
RocketRock is on a distinguished road
Default Say and Random number

Recently, I've been have some fun by following people around and typing "/me steals 3 silver and 23 copper from your bag" and stuff like that.
I was just wondering if possible, what the commands are to make a macro that does this:

/me steals <Random Integer Between 1 and 5> silver and <Random Number Integer 1 and 99> copper from your bag.

I'm sure there are some better uses for such a macro, but any help on the matter would be appreciated.
Reply With Quote
  #2 (permalink)  
Old 11-05-2008, 02:24 AM
Junior Member
 
Join Date: Nov 2008
Posts: 5
Fatheed is on a distinguished road
Default

Gimme a bit to have a think.

Whilst I'm doing that, this works I guess, you have to enter the 3 amounts tho

Code:
/script s={"Phrase 1","Phrase 2","Phrase 3"};SendChatMessage(s[random(1,3)], "SAY")
Reply With Quote
  #3 (permalink)  
Old 11-05-2008, 02:27 AM
Junior Member
 
Join Date: Nov 2008
Posts: 5
RocketRock is on a distinguished road
Default

Thanks, I'll try that for now.
Reply With Quote
  #4 (permalink)  
Old 11-06-2008, 02:59 AM
MiracleMage's Avatar
Senior Member
 
Join Date: Feb 2008
Location: Adana, Turkey
Posts: 125
MiracleMage is on a distinguished road
Default

RandomRoll(low, high) is what you are looking

/script SendChatMessage("me steal" .. RandomRoll(1,5) .. "silver and" .. RandomRoll(0,99) .. "copper from your bag", "SAY", "Common","")
or
/script s=RandomRoll(1,5) c=RandomRoll(0,99) SendChatMessage("me steal" .. s .. "silver and" .. s .. "copper from your bag", "SAY", "Common","")

.. is concatenation in lua language, which scripts are written in. I didn't try atm i hope they work dude.

If it doesnt work tell me. The nil values of sendchatmessage might causing problem. for simplicity you can just use SendChatMessage(message) coz defaults are SAY,Common,nil

BTW last parameter (nil) is "channel" and used with whisper generally.
__________________
..Born in hell, boy of fire..
Topic: What macros can not do
CastBySpellName() Only thing needed in macros where blizz don't permit it.

Last edited by MiracleMage : 11-06-2008 at 03:40 AM.
Reply With Quote
  #5 (permalink)  
Old 11-07-2008, 12:00 AM
Junior Member
 
Join Date: Nov 2008
Posts: 5
RocketRock is on a distinguished road
Default

I tried both, and the only thing that happens is I get 2 /roll's show up. One for 1-5 and one for 0-99.

Is there a way to randomise a number without using the /randomroll or /roll?
Reply With Quote
  #6 (permalink)  
Old 11-07-2008, 12:28 AM
Junior Member
 
Join Date: Nov 2008
Posts: 5
Fatheed is on a distinguished road
Default

This works for me

Code:
/script s=random(5);c=random(99);SendChatMessage("steals " .. s .. " silver and " .. c .. " copper from your bag", "EMOTE", "Common","")
Reply With Quote
  #7 (permalink)  
Old 11-07-2008, 12:33 AM
Junior Member
 
Join Date: Nov 2008
Posts: 5
RocketRock is on a distinguished road
Default

Haha! Awsome, thanks a lot.

Edit: Oh man I love this.

Last edited by RocketRock : 11-07-2008 at 12:52 AM.
Reply With Quote
  #8 (permalink)  
Old 11-07-2008, 12:56 AM
Junior Member
 
Join Date: Nov 2008
Posts: 5
Fatheed is on a distinguished road
Default

Your welcome
Reply With Quote
  #9 (permalink)  
Old 11-07-2008, 12:58 AM
MiracleMage's Avatar
Senior Member
 
Join Date: Feb 2008
Location: Adana, Turkey
Posts: 125
MiracleMage is on a distinguished road
Default

Quote:
Originally Posted by Fatheed View Post
This works for me

Code:
/script s=random(5);c=random(99);SendChatMessage("steals " .. s .. " silver and " .. c .. " copper from your bag", "EMOTE", "Common","")
Good work dude. I didn't see random(low,high) function on wowwiki's api page but after you wrote i realized it's given on Lua functions page.

Have fun mates. I'm looking forward wotlk to renew my account ^^
__________________
..Born in hell, boy of fire..
Topic: What macros can not do
CastBySpellName() Only thing needed in macros where blizz don't permit it.
Reply With Quote
  #10 (permalink)  
Old 11-07-2008, 01:01 AM
Junior Member
 
Join Date: Nov 2008
Posts: 5
RocketRock is on a distinguished road
Default

I've made 3 ones to that I use depending on what level the people I'm around are to make it more believable.

Low level:
Code:
/script s=random(5);c=random(99);SendChatMessage("pickpockets " .. s .. " silver and " .. c .. " copper from your bag", "EMOTE", "Common","")
Medium level:
Code:
/script s=random(50);c=random(99);SendChatMessage("pickpockets " .. s .. " silver and " .. c .. " copper from your bag", "EMOTE", "Common","")
High level:
Code:
/script s=random(99);c=random(99);g=random(5);SendChatMessage("pickpockets " .. g .. " gold, ".. s .. " silver and " .. c .. " copper from your bag", "EMOTE", "Common","")
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -8. The time now is 12:26 AM.


Powered by vBulletin® Version 3.6.10
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0