|
|
className is a string
|
|
|
what about this error? I was able to have it work before for some reason.
TypeError: Cannot find function getNumber in object Rogue.
(Line#45) - Problem Line: var skillptsmod = className.getNumber("Skill Points Variable");
|
|
|
This is what I have so far:
I still like the global part of the level up xp, I think it is less tedious than setting xpreq for each player character.
var character = self.getParent();
var gmset = character.getNumber("Game Master Experience Set");
if ( gmset == 0 || isGM == true){
var level = character.getNumber("Level");
var xpreq = character.getNumber("Experience Needed");
var nextExperienceLevel = (((level * xpreq/2) + 1250));
// Prepare any variables we will need (and may be needed in more than one place) in the script...
var intModifier = tool.roundDown(character.getNumber("Intelligence")/2-5);
var conModifier = tool.roundDown(character.getNumber("Constitution")/2-5);
var experience = character.getNumber("Experience");
//## Check to see if exp is greater than required
//########################################################
if (experience >= nextExperienceLevel){
//## MODIFY THE LEVEL FORMULA!!
//#########################################
character.set("Experience Needed", nextExperienceLevel);
// Increase the character`s level by 1...
var levelup = character.getNumber("Level")+1;
character.set("Level", levelup);
// Increase Class Level by 1...
var classLevel = self.getNumber("Class Level")+1;
self.set("Class Level", classLevel);
// ### Increase this character maximum hitpoints (and hitpoints by the same amount)...
// ###################################################################################
var hitpointIncrease = parseInt(tool.calculate("1d"+self.getNumber("Hit Dice")+"+"+conModifier));
if (hitpointIncrease<1)
hitpointIncrease = 1;
character.add("Hitpoints", hitpointIncrease);
character.add("Maximum Hitpoints", hitpointIncrease);
// ### Determine if we need to increase a stat...
// ##############################################
if (tool.roundDown((levelup-1)/4) != tool.roundDown(levelup/4))
tool.newObject("Stat Bonus", id);
// ### Increase the maximum skill points...
// ########################################
var humancheck = character.getString("Race");
if (humancheck == "Human"){
humancheck = 1;
}
else if (humancheck != "Human"){
humancheck = 0;
}
var skillPointIncrease = 8 + intModifier + humancheck;
if (skillPointIncrease<1)
skillPointIncrease = 1;
// Now add the new points to the maximum skill points...
character.add("Maximum Skill Points", skillPointIncrease);
}
else if(experience < nextExperienceLevel){
tool.say("Sorry, You do not have enough expereince!");
}
else if( gmset == 1 && isGM == false){
tool.say("Sorry, The Game Master Does Not Allow You To Level Up By Yourself!");
}
|
|
|
var level = character.getNumber("Level");
var xpreq = character.getNumber("EXPMAX");
var levelupxp = ("(((level+ xpreq/2) + 1250)/2)");
parent.calculate(levelupxp);
character.set("EXPMAX", levelupxp);
|
|
|
ok np, litterally the code in the script would be this....
var experienceFormula = parent.getString("Experience Levels Formula");
var nextExperienceLevel = parent.calculate(experienceFormula);
parent.set("Experience Needed", nextExperienceLevel);
Now, on the character object, we need 2 parameters....
Experience Levels Formula (Text)
Experience Needed (Number)
|
|
|
//where EXPMAX is a constant, it will update to make exponential changes
var levelupxp = ("((((#Level)+(#EXPMAX)/2) + 1250)/2)");
parent.calculate(levelupxp);
character.set((#EXPMAX), levelupxp);
////////////////////////////////////////////////////////////////////////////
something like this would be ok? Or must I call each thing like (#Level) like this;
var level = character.getNumber( "Level" );
etc. ?
I am not sure due to the way that you explained it.
|
|
|
Need some help with output, I`m a little rusty:
ReferenceError: "XML" is not defined.
(Line#60) - Problem Line:
Sorry you don`t have enough experience!
New Script:
var character = self.getParent();
// Prepare any variables we will need (and may be needed in more than one place) in the script...
var intModifier = tool.roundDown(character.getNumber("Intelligence")/2-5);
var conModifier = tool.roundDown(character.getNumber("Constitution")/2-5);
var experience = character.getNumber("Experience");
var expreq = character.getNumber("EXPMAX");
//## Check to see if exp is greater than required
//########################################################
if (experience >= expreq){
//## get new value for experience so abuse doesn`t happen
//########################################################
character.setNumber("EXPMAP", expreq + 10000);
// Increase the character`s level by 1...
var levelup = character.getNumber("Level")+1;
character.set("Level", levelup);
// Increase Class Level by 1...
var classLevel = self.getNumber("Class Level")+1;
self.set("Class Level", classLevel);
// ### Increase this character maximum hitpoints (and hitpoints by the same amount)...
// ###################################################################################
var hitpointIncrease = parseInt(tool.calculate("1d"+self.getNumber("Hit Dice")+"+"+conModifier));
if (hitpointIncrease<1)
hitpointIncrease = 1;
character.add("Hitpoints", hitpointIncrease);
character.add("Maximum Hitpoints", hitpointIncrease);
// ### Determine if we need to increase a stat...
// ##############################################
if (tool.roundDown((levelup-1)/4) != tool.roundDown(levelup/4))
tool.newObject("Stat Bonus", id);
// ### Increase the maximum skill points...
// ########################################
var humancheck = character.getString("Race");
if (humancheck == "Human"){
humancheck = 1;
}
else if (humancheck != "Human"){
humancheck = 0;
}
var skillPointIncrease = 8 + intModifier + humancheck;
if (skillPointIncrease<1)
skillPointIncrease = 1;
// Now add the new points to the maximum skill points...
character.add("Maximum Skill Points", skillPointIncrease);
}
//&& HERE IS WHERE I NEED HELP &&//
//&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&//
///////////////////////////////////
else if(experience < expreq){
<p> Sorry you don`t have enough experience! </p>
}
|
|
|
aha, thats a glitch. I`ll have a look at it as soon as I have a sec.
Thanks Haleseen
|
|
|
Thank you. I like the idea here, and feel compelled to help.
|
|
|
What does this mean, I get it when I click on one of my players located in an area containing an interactive map.
<span id=`mapContainer` onDblClick=`setImageLocation(event);moveObject()` onmousedown="if (typeof loadedFlag != `undefined`) {setClickPos(event, this); }" onmouseup="if (typeof loadedFlag != `undefined`) {mouseup(event, this);}" onmousemove="if (typeof loadedFlag != `undefined`) {moveTarget(event, this)}" style=`top: 0px; left:0px; min-width: 10000px; min-
I didn`t highlight the error, it is red like that already.
|
|
|
Welcome Mike! I`ll try to find some clear things for you to do in the D&D template if you`d like. Thanks for the offer!
|
|
|
This happens when I click on the name "Test" in D&D Template Test Game
HTTP Status 500 -
--------------------------------------------------------------------------------
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: org.apache.jasper.JasperException: Unable to compile class for JSP
An error occurred at line: 325 in the jsp file: /objectviewer.jsp
Generated servlet error:
The method generateParametersHTML(ServerInterface, ParameterSetManager, DatabaseObject, String, boolean, boolean, boolean, boolean, boolean, Visibility) in the type WebsiteLayer is not applicable for the arguments (JspWriter, ServerInterface, GameObject, String, boolean, boolean, boolean)
An error occurred at line: 336 in the jsp file: /objectviewer.jsp
Generated servlet error:
The method messageCodesToHtml(ParameterSetManager, DatabaseInterface, String) in the type WebUtils is not applicable for the arguments (ServerInterface, String)
An error occurred at line: 336 in the jsp file: /objectviewer.jsp
Generated servlet error:
The method messageCodesToHtml(ParameterSetManager, DatabaseInterface, String) in the type WebUtils is not applicable for the arguments (ServerInterface, String)
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:565)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:354)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
root cause
org.apache.jasper.JasperException: Unable to compile class for JSP
An error occurred at line: 325 in the jsp file: /objectviewer.jsp
Generated servlet error:
The method generateParametersHTML(ServerInterface, ParameterSetManager, DatabaseObject, String, boolean, boolean, boolean, boolean, boolean, Visibility) in the type WebsiteLayer is not applicable for the arguments (JspWriter, ServerInterface, GameObject, String, boolean, boolean, boolean)
An error occurred at line: 336 in the jsp file: /objectviewer.jsp
Generated servlet error:
The method messageCodesToHtml(ParameterSetManager, DatabaseInterface, String) in the type WebUtils is not applicable for the arguments (ServerInterface, String)
An error occurred at line: 336 in the jsp file: /objectviewer.jsp
Generated servlet error:
The method messageCodesToHtml(ParameterSetManager, DatabaseInterface, String) in the type WebUtils is not applicable for the arguments (ServerInterface, String)
org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:85)
org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:329)
org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:415)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:308)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:286)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:273)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:566)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:314)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
note The full stack trace of the root cause is available in the Apache Tomcat/6.0.7 logs.
--------------------------------------------------------------------------------
Apache Tomcat/6.0.7
|
|
|
HTTP Status 500 -
--------------------------------------------------------------------------------
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: java.lang.StringIndexOutOfBoundsException: String index out of range: 100
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:565)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
root cause
java.lang.StringIndexOutOfBoundsException: String index out of range: 100
java.lang.String.substring(Unknown Source)
org.apache.jsp.userprofile_005fPMs_005fcompose_jsp._jspService(userprofile_005fPMs_005fcompose_jsp.java:134)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:390)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
note The full stack trace of the root cause is available in the Apache Tomcat/6.0.7 logs.
--------------------------------------------------------------------------------
Apache Tomcat/6.0.7
|
|
|
"Looking for people to help out!
Looking for volunteers with coding or graphics skills! There`s ALWAYS something to do. Apply to join here and just let me know what kinds of skills you have.
Here is what we need...
1. Programmers who are familiar with Java
2. Graphic Designers who`ve used Photoshop, Inkscape, Illustrator or 3D Studio Max. Even rudimentary skills in any one of these programs (or similar programs) would be an asset.
When applying to join as MyRPG Staff, just tell me what you`d like to do. If you don`t have a lot of time, thats ok! Just do what you can when you can and no more!"
from that.
btw, my MSN is Holmandthemage@gmail.com, my yahoo messenger is Lordgeneralsaradamon@yahoo.com, my Skype is Saradamon, and my AIM is Saradamon.
incase u ever need to contact me easier than e-mail.
|
|
|
Awesome, thanks for the offer, when I get back on more (next week or the week after), I`ll hook up with you on that. We do need to get 3.5 out the door asap as that will attract attention and get some serious testing in.
Btw, what are you refering to when you say #2..#3...etc?
|
|
|
i`ve gotten better with gimp (which should really be up there after #2, dude) to the point of rivaling photoshop at times, by some peoples` opinions.
does saying "rivaling photoshop" mean much? not really. but yea, i`m atleast better and i should be able to help with stuff...
i can also make animations with gimp if needed...
and there should be a #3 as "beta tester for 3.5"... cause i applying for that
|
|