Strength potions do the trick nicely. They increase general damage, but sword damage is included in that.
Rollback Post to RevisionRollBack
My avatar-Madison Gotha. She knows various weapons, she's a mage/sage, and is somewhat immortal. Madison has the capability of taming and communicating monsters, a genetic trait passed down by her father. 26 physically, 1400-something mentally, and a Lofty Peakian/Zenithian mix. Doesn't really like being called an elf and hates being called human..
I might be Moderator, but don't bother treating me too special. And don't make tons of Ban Hammer jokes, please. Also, I'm an Off-Topic only Mod. Don't ask me to lock a thread or something if it's not in the off-topic
Alright i tryed that code but... It didnt work for me. This is what i put:
if(getCarriedItem == 276)
{
if(sword_sharpness == 1)
{
health=Entity.getHealth(victim) ;
health=health-(2)
Entity.setHealth(victim, health) ;
}
}
}
The attack hook was at the top just not shown. Any idea what i did wrong? (sword_sharpness = 1 was activated)
function attackHook(attacker, victim){
if(getCarriedItem()==276){//checks to see if your holding a diamond sword
health = Entity.getHealth(Entity.getEntityTypeId(victim));//checks the entities health
Entity.setHealth(victim, health - 1);//Add 1 more damage
}
}
Also: you don't need to have a script for every mob...
Rollback Post to RevisionRollBack
Please click that little green button down there to if I helped!
var minusHealth = 3; //3 is the amount of half hearts you want to decrease
function attackHook(a,v){
if(Player.getCarriedItem()==sword id){
Entity.setHealth(v,Entity.getHealth(v) - minusHealth);
}
}
var minusHealth = 3; //3 is the amount of half hearts you want to decrease
function attackHook(a,v){
if(Player.getCarriedItem()==sword id){
Entity.setHealth(v,Entity.getHealth(v) - minusHealth);
}
}
Thats the exact same thing I said THE POST RIGHT ABOVE YOURS!!
Rollback Post to RevisionRollBack
Please click that little green button down there to if I helped!
Also, it does so much damage because it's a diamond sword... change the sword ids to get different damages:
Diamond Sword: 276
Gold Sword: 283
Iron Sword: 267
Stone Sword: 272
Wood Sword: 268
And it does work...
How to define health variable?
For the mobs?
mobHealth = Entity.getHealth(victim);
//I just used health for the code I gave you because it's the only health required
What i meant was when i put 1, it took 3 hits to kill a creeper but when i put 2 it kills it with one hit. Since we are dealing with half hearts thats sort of impossible.
Link:
http://www.minecraft.../#entry29816329
Please click that little green button down there to if I helped!
-
View User Profile
-
View Posts
-
Send Message
Retired StaffIt would be nice if you do:)
Link:
http://www.minecraft.../#entry29816329
if(getCarriedItem == 276)
{
if(sword_sharpness == 1)
{
health=Entity.getHealth(victim) ;
health=health-(2)
Entity.setHealth(victim, health) ;
}
}
}
The attack hook was at the top just not shown. Any idea what i did wrong? (sword_sharpness = 1 was activated)
Link:
http://www.minecraft.../#entry29816329
Link:
http://www.minecraft.../#entry29816329
function attackHook(attacker, victim){ if(getCarriedItem()==276){//checks to see if your holding a diamond sword health = Entity.getHealth(Entity.getEntityTypeId(victim));//checks the entities health Entity.setHealth(victim, health - 1);//Add 1 more damage } }Also: you don't need to have a script for every mob...
Please click that little green button down there to if I helped!
Link:
http://www.minecraft.../#entry29816329
Please click that little green button down there to if I helped!
var minusHealth = 3; //3 is the amount of half hearts you want to decrease function attackHook(a,v){ if(Player.getCarriedItem()==sword id){ Entity.setHealth(v,Entity.getHealth(v) - minusHealth); } }Thats the exact same thing I said THE POST RIGHT ABOVE YOURS!!
Please click that little green button down there to if I helped!
Link:
http://www.minecraft.../#entry29816329
Please click that little green button down there to if I helped!
Link:
http://www.minecraft.../#entry29816329
Diamond Sword: 276
Gold Sword: 283
Iron Sword: 267
Stone Sword: 272
Wood Sword: 268
And it does work...
How to define health variable?
For the mobs?
For the player?
Please click that little green button down there to if I helped!
Link:
http://www.minecraft.../#entry29816329
Please click that little green button down there to if I helped!
Link:
http://www.minecraft.../#entry29816329
Please click that little green button down there to if I helped!