DragonPrime - LoGD Resource Community
Welcome Guest
  • Good evening, Guest.
    Please log in, or register.
  • October 19, 2018, 07:05:00 PM
Home Forums News Downloads Login Register Advanced Search
* * *
DragonPrime Menu
Login
 
 
Resource Pages
Search

Pages: [1]   Go Down
  Print  
Author Topic: displaying charm  (Read 4952 times)
0 Members and 1 Guest are viewing this topic.
zousug
Guest
« on: May 01, 2004, 06:11:29 PM »

hello..

is there away to display the players charm in the vital info box??

thanx
Logged
Talisman
Administrator
Mod God
*****
Offline Offline

Posts: 5479



View Profile WWW
« Reply #1 on: May 01, 2004, 06:47:25 PM »

In common.php find:

Code:
.templatereplace("statrow",array("title"=>"Armor","value"=>$u['armor']))

Insert after:

Code:
.templatereplace("statrow",array("title"=>"Charm","value"=>$u['charm']))

« Last Edit: May 01, 2004, 07:04:14 PM by Talisman » Logged

Play the latest beta version here on DragonPrime
zousug
Guest
« Reply #2 on: May 01, 2004, 06:55:35 PM »

hey..

thanx it worked like a (pardon the pun) charm..

Cheesy

only prob was that u had missed a (

--CODE--
.templatereplace("statrow",array"title"=>"Charm","value"=>$u['charm']))
--END CODE--

here is how its meant to be

--CODE--
.templatereplace("statrow",array("title"=>"Charm","value"=>$u['charm']))
« Last Edit: May 01, 2004, 06:56:37 PM by zousug » Logged
Talisman
Administrator
Mod God
*****
Offline Offline

Posts: 5479



View Profile WWW
« Reply #3 on: May 01, 2004, 07:04:38 PM »

I did indeed...fixed in my post now, thanks.
Logged

Play the latest beta version here on DragonPrime
zousug
Guest
« Reply #4 on: May 01, 2004, 07:05:42 PM »

hehe no worries..

Cheesy see im already learning lol...  (me like hanging with php gurus Cheesy)
Logged
Talisman
Administrator
Mod God
*****
Offline Offline

Posts: 5479



View Profile WWW
« Reply #5 on: May 01, 2004, 07:17:11 PM »

Same here...can't wait until I'm one too  Grin
Logged

Play the latest beta version here on DragonPrime
zousug
Guest
« Reply #6 on: May 01, 2004, 07:20:43 PM »

hehe yep thats going to be cool.. make my own mods Cheesy

i think i have pritty cool ideas.. just dont know how to make em Cry

--EDIT--
change of subject

how do i display these

1) the newest player

2) The newest hero

--END EDIT--
« Last Edit: May 01, 2004, 07:21:26 PM by zousug » Logged
Kyky
Guest
« Reply #7 on: May 01, 2004, 07:32:04 PM »

ok this one took me a while to figure out but i did....I'll write the instructions and post them in a minute...
Logged
Kyky
Guest
« Reply #8 on: May 01, 2004, 07:38:51 PM »

Go into your database and click settings then click browse then hit add setting and add: *newplayer* value: *none*, *newplayertitle* value: *none1*, *dragonkiller* value: *none2* add those to the settings without any of the special characters like * and ,

then in the village add this at the top between
Code:
require_once "common.php";

right here at this
Code:
$name = getsetting("newplayer",$default);
$title = getsetting("newplayertitle",$default);
$dker = getsetting("dragonkiller",$default);

then near the bottom where it says new day in whatever add this
Code:
output("`@`nSay Hello to the newest warrior: `^$title $name`@!`n");
output("`@Congratulations to our latest dragonkiller: $dker`@!`n");

that should work!
Logged
keith
Guest
« Reply #9 on: May 01, 2004, 09:50:57 PM »

Don't you need to change anything in the create.php and dragon.php for the database to know who is the newest player/DKer?
Logged
Kyky
Guest
« Reply #10 on: May 01, 2004, 09:57:59 PM »

ya, I accidentally uploaded a different dragon and it didn't have that change on there..and I can't remember what I changed sorry I will no by monday at the latest Ive been so busy
Logged
zousug
Guest
« Reply #11 on: May 02, 2004, 12:43:39 AM »

cool nw.. Cheesy

thanx when u post the rest of the changes can u do a quote of ya other post as well pls?? Cheesy

thanx cya
Logged
anpera
Guest
« Reply #12 on: May 02, 2004, 01:22:20 PM »

Well... we're so far allready...

This one was posted by "Nobody/Anonymous" from 4winz on sourceforge on January 1st, 2004.
Quote
//Posted by 4winz (edited a little)
//Thanks to Questara. She was the one that helped me.

Add at the end of the create.php file.
savesetting("newplayer",$shortname);
savesetting("newplayertitle",$title);

Right where it says your account is valid

refence it in village.php using:

$name = getsetting("newplayer",$default);
$title = getsetting("newplayertitle",$default);

at the start of it and

output("`#Welcome our newest player: `^$title $name`@!");

in your village description.


Thanks, Questy.
Quote
Date: 2004-01-04 08:01
Sender: jtraub
Logged In: YES
user_id=1372

Added, in a modified form to 0.9.8
Quote
Date: 2004-01-10 17:04
Sender: lonestrider
Logged In: YES
user_id=874697

Just wanted to say, cool little mod, 4winz. Using yours instead
of
mine now (yours is shorter).

-Lonestrider

I used the instruction above and the changes from 0.9.8-prerelease, so it isn't my code!
Here is what I extracted and translated from my files (displays latest member and newest hero on index):
Code:
----- Open:
create.php

----- Find:
output("`#`cYour email has been validated.  You may now log in.`c`0");

----- After, add:
savesetting("newplayer",addslashes($row[name]));

----- Find:
output("<form action='login.php' method='POST'><input name='name' value=\"$shortname\" type='hidden'><input name='password' value=\"$HTTP_POST_VARS[pass1]\" type='hidden'>

----- Before, add:
savesetting("newplayer",addslashes("$title $shortname"));


----- Open:
dragon.php

----- Find:
debuglog("slew the dragon and starts with {$session['user']['gold']} gold and {$session['user']['gems']} gems");

----- After, add:
savesetting("newdragonkill",addslashes($dkname));


----- Open:
index.php

----- Find:
output("`@Next new game day in: `$".date("G\\h, i\\m, s\\s \\(\\r\\e\\a\\l\\ \\t\\i\\m\\e\\)",strtotime("1970-01-01 00:00:00 + $realsecstotomorrow seconds"))."`0`n`n");

----- After, add:
$newplayer=stripslashes(getsetting("newplayer",""));
if ($newplayer!="") output("`@Our newest player is `^$newplayer`@!`0`n");
$newdk=stripslashes(getsetting("newdragonkill",""));
if ($newdk!="") output("`@The newest hero is: `&$newdk`@!`0`n`n");


----- Open:
newday.php

----- Find:
$session['user']['race']=(int)($_GET['setrace']);

----- After, add:
if ($session[user][dragonkills]==0 && $session[user][level]==1) addnews("`#{$session[user][name]} `#has entered our world. Welcome!");
« Last Edit: May 02, 2004, 01:23:40 PM by anpera » Logged
zousug
Guest
« Reply #13 on: May 02, 2004, 02:35:54 PM »

cool thnx..

ill copy this and do it as soon as i have the time lol Cheesy
Logged
Pages: [1]   Go Up
  Print  
 
Jump to:  


*
DragonPrime Notices
Play LoGD on Dragonprime

Support Us
No funds raised yet this year
Your help is greatly appreciated!
Recent Topics
DragonPrime LoGD
Who's Online
39 Guests, 0 Users
Home Forums News Downloads Login Register Advanced Search