Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Kill/Death stat transfer (https://forums.graalonline.com/forums/showthread.php?t=83011)

WaDaFack 12-05-2008 12:50 AM

Kill/Death stat transfer
 
If you want to transfer the kill/deaths attribute from one account to another than use this

NPC Code:
function onCreated()
{
findplayer("WaDaFack").kills = findplayer("BobTheSnowman").kills;
findplayer("WaDaFack").deaths = findplayer("BobTheSnowman").deaths;
}



That transfer the stats of BobTheSnowman to the account WaDaFack
Just put the accounts backwards, so the stats from WaDaFack can go to BobTheSnowman.
There you go, now the stats of BobTheSnowman is on WaDaFack, and the stats of WaDaFack is on BobTheSnowman.



- Script by Skyld

Tigairius 12-05-2008 01:29 AM

Assuming dontchangekills=false in server options.

xXziroXx 12-05-2008 01:37 AM

Well, uh... thank you for sharing this revolutionary script with us! :D

WaDaFack 12-05-2008 02:07 AM

Don't ask! Ahahaha
I just felt like posting this for peoples needs!

Pelikano 12-06-2008 11:57 AM

Hm.

So I could also do something like:

findplayer(Pelikano).guild = "Test";

And that would work?

Deas_Voice 12-06-2008 12:20 PM

Quote:

Originally Posted by Pelikano (Post 1447161)
Hm.

So I could also do something like:

findplayer(Pelikano).guild = "Test";

And that would work?

on serverside, yes.

on clientside no, its read only

RozenMaiden 12-06-2008 12:28 PM

Quote:

Originally Posted by Deas_Voice (Post 1447167)
on serverside, yes.

on clientside no, its read only

i guess it won't work on serverside either.
Assuming the "" around the name are still missing and Pelikano isnt a variable

Crow 12-06-2008 02:20 PM

It will work. A simple
PHP Code:

player.guild "Guild"

will do aswell. And I think it also works on the clientside. If it doesn't, I think
PHP Code:

player.nick @= " (Guild)"

does.

xXziroXx 12-06-2008 02:47 PM

Quote:

Originally Posted by Pelikano (Post 1447161)
findplayer(Pelikano).guild = "Test";

And that would work?

Only if Pelikano is a variable.

Pelikano 12-12-2008 10:25 AM

Of course I forgot something again.
=P

"Pelikano"

Well, can I change anything like that?

like:

findPlayer("Account").x += 1;

xXziroXx 12-12-2008 05:23 PM

If serversided, you can use it to change anything you'd like on another object.

Pelikano 12-13-2008 08:28 PM

Kewl


All times are GMT +2. The time now is 12:40 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.