Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   function firstLogin(pl) (https://forums.graalonline.com/forums/showthread.php?t=134260181)

iSlayer 08-13-2010 08:34 AM

function firstLogin(pl)
 
Hi guys his is a script wich Entrok made a while back and it doesn't seem to be working, its in a NPC called FirstLogin and it doesnt seem to be setting the players attributes for first login.

PHP Code:

function firstLogin(pl)
{
  
temp.mudaccount.loadvarsfromarray(pl);
  
temp.mudaccount.mudaccount pl;
  
  
// Ganis
  
temp.mudaccount.gani_attack   "sword";
  
temp.mudaccount.gani_grab     "grab";
  
temp.mudaccount.gani_idle     "idle";
  
temp.mudaccount.gani_pull     "pull";
  
temp.mudaccount.gani_push     "push";
  
temp.mudaccount.gani_sit      "sit";
  
temp.mudaccount.gani_swim     "swim";
  
temp.mudaccount.gani_swimidle "swim";
  
temp.mudaccount.gani_walk     "walk";
  
  
// Player class/level/exp
  
temp.mudaccount.mudclass      "Warrior";
  
temp.mudaccount.mudlevel      1;
  
temp.mudaccount.mudexp        0;
  
temp.mudaccount.mudexptolevel findNPC("ExpTables").GetRequiredExp(1temp.mudaccount.mudclass);
  
  
// Player HP/MP
  
temp.mudaccount.mudhp    100;
  
temp.mudaccount.mudmaxhp 100;
  
temp.mudaccount.mudmp    100;
  
temp.mudaccount.mudmaxmp 100;
  
  
// Player speed
  
temp.mudaccount.mudspeed 1.1;
  
  
// Level/X/Y
  
temp.mudaccount.charlevel server.start_level;
  
temp.mudaccount.charxpos  server.start_x;
  
temp.mudaccount.charypos  server.start_y;
  
  
// Next item ID
  
temp.mudaccount.nextitemid 10000;
  
  
temp.mudaccount.savevars("mudaccounts/" player.account ".txt"0);
  echo(
"[MudControl]: " player.account " has created a mudaccount.");



Skyld 08-13-2010 12:36 PM

That is because there is no built-in function firstLogin(); that is something that you need to script yourself.

Copying and pasting code isn't as easy as you think is it? ;)

iSlayer 08-13-2010 01:28 PM

Oh finally someone tells me

xXziroXx 08-13-2010 02:55 PM

You did NOT make that.

Crow 08-13-2010 03:00 PM

Quote:

Originally Posted by xXziroXx (Post 1593428)
You did NOT make that.

He said "Entrok" made it, whoever that is.

xXziroXx 08-13-2010 03:40 PM

Quote:

Originally Posted by Crow (Post 1593432)
He said "Entrok" made it, whoever that is.

I somehow doubt it.

Contrast 08-15-2010 05:05 AM

Something the creator fo that code should read:

Quote:

Originally Posted by Tigairius (Post 1465226)
Go to wikipedia.org and search for "MUD," I'd link it but it discusses some of the games that are MUDs.

That'll show you what MUD is, but a mudlib is the library which contains all of the account information & stuff for the mud.

A mudlib is a library of interpreted code used to create a MUD game.

There are pretty uncommon instances where it's necessary to use a MUDLIB on Graal.

Most people confuse MUDLIB for any form of text file storage.


Fulg0reSama 08-15-2010 05:57 AM

We need a thread called "Who is the mysterious Entrok?" Is he a multiple personality of iSlayer's own design due to all the hate we give him for thievery? We'll never know.

TSAdmin 08-15-2010 06:17 AM

Quote:

Originally Posted by Fulg0reSama (Post 1594156)
We need a thread called "Who is the mysterious Entrok?" Is he a multiple personality of iSlayer's own design due to all the hate we give him for thievery? We'll never know.

Yeah. He's like the name that is mentioned but he is never seen. He is.... THE SHADOW! - Now I want to watch that movie.

Fulg0reSama 08-15-2010 06:25 AM

Quote:

Originally Posted by TSAdmin (Post 1594161)
Yeah. He's like the name that is mentioned but he is never seen. He is.... THE SHADOW! - Now I want to watch that movie.

Not to go offtopic even more but you should see Mirrors or The Invisible. Both great movies.

Jiroxys7 08-15-2010 07:03 AM

Quote:

Originally Posted by Fulg0reSama (Post 1594156)
We need a thread called "Who is the mysterious Entrok?" Is he a multiple personality of iSlayer's own design due to all the hate we give him for thievery? We'll never know.

Entrok
Kortne (long E sound)
Courtney?

Do we know anyone by the name of Courtney?

Loriel 08-15-2010 06:17 PM

Quote:

Originally Posted by xXziroXx (Post 1593428)
You did NOT make that.

Man I do not think a function that is literally just a listing of assignments is quite enough of a work of art to qualify for copyright or anything of the sort

adam 08-15-2010 09:56 PM

Quote:

Originally Posted by Loriel (Post 1594248)
Man I do not think a function that is literally just a listing of assignments is quite enough of a work of art to qualify for copyright or anything of the sort

Or maybe your thinking is just so very high above a new scripters, that it seems less than trivial. Which of course it is... But not to them.

Switch 08-15-2010 11:19 PM

I thought Entrok was a server?

Fulg0reSama 08-15-2010 11:25 PM

Quote:

Originally Posted by Switch (Post 1594321)
I thought Entrok was a server?

Honest to god, I thought the same thing.


All times are GMT +2. The time now is 03:20 AM.

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