Drummerpete Posted August 11, 2008 Author Share Posted August 11, 2008 this is the whole sub, did I do everything right?```' Executes whenever a player casts a scripted spell.Sub ScriptedSpell(Index, Script)   Select Case Script        Case 0         If GetPlayerMP(index) >=10 Then           Call PlayerWarp(index, 5, 25, 25) ' on a scrolling map of 50x50, Player would be in the middle?           Call SetPlayerMP(index, int(GetPlayerMP - 10))         End If      Exit Sub  End SelectEnd Sub``` Link to comment Share on other sites More sharing options...
lucifer1101 Posted August 11, 2008 Share Posted August 11, 2008 you need to use an update command, i cant remember which onebut overall it is well done Link to comment Share on other sites More sharing options...
Drummerpete Posted August 11, 2008 Author Share Posted August 11, 2008 Yeah.Alot of things still confuse me.I starting learning about 3/4 hours ago. XD Link to comment Share on other sites More sharing options...
lucifer1101 Posted August 11, 2008 Share Posted August 11, 2008 you need to use these two commands i believe so that it will update your character```Sub SendMP(ByVal index As Long)Sub SendMap(ByVal mapper As Long)```Here try this```' Executes whenever a player casts a scripted spell.Sub ScriptedSpell(Index, Script)   Select Case Script        Case 0         If GetPlayerMP(index) >=10 Then           Call PlayerWarp(index, 5, 25, 25) ' on a scrolling map of 50x50, Player would be in the middle?           Call SetPlayerMP(index, int(GetPlayerMP - 10))           call SendMP(index)           Call SendMap(index)         End If      Exit Sub  End SelectEnd Sub```i believe that should workhere is the link to the topic explaining the update commands[http://www.touchofdeathforums.com/smf/index.php/topic,29208.0.html](http://www.touchofdeathforums.com/smf/index.php/topic,29208.0.html)hope that helps. Link to comment Share on other sites More sharing options...
Guest Posted August 11, 2008 Share Posted August 11, 2008 ```Sub ScriptedSpell(Index, Script)   Select Case Script        Case 0         If GetPlayerMP(index) >=10 Then           Call PlayerWarp(index, 5, 25, 25)           Call SetPlayerMP(index, int(GetPlayerMP - 10))           Call SendPlayerData(index)         End If      Exit Sub Case Else Call PlayerMsg(Index, "No spell script found. Please contact an admin to solve this problem.", WHITE) Exit Sub  End SelectEnd Sub```Lucifer, that could very well work, but mine is simpler. It only uses 1 command whereas yours uses two.Desiderium, you might want to make a case else at the end, in case no scripting spell is found. I added that for you. Link to comment Share on other sites More sharing options...
Drummerpete Posted August 11, 2008 Author Share Posted August 11, 2008 Ah. I get it now, thanks Hail. ^^ Link to comment Share on other sites More sharing options...
balliztik1 Posted August 11, 2008 Share Posted August 11, 2008 SendPlayerData doesn't do the same thing as SendMP and SendMap. Link to comment Share on other sites More sharing options...
Guest Posted August 11, 2008 Share Posted August 11, 2008 It doesn't? Though it did. Link to comment Share on other sites More sharing options...
Drummerpete Posted August 11, 2008 Author Share Posted August 11, 2008 is confused now.So Lucifer's is right? Link to comment Share on other sites More sharing options...
Guest Posted August 11, 2008 Share Posted August 11, 2008 Works fine for me. O_O Link to comment Share on other sites More sharing options...
Drummerpete Posted August 11, 2008 Author Share Posted August 11, 2008 What version are you using? Link to comment Share on other sites More sharing options...
Guest Posted August 11, 2008 Share Posted August 11, 2008 2.7. Link to comment Share on other sites More sharing options...
Drummerpete Posted August 11, 2008 Author Share Posted August 11, 2008 is still confused. >< * Link to comment Share on other sites More sharing options...
Guest Posted August 11, 2008 Share Posted August 11, 2008 How about just use all 3 of the commands? Link to comment Share on other sites More sharing options...
Drummerpete Posted August 11, 2008 Author Share Posted August 11, 2008 I'm trying to learn scripting properly, not just use everything and hope it works =p Link to comment Share on other sites More sharing options...
Guest Posted August 11, 2008 Share Posted August 11, 2008 Lol. Using all 3 would work, though. Link to comment Share on other sites More sharing options...
Drummerpete Posted August 11, 2008 Author Share Posted August 11, 2008 But it's not necessary. Link to comment Share on other sites More sharing options...
Firon3 Posted August 12, 2008 Share Posted August 12, 2008 SendPlayerData refresh Stats I assume (at least that's what I use it for)Use SendMP only if you modify the ammount of MP cuz as for now, there is absolutely no change in the player's MP, there is only a check if player's MP is at 10 or more (at least in the original script)… Link to comment Share on other sites More sharing options...
lucifer1101 Posted August 12, 2008 Share Posted August 12, 2008 Sub SendMP(ByVal index As Long) - Updates MPSub SendMap(ByVal mapper As Long) - Updates the mapSub SendPlayerData(ByVal index As Long) - Updates index, name, sprite, map, x, y, direction, access level, PK status, guild, guild access level, class, head picture, body picture, leg picture, paperdoll information, and hardcoded skillsas you can see the sen player data sub does not update mp so i decided on using all that was need for it instead of using mp and Pdata i just used mp and map update. so i think i got a touchdown on this.No OffenceThank Balliztik for these otherwise i would never know…. Link to comment Share on other sites More sharing options...
balliztik1 Posted August 12, 2008 Share Posted August 12, 2008 @lucifer1101:> Sub SendMP(ByVal index As Long) - Updates MP> Sub SendMap(ByVal mapper As Long) - Updates the map> Sub SendPlayerData(ByVal index As Long) - Updates index, name, sprite, map, x, y, direction, access level, PK status, guild, guild access level, class, head picture, body picture, leg picture, paperdoll information, and hardcoded skills> > as you can see the sen player data sub does not update mp so i decided on using all that was need for it instead of using mp and Pdata i just used mp and map update. so i think i got a touchdown on this.> No Offence> > Thank Balliztik for these otherwise i would never know….Knew that list would come in handy one day.I liked how SendPaperdoll refreshed the map. Good fun. Link to comment Share on other sites More sharing options...
Drummerpete Posted August 12, 2008 Author Share Posted August 12, 2008 I stil don't get it..XDSomeone post how the script should look? Link to comment Share on other sites More sharing options...
balliztik1 Posted August 12, 2008 Share Posted August 12, 2008 How lucifer had it in the first reply. Link to comment Share on other sites More sharing options...
Drummerpete Posted August 12, 2008 Author Share Posted August 12, 2008 Ah, okay, thanks guys. ^^ Link to comment Share on other sites More sharing options...
dg1423 Posted August 12, 2008 Share Posted August 12, 2008 dun really need sendmap though o.O" Link to comment Share on other sites More sharing options...
DrNova Posted August 13, 2008 Share Posted August 13, 2008 Are you sure you need the send mp command?I use the call setplayerhp command, and it does it automatically, I dont use a "send hp" command and it still updates 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