Edited by bringer of destruction, 17 June 2007 - 11:04 PM.
Is this possiable.
Started by
Soarin
, Jun 17 2007 10:55 PM
7 replies to this topic
#1
Posted 17 June 2007 - 10:55 PM
i was wondering is it possiable to script a sword that drains magic and health. I want to know if this is possiable to have an item like this that can kill link after the tiem drains magic and health.
#2
Posted 17 June 2007 - 11:01 PM
I assume so. Script the item to reduce health/magic every X frames it's equipped
#3
Posted 17 June 2007 - 11:04 PM
Thank you Noel.
#4
Posted 18 June 2007 - 09:46 AM
This is MOCK CODE, and will more than likely not work. Don't bother copying and pasting it into a script for that reason. It's just the general path it may look like before its alpha phase.
It totally sucks, and is completely incorrect. Most likely.
CODE
//This script removes magic and health every few moments while using it.
import "std.zh"
item script SwordDrainer {
int linksworduse; // I hope to god this does something helpful, lol...
if (Action = 2) {
Link->HP = Link->HP - 2;
Link->MP = Link->MP - 2;
Waitframe();
}
}
import "std.zh"
item script SwordDrainer {
int linksworduse; // I hope to god this does something helpful, lol...
if (Action = 2) {
Link->HP = Link->HP - 2;
Link->MP = Link->MP - 2;
Waitframe();
}
}
It totally sucks, and is completely incorrect. Most likely.
#5
Posted 18 June 2007 - 11:25 AM
That gives mer a general idea of what i have to do.
Edited by bringer of destruction, 18 June 2007 - 11:31 AM.
#6
Posted 12 September 2007 - 01:26 AM
Since item scripts activate when you press the button of the item, all you'd need is this; .....I think.
item script SwordDrainer {
void run(){
int hp_drain = 1;
int mp_drain = 1;
// int rupee_drain = 1;
if (hp_drain > 0){
Link->HP = Link->HP - hp_drain;
} if (mp_drain > 0){
Link->MP = Link->MP - mp_drain;
// } if (rupee_drain > 0){
// Game->Counter[CR_RUPEES] -= rupee drain;
// Game->PlaySound(insert sfx here);
}
Waitframe();
}
}
Although here's a neat idea;
item script SwordDrainer {
void run(){
int hp_drain = 1;
int mp_drain = 1;
// int rupee_drain = 1;
if (Link->Item[----item ID here-----] == false){
if (hp_drain > 0){
Link->HP = Link->HP - hp_drain;
} if (mp_drain > 0){
Link->MP = Link->MP - mp_drain;
// } if (rupee_drain > 0){
// Game->Counter[CR_RUPEES] -= rupee drain;
// Game->PlaySound(insert sfx here);
}
}
Waitframe();
}
}
You can take away the negative effects of the sword if you have another item!
ie, cursed sword untill you beat a boss and get the amulet of remove_curse, then it becomes the master sword!
btw; just remove the // if you want to curse rupees. and fill in the blanks with ID numbers in std.zh
also adjust this; int hp_drain = 1; to whatever you want. ie: int hp_drain = 1,000,000; !
have fun.
CODE
item script SwordDrainer {
void run(){
int hp_drain = 1;
int mp_drain = 1;
// int rupee_drain = 1;
if (hp_drain > 0){
Link->HP = Link->HP - hp_drain;
} if (mp_drain > 0){
Link->MP = Link->MP - mp_drain;
// } if (rupee_drain > 0){
// Game->Counter[CR_RUPEES] -= rupee drain;
// Game->PlaySound(insert sfx here);
}
Waitframe();
}
}
Although here's a neat idea;
CODE
item script SwordDrainer {
void run(){
int hp_drain = 1;
int mp_drain = 1;
// int rupee_drain = 1;
if (Link->Item[----item ID here-----] == false){
if (hp_drain > 0){
Link->HP = Link->HP - hp_drain;
} if (mp_drain > 0){
Link->MP = Link->MP - mp_drain;
// } if (rupee_drain > 0){
// Game->Counter[CR_RUPEES] -= rupee drain;
// Game->PlaySound(insert sfx here);
}
}
Waitframe();
}
}
You can take away the negative effects of the sword if you have another item!
ie, cursed sword untill you beat a boss and get the amulet of remove_curse, then it becomes the master sword!
btw; just remove the // if you want to curse rupees. and fill in the blanks with ID numbers in std.zh
also adjust this; int hp_drain = 1; to whatever you want. ie: int hp_drain = 1,000,000; !
have fun.
#7
Posted 12 September 2007 - 03:50 AM
Increasing health and magic when you hit an enemy should be doable... but truly "draining magic" might not be, because enemies don't have magic meters.
That's just what I've gathered, though.
That's just what I've gathered, though.
#8
Posted 12 September 2007 - 10:08 PM
Increasing health and magic when you hit an enemy should be doable... but truly "draining magic" might not be, because enemies don't have magic meters.
That's just what I've gathered, though.
No no, he's talking about draining Link's magic, cursed weapon style.
That's just what I've gathered, though.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users