Munchkin Posted January 5, 2013 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
Euphy Posted January 5, 2013 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
Munchkin Posted January 5, 2013 Author 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
Ryokem Posted January 6, 2013 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
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?
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.