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

Can someone tell me why this script isnt working?


monowolf00
 Share

Recommended Posts

```
Select Case Script       
                Case 1
                    If GetPlayerMP (index >=10 Then
                        Call SetPlayerSTR (index, int(GetPlayerSTR +20,30))
                        Call SetPlayerDEF (index, int(GetPlayerDEF -10,30))
                        Call SetPlayerMAGI (index, int(GetPlayerMAGI -10,30))
                    End If
            End Select
```
Its my first script, but when I go to use it it wont cast. It just says "spell successfully memorized". I am casting it from the spells menu
so dont say "You have to cast it from the spells menu, not inventory….".

I need your help.
Thanks in advance.
Link to comment
Share on other sites

```
Case 1
If GetPlayerMP(index) >= 10 Then
Call SetPlayerStr(index, GetPlayerStr(index) + 20)
Call SetPlayerDef(index, GetPlayerDef(index) - 10)
Call SetPlayerMagi(index, GetPlayerMagi(index) - 10)
Call SetPlayerMP(index, GetPlayerMP(index) - 10)
Call SendStats(index)
Call SendMP(index)
End If
```
Link to comment
Share on other sites

a timer

edit:

put this sub at the bottom of main.txt

Sub Spell(index)
If GetPlayerMP(index) >= 10 Then
Call SetPlayerStr(index, GetPlayerStr(index) + 20)
Call SetPlayerDef(index, GetPlayerDef(index) - 10)
Call SetPlayerMagi(index, GetPlayerMagi(index) - 10)
Call SetPlayerMP(index, GetPlayerMP(index) - 10)
Call SendStats(index)
Call SendMP(index)
End If
End Sub

add this to scripted spell
Case 1
call settimer("Spell" & index, 10000)
call removetimer("Spell" & index)

change 10000 to a number to change how long it last's
Link to comment
Share on other sites

if that doesnt work try this…

Sub Spell(index)
If GetPlayerMP(index) >= 10 Then
Call SetPlayerStr(index, GetPlayerStr(index) + 20)
Call SetPlayerDef(index, GetPlayerDef(index) - 10)
Call SetPlayerMagi(index, GetPlayerMagi(index) - 10)
Call SetPlayerMP(index, GetPlayerMP(index) - 10)
Call SendStats(index)
Call SendMP(index)
call removetimer("Spell" & index)
End If
End Sub

and

Case 1
call settimer("Spell" & index, 10000)
Link to comment
Share on other sites

_That's what I'm here for…I guess._

Actually, that's improper English. Ending a sentence with a preposition. Tsk tsk, Balliztik. Here's how it should be written, silly:

_That's for what I'm here…I guess._

Ah, contemporary writing, Balliztik. Don't forget. Only Shakespeare would say "what for" and "for what" and such. Here we go:

_That's why I'm here…I guess._
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...