Thread: quick question :)

Results 1 to 8 of 8
  1. #1 quick question :) 
    Banned
    Join Date
    Jun 2012
    Posts
    438
    Thanks given
    13
    Thanks received
    27
    Rep Power
    0
    close
    Reply With Quote  
     

  2. #2  
    Registered Member Paradox68's Avatar
    Join Date
    Jan 2012
    Age
    28
    Posts
    167
    Thanks given
    3
    Thanks received
    15
    Rep Power
    14
    For what? Is it calling the chance in process void? (Which is called every 0.5 seconds)

    EDIT: You're taking too long to reply, anyways, if it IS in the process void, I'd say a 1/20,000 chance is a decent amount.

    ex. (czar code)

    public int chance = 0;

    public void process() { //called every 0.5 seconds

    chance = misc.random(20000);
    if (chance == 545) { //this can be any number, really....
    callRandomEvent();
    }
    Reply With Quote  
     

  3. #3  
    Banned
    Join Date
    Jun 2012
    Posts
    438
    Thanks given
    13
    Thanks received
    27
    Rep Power
    0
    Quote Originally Posted by Paradox68 View Post
    For what? Is it calling the chance in process void? (Which is called every 0.5 seconds)

    EDIT: You're taking too long to reply, anyways, if it IS in the process void, I'd say a 1/20,000 chance is a decent amount.

    ex. (czar code)

    public int chance = 0;

    public void process() { //called every 0.5 seconds

    chance = misc.random(20000);
    if (chance == 545) { //this can be any number, really....
    callRandomEvent();
    }
    edit: didnt read properly ill go with something like 1/10k chance and no im not using process
    Reply With Quote  
     

  4. #4  
    Registered Member Paradox68's Avatar
    Join Date
    Jan 2012
    Age
    28
    Posts
    167
    Thanks given
    3
    Thanks received
    15
    Rep Power
    14
    Is your chance being called every 0.5 seconds though? (If not, how often?) As I said 1/20,000 per 0.5 seconds is pretty decent, 1/10,000 at the same rate would probably occur every hour or so which would be kind of pointless, so if you're going for a really rare thing, might wanna make it even higher at the rate, like 1/35,000 per 0.5 seconds. So if your chance is being called every 1 second, 1/17,500, and so on.
    Reply With Quote  
     

  5. #5  
    Banned
    Join Date
    Jun 2012
    Posts
    438
    Thanks given
    13
    Thanks received
    27
    Rep Power
    0
    Quote Originally Posted by Paradox68 View Post
    Is your chance being called every 0.5 seconds though? (If not, how often?) As I said 1/20,000 per 0.5 seconds is pretty decent, 1/10,000 at the same rate would probably occur every hour or so which would be kind of pointless, so if you're going for a really rare thing, might wanna make it even higher at the rate, like 1/35,000 per 0.5 seconds. So if your chance is being called every 1 second, 1/17,500, and so on.
    yea might out it up alot then and my usage is like this. its for skilling so i place this code in
    Code:
    			if(Misc.random(1) == 1 && !c.playerHasRandomEvent) {
    				GenieLamp.spawnGenieNpc(c);
    				GenieLamp.startTimer(c);
    			}
    that goes in where the anims + add item etc
    its set to 1 there so genie will come pretty much every time.
    Reply With Quote  
     

  6. #6  
    need java lessons
    Eclipse's Avatar
    Join Date
    Aug 2012
    Posts
    4,436
    Thanks given
    686
    Thanks received
    898
    Rep Power
    490
    Make it trigger when you'd gain logs, catch fish, ect. Don't waste yor process on that.


    Make sure for it to do something like this:
    if (c.inEvent = true) {
    return;
    } else {
    c.startEvent;
    c.inEvent = true;
    }

    Quote Originally Posted by jerryrocks317 View Post
    i am 14 and have my own laptop im on almost 24/7 currently creating rsps lol so please get off my thread lol
    Reply With Quote  
     

  7. #7  
    Father Of Lies


    Join Date
    May 2012
    Age
    26
    Posts
    1,216
    Thanks given
    267
    Thanks received
    289
    Rep Power
    242
    I'm pretty sure that when you login it used to start a timer (random timer) and then the event would happen.
    Reply With Quote  
     

  8. #8  
    Banned
    Join Date
    Jun 2012
    Posts
    438
    Thanks given
    13
    Thanks received
    27
    Rep Power
    0
    Quote Originally Posted by Ninth Legion View Post
    Make it trigger when you'd gain logs, catch fish, ect. Don't waste yor process on that.


    Make sure for it to do something like this:
    if (c.inEvent = true) {
    return;
    } else {
    c.startEvent;
    c.inEvent = true;
    }
    thats exactly what i did / close thread please
    Reply With Quote  
     


Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Similar Threads

  1. Quick Question
    By Coke zero in forum Help
    Replies: 12
    Last Post: 09-20-2012, 11:07 PM
  2. Quick Question
    By Defiled-X in forum Help
    Replies: 2
    Last Post: 02-29-2012, 11:54 PM
  3. Quick question
    By Insecure in forum Help
    Replies: 1
    Last Post: 12-21-2011, 08:42 PM
  4. Replies: 3
    Last Post: 09-22-2011, 02:35 AM
  5. Quick Question
    By FTWbotter in forum Help
    Replies: 1
    Last Post: 12-15-2009, 06:32 AM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •