Thread Rating:
  • 4 Vote(s) - 3.25 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Release Roll The Class by OTW
#11
I would implement an attachment checking system, the gun var would be like

PHP Code:
gun self.rollGun self.rollAttachment "_mp"

It would take a little bit, since not all guns in a certain class use the same attachments. I could add to special random class, by adding ar's with flamethrower and stuff. Also does it make more sense to make the special occur a lot less often ?
OneThatWalks
Web Developer, Java Programmer, Computer Builder....
Reply

#12
The way that the bots' weapon randomizing system is set up only gets the list of valid attachments for a given weapon. Making them specific to a certain class would perhaps not be as easy. I guess it could check which class its rolling for and filter out "bad" attachments by name, such as a sniper scope for an assault rifle.
Reply

#13
Well i will do it in a switch

if assault set switch var to (some number) idk if we can use words as cases like I did in java then in the statement case #: if gun = this then randomize a couple attachments. Ill check the bot code, I never thought of checking that because their weapons are very simply customized.
OneThatWalks
Web Developer, Java Programmer, Computer Builder....
Reply

#14
(04-21-2011, 23:23)OneThatWalks Wrote: Well i will do it in a switch

if assault set switch var to (some number) idk if we can use words as cases like I did in java then in the statement case #: if gun = this then randomize a couple attachments. Ill check the bot code, I never thought of checking that because their weapons are very simply customized.

It would probably be safer to roll for attachments using the bot code and then use a class switch to filter out the attachments that you dont want. That ensures that you wont get an invalid attachment for the weapon that was rolled.

All the bot code does is read the weapon list and randomly pick a weapon. It then checks to see if the weapon fits certain criteria (slot, rank requirement, etc) and if its valid it then rolls for a random valid attachment. Otherwise it just picks another random weapon and tries again.
Reply

#15
Ill check it out. Meanwhile BETA 2 should be out sometime in the near future.
OneThatWalks
Web Developer, Java Programmer, Computer Builder....
Reply

#16
The code is not confusing at all. Everyone has their own coding style but as long as your style is efficient, understandable and consistent it should be OK.

This is the same:
Code:
if(self.aimbotActive) self iPrintlnBold("Aimbot is ^2ON");
else self iPrintlnBold("Aimbot is ^1OFF");

as this:
Code:
if(self.aimbotActive)
   self iPrintlnBold("Aimbot is ^2ON");
else
    self iPrintlnBold("Aimbot is ^1OFF");

GSC Scripts similarly to Java or C++ don't care about the indenting or where the command is. As long as it's straight after the if statement (under, or next to it) then it will execute the code anyway.
[Image: 30xhrep.png]

A casual conversation between barata and I about Nukem.
Reply



Possibly Related Threads…
Thread Author Replies Views Last Post
  [Release] TeamCounter class 8q4s8 3 5,257 10-15-2013, 18:14
Last Post: [HARD] Tony.
  W@W: Making player spawn with a custom default class. koil 9 5,453 01-13-2013, 12:10
Last Post: koil
  [Request] Disabling Custom Classes NOT CHOOSE CLASS DidUknowiPwn 5 3,708 01-10-2013, 04:32
Last Post: banz
  Roll the Dice [BUILD 2] (25th Jun 2011) AZUMIKKEL 74 44,105 12-02-2012, 10:19
Last Post: Nekochan
  [News] Mass VAC Detection Roll-Out dylankrajewski 46 25,039 11-02-2012, 04:28
Last Post: dylankrajewski
  Leecher claims credit for Roll the Dice in an interview AZUMIKKEL 16 8,896 10-22-2012, 23:17
Last Post: Arteq
  Roll The Dice 4 Bloopbloop 17 20,107 10-12-2012, 07:16
Last Post: tjb1389
  How to disable "Choose Class"? DidUknowiPwn 8 5,590 10-07-2012, 21:09
Last Post: JariZ
  [News] Black Ops 2 - Create A Class(LEAK) Tomsen1410 5 4,090 09-20-2012, 09:51
Last Post: Tomsen1410
  [Release] Roll the Dice MOD for MW3 JariZ 74 45,660 09-14-2012, 20:58
Last Post: hillbilly

Forum Jump:


Users browsing this thread:
1 Guest(s)

Forum Powered By MyBB, Theme by © 2002-2024 Melroy van den Berg.