View Full Version : Mangos_AVS Vote & Reward System
borgotech
04-21-2009, 08:35 AM
Hi, this my first release on Ac-Web. Here is "Vote & Reward System" for Mangos. It's based on AVS structure and was moded by me to be compatible with Mangos. You can download from here (http://e790ab3f.linkbucks.com).
Credits to: 1337d00d the creator of AVS and to Borgotech (http://ebdce4da.linkbucks.com) for moding.
LIVE DEMO (http://ebdce4da.linkbucks.com)
Sryy for my poor English
charuga
04-22-2009, 04:15 PM
Please download link
September
04-22-2009, 08:34 PM
:Dwow I think you are the first to release this! awesome will test, thanks plus rep!
if85myh
04-22-2009, 09:34 PM
there is a problem, i receive in-game mail with the body there is no info about that item or something like that but no item in the mail attachement
mako1
04-22-2009, 10:36 PM
avs creator = 1337d00d why do so many people not know this....
borgotech
04-23-2009, 12:01 AM
avs creator = 1337d00d why do so many people not know this....
Thank you ..... now i edit my post to give to 1337d00d credits for AVS
there is a problem, i receive in-game mail with the body there is no info about that item or something like that but no item in the mail attachement
yes...there is a problem with atachaments (i dont why...becouse on my server work fine)..srry i will re upload the file....
When i re upload i will post here.....
if85myh
04-23-2009, 06:56 AM
I hope you will repuload soon because i was looking for a vote and reward system for mangos for a long time!
Still nothing?
September
04-26-2009, 06:32 PM
Yes a Fix would be great i hope someone can take a look at this and figure out what we need to do.
Also i am unsure of the reward_points field i guess i need to set a default value as i was getting an error after i added the field and then was unable to also create accounts because of it. Can someone help me with that also ? Thanks Plus Rep Of Course to people that help on this, Been looking for this for a while!
if85myh
05-04-2009, 07:20 AM
Is this dead or what?
Maggim
05-04-2009, 01:49 PM
Nah... Isn't dead =) ... Did you wait 20 seconds for LinkBux to show "Skip Ad" ? ;) ... I downloaded now... Thx!! =)
Crilleftw
05-04-2009, 03:16 PM
I'm sure this is an awesome upload, is anyone trying to solve the 'there is no info about that item' problem? That'd be sweet.
if85myh
05-04-2009, 09:16 PM
I do not think a fix will came up very soon, i am waiting for more than a week for someone who can fix it, but... :(
stefanhaan
05-07-2009, 02:16 PM
When i try to log in i get this error:
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in C:\Apache\Apache2\htdocs\vote\pages\login.php on line 76
Login failed.
if85myh
05-07-2009, 07:44 PM
don't bother retrying no one will came it a fix. this topic seems to be dead.
September
05-11-2009, 05:15 PM
well that really is too bad that more people are not interested in all the emu's, it seems so many only use the others and not mangos so no one is interested in this project. This is so great and would be so usefull to so many. If anyone can Fix this Please help us Out here PLZZZZZZZ haha ! +rep from me thats FOR SURE!
karal
05-19-2009, 09:34 AM
all AVS Vote & Reward System
always have the same problem in the same thing though, I have cloth cloth you have not run
error55o
05-30-2009, 04:16 AM
CREATE TABLE `realms` (
`id` int(10) unsigned NOT NULL auto_increment,
`name` varchar(32) default NULL,
`sqlhost` varchar(32) default NULL,
`sqluser` varchar(32) default NULL,
`sqlpass` varchar(32) default NULL,
`chardb` varchar(32) default NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=latin1;
CREATE TABLE `votemodules` (
`id` int(10) unsigned NOT NULL auto_increment,
`name` varchar(32) default NULL,
`image` varchar(128) default NULL,
`url` varchar(128) default NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=latin1;
CREATE TABLE `voterewards` (
`id` int(10) unsigned NOT NULL auto_increment,
`realm` tinyint(3) unsigned default NULL,
`name` varchar(32) default NULL,
`description` text,
`itemid` int(10) unsigned default NULL,
`points` tinyint(3) unsigned default NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1;
CREATE TABLE `votes` (
`ip` varchar(16) default NULL,
`account` varchar(16) default NULL,
`module` tinyint(3) unsigned default NULL,
`time` int(11) default NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
erm, not a valid sql database :confused: can some one post a sql export please, preferably for Navicat, I cant get any progress on this due to that problem
if85myh
05-31-2009, 10:15 PM
do not bother, it isn't working anyway
error55o
05-31-2009, 11:13 PM
do not bother, it isn't working anyway
oh, thats too bad, it was simple and looked good :(
Merlino
06-01-2009, 11:44 AM
like your site can make download?
an7r1x
07-20-2009, 07:04 PM
BUG : it dosnt send the items to the mail box ...
:(
cosminelu16
07-21-2009, 08:56 AM
this is because telnet thing if you want o send items ingame you must use telnet command for mangos i have the working script ;))
an7r1x
07-21-2009, 11:03 AM
so were can i get telnet ?
prime95
07-21-2009, 03:37 PM
Why does ajax not work??
They says "Your browser is outdated."
How can I fix thix?
I use FireFox, but with IE it doesn't work also.
This is the reward script
<?php
class Rewards
{
function Title()
{
?>
Rewards
<?php
}
function GetRealmData()
{
//Get data to use in the form.
$Con = mysql_connect(MYSQL_HOST,MYSQL_USER,MYSQL_PASS,tru e);
mysql_select_db(MYSQL_DB,$Con);
$RealmInfo = "{";
//get each realm
$res = mysql_query("SELECT id,name,sqlhost,sqluser,sqlpass,chardb FROM realms",$Con);
echo mysql_error();
while($Row = mysql_fetch_array($res))
{
$RealmInfo .= $Row['id'].":{name:\"".$Row['name']."\"},";
}
if(strlen($Realminfo) > 1)
$RealmInfo = substr($RealmInfo,0,strlen($RealmInfo)-1)."}";
else
$RealmInfo .='}';
mysql_close($Con);
return $RealmInfo;
}
function GetCharData()
{
//get data that will be used to select the character.
$Con = mysql_connect(MYSQL_HOST,MYSQL_USER,MYSQL_PASS,tru e);
mysql_select_db(MYSQL_DB,$Con);
$CharInfo = "{";
$Index = 0;
$res = mysql_query("SELECT id,sqlhost,sqluser,sqlpass,chardb FROM realms");
while($Row = mysql_fetch_array($res))
{
$Con2 = mysql_connect($Row['sqlhost'],$Row['sqluser'],$Row['sqlpass'],true);
mysql_select_db($Row['chardb'],$Con2);
// $res2 = mysql_query("SELECT guid,name FROM characters WHERE acct = '{$_SESSION['vcp']['id']}'",$Con2);
$res2 = mysql_query("SELECT guid,name FROM characters WHERE account = '{$_SESSION['vcp']['id']}'",$Con2);
while($Row2 = mysql_fetch_array($res2))
{
$CharInfo .= $Index.":{guid:".$Row2['guid'].",realm:".$Row['id'].",name:\"".$Row2['name']."\"},";
$Index++;
}
mysql_close($Con2);
}
if(strlen($Charinfo) > 1)
$CharInfo = substr($CharInfo,0,strlen($CharInfo)-1)."}";
else
$CharInfo .='}';
mysql_close($Con);
return $CharInfo;
}
function GetRewardData()
{
//rewards.. etc.
$Con = mysql_connect(MYSQL_HOST,MYSQL_USER,MYSQL_PASS,tru e);
mysql_select_db(MYSQL_DB,$Con);
$RewardInfo = "{";
$res = mysql_query("SELECT id,realm,name,description,points FROM voterewards");
while($Row = mysql_fetch_array($res))
{
$RewardInfo .= $Row['id'].":{realm:".$Row['realm'].",name:\"".$Row['name']."\",description:\"".$Row['description']."\",cost:".$Row['points']."},";
}
if(strlen($Rewardinfo) > 1)
$RewardInfo = substr($RewardInfo,0,strlen($RewardInfo)-1)."}";
else
$RewardInfo .='}';
$RewardInfo = str_replace("\r\n","<br />",$RewardInfo);
mysql_close($Con);
return $RewardInfo;
}
function Form()
{
?>
<table>
<tr>
<td valign="top">
<table cellspacing="2px">
<tr valign="top">
<td colspan="2">Select A Reward</td>
</tr>
<tr valign="top">
<td>Points:</td>
<td><span id="points"><?php echo $_SESSION['vcp']['points']; ?></span></td>
</tr>
<tr valign="top">
<td width="75px">Realm:</td>
<td><select name="realm" id="realm" size="1" style="width:150px;" onchange="getCharacters(); getRewards();"><option value="0">Your browser is outdated.</option></select></td>
</tr>
<tr valign="top">
<td>Character:</td>
<td><select name="character" id="character" size="1" style="width:150px;"><option value="0">Your browser is outdated.</option></select></td>
</tr>
<tr valign="top">
<td>Reward:</td>
<td><select name="reward" size="1" id="reward" style="width:150px;" onchange="getInfo();"><option value="0">Your browser is outdated.</option></select></td>
</tr>
<tr valign="top">
<td>Cost:</td>
<td><span id="cost"></span> reward points</td>
</tr>
<tr valign="top">
<td colspan="2" align="right"><input id="purchase" type="button" value="Purchase" onclick="onPurchase();" /></td>
</tr>
</table>
</td>
<td valign="top">
<div id="description" style="width:200px; height:200px; border:#000000 solid 1px; padding:2px;"></div>
</td>
</tr>
</table>
<script type="text/javascript">
var Realm = document.getElementById("realm");
var Character = document.getElementById("character");
var Reward = document.getElementById("reward");
var Description = document.getElementById("description");
var Cost = document.getElementById("cost");
var Points = document.getElementById("points");
var Purchase = document.getElementById("purchase");
var Realms = <?php echo $this->GetRealmData(); ?>;
var Characters = <?php echo $this->GetCharData(); ?>;
var Rewards = <?php echo $this->GetRewardData(); ?>;
var PointCount = <?php echo $_SESSION['vcp']['points']; ?>;
function getCharacters()
{
var i=0;
Character.options.length = 0;
for(var r in Characters)
{
if(Characters[r].realm == parseInt(Realm.value))
{
Character.options[i] = new Option(Characters[r].name,Characters[r].guid);
i++;
}
}
}
function getRewards()
{
var i=0;
Reward.options.length = 0;
for(var r in Rewards)
{
if(Rewards[r].realm == parseInt(Realm.value))
{
Reward.options[i] = new Option(Rewards[r].name,r);
i++;
}
}
getInfo();
}
function getInfo()
{
Description.innerHTML = Rewards[Reward.value].description;
Cost.innerHTML = Rewards[Reward.value].cost;
}
function onPurchase()
{
if(Character.options.length == 0)
{
alert("You don't have a character on that realm!");
return false;
}
if(Rewards[Reward.value].cost > PointCount)
{
alert("You don't have enough points!");
return false;
}
if(!confirm("Are you sure you wish to spend\r\n"+Rewards[Reward.value].cost+" reward points?"))
return false;
Purchase.disabled = true;
var R;
var Sub = Rewards[Reward.value].cost;
if(window.XMLHttpRequest)
{
R = new XMLHttpRequest();
}
else if(window.ActiveX)
{
R = new ActiveXObject("Microsoft.XMLHTTP");
}
R.onreadystatechange = function()
{
if(R.readyState == 4)
{
Purchase.disabled = false;
if(R.responseText != "1")
{
alert("Transaction failed:\r\n"+R.responseText);
}
else
{
PointCount -= Sub;
Points.innerHTML = PointCount;
}
}
}
R.open("POST","?act=spend",true);
var params = "realm="+Realm.value+"&reward="+Reward.value+"&character="+Character.value;
R.setRequestHeader("Content-type","application/x-www-form-urlencoded");
R.setRequestHeader("Content-length",params.length);
R.setRequestHeader("Connection","close");
R.send(params);
}
function Initialize()
{
// Setup realm list, char list, etc.
var i = 0;
for(var r in Realms)
{
Realm.options[i] = new Option(Realms[r].name,r);
i++;
}
i=0;
for(var r in Characters)
{
if(Characters[r].realm == parseInt(Realm.value))
{
Character.options[i] = new Option(Characters[r].name,Characters[r].guid);
i++;
}
}
i=0;
for(var r in Rewards)
{
if(Rewards[r].realm == parseInt(Realm.value))
{
Reward.options[i] = new Option(Rewards[r].name,r);
i++;
}
}
getCharacters();
getRewards();
getInfo();
}
Initialize();
</script>
<?php
}
function Content()
{
$this->Form();
}
function __construct()
{
include("html/main.php");
}
}
?>
Dude My vote page works, except when you vote you never get a point. Otherwise it is fine. Oh...and when you get mailed the item it's always something different than what ID you typed in. FIX please? Lol i need this
RoyalatY
11-08-2009, 01:00 PM
Link = Spam!
DataBase379
07-20-2010, 08:14 PM
Download link please!
Drikish
07-20-2010, 09:12 PM
Wow, you really fail epicly.
Your live demo leads to link bucks.
You're trying to make money by releasing shit? Get a life.
Also, the vote system blows.
fullmetalalki
07-21-2010, 01:46 AM
did you not notice that this was released a year ago?
cajkan
07-23-2010, 06:06 PM
Pls someone reupload
bump bump bump
vBulletin® v3.8.7, Copyright ©2000-2012, vBulletin Solutions, Inc.