#17083 - 04/05/08 11:49 AM
Create a Signature to promote your DS game
|
Ignacio
Grape Nuts
Registered: 08/26/07
Posts: 25
|
Offline
|
|
I was thinking if any one know haw to do a link, that the players gives to other person and when they enter the players gets something like ore or experience and the other know the game. Like Bitefight or others games, its a way to promote and encourege people to play your game.
Thanks
|
|
Top
|
|
|
#17089 - 04/07/08 04:20 PM
Re: Create a Signature to promote your DS game
[Re: Ignacio]
|
Whiz
Cheerios
Registered: 10/28/07
Posts: 129
|
Offline
|
|
You could use sigbot.php as a jumping-off point.
http://timedg.freehostia.com/dragonknight/sigbot.php?id=1
Just edit sigbot.php to then do an sql update to user the appropriate user id to add coin per click, or something.
Edited by Whiz (04/07/08 04:22 PM)
|
|
Top
|
|
|
#17090 - 04/07/08 05:08 PM
Re: Create a Signature to promote your DS game
[Re: Whiz]
|
Ignacio
Grape Nuts
Registered: 08/26/07
Posts: 25
|
Offline
|
|
I have the problem that i cant see none of your links, but i understad the star point using sigbotª
|
|
Top
|
|
|
#17114 - 04/11/08 08:50 AM
Re: Create a Signature to promote your DS game
[Re: Ignacio]
|
Dragonking
Grape Nuts
Registered: 12/09/06
Posts: 39
|
Offline
|
|
I made a basic refer system. It works. You can make your own template around it. I’m planning to include the register so a person can register on the refer page.
CREATE FILE: refer.php
<?php
// Dragon Scourge
//
// Program authors: Jamin Blount
// Copyright (C) 2007 by renderse7en
// Script Version 1.0 Beta 5 Build 20
// You may not distribute this program in any manner, modified or
// otherwise, without the express, written consent from
// renderse7en.
//
// You may make modifications, but only for your own use and
// within the confines of the Dragon Scourge License Agreement
// (see our website for that).
include("lib.php");
// Get a bunch of stuff.
if (isset($_GET["ref"]) && is_numeric($_GET["ref"])) { $ref = $_GET["ref"]; }
if (!isset($ref)) { die(); }
$userrow = dorow(doquery("SELECT *, UNIX_TIMESTAMP(onlinetime) AS fonlinetime FROM <<users>> WHERE id='$ref' LIMIT 1"));
if (!$userrow) { die(); }
$gold = $userrow["gold"] + 25;
$query = doquery("UPDATE <<users>> SET gold='$gold' WHERE id='$ref' LIMIT 1");
?>
As you can see, this updates the users gold with 25. You can change this to hp, mp, tp or the amount to 100.
OPEN FILE: users.php SEARCH:
if ($controlrow["showsigbot"] == 1) {
$sigboturl = $controlrow["gameurl"] . "sigbot/" . $userrow["id"] . ".png";
$b["sigboturl"] = "SigBot URL: <a href=\"$sigboturl\" target=\"_new\">$sigboturl</a><br />";
} else {
$b["sigboturl"] = "";
}
COPY beneath:
$referalurl = $controlrow["gameurl"] . "us/" . $userrow["id"] . ".png";
$b["sigboturl"] = "SigBot URL: <a href=\"$sigboturl\" target=\"_new\">$sigboturl</a><br />";
OPEN FILE templates/users_charlistrow.php SEARCH
PLACE BENEATH
Keep in mind this is just a basic system. You can cheat by refreshing the refer page several times. Also the player can visit the page to increase it’s own gold. The page is blank... I only spend like 30 minutes to code this. You can edit if you want. Like I said earlier I’m going to include the register file. You can make a little story (like bite fight). It’s just to show you how to make such a thing. Yes, the mod needs a lot editing.
Thanks to Whiz for the idea of using the sigbot file as the basic file.
|
|
Top
|
|
|
#17115 - 04/11/08 10:17 AM
Re: Create a Signature to promote your DS game
[Re: Dragonking]
|
gamefreak888
Rice Krispies
Registered: 09/06/07
Posts: 215
|
Offline
|
|
It's not working. When I go to index.php?do=characters, I see the following:
{{referalurl}}
I'm 100% sure I've followed your instructions correctly and uploaded users.php and refer.php.
|
|
Top
|
|
|
#17116 - 04/11/08 10:37 AM
Re: Create a Signature to promote your DS game
[Re: gamefreak888]
|
Dragonking
Grape Nuts
Registered: 12/09/06
Posts: 39
|
Offline
|
|
In users this is wrong:
$referalurl = $controlrow["gameurl"] . "us/" . $userrow["id"] . ".png"; $b["sigboturl"] = "SigBot URL: <a href=\"$sigboturl\" target=\"_new\">$sigboturl</a><br />";
it should be:
$referalurl = $controlrow["gameurl"] . "refer.php?ref=" . $userrow["id"] ; $b["referalurl"] = "Referal URL: <a href=\"$referalurl\" target=\"_new\">$referalurl</a><br />";
I don't know why it was wrong in my last post. It was mixed with the sigbot code.
Edited by Dragonking (04/11/08 10:38 AM)
|
|
Top
|
|
|
#17117 - 04/11/08 12:59 PM
Re: Create a Signature to promote your DS game
[Re: Dragonking]
|
Ignacio
Grape Nuts
Registered: 08/26/07
Posts: 25
|
Offline
|
|
Thanks, its unbeliable that you monly spend 30 minutes... i hope to know as much as you guys...
|
|
Top
|
|
|
#17118 - 04/11/08 01:06 PM
Re: Create a Signature to promote your DS game
[Re: Dragonking]
|
Ignacio
Grape Nuts
Registered: 08/26/07
Posts: 25
|
Offline
|
|
It works for me, but when the player enters to the referal link, the web is blank, but to the character adss 25 of gold
|
|
Top
|
|
|
#17119 - 04/11/08 02:18 PM
Re: Create a Signature to promote your DS game
[Re: Ignacio]
|
Dragonking
Grape Nuts
Registered: 12/09/06
Posts: 39
|
Offline
|
|
Yes. I'v I knew how to include the template (I know how to but it gives an error about lib.php(2) or something), it would look a lot better.
Ignacio: It's a simple code: the first part is copied from the sigbot file, but I edited to be ref=(id) instead of id=(id) (simple) and the second part is just an query to update users.
|
|
Top
|
|
|
#17120 - 04/11/08 02:22 PM
Re: Create a Signature to promote your DS game
[Re: Ignacio]
|
OrEz
Grape Nuts
Registered: 03/28/08
Posts: 26
|
Offline
|
|
You can try make an redirect to register, after the referal code.
You can try something like :" you have been bitten by [$name] and he steel's from you [$gold]" "Click here to register" or after 5 secundes 10, redirects you to register. Its just an ideea.
Edit:
For some bugs like refresh the link gives you gold you can kill that process by adding a function line like : "if [$ip][$CharName] acces kill bitelink acces" and for multi click by proxyies, it can help an times wait funcion
Edited by OrEz (04/11/08 02:37 PM)
|
|
Top
|
|
|
#17121 - 04/11/08 02:33 PM
Re: Create a Signature to promote your DS game
[Re: OrEz]
|
Dragonking
Grape Nuts
Registered: 12/09/06
Posts: 39
|
Offline
|
|
Yeah It's possible to do, but like I said in my previous post, I don't know how to include the template. A blank page with the text only scare people off.
|
|
Top
|
|
|
#17122 - 04/11/08 04:47 PM
Re: Create a Signature to promote your DS game
[Re: Ignacio]
|
OrEz
Grape Nuts
Registered: 03/28/08
Posts: 26
|
Offline
|
|
<?php
include("lib.php");
include("globals.php");
// Get a bunch of stuff.
if (isset($_GET["ref"]) && is_numeric($_GET["ref"])) { $ref = $_GET["ref"]; }
if (!isset($ref)) { die(); }
$userrow = dorow(doquery("SELECT *, UNIX_TIMESTAMP(onlinetime) AS fonlinetime FROM <<users>> WHERE id='$ref' LIMIT 1"));
if (!$userrow) { die(); }
$gold = $userrow["gold"] + 1;
$query = doquery("UPDATE <<users>> SET gold='$gold' WHERE id='$ref' LIMIT 1");
$page = "back to<a href=\"index.php\">game</a>.";
display("Refer", $page);
?>
The first bug is: The victim Must have an account register and to be logged in to access the refer link and give gold. If the victim it's not logged in , they will automate be redirect to login page. Any fix?
Need to be accessed if you don't have an account registered , and give gold to the refer.
Edited by OrEz (04/11/08 05:15 PM)
|
|
Top
|
|
|
#17128 - 04/13/08 10:10 AM
Re: Create a Signature to promote your DS game
[Re: OrEz]
|
Dragonking
Grape Nuts
Registered: 12/09/06
Posts: 39
|
Offline
|
|
Delete this: include("globals.php"); but then it appears if you are the player. you can easly edit this by doinf this: Replace the $userrow line with: $userrow2 = dorow(doquery("SELECT gold FROM <<users>> WHERE id='$ref' LIMIT 1"));
create some random account in your databse with an id=(numer) and under the $userrow you do this: $userrow = dorow(doquery("SELECT * FROM <<users>> WHERE id='(number)' LIMIT 1"));
and replace userrow['gold'] with userrow2['gold'] it should work (haven't tested it yet)
Edit: it works! Only you have to edit panel.php by doing this: If ($userrow['id'] = (number)) {} else { }
around the babblebox, players online, top panel, bottom panel, etc. till you have a normal page without showing anything but your banner, background, text and copyright information.
Edit 2: Important: switch the userrow2 and userrow around. When you do the above you get an blank page when you play the game.
Edit 3: still doesn't work but I have an idea.
Edit 4: The idea doesn't work...
Edited by Dragonking (04/13/08 12:03 PM)
|
|
Top
|
|
|
#17142 - 04/14/08 05:35 PM
Re: Create a Signature to promote your DS game
[Re: Dragonking]
|
OrEz
Grape Nuts
Registered: 03/28/08
Posts: 26
|
Offline
|
|
Got it ... This will redirects you in the register page , doesn't matter if you are logged in or not, its works... To make things for secure: 1. Not allowing the account to auto click his link and give gold. (based on idnumber and ip) 2. Time function , don't know much of this thing, but its good for proxy's. (interval of 5 minutes wen you can click again the link)
<?php
include("lib.php");
// Get a bunch of stuff.
if (isset($_GET["ref"]) && is_numeric($_GET["ref"])) { $ref = $_GET["ref"]; }
if (!isset($ref)) { die(); }
$userrow = dorow(doquery("SELECT *, UNIX_TIMESTAMP(onlinetime) AS fonlinetime FROM <<users>> WHERE id='$ref' LIMIT 1"));
if (!$userrow) { die(); }
$gold = $userrow["gold"] + 1;
$query = doquery("UPDATE <<users>> SET gold='$gold' WHERE id='$ref' LIMIT 1");
header( 'Location: users.php?do=register' ) ;
?>
Edited by OrEz (04/14/08 05:40 PM)
|
|
Top
|
|
|
|
|