Munchkin Posted January 5, 2013 Group: Members Topic Count: 11 Topics Per Day: 0.00 Content Count: 28 Reputation: 0 Joined: 04/19/12 Last Seen: May 6, 2013 Share Posted January 5, 2013 I'm planning to make an item that gives immunity for a player that lasts a minute and can only be used on a specific map (i use ein_dun02) getmapxy(@mapname$,@mapx,@mapy,0) if(@mapname$ == "ein_dun02") { attachnpctimer getcharid(3); atcommand "@battleignore"; dispbottom "Item effect will last 1 minute or upon logging out."; initnpctimer; } OnTimer60000: OnTimerQuit: atcommand "@battleignore"; end; But i think something is wrong in which item effect will stack... x_x Someone can edit my code to make free of exploit? Quote Link to comment Share on other sites More sharing options...
Euphy Posted January 5, 2013 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 January 5, 2013 'initnpctimer' can only run one object. You're looking for 'addtimer'. Instead of 'getmapxy', you can use strcharinfo(3) to retrieve map info. You didn't write any 'end' after the condition and are missing a semicolon, plus OnTimerQuit is never called. o.o /* Item script */ if (strcharinfo(3) != "ein_dun02") end; if (@battleignore) { dispbottom "You can only run one instance of this item."; end; } else set @battleignore,1; addtimer 60000,"battleignore::OnStop"; atcommand "@battleignore"; dispbottom "Item effect will last 1 minute or upon logging out."; end; - script battleignore -1,{ OnStop: atcommand "@battleignore"; set @battleignore,0; end; } 1 Quote Link to comment Share on other sites More sharing options...
Munchkin Posted January 5, 2013 Group: Members Topic Count: 11 Topics Per Day: 0.00 Content Count: 28 Reputation: 0 Joined: 04/19/12 Last Seen: May 6, 2013 Author Share Posted January 5, 2013 Thank you sir Euphy ! you're the best I also have a question about your hunting script but i'll just pm it! Quote Link to comment Share on other sites More sharing options...
Ryokem Posted January 6, 2013 Group: Members Topic Count: 0 Topics Per Day: 0 Content Count: 205 Reputation: 19 Joined: 10/12/12 Last Seen: November 7, 2013 Share Posted January 6, 2013 (edited) What about to use sc_invincible instead? I find it more practical.. sc_start sc_invincible 60000; Edit: I hope that bonus wasn't been nerfed or deleted. Edited January 6, 2013 by Ryokem Quote Link to comment Share on other sites More sharing options...
Question
Munchkin
I'm planning to make an item that gives immunity for a player that lasts a minute and can only be used on a specific map (i use ein_dun02)
But i think something is wrong in which item effect will stack... x_x Someone can edit my code to make free of exploit?
Link to comment
Share on other sites
3 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.