Welcome Guest [Log In] [Register]
We hope you enjoy your visit.

You're currently viewing our forum as a guest. This means you are limited to certain areas of the board and there are some features you can't use. If you join our community, you'll be able to access member-only sections, and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free.


Join our community!


If you're already a member please log in to your account to access all of our features:

Username:   Password:
Add Reply
Basic Battle Script
Topic Started: Sep 26 2009, 06:24 PM (217 Views)
Will
Member Avatar


This code has been moved here from our old support forum (as it will soon no longer exist at it's current location).
Please use the report button on this post to notify our staff of any problem with this modification.


Originally posted by: jediman
Basic Battle Script
 
Name: Battle Script V1
Made by: Jediman, and with basically everything from the help of ZB Support Community
Next Version: Two, but it will not be released.
Here's the stuff
Code:
 

<script type="text/javascript">
// Made by Jediman, most of coding, done by the help of Zeta Boards members, cause I am garbage. THANKS!
// YOUR not allowed to redistribute, or post it anywhere EVER.
// Made for http://hprp.divinusdies.net/
$(function() {
$('#c_bbcode button:first').before($(document.createElement('button')).attr({ type: 'button', name: 'Cast Spell' }).text('Cast Spell').click(function () {
var outcome = "Your Spell was "+Math.floor(Math.random()*100)+" Percent Successful.";
$('#c_post-text').append(outcome);
}));
});
</script>

Description: This code is a battle script, simple as that. It is sucky, as it is beta, v1. I will improve the free version a little more, before I drop it and develop it for my sites only.


This can be used for multiple reasons, mostly role play. What this does, is create a button, that the user clicks to randomly generate a percent of how succsessful their attack was.

Here is what it would look like:
{my
Rp
would
go here rping the attack}
Your Spell Cast was 100 percent sucsessful!

And thats all it does for the moment.
Online Profile Quote Post Goto Top
 
EdgeMirror
Member
[ *  *  * ]
Forget what I asked. The code is working now.
Edited by EdgeMirror, Oct 31 2009, 11:30 AM.
Offline Profile Quote Post Goto Top
 
pritamsingh98
Member
[ * ]
thanx for sharing
Offline Profile Quote Post Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
« Previous Topic · Code & Modification Database · Next Topic »
Add Reply