Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Snitz Forums 2000 MOD-Group
 MOD Add-On Forum (W/O Code)
 Dice Roller Revisited
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

Kagan
Starting Member

33 Posts

Posted - 08 September 2003 :  21:42:06  Show Profile  Visit Kagan's Homepage  Send Kagan an AOL message  Send Kagan an ICQ Message
I had posted earlier that I was searching for a way to add dice rolling capability in the quick reply area so that the rolls would be posted with the person's reply for my gaming site. I am going to attempt this but I really need to know exactly WHERE things would need changed. The database I assume, but what asp file would I change to show the new options in the quick reply field? I am willing to attempt this but I really need some tips where to start. Any help would be appreciated!

Gremlin
General Help Moderator

New Zealand
7528 Posts

Posted - 09 September 2003 :  03:33:46  Show Profile  Visit Gremlin's Homepage
post.asp and post_info.asp are the main pages used when replying/creating/editing posts etc.

Can you describe a little more what your trying to do, or link to your earlier post if that contains more info please and I'll try and help a little more.

Kiwihosting.Net - The Forum Hosting Specialists
Go to Top of Page

Kagan
Starting Member

33 Posts

Posted - 09 September 2003 :  04:02:43  Show Profile  Visit Kagan's Homepage  Send Kagan an AOL message  Send Kagan an ICQ Message
Here is the link for the previous discussion on this. I am willing to do whatever is needed but help/guidance would be hugely appreciated!
http://forum.snitz.com/forum/topic.asp?TOPIC_ID=46198
Go to Top of Page

Kagan
Starting Member

33 Posts

Posted - 11 September 2003 :  04:03:41  Show Profile  Visit Kagan's Homepage  Send Kagan an AOL message  Send Kagan an ICQ Message
Anyone? Anyone at all? :)
Go to Top of Page

Gremlin
General Help Moderator

New Zealand
7528 Posts

Posted - 11 September 2003 :  08:09:17  Show Profile  Visit Gremlin's Homepage
I'd love to be able to help a little further but I've got a few things I've promised other people to do over the next week or so.

How much ASP knowlege do you have ?

Kiwihosting.Net - The Forum Hosting Specialists
Go to Top of Page

Kagan
Starting Member

33 Posts

Posted - 11 September 2003 :  12:37:36  Show Profile  Visit Kagan's Homepage  Send Kagan an AOL message  Send Kagan an ICQ Message
Not that much, BUT-if someone could show me/tell me WHERE in the post info I could add more fields I would be willing to put the dice rolling area in(buttons for each die etc.) I have an example from another site I play on but that person uses php so obviously some differences. I have the code from that dice rolling technique but need to see how to add to asp and the database itself. I am listing the code here that was on that site. Again I realize this is different but at the same time, I feel the idea should be the same, maybe not??
<br><hr width="100%"><br>
<h1 align="center">Enter Your Message For Emerald Talons</h1><hr align="center" width="37%">

<form method="post" action="http://www.woldiangames.com/include/action/post.php3" name="postForm" onSubmit="return verifyPost(this)">
<table summary="post entry table" align="center" border="0" cellspacing="0" cellpadding="0">
<tr>
<td colspan="3">
<script type="text/javascript">
<!--
// Random number generator from _Numerical Recipes_
function random() {
random.seed = (random.seed * random.a + random.c) % random.m;
return random.seed / random.m;
}
random.m=714025; random.a=4096; random.c=150889;
random.seed = (new Date()).getTime()%random.m;
// End Random number script

function resetEnterForm()
{
document.postForm.post_name.value = "";
document.postForm.die_rolls.value = "";
document.postForm.message.value = "";
}

function isInt(val)
{
var elmstr = val + ""
if (elmstr == "")
{ return false }
for (var i=0; i<elmstr.length; i++)
{
if (elmstr.charAt(i) < "0" || elmstr.charAt(i) > "9")
{ return false }
}
return true
}

function addDieRoll(dieCount, dieSides, modifier, textObject)
{
if (isInt(dieCount) == false)
{ return }
var dieMod = Math.round(modifier)
var text = "";
if (textObject.value)
{ text = " "; }
if (dieCount > 1)
{ text += dieCount + "d" + dieSides }
else
{ text += "d" + dieSides }
if (dieCount > 1)
{ text += "(" }
var total = 0
for (var cnt = 0; cnt < dieCount; cnt++)
{
var roll = Math.floor(dieSides * random()) + 1
total += roll
if (cnt > 0)
{ text += "+" + roll }
else if (dieCount > 1)
{ text += roll }
}
if (dieCount > 1)
{ text += ")" }
if (modifier != 0)
{ text += modifier + "=" + (total+dieMod) }
else
{ text += "=" + total }

if (textObject.value)
{ textObject.value += text }
else
{ textObject.value = text }
}

function showIt(layer, on)
{
if (document.layers)
{ layer.visibility = (on) ? "show" : "hide"; }
else
{ layer.style.visibility = (on) ? "visible" : "hidden"; }
}

function showSegment(el)
{
whichSeg = eval(el+"fields");
showIt(currentseg, false);
showIt(whichSeg, true);
currentseg = whichSeg;
}


// -->
</script>

<input type="hidden" name="gamelink" value="http://www.woldiangames.com///games/index.html?game=ekingdom#MY_LAST_VIEW">
<input type="hidden" name="campaign" value="">
<input type="hidden" name="game" value="ekingdom">
<table summary="post entry form" cellspacing="4" cellpadding="0" border="0" align="center">
<!-- start index controls -->
<!-- end index controls -->

<!-- start post name input -->
<tr>
<td><b>Post Name:</b></td>
<td colspan="2"><input type="text" name="post_name" size="48" wrap="virtual"></td>
</tr>
<!-- end die rolls input -->
<!-- start die rolls input -->
<tr>
<td><b>Die Rolls:</b></td>
<td colspan="2">
<textarea name="die_rolls" rows="2" cols="48" wrap="virtual" noTab onFocus="document.postForm.post_name.focus()"></textarea>
</td>
</tr>
<tr>
<td> </td>
<td><b>Click&Roll:</b></td>
<td>
<input type="button" value="d100" onClick="addDieRoll(1, 100, 0, document.postForm.die_rolls)"> 
<input type="button" value="d20" onClick="addDieRoll(1, 20, 0, document.postForm.die_rolls)"> 
<input type="button" value="d12" onClick="addDieRoll(1, 12, 0, document.postForm.die_rolls)"> 
<input type="button" value="d10" onClick="addDieRoll(1, 10, 0, document.postForm.die_rolls)"> 
<input type="button" value="d8" onClick="addDieRoll(1, 8, 0, document.postForm.die_rolls)"> 
<input type="button" value="d6" onClick="addDieRoll(1, 6, 0, document.postForm.die_rolls)"> 
<input type="button" value="d4" onClick="addDieRoll(1, 4, 0, document.postForm.die_rolls)"> 
<input type="button" value="d3" onClick="addDieRoll(1, 3, 0, document.postForm.die_rolls)"> 
<input type="button" value="d2" onClick="addDieRoll(1, 2, 0, document.postForm.die_rolls)"> 
</td>
</tr>
<tr>
<td> </td>
<td><b>MultiRoll:</b></td>
<td>
<input type="text" size="3" name="numDie" value="1">
<select name="dieSides" size="1">
<option value="100"> d100<option selected value="20"> d20<option value="12"> d12<option value="10"> d10<option value="8"> d8<option value="6"> d6<option value="4"> d4<option value="3"> d3<option value="2"> d2 </select>
<select name="dieMod" size="1">
<option value=-20>-20<option value=-19>-19<option value=-18>-18<option value=-17>-17<option value=-16>-16<option value=-15>-15<option value=-14>-14<option value=-13>-13<option value=-12>-12<option value=-11>-11<option value=-10>-10<option value=-9>-9<option value=-8>-8<option value=-7>-7<option value=-6>-6<option value=-5>-5<option value=-4>-4<option value=-3>-3<option value=-2>-2<option value=-1>-1<option selected value=+0>+0<option value=+1>+1<option value=+2>+2<option value=+3>+3<option value=+4>+4<option value=+5>+5<option value=+6>+6<option value=+7>+7<option value=+8>+8<option value=+9>+9<option value=+10>+10<option value=+11>+11<option value=+12>+12<option value=+13>+13<option value=+14>+14<option value=+15>+15<option value=+16>+16<option value=+17>+17<option value=+18>+18<option value=+19>+19<option value=+20>+20<option value=+21>+21<option value=+22>+22<option value=+23>+23<option value=+24>+24<option value=+25>+25<option value=+26>+26<option value=+27>+27<option value=+28>+28<option value=+29>+29<option value=+30>+30<option value=+31>+31<option value=+32>+32<option value=+33>+33<option value=+34>+34<option value=+35>+35<option value=+36>+36<option value=+37>+37<option value=+38>+38<option value=+39>+39<option value=+40>+40<option value=+41>+41<option value=+42>+42<option value=+43>+43<option value=+44>+44<option value=+45>+45<option value=+46>+46<option value=+47>+47<option value=+48>+48<option value=+49>+49<option value=+50>+50 </select>
<input type="button" value="Roll" onClick="addDieRoll(postForm.numDie.value, postForm.dieSides.options[postForm.dieSides.selectedIndex].value, postForm.dieMod.options[postForm.dieMod.selectedIndex].value, postForm.die_rolls)">
</td>
</tr>
<!-- end die rolls input -->
<!-- start message input -->
<tr>
<td><b>Message:</b></td>
<td colspan="2"><textarea name="message" rows="9" cols="48" wrap="virtual"></textarea></td>
</tr>
<tr>
<td colspan="3" align="center">
<input type="checkbox" notab name="privatePost" value="ON"><b>Post Private to DMs</b>
</td>
</tr>
<!-- end message input -->
</table>
</td>
</tr>
<tr>
<td valign="center" align="center" colspan="3">
<input type="submit" notab value="Submit">        
<input type="button" notab value="Reset" onClick="resetForm()">
<br> 
</td>
</tr>
</table>
</form>



Go to Top of Page

Gremlin
General Help Moderator

New Zealand
7528 Posts

Posted - 12 September 2003 :  09:20:02  Show Profile  Visit Gremlin's Homepage
inc_post_buttons.asp is where all the buttons on the post page are coded.

Kiwihosting.Net - The Forum Hosting Specialists
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.31 seconds. Powered By: Snitz Forums 2000 Version 3.4.07