Cronwerks MCCode/MCCodes Forums

Please login or register.

Login with username, password and session length

News:

Have you purchased a mod and lost your copy? Just file a support ticket through your "My Mods" page.


This forum is now closed and has moved to a new location! Click here to find out why.

AuthorTopic: Starter items for new player and Event to id 1 id 2 id 5 saying New Player  (Read 524 times)

Dusty

  • Basic Member
  • *
  • Reputation Power: 21
  • Dusty has no influence.
  • Offline Offline
  • Posts: 39
  • TRD Computer Repair
    • Yahoo Instant Messenger - peewee986
    • View Profile
    • WWW
I need a code that I can use for V1..  and I need to know where to places this code..  I think it will go in my validate.php but im not sure 100% that its where it will go.    But what I need is when the user validates his account with the email that is sent to him.. I need id 1 id 2 and id 5 to get an event saying that a new player as joined the game. it give the name and id of the player that also is a link that will take you right to there profile,    and it auto send the player a D day a few crystals a little bit of money and some med items stuff like that.   

I tryed adding some things my self  but some where in there Im messing some thing up    also I really dont need the players name to be a link to there profile   that is just something lazy   

Thanks
Logged
TRD Computer Repair Services
www.trdcomputer.com

Danny696

  • Senior Member
  • ****
  • Reputation Power: 317
  • Danny696 is a force to reckon with.Danny696 is a force to reckon with.Danny696 is a force to reckon with.Danny696 is a force to reckon with.Danny696 is a force to reckon with.Danny696 is a force to reckon with.Danny696 is a force to reckon with.Danny696 is a force to reckon with.
  • Offline Offline
  • Posts: 540
    • View Profile
    • WWW
How does your validate work, is it cronus' mod?
Logged
Project Choosen - 10%
Daniel - Hanson . Com

Dusty

  • Basic Member
  • *
  • Reputation Power: 21
  • Dusty has no influence.
  • Offline Offline
  • Posts: 39
  • TRD Computer Repair
    • Yahoo Instant Messenger - peewee986
    • View Profile
    • WWW
Code: [Select]
<?php
session_start
();
require 
"mysql.php";
global 
$c;
if ( 
$_GET['act'] == 'val')
{
$q=mysql_query("SELECT * FROM validating WHERE vdID='{$_GET['token']}'"$c);
if (!
mysql_num_rows($q))
{
die(
"Invalid account");
}
$r=mysql_fetch_array($q);
$pass=strip_tags($r['vdPASSW']);
$pass=md5($pass);
$username=($r['vdUSERN']);
$email=($r['vdEMAIL']);
$money=($r['vdMONEY']);
mysql_query("INSERT INTO users (username,userpass,email,login_name,maxenergy,maxwill,maxbrave,maxhp,energy,will,hp,brave,level,location,money,turns,cybermoney,bankmoney,signedup) values('$username','$pass','$email','$username','12','100','3','100','12','100','100','3','1','1','$money','100','-1','-1',unix_timestamp() )",$c) or die(mysql_error());
$i=mysql_insert_id($c);
mysql_query("INSERT INTO `userstats` VALUES($i, 10, 10, 10, 10, 10, 10, 10, 10)"$c);
mysql_query("INSERT INTO `inventory` (inv_id, inv_itemid, inv_userid, inv_qty) VALUES ('', '195', '{$i}', '400')"$c);
mysql_query("INSERT INTO `inventory` (inv_id, inv_itemid, inv_userid, inv_qty) VALUES ('', '33', '{$i}', '10')"$c);

//
include_once('global_func.php');
event_add($i"welcome to the Mafia Lords. You have been given a few start Items. Check your items for more details"$c);

$time    time()+5;
$subject 'Welcome to Mafia-Lords';
$body    'Welcome to the game.<br /><br />Please let me know if you need anything, any help, or any advice.<br /><br />Please check out the Help Tutorial in the bottom left corner for anything you need to know or contact ID 1 or ID 5. Thanks Steve<br /><br />';
mysql_query
(
"INSERT INTO `mail` (mail_id, mail_read, mail_from, mail_to, mail_time, mail_subject, mail_text) ".
"VALUES ('', '0', '1', '{$i}', '{$time}', '{$subject}', '{$body}')",$c);
//
mysql_query("INSERT INTO userstats VALUES($i,10,10,10,10,10)",$c);
mysql_query("DELETE FROM validating WHERE vdID='{$_GET['token']}'"$c);
print 
"Account validated!<br />
<a href='login.php'>&gt; Login</a>"
;
}
else
{
mysql_query("DELETE FROM validating WHERE vdID='{$_GET['token']}'"$c);
print 
"Registration Cancelled.";
}
?>


this is my val.php   
« Last Edit: June 05, 2010, 04:41:12 PM by Dusty »
Logged
TRD Computer Repair Services
www.trdcomputer.com

Danny696

  • Senior Member
  • ****
  • Reputation Power: 317
  • Danny696 is a force to reckon with.Danny696 is a force to reckon with.Danny696 is a force to reckon with.Danny696 is a force to reckon with.Danny696 is a force to reckon with.Danny696 is a force to reckon with.Danny696 is a force to reckon with.Danny696 is a force to reckon with.
  • Offline Offline
  • Posts: 540
    • View Profile
    • WWW
Ahh, sorry i dont work with Lite/v1
Logged
Project Choosen - 10%
Daniel - Hanson . Com

Dusty

  • Basic Member
  • *
  • Reputation Power: 21
  • Dusty has no influence.
  • Offline Offline
  • Posts: 39
  • TRD Computer Repair
    • Yahoo Instant Messenger - peewee986
    • View Profile
    • WWW
Is there any one that I can ask about this.    I got it fixed to where it would give them items. but I cant get it to send me an another id an event or give the new user money and crystals
Logged
TRD Computer Repair Services
www.trdcomputer.com

Danny696

  • Senior Member
  • ****
  • Reputation Power: 317
  • Danny696 is a force to reckon with.Danny696 is a force to reckon with.Danny696 is a force to reckon with.Danny696 is a force to reckon with.Danny696 is a force to reckon with.Danny696 is a force to reckon with.Danny696 is a force to reckon with.Danny696 is a force to reckon with.
  • Offline Offline
  • Posts: 540
    • View Profile
    • WWW
Cronus works with Lite/V1 mods.
Logged
Project Choosen - 10%
Daniel - Hanson . Com

Dusty

  • Basic Member
  • *
  • Reputation Power: 21
  • Dusty has no influence.
  • Offline Offline
  • Posts: 39
  • TRD Computer Repair
    • Yahoo Instant Messenger - peewee986
    • View Profile
    • WWW
Thanks Ill shot him a message
Logged
TRD Computer Repair Services
www.trdcomputer.com
 


This forum is now closed and has moved to a new location! Click here to find out why.