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!

NPC Help

Joined
May 7, 2010
Messages
83
Reaction score
9
I'm currently using v83, and there are NPCs (like the News Stand) that can't be coded(as it seems). What do I mean by this? Well, before even putting the NPC script in the npc script folder, he currently says

17AiX - NPC Help - RaGEZONE Forums

When I put a script in the npc script directory, he still says the same thing. Why is this?

I have recently switched to v83, from v75, and the Maple Admin was the same with the News Stand. Now I'm using Orpheus, a v83 repack. With this repack, the Maple Admin can now be scripted without the default message coming up. (which was something like 'Please visit nexons website for more info for events'. So, knowing this, there must be a way to get around this. Since I'm still a noob in scripting NPC and whatnot, can someone help me with this?

Also, I forgot to mention that if I use a command to start a conversation with the NPC, the script that's in my folder shows. Basically, it's just like cody. He's used a lot for servers, if you regurally talk to him, he says that he's the head programmer or w/e. If you use the command, he job advance(or w/e you have him do).
 

Attachments

You must be registered for see attachments list
Nae-un <33
Joined
Jun 23, 2012
Messages
554
Reaction score
70
Some NPCs are hardcoded to say the same thing regardless of the NPC script you put into the folder. The majority of these types of NPCs are composed of NPCs with quests, or NPCs like Cody.


I believe there was a release that allowed you to edit quest NPCs. Just search "any npc scriptable" and you should find it.
 
Upvote 0
Joined
May 7, 2010
Messages
83
Reaction score
9
Some NPCs are hardcoded to say the same thing regardless of the NPC script you put into the folder. The majority of these types of NPCs are composed of NPCs with quests, or NPCs like Cody.


I believe there was a release that allowed you to edit quest NPCs. Just search "any npc scriptable" and you should find it.

Ohh, thanks. I have found the thread - http://forum.ragezone.com/f427/make-npc-scriptable-781332/
So I put it in - MaplePacketCreator.java?

Actually, this is is my MaplePacketCreator.java lmao...

So why can I not script cody and the news stand?
 
Upvote 0
Joined
May 7, 2010
Messages
83
Reaction score
9
Your opcodes..?

Uhh.. opcodes.java? I can't edit it in Netbeans, nor do I know how to edit it. But I guess I'll post it here.

PHP:
/*
 * Copyright 1999-2004 The Apache Software Foundation.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
/*
 * $Id: OpCodes.java,v 1.1.2.1 2005/08/01 01:30:33 jeffsuttor Exp $
 */
package com.sun.org.apache.xpath.internal.compiler;

/**
 * Operations codes for XPath.
 *
 * Code for the descriptions of the operations codes:
 * [UPPER CASE] indicates a literal value,
 * [lower case] is a description of a value,
 *      ([length] always indicates the length of the operation,
 *       including the operations code and the length integer.)
 * {UPPER CASE} indicates the given production,
 * {description} is the description of a new production,
 *      (For instance, {boolean expression} means some expression
 *       that should be resolved to a boolean.)
 *  * means that it occurs zero or more times,
 *  + means that it occurs one or more times,
 *  ? means that it is optional.
 *
 * returns: indicates what the production should return.
 */
public class OpCodes
{

  /**
   * [ENDOP]
   * Some operators may like to have a terminator.
   * @xsl.usage advanced
   */
  public static final int ENDOP = -1;

  /**
   * [EMPTY]
   * Empty slot to indicate NULL.
   */
  public static final int EMPTY = -2;

  /**
   * [ELEMWILDCARD]
   * Means ELEMWILDCARD ("*"), used instead
   * of string index in some places.
   * @xsl.usage advanced
   */
  public static final int ELEMWILDCARD = -3;

  /**
   * [OP_XPATH]
   * [length]
   *  {expression}
   *
   * returns:
   *  XNodeSet
   *  XNumber
   *  XString
   *  XBoolean
   *  XRTree
   *  XObject
   * @xsl.usage advanced
   */
  public static final int OP_XPATH = 1;

  /**
   * [OP_OR]
   * [length]
   *  {boolean expression}
   *  {boolean expression}
   *
   * returns:
   *  XBoolean
   * @xsl.usage advanced
   */
  public static final int OP_OR = 2;

  /**
   * [OP_AND]
   * [length]
   *  {boolean expression}
   *  {boolean expression}
   *
   * returns:
   *  XBoolean
   * @xsl.usage advanced
   */
  public static final int OP_AND = 3;

  /**
   * [OP_NOTEQUALS]
   * [length]
   *  {expression}
   *  {expression}
   *
   * returns:
   *  XBoolean
   * @xsl.usage advanced
   */
  public static final int OP_NOTEQUALS = 4;

  /**
   * [OP_EQUALS]
   * [length]
   *  {expression}
   *  {expression}
   *
   * returns:
   *  XBoolean
   * @xsl.usage advanced
   */
  public static final int OP_EQUALS = 5;

  /**
   * [OP_LTE] (less-than-or-equals)
   * [length]
   *  {number expression}
   *  {number expression}
   *
   * returns:
   *  XBoolean
   * @xsl.usage advanced
   */
  public static final int OP_LTE = 6;

  /**
   * [OP_LT] (less-than)
   * [length]
   *  {number expression}
   *  {number expression}
   *
   * returns:
   *  XBoolean
   * @xsl.usage advanced
   */
  public static final int OP_LT = 7;

  /**
   * [OP_GTE] (greater-than-or-equals)
   * [length]
   *  {number expression}
   *  {number expression}
   *
   * returns:
   *  XBoolean
   * @xsl.usage advanced
   */
  public static final int OP_GTE = 8;

  /**
   * [OP_GT] (greater-than)
   * [length]
   *  {number expression}
   *  {number expression}
   *
   * returns:
   *  XBoolean
   * @xsl.usage advanced
   */
  public static final int OP_GT = 9;

  /**
   * [OP_PLUS]
   * [length]
   *  {number expression}
   *  {number expression}
   *
   * returns:
   *  XNumber
   * @xsl.usage advanced
   */
  public static final int OP_PLUS = 10;

  /**
   * [OP_MINUS]
   * [length]
   *  {number expression}
   *  {number expression}
   *
   * returns:
   *  XNumber
   * @xsl.usage advanced
   */
  public static final int OP_MINUS = 11;

  /**
   * [OP_MULT]
   * [length]
   *  {number expression}
   *  {number expression}
   *
   * returns:
   *  XNumber
   * @xsl.usage advanced
   */
  public static final int OP_MULT = 12;

  /**
   * [OP_DIV]
   * [length]
   *  {number expression}
   *  {number expression}
   *
   * returns:
   *  XNumber
   * @xsl.usage advanced
   */
  public static final int OP_DIV = 13;

  /**
   * [OP_MOD]
   * [length]
   *  {number expression}
   *  {number expression}
   *
   * returns:
   *  XNumber
   * @xsl.usage advanced
   */
  public static final int OP_MOD = 14;

  /**
   * [OP_QUO]
   * [length]
   *  {number expression}
   *  {number expression}
   *
   * returns:
   *  XNumber
   * @xsl.usage advanced
   */
  public static final int OP_QUO = 15;

  /**
   * [OP_NEG]
   * [length]
   *  {number expression}
   *
   * returns:
   *  XNumber
   * @xsl.usage advanced
   */
  public static final int OP_NEG = 16;

  /**
   * [OP_STRING] (cast operation)
   * [length]
   *  {expression}
   *
   * returns:
   *  XString
   * @xsl.usage advanced
   */
  public static final int OP_STRING = 17;

  /**
   * [OP_BOOL] (cast operation)
   * [length]
   *  {expression}
   *
   * returns:
   *  XBoolean
   * @xsl.usage advanced
   */
  public static final int OP_BOOL = 18;

  /**
   * [OP_NUMBER] (cast operation)
   * [length]
   *  {expression}
   *
   * returns:
   *  XBoolean
   * @xsl.usage advanced
   */
  public static final int OP_NUMBER = 19;

  /**
   * [OP_UNION]
   * [length]
   *  {PathExpr}+
   *
   * returns:
   *  XNodeSet
   * @xsl.usage advanced
   */
  public static final int OP_UNION = 20;

  /**
   * [OP_LITERAL]
   * [3]
   * [index to token]
   *
   * returns:
   *  XString
   * @xsl.usage advanced
   */
  public static final int OP_LITERAL = 21;

  /** The low opcode for nodesets, needed by getFirstPredicateOpPos and 
   *  getNextStepPos.          */
  static final int FIRST_NODESET_OP = 22;

  /**
   * [OP_VARIABLE]
   * [4]
   * [index to namespace token, or EMPTY]
   * [index to function name token]
   *
   * returns:
   *  XString
   * @xsl.usage advanced
   */
  public static final int OP_VARIABLE = 22;

  /**
   * [OP_GROUP]
   * [length]
   *  {expression}
   *
   * returns:
   *  XNodeSet
   *  XNumber
   *  XString
   *  XBoolean
   *  XRTree
   *  XObject
   * @xsl.usage advanced
   */
  public static final int OP_GROUP = 23;

  /**
   * [OP_EXTFUNCTION] (Extension function.)
   * [length]
   * [index to namespace token]
   * [index to function name token]
   *  {OP_ARGUMENT}
   *
   * returns:
   *  XNodeSet
   *  XNumber
   *  XString
   *  XBoolean
   *  XRTree
   *  XObject
   * @xsl.usage advanced
   */
  public static final int OP_EXTFUNCTION = 24;

  /**
   * [OP_FUNCTION]
   * [length]
   * [FUNC_name]
   *  {OP_ARGUMENT}
   * [ENDOP]
   *
   * returns:
   *  XNodeSet
   *  XNumber
   *  XString
   *  XBoolean
   *  XRTree
   *  XObject
   * @xsl.usage advanced
   */
  public static final int OP_FUNCTION = 25;

  /** The last opcode for stuff that can be a nodeset.         */
  static final int LAST_NODESET_OP = 25;

  /**
   * [OP_ARGUMENT] (Function argument.)
   * [length]
   *  {expression}
   *
   * returns:
   *  XNodeSet
   *  XNumber
   *  XString
   *  XBoolean
   *  XRTree
   *  XObject
   * @xsl.usage advanced
   */
  public static final int OP_ARGUMENT = 26;

  /**
   * [OP_NUMBERLIT] (Number literal.)
   * [3]
   * [index to token]
   *
   * returns:
   *  XString
   * @xsl.usage advanced
   */
  public static final int OP_NUMBERLIT = 27;

  /**
   * [OP_LOCATIONPATH]
   * [length]
   *   {FROM_stepType}
   * | {function}
   * {predicate}
   * [ENDOP]
   *
   * (Note that element and attribute namespaces and
   * names can be wildcarded '*'.)
   *
   * returns:
   *  XNodeSet
   * @xsl.usage advanced
   */
  public static final int OP_LOCATIONPATH = 28;

  // public static final int LOCATIONPATHEX_MASK = 0x0000FFFF;
  // public static final int LOCATIONPATHEX_ISSIMPLE = 0x00010000;
  // public static final int OP_LOCATIONPATH_EX = (28 | 0x00010000);

  /**
   * [OP_PREDICATE]
   * [length]
   *  {expression}
   * [ENDOP] (For safety)
   *
   * returns:
   *  XBoolean or XNumber
   * @xsl.usage advanced
   */
  public static final int OP_PREDICATE = 29;

  /**
   * [OP_MATCHPATTERN]
   * [length]
   *  {PathExpr}+
   *
   * returns:
   *  XNodeSet
   * @xsl.usage advanced
   */
  public static final int OP_MATCHPATTERN = 30;

  /**
   * [OP_LOCATIONPATHPATTERN]
   * [length]
   *   {FROM_stepType}
   * | {function}{predicate}
   * [ENDOP]
   * returns:
   *  XNodeSet
   * @xsl.usage advanced
   */
  public static final int OP_LOCATIONPATHPATTERN = 31;

  /**
   * [NODETYPE_COMMENT]
   * No size or arguments.
   * Note: must not overlap function OP number!
   *
   * returns:
   *  XBoolean
   * @xsl.usage advanced
   */
  public static final int NODETYPE_COMMENT = 1030;

  /**
   * [NODETYPE_TEXT]
   * No size or arguments.
   * Note: must not overlap function OP number!
   *
   * returns:
   *  XBoolean
   * @xsl.usage advanced
   */
  public static final int NODETYPE_TEXT = 1031;

  /**
   * [NODETYPE_PI]
   * [index to token]
   * Note: must not overlap function OP number!
   *
   * returns:
   *  XBoolean
   * @xsl.usage advanced
   */
  public static final int NODETYPE_PI = 1032;

  /**
   * [NODETYPE_NODE]
   * No size or arguments.
   * Note: must not overlap function OP number!
   *
   * returns:
   *  XBoolean
   * @xsl.usage advanced
   */
  public static final int NODETYPE_NODE = 1033;

  /**
   * [NODENAME]
   * [index to ns token or EMPTY]
   * [index to name token]
   *
   * returns:
   *  XBoolean
   * @xsl.usage advanced
   */
  public static final int NODENAME = 34;

  /**
   * [NODETYPE_ROOT]
   * No size or arguments.
   *
   * returns:
   *  XBoolean
   * @xsl.usage advanced
   */
  public static final int NODETYPE_ROOT = 35;

  /**
   * [NODETYPE_ANY]
   * No size or arguments.
   *
   * returns:
   *  XBoolean
   * @xsl.usage advanced
   */
  public static final int NODETYPE_ANYELEMENT = 36;

  /**
   * [NODETYPE_ANY]
   * No size or arguments.
   *
   * returns:
   *  XBoolean
   * @xsl.usage advanced
   */
  public static final int NODETYPE_FUNCTEST = 1034;

  /**
   * [FROM_stepType]
   * [length, including predicates]
   * [length of just the step, without the predicates]
   * {node test}
   * {predicates}?
   *
   * returns:
   *  XBoolean
   * @xsl.usage advanced
   */
  public static final int AXES_START_TYPES = 37;

  /** ancestor axes opcode.         */
  public static final int FROM_ANCESTORS = 37;

  /** ancestor-or-self axes opcode.         */
  public static final int FROM_ANCESTORS_OR_SELF = 38;

  /** attribute axes opcode.         */
  public static final int FROM_ATTRIBUTES = 39;

  /** children axes opcode.         */
  public static final int FROM_CHILDREN = 40;

  /** descendants axes opcode.         */
  public static final int FROM_DESCENDANTS = 41;

  /** descendants-of-self axes opcode.         */
  public static final int FROM_DESCENDANTS_OR_SELF = 42;

  /** following axes opcode.         */
  public static final int FROM_FOLLOWING = 43;

  /** following-siblings axes opcode.         */
  public static final int FROM_FOLLOWING_SIBLINGS = 44;

  /** parent axes opcode.         */
  public static final int FROM_PARENT = 45;

  /** preceding axes opcode.         */
  public static final int FROM_PRECEDING = 46;

  /** preceding-sibling axes opcode.         */
  public static final int FROM_PRECEDING_SIBLINGS = 47;

  /** self axes opcode.         */
  public static final int FROM_SELF = 48;

  /** namespace axes opcode.         */
  public static final int FROM_NAMESPACE = 49;

  /** '/' axes opcode.         */
  public static final int FROM_ROOT = 50;

  /**
   * For match patterns.
   * @xsl.usage advanced
   */
  public static final int MATCH_ATTRIBUTE = 51;

  /**
   * For match patterns.
   * @xsl.usage advanced
   */
  public static final int MATCH_ANY_ANCESTOR = 52;

  /**
   * For match patterns.
   * @xsl.usage advanced
   */
  public static final int MATCH_IMMEDIATE_ANCESTOR = 53;

  /** The end of the axes types.    */
  public static final int AXES_END_TYPES = 53;

  /** The next free ID.  Please keep this up to date.  */
  private static final int NEXT_FREE_ID = 99;
}
 
Upvote 0
Joined
Mar 14, 2010
Messages
5,363
Reaction score
1,343
Uhh.. opcodes.java? I can't edit it in Netbeans, nor do I know how to edit it. But I guess I'll post it here.

PHP:
/*
 * Copyright 1999-2004 The Apache Software Foundation.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
/*
 * $Id: OpCodes.java,v 1.1.2.1 2005/08/01 01:30:33 jeffsuttor Exp $
 */
package com.sun.org.apache.xpath.internal.compiler;

/**
 * Operations codes for XPath.
 *
 * Code for the descriptions of the operations codes:
 * [UPPER CASE] indicates a literal value,
 * [lower case] is a description of a value,
 *      ([length] always indicates the length of the operation,
 *       including the operations code and the length integer.)
 * {UPPER CASE} indicates the given production,
 * {description} is the description of a new production,
 *      (For instance, {boolean expression} means some expression
 *       that should be resolved to a boolean.)
 *  * means that it occurs zero or more times,
 *  + means that it occurs one or more times,
 *  ? means that it is optional.
 *
 * returns: indicates what the production should return.
 */
public class OpCodes
{

  /**
   * [ENDOP]
   * Some operators may like to have a terminator.
   * @xsl.usage advanced
   */
  public static final int ENDOP = -1;

  /**
   * [EMPTY]
   * Empty slot to indicate NULL.
   */
  public static final int EMPTY = -2;

  /**
   * [ELEMWILDCARD]
   * Means ELEMWILDCARD ("*"), used instead
   * of string index in some places.
   * @xsl.usage advanced
   */
  public static final int ELEMWILDCARD = -3;

  /**
   * [OP_XPATH]
   * [length]
   *  {expression}
   *
   * returns:
   *  XNodeSet
   *  XNumber
   *  XString
   *  XBoolean
   *  XRTree
   *  XObject
   * @xsl.usage advanced
   */
  public static final int OP_XPATH = 1;

  /**
   * [OP_OR]
   * [length]
   *  {boolean expression}
   *  {boolean expression}
   *
   * returns:
   *  XBoolean
   * @xsl.usage advanced
   */
  public static final int OP_OR = 2;

  /**
   * [OP_AND]
   * [length]
   *  {boolean expression}
   *  {boolean expression}
   *
   * returns:
   *  XBoolean
   * @xsl.usage advanced
   */
  public static final int OP_AND = 3;

  /**
   * [OP_NOTEQUALS]
   * [length]
   *  {expression}
   *  {expression}
   *
   * returns:
   *  XBoolean
   * @xsl.usage advanced
   */
  public static final int OP_NOTEQUALS = 4;

  /**
   * [OP_EQUALS]
   * [length]
   *  {expression}
   *  {expression}
   *
   * returns:
   *  XBoolean
   * @xsl.usage advanced
   */
  public static final int OP_EQUALS = 5;

  /**
   * [OP_LTE] (less-than-or-equals)
   * [length]
   *  {number expression}
   *  {number expression}
   *
   * returns:
   *  XBoolean
   * @xsl.usage advanced
   */
  public static final int OP_LTE = 6;

  /**
   * [OP_LT] (less-than)
   * [length]
   *  {number expression}
   *  {number expression}
   *
   * returns:
   *  XBoolean
   * @xsl.usage advanced
   */
  public static final int OP_LT = 7;

  /**
   * [OP_GTE] (greater-than-or-equals)
   * [length]
   *  {number expression}
   *  {number expression}
   *
   * returns:
   *  XBoolean
   * @xsl.usage advanced
   */
  public static final int OP_GTE = 8;

  /**
   * [OP_GT] (greater-than)
   * [length]
   *  {number expression}
   *  {number expression}
   *
   * returns:
   *  XBoolean
   * @xsl.usage advanced
   */
  public static final int OP_GT = 9;

  /**
   * [OP_PLUS]
   * [length]
   *  {number expression}
   *  {number expression}
   *
   * returns:
   *  XNumber
   * @xsl.usage advanced
   */
  public static final int OP_PLUS = 10;

  /**
   * [OP_MINUS]
   * [length]
   *  {number expression}
   *  {number expression}
   *
   * returns:
   *  XNumber
   * @xsl.usage advanced
   */
  public static final int OP_MINUS = 11;

  /**
   * [OP_MULT]
   * [length]
   *  {number expression}
   *  {number expression}
   *
   * returns:
   *  XNumber
   * @xsl.usage advanced
   */
  public static final int OP_MULT = 12;

  /**
   * [OP_DIV]
   * [length]
   *  {number expression}
   *  {number expression}
   *
   * returns:
   *  XNumber
   * @xsl.usage advanced
   */
  public static final int OP_DIV = 13;

  /**
   * [OP_MOD]
   * [length]
   *  {number expression}
   *  {number expression}
   *
   * returns:
   *  XNumber
   * @xsl.usage advanced
   */
  public static final int OP_MOD = 14;

  /**
   * [OP_QUO]
   * [length]
   *  {number expression}
   *  {number expression}
   *
   * returns:
   *  XNumber
   * @xsl.usage advanced
   */
  public static final int OP_QUO = 15;

  /**
   * [OP_NEG]
   * [length]
   *  {number expression}
   *
   * returns:
   *  XNumber
   * @xsl.usage advanced
   */
  public static final int OP_NEG = 16;

  /**
   * [OP_STRING] (cast operation)
   * [length]
   *  {expression}
   *
   * returns:
   *  XString
   * @xsl.usage advanced
   */
  public static final int OP_STRING = 17;

  /**
   * [OP_BOOL] (cast operation)
   * [length]
   *  {expression}
   *
   * returns:
   *  XBoolean
   * @xsl.usage advanced
   */
  public static final int OP_BOOL = 18;

  /**
   * [OP_NUMBER] (cast operation)
   * [length]
   *  {expression}
   *
   * returns:
   *  XBoolean
   * @xsl.usage advanced
   */
  public static final int OP_NUMBER = 19;

  /**
   * [OP_UNION]
   * [length]
   *  {PathExpr}+
   *
   * returns:
   *  XNodeSet
   * @xsl.usage advanced
   */
  public static final int OP_UNION = 20;

  /**
   * [OP_LITERAL]
   * [3]
   * [index to token]
   *
   * returns:
   *  XString
   * @xsl.usage advanced
   */
  public static final int OP_LITERAL = 21;

  /** The low opcode for nodesets, needed by getFirstPredicateOpPos and 
   *  getNextStepPos.          */
  static final int FIRST_NODESET_OP = 22;

  /**
   * [OP_VARIABLE]
   * [4]
   * [index to namespace token, or EMPTY]
   * [index to function name token]
   *
   * returns:
   *  XString
   * @xsl.usage advanced
   */
  public static final int OP_VARIABLE = 22;

  /**
   * [OP_GROUP]
   * [length]
   *  {expression}
   *
   * returns:
   *  XNodeSet
   *  XNumber
   *  XString
   *  XBoolean
   *  XRTree
   *  XObject
   * @xsl.usage advanced
   */
  public static final int OP_GROUP = 23;

  /**
   * [OP_EXTFUNCTION] (Extension function.)
   * [length]
   * [index to namespace token]
   * [index to function name token]
   *  {OP_ARGUMENT}
   *
   * returns:
   *  XNodeSet
   *  XNumber
   *  XString
   *  XBoolean
   *  XRTree
   *  XObject
   * @xsl.usage advanced
   */
  public static final int OP_EXTFUNCTION = 24;

  /**
   * [OP_FUNCTION]
   * [length]
   * [FUNC_name]
   *  {OP_ARGUMENT}
   * [ENDOP]
   *
   * returns:
   *  XNodeSet
   *  XNumber
   *  XString
   *  XBoolean
   *  XRTree
   *  XObject
   * @xsl.usage advanced
   */
  public static final int OP_FUNCTION = 25;

  /** The last opcode for stuff that can be a nodeset.         */
  static final int LAST_NODESET_OP = 25;

  /**
   * [OP_ARGUMENT] (Function argument.)
   * [length]
   *  {expression}
   *
   * returns:
   *  XNodeSet
   *  XNumber
   *  XString
   *  XBoolean
   *  XRTree
   *  XObject
   * @xsl.usage advanced
   */
  public static final int OP_ARGUMENT = 26;

  /**
   * [OP_NUMBERLIT] (Number literal.)
   * [3]
   * [index to token]
   *
   * returns:
   *  XString
   * @xsl.usage advanced
   */
  public static final int OP_NUMBERLIT = 27;

  /**
   * [OP_LOCATIONPATH]
   * [length]
   *   {FROM_stepType}
   * | {function}
   * {predicate}
   * [ENDOP]
   *
   * (Note that element and attribute namespaces and
   * names can be wildcarded '*'.)
   *
   * returns:
   *  XNodeSet
   * @xsl.usage advanced
   */
  public static final int OP_LOCATIONPATH = 28;

  // public static final int LOCATIONPATHEX_MASK = 0x0000FFFF;
  // public static final int LOCATIONPATHEX_ISSIMPLE = 0x00010000;
  // public static final int OP_LOCATIONPATH_EX = (28 | 0x00010000);

  /**
   * [OP_PREDICATE]
   * [length]
   *  {expression}
   * [ENDOP] (For safety)
   *
   * returns:
   *  XBoolean or XNumber
   * @xsl.usage advanced
   */
  public static final int OP_PREDICATE = 29;

  /**
   * [OP_MATCHPATTERN]
   * [length]
   *  {PathExpr}+
   *
   * returns:
   *  XNodeSet
   * @xsl.usage advanced
   */
  public static final int OP_MATCHPATTERN = 30;

  /**
   * [OP_LOCATIONPATHPATTERN]
   * [length]
   *   {FROM_stepType}
   * | {function}{predicate}
   * [ENDOP]
   * returns:
   *  XNodeSet
   * @xsl.usage advanced
   */
  public static final int OP_LOCATIONPATHPATTERN = 31;

  /**
   * [NODETYPE_COMMENT]
   * No size or arguments.
   * Note: must not overlap function OP number!
   *
   * returns:
   *  XBoolean
   * @xsl.usage advanced
   */
  public static final int NODETYPE_COMMENT = 1030;

  /**
   * [NODETYPE_TEXT]
   * No size or arguments.
   * Note: must not overlap function OP number!
   *
   * returns:
   *  XBoolean
   * @xsl.usage advanced
   */
  public static final int NODETYPE_TEXT = 1031;

  /**
   * [NODETYPE_PI]
   * [index to token]
   * Note: must not overlap function OP number!
   *
   * returns:
   *  XBoolean
   * @xsl.usage advanced
   */
  public static final int NODETYPE_PI = 1032;

  /**
   * [NODETYPE_NODE]
   * No size or arguments.
   * Note: must not overlap function OP number!
   *
   * returns:
   *  XBoolean
   * @xsl.usage advanced
   */
  public static final int NODETYPE_NODE = 1033;

  /**
   * [NODENAME]
   * [index to ns token or EMPTY]
   * [index to name token]
   *
   * returns:
   *  XBoolean
   * @xsl.usage advanced
   */
  public static final int NODENAME = 34;

  /**
   * [NODETYPE_ROOT]
   * No size or arguments.
   *
   * returns:
   *  XBoolean
   * @xsl.usage advanced
   */
  public static final int NODETYPE_ROOT = 35;

  /**
   * [NODETYPE_ANY]
   * No size or arguments.
   *
   * returns:
   *  XBoolean
   * @xsl.usage advanced
   */
  public static final int NODETYPE_ANYELEMENT = 36;

  /**
   * [NODETYPE_ANY]
   * No size or arguments.
   *
   * returns:
   *  XBoolean
   * @xsl.usage advanced
   */
  public static final int NODETYPE_FUNCTEST = 1034;

  /**
   * [FROM_stepType]
   * [length, including predicates]
   * [length of just the step, without the predicates]
   * {node test}
   * {predicates}?
   *
   * returns:
   *  XBoolean
   * @xsl.usage advanced
   */
  public static final int AXES_START_TYPES = 37;

  /** ancestor axes opcode.         */
  public static final int FROM_ANCESTORS = 37;

  /** ancestor-or-self axes opcode.         */
  public static final int FROM_ANCESTORS_OR_SELF = 38;

  /** attribute axes opcode.         */
  public static final int FROM_ATTRIBUTES = 39;

  /** children axes opcode.         */
  public static final int FROM_CHILDREN = 40;

  /** descendants axes opcode.         */
  public static final int FROM_DESCENDANTS = 41;

  /** descendants-of-self axes opcode.         */
  public static final int FROM_DESCENDANTS_OR_SELF = 42;

  /** following axes opcode.         */
  public static final int FROM_FOLLOWING = 43;

  /** following-siblings axes opcode.         */
  public static final int FROM_FOLLOWING_SIBLINGS = 44;

  /** parent axes opcode.         */
  public static final int FROM_PARENT = 45;

  /** preceding axes opcode.         */
  public static final int FROM_PRECEDING = 46;

  /** preceding-sibling axes opcode.         */
  public static final int FROM_PRECEDING_SIBLINGS = 47;

  /** self axes opcode.         */
  public static final int FROM_SELF = 48;

  /** namespace axes opcode.         */
  public static final int FROM_NAMESPACE = 49;

  /** '/' axes opcode.         */
  public static final int FROM_ROOT = 50;

  /**
   * For match patterns.
   * @xsl.usage advanced
   */
  public static final int MATCH_ATTRIBUTE = 51;

  /**
   * For match patterns.
   * @xsl.usage advanced
   */
  public static final int MATCH_ANY_ANCESTOR = 52;

  /**
   * For match patterns.
   * @xsl.usage advanced
   */
  public static final int MATCH_IMMEDIATE_ANCESTOR = 53;

  /** The end of the axes types.    */
  public static final int AXES_END_TYPES = 53;

  /** The next free ID.  Please keep this up to date.  */
  private static final int NEXT_FREE_ID = 99;
}



Are you trolling us..? God I hope you are..

The Sendopcode for "SET_NPC_SCRIPTABLE"

Hendi48 notes

SET_NPC_SCRIPTABLE values:
v83: 263 (untested)
v100: 376
Other versions: NPC_ANIMATION+2/3/4/5 (trial and error)

He thinks it's 263, but it's untested so you'd have to guess by trial and error.
 
Upvote 0
Joined
May 7, 2010
Messages
83
Reaction score
9
Are you trolling us..? God I hope you are..

The Sendopcode for "SET_NPC_SCRIPTABLE"

Hendi48 notes



He thinks it's 263, but it's untested so you'd have to guess by trial and error.

OHHHHHHHHHHHHHHHHHHHH- hahaha yea umm.. ._.

Now I see.

I bet he read this over and over and had no idea what you were talking about.:blink:
I kinda understand now.

Since I can already script the Maple Admin, this doesn't need to be edited. That's what was confusing me.

I have added in

PHP:
player.getClient().getSession().write(MaplePacketCreator.setNPCScriptable(npcid, string));
with the NPC ID and name, but still isn't working...
 
Upvote 0
Joined
Mar 14, 2010
Messages
5,363
Reaction score
1,343
OHHHHHHHHHHHHHHHHHHHH- hahaha yea umm.. ._.

Now I see.


I kinda understand now.

Since I can already script the Maple Admin, this doesn't need to be edited. That's what was confusing me.

I have added in

PHP:
player.getClient().getSession().write(MaplePacketCreator.setNPCScriptable(npcid, string));
with the NPC ID and name, but still isn't working...

How do you know, your "SET_NPC_SCRIPTABLE" header is even correct? Change it many times -1,+1,-2,+2 etc till you figure it out. ^^
 
Upvote 0
Joined
May 7, 2010
Messages
83
Reaction score
9
How do you know, your "SET_NPC_SCRIPTABLE" header is even correct? Change it many times -1,+1,-2,+2 etc till you figure it out. ^^

Well, I can code the Maple Admin, so it has to be right, correct? (the maple admin can't originally be coded, it's like cody and the news stand)

But, this was already in PlayerLoggedinHandler.java (assuming it's for the maple admin):
PHP:
if (ServerConstants.MAKE_NPCS_SCRIPTABLE) {
			for (int i = 0; i < ScriptableNPCConstants.SCRIPTABLE_NPCS.length; i++) {
				c.announce(MaplePacketCreator.setNPCScriptable(ScriptableNPCConstants.SCRIPTABLE_NPCS[i], ScriptableNPCConstants.SCRIPTABLE_NPCS_DESC[i]));
			}
		}
 
Upvote 0
Back
Top