LadyLuck

05/16/2010 02:27 PrettyGodness#1
Guys i have another question hehe the source i got the ladyluck is infinity. How can i set it to be only 10 per day? thanks
05/16/2010 02:30 Arcо#2
Do a simple if check.
if (GC.MyChar.LotteryUsed)
I think the definition is lotteryused.
05/16/2010 03:48 PrettyGodness#3
Thanks a lot i made this:

if (GC.MyChar.LotteryUsed >= 10)
{
GC.AddSend(Packets.NPCSay(("You cant try the luck more than 10 times. bye")));
GC.AddSend(Packets.NPCLink("Alright!", 255));
GC.AddSend(Packets.NPCSetFace(N.Avatar));
GC.AddSend(Packets.NPCFinish());

}
05/16/2010 03:52 .Summer#4
Quote:
Originally Posted by PrettyGodness View Post
Thanks a lot i made this:

if (GC.MyChar.LotteryUsed >= 10)
{
GC.AddSend(Packets.NPCSay(("You cant try the luck more than 10 times. bye")));
GC.AddSend(Packets.NPCLink("Alright!", 255));
GC.AddSend(Packets.NPCSetFace(N.Avatar));
GC.AddSend(Packets.NPCFinish());

}
i like to see is going forward :)
05/16/2010 04:08 PrettyGodness#5
lol i thought was working but its not lmao it gives the "You cant try the luck more than 10 times. bye" but it enter lol
05/16/2010 04:11 .Summer#6
Code:
if (GC.MyChar.LotteryUse == 10)
{
GC.AddSend(Packets.NPCSay(("You cant try the luck more than 10 times. bye")));
GC.AddSend(Packets.NPCLink("Alright!", 255));
GC.AddSend(Packets.NPCSetFace(N.Avatar));
GC.AddSend(Packets.NPCFinish());
}
then when enter put:
Code:
GC.MyChar.LotteryUse += 1;
then in character.cs put a
Code:
public int LotteryUse = 0;
but also you will need some timer to check if there have been 24hours.
05/16/2010 04:23 PrettyGodness#7
didnt work yet =\ do u have msn? Look i put

if (GC.MyChar.LotteryUse == 10)


{
GC.AddSend(Packets.NPCSay(("You cant try the luck more than 10 times. bye")));
GC.AddSend(Packets.NPCLink("Alright!", 255));
GC.AddSend(Packets.NPCSetFace(N.Avatar));
GC.AddSend(Packets.NPCFinish());
GC.MyChar.LotteryUse += 1;
}
05/16/2010 04:25 .Summer#8
you have to put += 1
after the teleport

[Only registered and activated users can see links. Click Here To Register...]
but im not on right now :)
05/16/2010 19:07 gerble93#9
Well do this.. if not already..

Define it in the character.cs location (default 0)
Make it save and load with the save function and load function
Make a timer that clears it every 24 hrs...
make it so once u get your prize it adds up..
make it check in the npc.. allow or disallow..
ur done.
05/17/2010 00:04 PrettyGodness#10
Thanks guys i downloaded another source i fixed almost of my problemas thanks a lot