adamsharp Posted September 12, 2009 Author Share Posted September 12, 2009 What Is Wrong With This?```Case 6Call PlayerMsg(Index, "You Drink The First Part Of The Potion", 10)Call SetPlayerHP(Index,GetPlayerHP(Index) + 75)Call TakeItem(Index, 250, 1)Call GiveItem(Index, 251, 1)Exit Sub```Regards,Adamsharp. Link to comment Share on other sites More sharing options...
balliztik1 Posted September 12, 2009 Share Posted September 12, 2009 Doesn't look like anything's wrong, at a glance. As long as you have the take and give item subs, you should be fine, assuming your main.txt doesn't have an error somewhere else. Link to comment Share on other sites More sharing options...
xelander Posted September 12, 2009 Share Posted September 12, 2009 Case 6Call PlayerMsg(Index, "You Drink The First Part Of The Potion", 10)Call SetPlayerHP(Index,GetPlayerHP(Index) + 75)Call TakeItem(Index, 250, 1)Call GiveItem(Index, 251, 1)Call SendHP(Index)Exit Sub Link to comment Share on other sites More sharing options...
balliztik1 Posted September 12, 2009 Share Posted September 12, 2009 It actually shouldn't need a SendHP in there. SetPlayerHP automatically refreshes the HP, according to the latest source code. Not sure about older versions, though.What exactly isn't working? Are you not being healed? Is the item not being taken? Are you not getting the message? Link to comment Share on other sites More sharing options...
adamsharp Posted September 12, 2009 Author Share Posted September 12, 2009 nothing is happening at allalsowhat is wrong with this?```' Executes every second, based on the server time.Sub TimedEvent(Hours, Minutes, Seconds) If Minutes = 0 Then If Seconds = 0 Then Call AdminMsg("Don't Forget To Read The News At Tlomaw.com", YELLOW)Call AdminMsg("Look Its The Start Of A New Hour Here Have 25 Gold!", 10)Call GiveCurrency(Index, 1, 25) End If End IfEnd Sub```thank youRegards,Adamsharp. Link to comment Share on other sites More sharing options...
xelander Posted September 12, 2009 Share Posted September 12, 2009 Make sure Scripts are ON. Link to comment Share on other sites More sharing options...
balliztik1 Posted September 12, 2009 Share Posted September 12, 2009 @adamsharp:> nothing is happening at all> also> > what is wrong with this?> ```> ' Executes every second, based on the server time.> Sub TimedEvent(Hours, Minutes, Seconds)> If Minutes = 0 Then> If Seconds = 0 Then> Call AdminMsg("Don't Forget To Read The News At Tlomaw.com", YELLOW)> Call AdminMsg("Look Its The Start Of A New Hour Here Have 25 Gold!", 10)> Call GiveCurrency(Index, 1, 25)> End If> End If> End Sub> > ```thank you> Regards,> Adamsharp.Couple things wrong with that. One, AdminMsgs aren't shown to players. I don't know if you were trying to send these to players, but you'd need GlobalMsgs for that. Second, "index" is not defined in that sub, so you can't give currency to player "index". You'd have to do something like:```For index = 1 to MAX_PLAYERS If IsPlaying(index) Then Call GiveCurrency(Index, 1, 25) End IfNext```As for the potion, that definitely means your main.txt is bugged. Either turn on ScriptErrors in the data.ini file and restart the server, then fix the errors that it finds, or post your main.txt so someone else can check into it. Link to comment Share on other sites More sharing options...
Ruins of Hell Posted September 12, 2009 Share Posted September 12, 2009 @adamsharp:> what is wrong with this?> ```> shod code> > ```thank you> Regards,> Adamsharp.Stop using Regards. You aren't Godlord, only he can do that cause he's a computerWhat's wrong with it?You removed the credit for Eclipse. Link to comment Share on other sites More sharing options...
kris_hole Posted September 19, 2009 Share Posted September 19, 2009 do you have teh give item take item subs? 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