Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Sub JoinGame Spell Script not working..


Braydo25
 Share

Recommended Posts

```
:: Access ::
'ADMIN_MONITER = 1
'ADMIN_MAPPER = 2
'ADMIN_DEVELOPER = 3
'ADMIN_CREATOR = 4

':: Text Color Code ::
'Black = 0
'Blue = 1
'Green = 2
'Cyan = 3
'Red = 4
'Magenta = 5
'Brown = 6
'Grey = 7
'DarkGrey = 8
'BrightBlue = 9
'BrightGreen = 10
'BrightCyan = 11
'BrightRed = 12
'Pink = 13
'Yellow = 14
'White = 15

Sub JoinGame(index)
Dim GameName
Dim MOTD

GameName = Trim(GetVar("Data.ini", "CONFIG", "GameName"))
MOTD = GetVar("motd.ini", "MOTD", "Msg")

    ' Send them welcome
    Call PlayerMsg(index, "Welcome to " & GameName & "!", 15)

    ' Send motd
    If Trim(MOTD) <> "" Then
        Call PlayerMsg(index, "MOTD: " & MOTD, 11)
    End If

'Human Skill Start
If GetVar("OneTime.ini", GetPlayerName(index), "Spells") = "" And GetPlayerClass(index) = 0 Then
Call SetPlayerSpell(index, 1, 5)
Call SetPlayerSpell(index, 2, 6)
Call SetPlayerSpell(index, 3, 7)
Call PutVar("OneTime.ini", GetPlayerName(index), "Spells", "Done")
End If

'Magi Skill Start
If GetVar("OneTime.ini", GetPlayerName(index), "Spells") = "" And GetPlayerClass(index) = 1 Then
Call SetPlayerSpell(index, 1, 13)
Call SetPlayerSpell(index, 2, 14)
Call SetPlayerSpell(index, 3, 15)
Call PutVar("OneTime.ini", GetPlayerName(index), "Spells", "Done")
End If

'Druid Skill Start
If GetVar("OneTime.ini", GetPlayerName(index), "Spells") = "" And GetPlayerClass(index) = 2 Then
Call SetPlayerSpell(index, 1, 9)
Call SetPlayerSpell(index, 2, 10)
Call SetPlayerSpell(index, 3, 11)
Call PutVar("OneTime.ini", GetPlayerName(index), "Spells", "Done")
End If

'Trogdin Skill Start
If GetVar("OneTime.ini", GetPlayerName(index), "Spells") = "" And GetPlayerClass(index) = 3 Then
Call SetPlayerSpell(index, 1, 1)
Call SetPlayerSpell(index, 2, 2)
Call SetPlayerSpell(index, 3, 3)
Call PutVar("OneTime.ini", GetPlayerName(index), "Spells", "Done")
End If

End Sub
```
well I recently transfered everything from T.E. to baron EE 1.0 for more features, well now this part of my main isnt executing when a new player joins, whats wrong?
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...