Nipsino Posted June 18, 2012 Group: Members Topic Count: 28 Topics Per Day: 0.01 Content Count: 218 Reputation: 16 Joined: 01/24/12 Last Seen: May 24, 2015 Share Posted June 18, 2012 So I was working on an NPC and I was thinking is it possible to give a skill when the player is in a certain map, then once they leave the map, the skills go away. So far this is what I have on the OnPCLoadMapEvent. - script Skills -1,{ OnPCLoadMapEvent: if(strcharinfo(3)) = "prontera") { skill 28,10; skill 29,10; skill 34,10; } else { end; } } prontera mapflag loadevent Map server doesn't show any script errors, however when I enter the map it wouldn't give me the skills. Quote Link to comment Share on other sites More sharing options...
Euphy Posted June 18, 2012 Group: Members Topic Count: 72 Topics Per Day: 0.02 Content Count: 2997 Reputation: 1132 Joined: 05/27/12 Last Seen: June 1, 2017 Share Posted June 18, 2012 if(strcharinfo(3)) = "prontera") { You should've gotten a mapserver error - there's an extra ")" after strcharinfo. Also, I don't think that deletes the skill when you leave the map - I'd suggest attaching a timer to the player that checks every few seconds if the player is still on the map, and if not, remove the skills and detach the timer. Quote Link to comment Share on other sites More sharing options...
Nipsino Posted June 18, 2012 Group: Members Topic Count: 28 Topics Per Day: 0.01 Content Count: 218 Reputation: 16 Joined: 01/24/12 Last Seen: May 24, 2015 Author Share Posted June 18, 2012 if(strcharinfo(3)) = "prontera") { You should've gotten a mapserver error - there's an extra ")" after strcharinfo. Also, I don't think that deletes the skill when you leave the map - I'd suggest attaching a timer to the player that checks every few seconds if the player is still on the map, and if not, remove the skills and detach the timer. Oh sorry about that. That wasn't the actual script, but yeah. It relates to that one. I didn't mean to put the extra ) there. Mmhm, alright. I'll let you know if it's an success. Thanks for the tip, btw. So I used addtoskill 426,10,0; and it worked. Only problem now is too delete the skill when they exit the map. Any ideas? Quote Link to comment Share on other sites More sharing options...
Question
Nipsino
So I was working on an NPC and I was thinking is it possible to give a skill when the player is in a certain map, then once they leave the map, the skills go away. So far this is what I have on the OnPCLoadMapEvent.
Map server doesn't show any script errors, however when I enter the map it wouldn't give me the skills.
Link to comment
Share on other sites
2 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.