- Joined
- Aug 12, 2010
- Messages
- 81
- Reaction score
- 3
Hey ragezoners.
I've been trieing to edit the voting script to let ppl choose their own rewards for voting.
I used the scripts from this guy: http://forum.ragezone.com/f457/best-voting-script-will-find-647777/
I've made this:
vote.php
And i got this in the config where which contains the items that get send:
inc.config.php
But if someone choses the amps they will get the holy scroll because it's the lowest thing on the list. So i have to let the script know that it has the sent the amp if someone choses the amp and the holy if they choose the holy.
Other stuff that i did change or could be used:
class.vote.php
and this:
vote.js file
I hope you guys can help me asap with this problem.
Thanks
I've been trieing to edit the voting script to let ppl choose their own rewards for voting.
I used the scripts from this guy: http://forum.ragezone.com/f457/best-voting-script-will-find-647777/
I've made this:
vote.php
PHP:
<script type="text/javascript" src="vote/js/jquery.js"></script>
<script type="text/javascript" src="vote/js/vote.js"></script>
<div id="et_vbutton" onclick="etLiteGetVoteDialog();" style="background-image: url('vote/images/votenow.png'); text-align: center; width: 250px; height: 150px; position: absolute; top: 0px; right: 20px; cursor: pointer;">
<div id="et_vcharenter" style="background-color: #F8F8F8; margin: 10px auto; width: 200px; height: 140px; text-align: center; display: none;">
Character Name:<br/>
<input type="text" id="etCharField"/><br/>
<br>Select Reward Item:<br>
<select name="etItemField" id="etItemField">
<option value="1">3x Amplification ES (S) </option>
<option value="2">2x Scroll of Resurrection</option>
<option value="3">2x Scroll of Holy</option>
</select>
<input type="submit" id="etCharSubmit" onclick="etLiteDoVoteDialog();" value="Vote!"/>
And i got this in the config where which contains the items that get send:
inc.config.php
PHP:
$voteReward = array("itemName" => "Scroll of Experience ES (S)", "itemId" => 30148, "itemAmount" => 3);
$voteReward = array("itemName" => "Scroll of Resurrection", "itemId" => 10431, "itemAmount" => 2);
$voteReward = array("itemName" => "Scroll of Holy", "itemId" => 10426, "itemAmount" => 2);
Other stuff that i did change or could be used:
class.vote.php
PHP:
public function sendItem( $etCharacter )
{
global $mssqlCharacterDBF;
global $voteReward;
$rewardId = $voteReward['itemId'];
$rewardName = $voteReward['itemName'];
$rewardAmount = $voteReward['itemAmount'];
$etCharacter = $this->mssql_escape_string($etCharacter);
$etItem = $this->mssql_escape_string($etItem);
vote.js file
var etVoteCharacter = escape(encodeURI(document.getElementById("etCharField").value));
var etVoteItem = escape(encodeURI(document.getElementById("etItemField").value));
I hope you guys can help me asap with this problem.
Thanks
Last edited:


