Hey all, it's me again =D. I wondered if anyone could help me with some formatting on a buffing NPC I am working on. See, if it doesn't work, I will end up redoing around 4000-5000 lines of code, so, I dont really want to continue with it until I know it works, hehe. I already did the first 5000 lines of code for categories and pricing and stuff, this is the part where u give him money.
Code:
sub EVENT_ITEM
{
{
if($ulevel < 10)
{
if($platinum == "100")
{
if($copper == "1")
{
quest::castspell($userid,1200);
quest::say("Good luck on your journies $name .");
}
}
}
elsif($ulevel > 9)
{
if($ulevel < 20)
{
if($platinum == "200")
{
if($copper == "1")
{
quest::castspell($userid,1200);
quest::say("Good luck on your journies $name .");
}
}
}
}
elsif($ulevel > 19)
{
if($ulevel < 30)
{
if($platinum == "300")
{
if($copper == "1")
{
quest::castspell($userid,1200);
quest::say("Good luck on your journies $name .");
}
}
}
}
elsif($ulevel > 29)
{
if($ulevel < 40)
{
if($platinum == "400")
{
if($copper == "1")
{
quest::castspell($userid,1200);
quest::say("Good luck on your journies $name .");
}
}
}
}
elsif($ulevel > 39)
{
if($ulevel < 50)
{
if($platinum == "500")
{
if($copper == "1")
{
quest::castspell($userid,1200);
quest::say("Good luck on your journies $name .");
}
}
}
}
elsif($ulevel > 49)
{
if($ulevel < 60)
{
if($platinum == "600")
{
if($copper == "1")
{
quest::castspell($userid,1200);
quest::say("Good luck on your journies $name .");
}
}
}
}
elsif($ulevel > 59)
{
if($ulevel < 70)
{
if($platinum == "700")
{
if($copper == "1")
{
quest::castspell($userid,1200);
quest::say("Good luck on your journies $name .");
}
}
}
}
elsif($ulevel > 69)
{
if($ulevel < 80)
{
if($platinum == "800")
{
if($copper == "1")
{
quest::castspell($userid,1200);
quest::say("Good luck on your journies $name .");
}
}
}
}
elsif($ulevel > 79)
{
if($ulevel < 90)
{
if($platinum == "900")
{
if($copper == "1")
{
quest::castspell($userid,1200);
quest::say("Good luck on your journies $name .");
}
}
}
}
elsif($ulevel > 89)
{
if($ulevel < 100)
{
if($platinum == "1000")
{
if($copper == "1")
{
quest::castspell($userid,1200);
quest::say("Good luck on your journies $name .");
}
}
}
}
}
}
as you can see, you pay more for buffs as you gain levesl, so, I just wanted to know if this format would work, that way if it wont, I only have to redo about 90 lines instead of 4000-5000 lines =D. If you want to look at the entire code file, send me an email at
xteam_leader@yahoo.com it is probably about 100 kb now and is in a notepad, lol. Soooo much code, been working for hours on it so far.