Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

[HELP] Script on Spawning random boss

Newbie Spellweaver
Joined
Oct 11, 2018
Messages
27
Reaction score
0
Can anyone help me how can I spawn a boss randomly every 3 hours or so, using script?
 
Newbie Spellweaver
Joined
Oct 11, 2018
Messages
27
Reaction score
0
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?
 
Upvote 0
Newbie Spellweaver
Joined
Nov 5, 2019
Messages
59
Reaction score
1
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.
 
Upvote 0
Newbie Spellweaver
Joined
Oct 11, 2018
Messages
27
Reaction score
0
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.
 
Upvote 0
Elite Diviner
Joined
Jan 5, 2017
Messages
476
Reaction score
348
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...
 
Upvote 0
Newbie Spellweaver
Joined
Oct 11, 2018
Messages
27
Reaction score
0
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.
 
Upvote 0
Back
Top