Legendary Tales Official Website
News Search:
Home · Articles · Downloads · Discussion Forum · Old Forums (read only) · RegisterAugust 28 2008 04:46:52
Navigation
Home
Articles
Downloads
FAQ
Discussion Forum
Web Links
News
Contact Me
Screenshots
Search
Login
Username

Password

Save



Not a member yet?
Then register.

I forgot my password.

Why register?
Newsletter
Subscribe now to receive important news, game releases and site updates
Buy 3 Skulls only $9.99

Download a demo

Full version download immediately after purchase!

You can also use your credit card without a paypal account.

Visa Mastercard American Express Discover
A Custom Skill Script by JSB
//When used, it will put it's user's mana to 0 and
//create a random item, type of which depends on
//the user's skill level. There is also a change
//of failure. At skill level 6, the skill may
//create healing potions with 50% change of failure.
//At level 12, it may produce healing potions or
//poison pastes with 33% change of failure. At level
//18 it may produce healing potions, poison pastes
//or potions which make the drinker go berserk,
//giving +2 to melee attack and damage, but
//reducing 1 point from melee armor, with 25% change
//of failure. At level 24, it may produce healing
//potions, poison pastes, berserk potions or
//antidotes which purge all poison immediatly and
//without any change of not working, with 20% change
//of failure.

UseLib("def.js");

//Loaded javascript library for SetValue and
//GetValue commands.

//Defining functions that the script at the end
//of the file will call to create items.
//We'll take the last function for an example.

function SkillSix(){
i = Rnd(1,2);
if ( i == 1){
AddItem(9001013);
Echo("\You make a healing potion.")
Echo("\n~A healing potion has been added to your inventory.")
}
else if ( i == 2){
Echo("\You fail to make any items.")
}
return true;
}

function SkillTwelve(){
i = Rnd(1,3);
if ( i == 1){
AddItem(9001013);
Echo("\You make a healing potion.")
Echo("\n~A healing potion has been added to your inventory.")
}
else if ( i == 2){
AddItem(9001012);
Echo("\You make a poison paste.")
Echo("\n~A poison paste has been added to your inventory.")
}
else if ( i == 3){
Echo("\You fail to make any items.")
}
return true;
}

function SkillEighteen(){
i = Rnd(1,4);
if ( i == 1){
AddItem(9001013);
Echo("\You make a healing potion.")
Echo("\n~A healing potion has been added to your inventory.")
}
else if ( i == 2){
AddItem(9001012);
Echo("\You make a poison paste.")
Echo("\n~A poison paste has been added to your inventory.")
}
else if ( i == 3){
AddItem(9001015)
Echo("\You make a berserk potion.")
Echo("\n~A berserk potion has been added to your inventory.")
}
else if ( i == 4){
Echo("\You fail to make any items.")
}
return true;
}

function SkillTwentyFour(){
i = Rnd(1,5); //Roll random number: 1-5
if ( i == 1){ //If the number is 1,
AddItem(9001013); //Make a healing potion.
Echo("\You make a healing potion.")
Echo("\n~A healing potion has been added to your inventory.")
}
else if ( i == 2){
AddItem(9001012); //If it's 2, make a poison paste.
Echo("\You make a poison paste.")
Echo("\n~A poison paste has been added to your inventory.")
}
else if ( i == 3){
AddItem(9001015) //If it's 3, make a... You get the idea.
Echo("\You make a berserk potion.")
Echo("\n~A berserk potion has been added to your inventory.")
}
else if ( i == 4){
AddItem(9001014)
Echo("\You make an antidote.")
Echo("\n~An antidote has been added to your inventory.")
}
else if ( i == 5){ //In case of 5, don't make any items.
Echo("\You fail to make any items.")
}
return true;
}

function OnExecute(){ //When the skill is used
v = Sender.SkillValue("Item Making"); //get the skill value
m = Sender.GetValue(32); //and the mana value of the player.
if (m < 10){ //If mana is less than 10, the skill will do nothing.
Echo("\You do not have enought mana to use this skill.")
}
else if (v < 6){ //Same if the skill value is less than 6.
Echo("\You are not skilled enought to make items.")
}
else if (v < 12){ //If skill value is less than 12 (but more than 6, if it is less, this code will be ignored),
Sender.SetValue(32,0,-1); //set the character's mana to 0
SkillSix(); //and trigger function SkillSix.
}
else if (v < 18){ //Same as above, only with slightly
Sender.SetValue(32,0,-1); //different numbers, and
SkillTwelve(); //function SkillTwelve, you get the picture.
}
else if (v < 24){
Sender.SetValue(32,0,-1);
SkillEighteen();
}
else if (v == 24){
Sender.SetValue(32,0,-1);
SkillTwentyFour();
}
}
Comments
No Comments have been Posted.
Post Comment
Please Login to Post a Comment.
Ratings
Rating is available to Members only.

Please login or register to vote.

Awesome! Awesome! 0% [No Votes]
Very Good Very Good 100% [1 Vote]
Good Good 0% [No Votes]
Average Average 0% [No Votes]
Poor Poor 0% [No Votes]
Play Online Now
Play Now
Requirements and info
Terms of Service
Privacy Policy
RSS Newsfeed
Shoutbox
You must login to post a message.

Throndir
21/08/2008 10:54
Then read this tutorial. http://h1.ripway.com/thro
ndir/Delete After Files/Tutorial.zip


Throndir
21/08/2008 10:51
It depends what you're trying to do. If you want to create a textbased game, download the engine and editor.

jfreak
20/08/2008 02:52
how do i begin smiley?

MrHelem
17/08/2008 15:22
Nevermind, got it figured out.

MrHelem
17/08/2008 04:13
Hey, can anyone tell me how to set up a custom skill so it uses mana? I scanned the tutorials and didn't find anything.

Throndir
10/08/2008 13:33
Or check out legendarytales.wikispaces
.com


Throndir
10/08/2008 13:09
Yes. Post in the forums with your problem.

critchell
09/08/2008 17:46
i need some help with a particular script which adds a new member to a party, can anyone help?

Throndir
05/08/2008 14:24
Legendarytales is a game engine and editor. You basically create textbased games, or hope for any other person to create an adventure so you could play it..

Delphinus
05/08/2008 10:17
You create. Check the 'Downloads' page.

Shoutbox Archive
Copyright www.legendarytales.com © 2001 - 2008

Terms Of Service Privacy Policy
eXTReMe Tracker