Help me please

03/05/2011 23:00 Jiraiya-san#1
Aight guyz i have one favour to ask can someon get me a map where u cannont use lucky time plz :)

Thanks^^
03/05/2011 23:17 pro4never#2
if(Program.NoLuckyMaps.Contains(GC.MyChar.Map))
return;

then

List<ushort> NoLuckyMaps = new List<ushort>{mapid, mapid2, mapid3);

etc.

Simple enough to do.

Note: first section would go where you are using the luck time skill and is structured i THINK how lotf works. Never used it so wouldn't know.
03/06/2011 00:52 { Angelius }#3
Orrr ...

if (User.Map == 1036/whatever){return;}
else {Process this skill }
03/06/2011 01:10 pro4never#4
Quote:
Originally Posted by { Angelius } View Post
Orrr ...

if (User.Map == 1036/whatever){return;}
else {Process this skill }


No need for else when using return statements cause they end the method right then and there.

And yes, personall I like a list of maps something isn't allowed on cause it makes adding/removing them easier in the long run.

Alternatively you could give maps a permission flag to allow/disallow actions.
03/06/2011 01:17 { Angelius }#5
Quote:
Originally Posted by pro4never View Post
No need for else when using return statements cause they end the method right then and there.
i agree on that part and i should have done it this way

if (User.Map == 1036)
return;