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(1, temp.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.");
}