-sHEDDING- Posted July 1, 2009 Author Share Posted July 1, 2009 Ok if its a first login then they get an intro and then they get enough xp to level up well for soem reason my char says 25/5 xp heres my join subIf GetPlayerLevel(index) = 1 Then If GetPlayerEXP(index) = 0 ThenCall CustomMenuShow(index, "new player index", "\GUI\CUSTOM\Intro.bmp", 1) Call SetPlayerEXP(index, 1)Call SendPlayerData(Index)End ifEnd ifIf GetPlayerLevel(index) = 1 ThenCall SetPlayerExp(Index, GetPlayerExp(Index) + 5)Call SendPlayerData(Index)End IfEnd Sub Link to comment Share on other sites More sharing options...
Guest Posted July 1, 2009 Share Posted July 1, 2009 no else cases ? Link to comment Share on other sites More sharing options...
Admiral Refuge Posted July 1, 2009 Share Posted July 1, 2009 Is all you want to do, is show that custom menu when the player logs in for the first time? Because there's an easier way, using inis, e.g.```If GetVar("FirstTime.ini", GetPlayerLogin(Index) & "", GetPlayerName(Index) & "") = "" Then Call CustomMenuShow(index, "new player index", "\GUI\CUSTOM\Intro.bmp", 1) Call PutVar("FirstTime.ini", GetPlayerLogin(Index) & "", GetPlayerName(Index) & "", "1")End If```Or, you can use the onNewChar sub or w/e it's called, but then the custom menu will display as soon as you create a new character.@[Kingdom's:> Tipsta link=topic=47372.msg484262#msg484262 date=1246423787]> no else cases ?Hey, I was asleep! Link to comment Share on other sites More sharing options...
DarkMazer Posted July 1, 2009 Share Posted July 1, 2009 If you want them to level up once they have enough experience, you need to add Call LevelUp(Index) after you set their experience. It'll only level the player up if they have enough experience, so you could put it anywhere a player gains experience for any reason and not have to worry. Link to comment Share on other sites More sharing options...
-sHEDDING- Posted July 2, 2009 Author Share Posted July 2, 2009 ok thanks both of u and there is no need for else cases since this is in the join sub and only run if they are a new charater and refuge so i could call a custom menu when they press create new char? Link to comment Share on other sites More sharing options...
Admiral Refuge Posted July 2, 2009 Share Posted July 2, 2009 @-sHEDDING-:> and refuge so i could call a custom menu when they press create new char?You would put the commands in the OnNewChar sub Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now