• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Trigger] Rolling Trigger

Status
Not open for further replies.
Level 9
Joined
May 5, 2007
Messages
253
you know how in WoW you type /roll to make a rolling out of 100 if that number rolls a person can win the item can someone make that for me please its for my rpg and items drop and i need something like that so people can roll can someone please help me its where u type -roll?
 
Level 14
Joined
Apr 21, 2007
Messages
1,465
I actually have an idea about this. First you should put a dummy item drop. This can be anything, it is used to start the rolling sequence. I'll name the item START1.

Ok so first we add the following trigger:

Code:
Event - Unit - A unit Acquires an item
Condition - Item being picked up equal to START1
Action - Set ROLLINGSEQUENCE to 1

Note: Rollingsequence is a real variable

You can add a Remove START1 action which will remove our dummy item, the purpose of the dummy item was to activate the roll sequence and there is no use for it anymore. Now lets see the rolling sequence itself. First you'll need a couple of variables(equal to the number of players). They have to be integer. I'll make an example for player 1

Code:
Event - Player - Player 1 (Red) types a chat message containing -roll as An exact match
Condition - ROLLINGSEQUENCE equal to 1
Action - Set PLAYER1ROLL == Random number between 1 and 100

You'll also want to add a Game - Show message to all players for 20 seconds PLAYER1ROLL, but I'm not 100% sure how this is done since I don't have Warcraft III at the moment.

Then you would want to add a trigger that will process which PLAYERROLL was the highest and give him the specific item, sorry, not sure how this is done and I can't test it since I don't have WE :(

Note: You will need to attch this to every item roll, and you should add a condition in the first trigger to check which item you are rolling for in the beggining.

I'm not sure how skilled you are with triggers, but from here you can probably find out by yourself how to do the highest roll check sequence.

Once again I'm sorry I can't be of more help, but seeing as how I don't know the WE by heart and I don't have it now, there is not much else I can do. I hope this helps.
 
Level 4
Joined
Feb 4, 2008
Messages
82
well basically it is like what CMarket said all you would do as a code is like this
  • Event
    • Player - Player 1 (Red) types a chat message containing -roll as An exact match
  • Condition
  • Action
    • Set PlayerRoll = Random number between 1 and 100
    • Game - Display to (All players) the text: "Player" has rolled "PlayerRoll"
or you can specify the roll more like:
  • Player - Player 1 (Red) types a chat message containing -roll + "Number" as An exact match
  • Condition
  • Action
    • Set PlayerRoll = Random number between 1 and "Number"
    • Game - Display to (All players) the text: "Player" has rolled "PlayerRoll"

Note: the words between the " " are variables you need to create were PlayerRoll is an integer, Player is the player's color (red, blue, brown, etc..)
and Number is the number that the player can specify so he can choose that number as the ceiling (like if he choose 5 then the max no. in the roll will be 5).
 
Status
Not open for further replies.
Top