expedition

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • File: MissionCaseExpedition.class.php
      Function: EndStayEvent

      There you can change the event chance. This is the dice:
      $GetEvent = mt_rand(0, 1000);

      If you change this to mt_rand(0, 812); you will always have an event, if the location is not mined out. If you also dont want a location to depleet, change this code:


      PHP Source Code

      1. $depleted = mt_rand(0, 100);
      2. //if ($depleted < $chanceDepleted)
      3. // $GetEvent = 1000; // nothing happens
      Lines 2 and 3 are commented out by inserting // at the beginning

      The post was edited 1 time, last by Palatinus ().

    • Palatinus wrote:

      Of course, it depends on what codebase you are using.
      Este es mi codigo de las expediciones, como puedo aumentar el éxito de las expediciones?
      Files
    • In your code, there are 3 Events:
      1. Ressources
      2. DM
      3. Ships
      This defines creates a random event. If it is 1-3, there will be an event. If it is 4 to 9, there will be no event. (33% Chance at the moment)

      PHP Source Code

      1. $GetEvent = mt_rand(1, 9);


      This code will have event every second time (50% Chance):

      Source Code

      1. $GetEvent = mt_rand(1, 6);


      This code will have event every time (100% Chance):

      PHP Source Code

      1. $GetEvent = mt_rand(1, 3);

      The code is in line 58. Have fun! :)
    • Palatinus wrote:

      In your code, there are 3 Events:
      1. Ressources
      2. DM
      3. Ships
      This defines creates a random event. If it is 1-3, there will be an event. If it is 4 to 9, there will be no event. (33% Chance at the moment)

      PHP Source Code

      1. $GetEvent = mt_rand(1, 9);

      This code will have event every second time (50% Chance):

      Source Code

      1. $GetEvent = mt_rand(1, 6);

      This code will have event every time (100% Chance):

      PHP Source Code

      1. $GetEvent = mt_rand(1, 3);
      The code is in line 58. Have fun! :)
      Lo he puesto en mt_rand(1, 6); y solo me ha traido un solo recurso. Tiene este cambio algo que ver con eso?
    • tellez wrote:

      Lo he puesto en mt_rand(1, 6); y solo me ha traido un solo recurso. Tiene este cambio algo que ver con eso?
      Oui c'est normal c'est du à cette partie du code qui donne les chances d'obtenir 1 ou plusieurs ressources
      -------------------------------------------------------------------
      Yes it's normal it's due to this part of the code which gives the chances of obtaining 1 or more resources

      PHP Source Code

      1. $chanceToFound = mt_rand(1, 6);
      2. if($chanceToFound > 3)
      3. {
      4. $resourceId = 901;
      5. }
      6. elseif($chanceToFound > 1)
      7. {
      8. $resourceId = 902;
      9. $factor = $factor / 2;
      10. }
      11. else
      12. {
      13. $resourceId = 903;
      14. $factor = $factor / 3;
      15. }
      Display All
    • it all depends on what you want to do. Have the 3 see 4 resources or only 3 or only 2 or only 1 etc...

      The quantity does not change