More detailed mission description

  • hey, I have an idea that on the right side (under or above the mission helper) a more detailed random description of the fire appears.


    For example, having a "car fire" in the window would display one of several texts:

    - An abandoned car is on fire

    - Car fire after the accident

    - car fire while driving (with and without people inside.)


    The script would read missions on an "ID" basis and assign random text to them.


    I will adapt the mission descriptions myself, I just need a "started script"


    If anyone could do this, for the Polish version of the game, I would be very grateful.

    Regards and have a nice day<3

  • ok, where exactly do you need the help? Show what you already have.

    I really have nothing.

    I have no experience in writing a script, I gave an idea for a "sketch" and I hope that someone will manage to write it so that you can edit it, add your "descriptions" for different missions.

  • In my opinion, such a script should rather be installed by the game operator. (Excuse my bad English)

  • With these snippets you read out the ID of the mission and if the operation is correct, a text is output in an alert. You should be able to build on that.

    JavaScript
    (function () {
    var mission = $('#mission_help').attr('href').split("/").pop().replace(/\?.*/, '');
    if (mission === '65') {
    alert('we have been reported pickpocketing')
    }
    })();
  • Grognagor, Würdest du dir mal das folgende Script laden und dann den oben erwähnten Einsatz aufrufen.


  • Gemacht, mir wird ein Fehler geworfen:


  • Sieht bei mir so aus

  • Grognagor, Würdest du dir mal das folgende Script laden und dann den oben erwähnten Einsatz aufrufen.


    Moin,
    Ich würd die Adresse mit $('#mission_general_info').children('small').text().split('|')[0].trim(); und die ID mit window.location.pathname.replace(/\D+/g,''); holen.

    Das wäre bei dem Beispiel der Part links vom "|".