https://www.youtube.com/watch?v=kFq-dr- ... e=youtu.be
Give Magic:
https://www.youtube.com/watch?v=0ynzSGj ... e=youtu.be
And here is the code (only the parts that I added, you just need to copy them in function ActivateCommand in file adventures.bb)
Code: Select all
Case 14 ; CMD 14: Data1 is the music track number
If currentmusic<>Data1 And GlobalMusicVolume2>0
If ChannelPlaying (MusicChannel)=1
StopChannel (MusicChannel)
EndIf
If Data1 >0
If Data1 =21
MusicChannel=PlayMusic ("data\models\ladder\valetfile.ogg")
Else
MusicChannel=PlayMusic ("data\music\"+Data1+".ogg")
EndIf
EndIf
CurrentMusic=Data1
levelmusic=CurrentMusic
EndIf
Case 15 ; CMD 15: Data 1 is the Magic number (0=Floing, 1=Pow etc.), Data 2 is the muber of charges (default is 9)
For j=0 To 99
If InventoryItem(j)=1001
PlaySoundFX(80,-1,-1)
CurrentSpell=Data1
InventoryTexture(j)=16+CurrentSpell
If Data2>0
CurrentSpellPower=Data2
Else
CurrentSpellPower=9
EndIf
; activate glove icon
DeleteIcon(0)
If CurrentSpell=5 And IndigoActive=3
CreateIcon(0,0,16+CurrentSpell,1002+CurrentSpell,"X "+CurrentSpellPower+" X","Activate")
Else
CreateIcon(0,0,16+CurrentSpell,1002+CurrentSpell,"- "+CurrentSpellPower+" -","Activate")
EndIf
EndIf
Next
Enjoy!