kwali Posted March 17, 2009 Author Share Posted March 17, 2009 ```Sub hpPot(index, addhp) addhp = Call GetPlayerHP(index)+addhp SetPlayerHP(index,addhp)End Sub```trying to make a potion that will increase the players hp by an amountI'm completely new to all of this and very confused lol so I need as much help as I can get on how to make this work :confused:EE 2.7 Link to comment Share on other sites More sharing options...
AdrianC Posted March 17, 2009 Share Posted March 17, 2009 I'm guessing you want:Sub hpPot(index, addhp) SetPlayerHP(index, int(GetPlayerHP(index) + addhp))End SubI didn't check the commands to make sure that all the parameters are correct, but if they are, this should work. Link to comment Share on other sites More sharing options...
Arcterious Posted March 17, 2009 Share Posted March 17, 2009 I would put this under Sub UseItem, not under its own sub.If ItemNum = # ThenCall SetPlayerHp(Index, GetPlayerHp(Index) + #)End IfThat should work without a doubt. Link to comment Share on other sites More sharing options...
kwali Posted March 17, 2009 Author Share Posted March 17, 2009 ty it worksbut how do I destroy the item after it has been usedalso, this is a different problem but whenever I talk to an npc in game, if I give them text to say, the text will show up 4 times, how can I fix this? Link to comment Share on other sites More sharing options...
Arcterious Posted March 17, 2009 Share Posted March 17, 2009 I don't know anything about the quest, but this is how to remove the item.If ItemNum = # ThenCall SetPlayerHp(Index, GetPlayerHp(Index) + #)Call TakeItem(Index, #, Value)End If Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now