• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

TalkAction Bounty Hunters System (Player Hunt System)

Code:
[17/06/2009 12:50:59] Lua Script Error: [TalkAction Interface] 
[17/06/2009 12:50:59] data/talkactions/scripts/bh-add.lua:onSay

[17/06/2009 12:50:59] data/talkactions/scripts/bh-add.lua:6: attempt to call field 'explode' (a nil value)
[17/06/2009 12:50:59] stack traceback:
[17/06/2009 12:50:59] 	data/talkactions/scripts/bh-add.lua:6: in function <data/talkactions/scripts/bh-add.lua:1>
 
bump ...

so? no ideas?

A simple PHP script made by me. Just make a new file in your webserver and add this code, name it to "something.php".

Code:
<?php
$user = "root";
$pass = "pass";

$con = mysql_connect("localhost",$user,$pass);
if (!$con)
  {
  die('Could not connect: ' . mysql_error());
  }

mysql_select_db("otserv", $con);

$result = mysql_query("SELECT * FROM bounty_hunters ORDER BY `added`");

for($i = 1; $row = mysql_fetch_array($result); $i++)
{
  $playerid[$i] = $row['sp_id'];
  $prize[$i] = $row['prize'];
}

$i++;

while($i != 0) 
{
  $result = mysql_query("SELECT * FROM players WHERE id='$playerid[$i]'");
  while($row = mysql_fetch_array($result))
  {
    echo $row['name'] . " " . $prize[$i] . " K";
    echo "<br />";
  }
  $i--;
}


mysql_close($con);
?>
 
Yakushi, change the first lines:
mysql_connect("host","user","password");
mysql_select_db("database");

There you must change this to your database settings.
 
A simple PHP script made by me. Just make a new file in your webserver and add this code, name it to "something.php".

Code:
<?php
$user = "root";
$pass = "pass";

$con = mysql_connect("localhost",$user,$pass);
if (!$con)
  {
  die('Could not connect: ' . mysql_error());
  }

mysql_select_db("otserv", $con);

$result = mysql_query("SELECT * FROM bounty_hunters ORDER BY `added`");

for($i = 1; $row = mysql_fetch_array($result); $i++)
{
  $playerid[$i] = $row['sp_id'];
  $prize[$i] = $row['prize'];
}

$i++;

while($i != 0) 
{
  $result = mysql_query("SELECT * FROM players WHERE id='$playerid[$i]'");
  while($row = mysql_fetch_array($result))
  {
    echo $row['name'] . " " . $prize[$i] . " K";
    echo "<br />";
  }
  $i--;
}


mysql_close($con);
?>



okay i made it. but how can i see now which player is hunted atm?
cuz i made one of my players hunted but no one could see it ...

can u help?
oh well right, i made that script ...
--> C:\xampp\mysql\data\MYRPGFOLDER and theres the .php file (named: bounty_hunters.php)

i dont know if this is a problem that i named the file like the script (script in sql.db: bounty_hunters ; file: bounty_hunters.php). It doesnt shows any error in console ...


Im using --> TFS 0.4.x Crying Damson Patch Level 2
 
Can someone have a look at this please

Warning: include(bounty-hunters.php) [function.include]: failed to open stream: No such file or directory in C:\xampp\htdocs\index.php on line 130

Warning: include() [function.include]: Failed opening 'bounty-hunters.php' for inclusion (include_path='.;C:\xampp\php\pear\') in C:\xampp\htdocs\index.php on line 130


Thanks!
 
Warning: include(bounty-hunters.php) [function.include]: failed to open stream: No such file or directory in C:\xampp\htdocs\index.php on line 130

Warning: include() [function.include]: Failed opening 'bounty-hunters.php' for inclusion (include_path='.;C:\xampp\php\pear\') in C:\xampp\htdocs\index.php on line 130


Thanks!

are you serious?
 
The bountys don't clear after someone kills them on your page.

A simple PHP script made by me. Just make a new file in your webserver and add this code, name it to "something.php".

Code:
<?php
$user = "root";
$pass = "pass";

$con = mysql_connect("localhost",$user,$pass);
if (!$con)
  {
  die('Could not connect: ' . mysql_error());
  }

mysql_select_db("otserv", $con);

$result = mysql_query("SELECT * FROM bounty_hunters ORDER BY `added`");

for($i = 1; $row = mysql_fetch_array($result); $i++)
{
  $playerid[$i] = $row['sp_id'];
  $prize[$i] = $row['prize'];
}

$i++;

while($i != 0) 
{
  $result = mysql_query("SELECT * FROM players WHERE id='$playerid[$i]'");
  while($row = mysql_fetch_array($result))
  {
    echo $row['name'] . " " . $prize[$i] . " K";
    echo "<br />";
  }
  $i--;
}


mysql_close($con);
?>
 
Everything is working perfect for me but there is one error in the console that are very annoying.

[13/07/2009 16:15:57] Lua Script Error: [TalkAction Interface]
[13/07/2009 16:15:57] data/talkactions/scripts/bh-add.lua: onSay

[13/07/2009 16:15:57] data/talkactions/scripts/bh-add.lua:13: attempt to concatenate global 'sp_id' (a nil value)
[13/07/2009 16:15:57] stack traceback:
[13/07/2009 16:15:57] data/talkactions/scripts/bh-add.lua:13: in function <data/talkactions/scripts/bh-add.lua:1>

I dont know when it comes, what the players are doing but maybe someone here just can read the error and solve it? Cuz I tried but cant :(

Im using TFS 0.3.4 if someone is wondering :)

Thanks anyway!

Yours Suxex/
 
Back
Top