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

Lock Classes and Item Spell


Drakiac
 Share

Recommended Posts

This is all for EO

1) I've created 5 classes but I only want one to be available at the character creation screen. How do I do this? I've tried putting Locked=1 in the classes but you can still select it. How do I do I lock it? Also, how do I pick what map and coordinates I want each class to spawn?

2) How can I make it so that in order to cast a spell your character needs to have an item equipped? Every spell in the game will need this item to be able to work.

Thanks!
-Drakiac
Link to comment
Share on other sites

1\. Just remove the class selection on the character creation screen and hard code it.

2\. I imagine it would be something like```
if not getplayerequipment(index).weapon=wand or whatever then exit sub
```at the top of the cast spell sub.
Link to comment
Share on other sites

For number two will this make it so they can only cast it equipped? I don't want them to be able to cast it if it's in their inventory.

Edit: I tried it out and it gave me an error so I changed it to```
If Not GetPlayerEquipment(index, weapon) = wand Then Exit Sub
```but now its saying that it hasn't defined the variable wand yet. The items name actually is wand just so you know.

Edit 2: Yay I got it to work! My first code!```
' Make sure player has wand equipped
    If GetPlayerEquipment(index, Weapon) <> 7 Then
        Call PlayerMsg(index, "You need your wand equipped!", BrightRed)
        Exit Sub
    End If

```
Thank you guys so much for the help!
-Drakiac
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...