Ahh well that sucks. Oh well back to my map
- StolenSoul90
- Registered Member
-
Member for 8 years, 4 months, and 9 days
Last active Sat, May, 13 2017 10:06:06
- 0 Followers
- 22 Total Posts
- 2 Thanks
-
Dec 22, 2015StolenSoul90 posted a message on Pocket Edition/Windows 10 Livestream, with Map Downloads!Posted in: News
-
Dec 21, 2015StolenSoul90 posted a message on Pocket Edition/Windows 10 Livestream, with Map Downloads!Posted in: News
Is the file corrupt? Won't let me extract the file!!!
- To post a comment, please login.
0
Ya got that all set up but, for some reason I can't access the lib files.
Hmm thnx for that I'll check it out if aide doesn't work for me.
0
Ya I saw that. Was gonna start up after I get my new laptop.
0
I need to learn native coding. Would really love to learn how to make an ore gen
0
//Sword
ModPE.setItem(380, "sword", 3, "Killer", 1);
//attack code
function attackHook(attacker, victim){
if(getCarriedItem() == 380){
Entity.setHealth(victim, 1);
}
}
//death code
function deathHook(attacker, victim){
if(Player.getCarriedItem() == 380){
if(Entity.getEntityTypeId() == 13){
Level.dropItem(Entity.getX(victim), Entity.getY(victim), Entity.getZ(victim), 0, 260, 1);
}
}
}
Well I toyed around with it some more and found that I was missing the if (player.getCarriedItem ()==380){} in my deathHook. Now it insta kills, drops vanilla drops, and drops my added apple (test purposes)
I wanna thank both of you for your help
0
+1 mate
Though I did get an error. Says I didn't define mob. Am I supposed to put mob id there?
0
Hmm ok. I just took the variables out and left it set as vanilla sword. Seems to work. Maybe it's just cause I'm using a gold sword. But shouldn't be able to 1 hit ko chicken mobs and what not?
<code>function attackHook(attacker, victim){}</code>
0
Has been SOLVED!!
ModPE.setItem (1000, "sword", 3, "Golden Angel");
Function attackHook (attacker, victim){
If (Player.getCarriedItem == 1000){
Var dmg = 14
Var mixed = Entity.getHealth (victim) - dmg
If(mixed > 2){
Entity.setHealth (victim, mixed);
}else {
Entity.setHealth (victim, 2);
}
}
This is the current code! This code works, as far as mob drops go but what doesn't work is the damage. No matter what my Var is set to my weapon only does 2 damage per hit.
Is my code wrong or is it something so simple I was just oblivious to it? Any help would be much appreciated.
Sorry for crappy looking code not sure how to make it look like it does in Droid edit
0
Thank you that helped alot. I'll Def give that a shot.
0
So, I stumbled upon one of arjay07's YouTube javascript tutorials. His video helped me make a custom weapon.
My question is how can I edit the appearance of my sword? Is there a way to do it using a code or can I use the uk.io app to create a texture? If I use the uk.io app how would I implement my texture straight into my current script?
Plz and thank you for any help. For now I'm just toying around with it. FYI it's for personal use...I may never make a full on mod. Not sure I got the time too lol.
0
Keep me posted. I would really love to use this and tinker on my Samsung devices.
0
Your darn right. Never hurts to try.
0
I see. Wonder if it will install on my tablet then lol.
0
????
0
I get this error msg. Maybe it just doesn't like phone lol.
org.mozilla.javascript.WrappedException: Wrapped java.lang.IllegalArgumentException: The requested block texture copper_ore:0 does not exist (MetallurgyPE-3.js#14)
at org.mozilla.javascript.Context.throwAsScriptRuntimeEx(Unknown Source)
at org.mozilla.javascript.MemberBox.invoke(Unknown Source)
at org.mozilla.javascript.FunctionObject.call(Unknown Source)
at org.mozilla.javascript.Interpreter.interpretLoop(Unknown Source)
at script(MetallurgyPE-3.js:14)
at script(MetallurgyPE-3.js:474)
at org.mozilla.javascript.Interpreter.interpret(Unknown Source)
at org.mozilla.javascript.InterpretedFunction.call(Unknown Source)
at org.mozilla.javascript.ContextFactory.doTopCall(Unknown Source)
at org.mozilla.javascript.ScriptRuntime.doTopCall(Unknown Source)
at org.mozilla.javascript.InterpretedFunction.exec(Unknown Source)
at net.zhuoweizhang.mcpelauncher.ScriptManager.initJustLoadedScript(ScriptManager.java:253)
at net.zhuoweizhang.mcpelauncher.ScriptManager$ParseThread.run(ScriptManager.java:179)
at java.lang.Thread.run(Thread.java:818)
Caused by: java.lang.IllegalArgumentException: The requested block texture copper_ore:0 does not exist
at net.zhuoweizhang.mcpelauncher.ScriptManager.verifyBlockTextures(ScriptManager.java:1271)
at net.zhuoweizhang.mcpelauncher.ScriptManager.access$1600(ScriptManager.java:53)
at net.zhuoweizhang.mcpelauncher.ScriptManager$NativeBlockApi.defineBlock(ScriptManager.java:3202)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
... 11 more
0
Hmm guess this mod is not 13.1 compatable???