Warning: preg_replace_callback(): Requires argument 2, '$func['entity_fix']('\2')', to be a valid callback in /nfs/c01/h06/mnt/10927/domains/dragonprime.net/html/Sources/Load.php(225) : runtime-created function on line 3
[A.I. Script] Changeling
DragonPrime - LoGD Resource Community
Welcome Guest
  • Good morning, Guest.
    Please log in, or register.
  • September 20, 2019, 02:54:09 AM
Home Forums News Downloads Login Register Advanced Search
* * *
DragonPrime Menu
Login
 
 
Resource Pages
Search

Pages: [1]   Go Down
  Print  
Author Topic: [A.I. Script] Changeling  (Read 3541 times)
0 Members and 1 Guest are viewing this topic.
Iori
Mod God
*****
Offline Offline

Posts: 832


View Profile WWW
« on: July 11, 2007, 12:57:23 AM »

A creature that has a tendency to take the player's form. At low DKs, the changes are purely cosmetic. At higher DKs, it copies the player's powers too.

Code:
global $session, $badguy, $buffset;
if (!isset($badguy['transform']) && e_rand(0,2)) {
output("`n`n`^%s `^transforms into your lookalike!`n`n`0",$badguy['creaturename']);
$badguy['creaturename'] = $session['user']['name'];
$badguy['creatureweapon'] = $session['user']['weapon'];
$badguy['creaturegold'] += 50;
$badguy['creatureexp'] += 25;
if ($session['user']['dragonkills'] > 10) {
$badguy['creatureattack'] = max($session['user']['attack'],$badguy['creatureattack']);
$badguy['creaturedefense'] = max($session['user']['defense'],$badguy['creaturedefense']);
$badguy['creaturehealth'] = max($session['user']['hitpoints'],$badguy['creaturehealth']);
} elseif ($session['user']['dragonkills'] > 25) {
$badguy['creatureattack'] = max($badguy['creatureattack']*$buffset['atkmod'],$badguy['creatureattack']);
$badguy['creaturedefense'] = max($badguy['creaturedefense']*$buffset['defmod'],$badguy['creaturedefense']);
$badguy['creaturehealth'] = max($session['user']['maxhitpoints'],$badguy['creaturehealth']);
}
$badguy['transform'] = 1;
}
Logged

Pages: [1]   Go Up
  Print  
 
Jump to:  


*
DragonPrime Notices
Welcome to DragonPrime - The LoGD Resource Community!

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