Author Topic: Roll the Dice module  (Read 29059 times)

0 Members and 2 Guests are viewing this topic.

Offline Timmy

  • Ulysses Team Member
  • Sr. Member
  • *****
  • Posts: 252
  • Karma: 168
  • Code monkey
Re: Roll the Dice module
« Reply #15 on: March 26, 2015, 03:27:05 AM »
1. Adding a ban (maybe kick) to the roll would be scary as <censor>, but I love it. I would fear that users wouldn't be so excited to use it though considering they'd risk losing their score and karma (not touching configs for these), so I don't plan on adding this effect.

2. Adding that explode option would be dope a.f. lol I'll read through this again to figure out how to add that. I'll also check out ulx jail to the mix, now that I think of it. Or even get whipped by the dice (ulx whip/slap). <censor>, options seem to be endless once you know what's going on lol

3. This shouldve been 1 but no ragrets, but I understand the purpose of it being random and not being able to choose the effect. I just think players would enjoy the option to some effects that aren't normally accessible at their own leisure. Similar to ulx Fun commands. I'm mainly talking about the drugged and confused effects. Giving users the option to do this to themselves has been a popular request. For now, I'll look into extending the time lengths for some effects.

Oh, I misunderstood you. Thought you said wanted banning as an effect or something. That would have taken the dice to the next level for suuure. xD

I only wanted 1 lethal effect considering there's not that many effects (yet). Rocket will actually explode the player in the air. You're obviously free to modify and/or add anything you want! I like the idea of ulx whip as a roll though...

I'll attach separate ulx commands for confused and drugged to this post. Code is kinda messy but it works. (:

Edit: updated versions
« Last Edit: March 28, 2015, 12:17:48 PM by Timmy »

Offline allofmywutsteam

  • Full Member
  • ***
  • Posts: 136
  • Karma: 3
  • MNWO Owner
    • MNWO Discord
Re: Roll the Dice module
« Reply #16 on: March 26, 2015, 06:56:29 AM »
Oh, I misunderstood you. Thought you said wanted banning as an effect or something. That would have taken the dice to the next level for suuure. xD

I only wanted 1 lethal effect considering there's not that many effects (yet). Rocket will actually explode the player in the air. You're obviously free to modify and/or add anything you want! I like the idea of ulx whip as a roll though...

I'll attach separate ulx commands for confused and drugged to this post. Code is kinda messy but it works. (:

Awesome! It took me a minute to find it (so many commands), but I got it up and running. I know my community will love using this (weridos lol). I just tried it for a minute and I'm about ready to give up technology for the day. My eyes... lol Oh well. Is there a way to somehow create a "Confirm" window for those who may be epileptic? I plan on releasing a video on how to use this, but some people will try to go for the full 256 seconds, forget how to get out of drugged, have a seizure, then I'm lol So when they go, say, for 30+ seconds, and they hit confirm (or when they do the chat command), have something say "This may cause nausea or epileptic episodes. Do you wish to continue?" or something to that matter. I'm sure this is asking more than needed, but I'm looking out for the fam.

Thanks again!

On a side note, I really do have a buttload of categories. Some commands come with their own as well as addons and whatnot. If I combined the code from one autorun into one lua file, and moves the lua/sh code into one lua/sh lua file, would that essentially combine whatever I just did into categories? I'll probably look more in depth into this and categorize them better. Here's half of them for instance http://puu.sh/gQkr0/fa6fa331b1.png and it would be a lot easier if I combined some of them. But I'll look into that. Just checking if anyone knows an easy or suggested way of doing this.
"Then Jesus said to his disciples, 'Whoever wants to be my disciple must deny themselves and take up their cross and follow me.'" - Matthew 16:24



MNWO: Steam | Discord | Website | Join Server

Offline Stickly Man!

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 1270
  • Karma: 164
  • What even IS software anymore?
    • XGUI
Re: Roll the Dice module
« Reply #17 on: March 26, 2015, 07:43:23 AM »
On a side note, I really do have a buttload of categories. Some commands come with their own as well as addons and whatnot. If I combined the code from one autorun into one lua file, and moves the lua/sh code into one lua/sh lua file, would that essentially combine whatever I just did into categories? I'll probably look more in depth into this and categorize them better. Here's half of them for instance http://puu.sh/gQkr0/fa6fa331b1.png and it would be a lot easier if I combined some of them. But I'll look into that. Just checking if anyone knows an easy or suggested way of doing this.

The command categories are manually specified in with each ulx.command call- you'd have to manually go through the code and change the category name yourself. As an example, with Timmy's confuse code he just posted, you'd look at the ulx-confused\lua\ulx\modules\sh\confuse.lua file, then find the line that has "ulx.command(" (line 51), then the first argument is "Fun". You can change that to whatever value you like. For other commands/addons, you'll just have to find where "ulx.command" is called. The files containing this SHOULD be in <whichever addon>\lua\ulx\modules\sh, though, so they shouldn't be hard to find.
Join our Team Ulysses community discord! https://discord.gg/gR4Uye6

Offline allofmywutsteam

  • Full Member
  • ***
  • Posts: 136
  • Karma: 3
  • MNWO Owner
    • MNWO Discord
Re: Roll the Dice module
« Reply #18 on: March 26, 2015, 08:02:05 AM »
The command categories are manually specified in with each ulx.command call- you'd have to manually go through the code and change the category name yourself. As an example, with Timmy's confuse code he just posted, you'd look at the ulx-confused\lua\ulx\modules\sh\confuse.lua file, then find the line that has "ulx.command(" (line 51), then the first argument is "Fun". You can change that to whatever value you like. For other commands/addons, you'll just have to find where "ulx.command" is called. The files containing this SHOULD be in <whichever addon>\lua\ulx\modules\sh, though, so they shouldn't be hard to find.

Great! So I just have to find the "ulx.command" line in all the sh/*lua files and then I can rename the first argument. Now, I've seen commands that you can change the Category name via CATEGORY_NAME. Perfect example would be the "Restart Timer Command" by syst3M4TiK where he uses "local CATEGORY_NAME = "_Restart"" and changing works fine. Is there a difference between local CATEGORY_NAME = "_Restart" and ulx.command?
"Then Jesus said to his disciples, 'Whoever wants to be my disciple must deny themselves and take up their cross and follow me.'" - Matthew 16:24



MNWO: Steam | Discord | Website | Join Server

An Error Has Occurred!

array_keys(): Argument #1 ($array) must be of type array, null given