marak Posted May 10, 2013 Author Share Posted May 10, 2013 and the next I wanted a system that spell appears in the class that I have not selected the option "not allowed to use?" and LV that I put on the bar levreqwhen the class reaches lv such that I put in the bar levreq character appears in the chat you just learned a new spellsorry for english!!! Link to comment Share on other sites More sharing options...
Synergy Posted May 10, 2013 Share Posted May 10, 2013 Couple of things:Firstly, don't make the title of your topic "Helpp!!!! pl00xxxx!!!!" - that is not helpful. It doesn't describe the issue at all. It's just annoying for others.Secondly don't start your topic as a follow on from other random post "… and the next"? That doesn't help either.Try splitting your questions up into more than 1 sentence. At the moment I have no idea what you're asking. Link to comment Share on other sites More sharing options...
Zeno Posted May 11, 2013 Share Posted May 11, 2013 Goose is right, it is difficult to understand you. The better you express yourself, the better able others are to help.This time it worked out, because I am somewhat fluent in gibberish. ; ]It sounds like you want players to be given spells when they level up and meet the requirements you've put in the spell editor. To do this, you'll have to check requirements for every spell when a player levels up and give them whatever spell they can use but do not have. Please note that where this is an automatic process, any overpowered spells that would normally not be released into the game will go straight into player's spellbooks, _unless their access requirement is above the player._Add this sub in modPlayer:```Sub SpellsOnLevel(ByVal Index As Long)Dim n As Long For n = 1 To MAX_SPELLS ' access requirement If Not GetPlayerAccess(Index) >= Spell(n).AccessReq Then Exit Sub End If ' Get the spell num If Spell(n) > 0 Then ' Make sure they are the right class If Spell(n).ClassReq = GetPlayerClass(Index) Or Spell(n).ClassReq = 0 Then ' Make sure they are the right level i = Spell(n).LevelReq If i <= GetPlayerLevel(Index) Then i = FindOpenSpellSlot(Index) ' Make sure they have an open spell slot If i > 0 Then ' Make sure they dont already have the spell If Not HasSpell(Index, n) Then Call SetPlayerSpell(Index, i, n) Call PlayerMsg(Index, "You feel the rush of knowledge fill your mind. You can now use " & Trim$(Spell(n).Name) & ".", BrightGreen) ' update 'em Call SendPlayerSpells(Index) End If End If End If End If End If NextEnd Sub```If you Sub SetPlayerLevel is unedited, just replace it with this:```Public Sub CheckPlayerLevelUp(ByVal Index As Long)Dim i As LongDim expRollover As LongDim LevelCount As Long LevelCount = 0 Do While GetPlayerExp(Index) >= GetPlayerNextLevel(Index) expRollover = GetPlayerExp(Index) - GetPlayerNextLevel(Index) ' can level up? If Not SetPlayerLevel(Index, GetPlayerLevel(Index) + 1) Then Exit Sub End If Call SetPlayerPOINTS(Index, GetPlayerPOINTS(Index) + 3) Call SetPlayerExp(Index, expRollover) LevelCount = LevelCount + 1 Loop If LevelCount > 0 Then If LevelCount = 1 Then ' singular GlobalMsg GetPlayerName(Index) & " has gained " & LevelCount & " level!", Brown Else ' plural GlobalMsg GetPlayerName(Index) & " has gained " & LevelCount & " levels!", Brown End If For i = 1 To Vitals.Vital_Count - 1 SendVital Index, i Next'here's where you check if they get any new spells. Call SpellsonLevel(Index) SendEXP Index SendPlayerData Index End IfEnd Sub```Otherwise, if you have edited your level up sub, add in Call SpellsOnLevel(Index) somewhere before SendPlayerData Index. 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