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

I need help


IrunoHatake
 Share

Recommended Posts

can some1 fix this script? i'm pretty sure it has to do with either the level party or the 2 else's. this is my second quest so i wanted to try and add a level req.

Case 3
If GetPlayerLevel(index) <= 3 Then
Call PlayerMsg(index, "I'm the Battle tutor, can u get me 5 cogs from ClockWork Rabbit?", 12)
If CanTake(Index, 3, 5) = false Then
    Call PlayerMsg(index, "You didn't get the cogs!", 12)
Else
    Call TakeItem(index, 3, 5)
    Call GiveItem(index, 1, 200)
    Call PlayerMsg(index, "Thanks heres your Reward!", 12)
Else
    Call PlayerMsg(index, "Your to low a level for this quest!", 12)
End If
End If
Exit Sub
Link to comment
Share on other sites

i'm a idiot how could i forget the script part >.>

Case 3
If GetPlayerLevel(index) <= 3 Then
Call PlayerMsg(index, "I'm the Battle tutor, can u get me 5 cogs from ClockWork Rabbit?", 12)
If CanTake(Index, 3, 5) = false Then
    Call PlayerMsg(index, "You didn't get the cogs!", 12)
Else
    Call TakeItem(index, 3, 5)
    Call GiveItem(index, 1, 200)
    Call PlayerMsg(index, "Thanks heres your Reward!", 12)
Else
    Call PlayerMsg(index, "Your to low a level for this quest!", 12)
End If
End If
Exit Sub
Link to comment
Share on other sites

You just misplaced your second Else, I recommend when you are scripting to tab out when you go into ifs and such as I did

```
Case 3
If GetPlayerLevel(index) <= 3 Then
Call PlayerMsg(index, "I'm the Battle tutor, can u get me 5 cogs from ClockWork Rabbit?", 12)
If CanTake(Index, 3, 5) = False Then
    Call PlayerMsg(index, "You didn't get the cogs!", 12)
Else
    Call TakeItem(index, 3, 5)
    Call GiveItem(index, 1, 200)
    Call PlayerMsg(index, "Thanks heres your Reward!", 12)
End If
Else
Call PlayerMsg(index, "Your to low a level for this quest!", 12)
End If
Exit Sub
```
Link to comment
Share on other sites

hold on a sec could you show me one last thing?

what would it look like if i added another if and else?
i need a min lvl req and it says your to low a lvl.

If GetPlayerLevel(index) >= 5 Then
            Call PlayerMsg(index, "Your to Low a level for this quest!", 12)
add this is plz >.< cause i know i'd do same mistake as last time but at least i can now make a decent script with 2 elses.
Link to comment
Share on other sites

i believe that it would go like so….

```
Case 3
If GetPlayerLevel(index) >= 5 Then
cal playermessage(index, "You are too high a level for this quest!", 12)
End If
If GetPlayerLevel(index) <= 3 Then
Call PlayerMsg(index, "I'm the Battle tutor, can u get me 5 cogs from ClockWork Rabbit?", 12)
If CanTake(Index, 3, 5) = False Then
    Call PlayerMsg(index, "You didn't get the cogs!", 12)
Else
    Call TakeItem(index, 3, 5)
    Call GiveItem(index, 1, 200)
    Call PlayerMsg(index, "Thanks heres your Reward!", 12)
End If
Else
Call PlayerMsg(index, "Your to low a level for this quest!", 12)
End If
Exit Sub
```
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...