[HELP] Script on Spawning random boss

Results 1 to 7 of 7
  1. #1
    Enthusiast obideleon is offline
    MemberRank
    Oct 2018 Join Date
    27Posts

    Support [HELP] Script on Spawning random boss

    Can anyone help me how can I spawn a boss randomly every 3 hours or so, using script?


  2. #2
    Member Waspy is offline
    MemberRank
    Nov 2019 Join Date
    59Posts

    Re: [HELP] Script on Spawning random boss

    Quote Originally Posted by obideleon View Post
    Can anyone help me how can I spawn a boss randomly every 3 hours or so, using script?
    You'd be better off setting that in NPCgen, with a mob trigger that has a timer for every x hours.

  3. #3
    Enthusiast obideleon is offline
    MemberRank
    Oct 2018 Join Date
    27Posts

    Re: [HELP] Script on Spawning random boss

    Quote Originally Posted by Waspy View Post
    You'd be better off setting that in NPCgen, with a mob trigger that has a timer for every x hours.
    Someone told me that I should edit aipolicy.data. Do you have working AIEditor for 1.5.5 v159?

  4. #4
    Member Waspy is offline
    MemberRank
    Nov 2019 Join Date
    59Posts

    Re: [HELP] Script on Spawning random boss

    Quote Originally Posted by obideleon View Post
    Someone told me that I should edit aipolicy.data. Do you have working AIEditor for 1.5.5 v159?

    In all honesty, you're more likely to break everything if you do that. Editing NPCgen does the same stuff and is easier + less chances to mess it up and break your files.

    But, no, I do not have a tool for that.

  5. #5
    Enthusiast obideleon is offline
    MemberRank
    Oct 2018 Join Date
    27Posts

    Re: [HELP] Script on Spawning random boss

    Quote Originally Posted by Waspy View Post
    In all honesty, you're more likely to break everything if you do that. Editing NPCgen does the same stuff and is easier + less chances to mess it up and break your files.

    But, no, I do not have a tool for that.
    Oh okay. Maybe I'll stick with NPCgen then. But it will be fixed instead of random. I'm actually finding a way to activate a trigger using a script.

  6. #6
    Account Upgraded | Title Enabled! Wrechid is offline
    MemberRank
    Jan 2017 Join Date
    EMPTYLocation
    396Posts

    Re: [HELP] Script on Spawning random boss

    here is a method for start/stopping triggers via script...

    install and get pwadmin working using the default install location...

    create a script called trig.jsp in the directory /usr/local/jakarta/webapps/pwAdmin/AA

    copy and paste this code into the trig.jsp script,
    Code:
    <%@page contentType="text/html; charset=UTF-8" %>
    <%@page import="java.lang.*"%>
    <%@page import="protocol.*"%>
    <%@page import="com.goldhuman.auth.*"%>
    <%@page import="org.apache.commons.logging.Log"%>
    <%@page import="org.apache.commons.logging.LogFactory"%>
    <%@page import="com.goldhuman.util.*" %>
    <%
        String opt = request.getParameter("trg_opt");
        String tag = request.getParameter("trg_tag");
        int worldtag = Integer.parseInt(tag);
        String id = request.getParameter("trg_id");
        String command;
        
        if ( opt.equals("start") )
        {
            command = "active_npc_generator "+id;
        }
        else
        {
            command = "cancel_npc_generator "+id;
        }
        DeliveryDB.GMControlGame( worldtag, command );
    %>
    set the trig.jsp script permission to 777...

    from command line run this,
    Code:
    /usr/bin/wget http://127.0.0.1:8080/pwadmin/AA/trig.jsp?trg_opt="start"\&trg_tag="1"\&trg_id="3035" && rm -f trig.jsp?*
    the idea here is to use pwAdmin's json/api... with a bit of creativity you could put this command in a script and pass arguments to it for smaller command lines...

  7. #7
    Enthusiast obideleon is offline
    MemberRank
    Oct 2018 Join Date
    27Posts

    Re: [HELP] Script on Spawning random boss

    Quote Originally Posted by Wrechid View Post
    here is a method for start/stopping triggers via script...

    install and get pwadmin working using the default install location...

    create a script called trig.jsp in the directory /usr/local/jakarta/webapps/pwAdmin/AA

    copy and paste this code into the trig.jsp script,
    Code:
    <%@page contentType="text/html; charset=UTF-8" %>
    <%@page import="java.lang.*"%>
    <%@page import="protocol.*"%>
    <%@page import="com.goldhuman.auth.*"%>
    <%@page import="org.apache.commons.logging.Log"%>
    <%@page import="org.apache.commons.logging.LogFactory"%>
    <%@page import="com.goldhuman.util.*" %>
    <%
        String opt = request.getParameter("trg_opt");
        String tag = request.getParameter("trg_tag");
        int worldtag = Integer.parseInt(tag);
        String id = request.getParameter("trg_id");
        String command;
        
        if ( opt.equals("start") )
        {
            command = "active_npc_generator "+id;
        }
        else
        {
            command = "cancel_npc_generator "+id;
        }
        DeliveryDB.GMControlGame( worldtag, command );
    %>
    set the trig.jsp script permission to 777...

    from command line run this,
    Code:
    /usr/bin/wget http://127.0.0.1:8080/pwadmin/AA/trig.jsp?trg_opt="start"\&trg_tag="1"\&trg_id="3035" && rm -f trig.jsp?*
    the idea here is to use pwAdmin's json/api... with a bit of creativity you could put this command in a script and pass arguments to it for smaller command lines...
    Thanks man.



Advertisement