hadiesyafiq
New member
hi i want make this script will work if we have just one of 3 different item
1 got 3 kind of item apple,meat and orange...this script will be use if we have one of the item..
example
- script VIP FAKE_NPC,{
OnPCLoginEvent:
if (countitem(apple) > 0)
{
setparam(125, 55 * .exp_rate); // SP_MOD_EXP
setparam(126, 40 * .drop_rate); // SP_MOD_DROP
setparam(127, 0); // SP_MOD_DEATH
}
else
{
setparam(125, 100); // SP_MOD_EXP
setparam(126, 100); // SP_MOD_DROP
setparam(127, 0); // SP_MOD_DEATH
}
end;
OnPCLoginEvent:
if (countitem(meat) > 0)
{
setparam(125, 55 * .exp_rate); // SP_MOD_EXP
setparam(126, 40 * .drop_rate); // SP_MOD_DROP
setparam(127, 0); // SP_MOD_DEATH
}
else
{
setparam(125, 100); // SP_MOD_EXP
setparam(126, 100); // SP_MOD_DROP
setparam(127, 0); // SP_MOD_DEATH
}
end;
OnPCLoginEvent:
if (countitem(orange) > 0)
{
setparam(125, 55 * .exp_rate); // SP_MOD_EXP
setparam(126, 40 * .drop_rate); // SP_MOD_DROP
setparam(127, 0); // SP_MOD_DEATH
}
else
{
setparam(125, 100); // SP_MOD_EXP
setparam(126, 100); // SP_MOD_DROP
setparam(127, 0); // SP_MOD_DEATH
}
end;
}
not work like above..i forgot how to make script if and else...can someone show me the script?
1 got 3 kind of item apple,meat and orange...this script will be use if we have one of the item..
example
- script VIP FAKE_NPC,{
OnPCLoginEvent:
if (countitem(apple) > 0)
{
setparam(125, 55 * .exp_rate); // SP_MOD_EXP
setparam(126, 40 * .drop_rate); // SP_MOD_DROP
setparam(127, 0); // SP_MOD_DEATH
}
else
{
setparam(125, 100); // SP_MOD_EXP
setparam(126, 100); // SP_MOD_DROP
setparam(127, 0); // SP_MOD_DEATH
}
end;
OnPCLoginEvent:
if (countitem(meat) > 0)
{
setparam(125, 55 * .exp_rate); // SP_MOD_EXP
setparam(126, 40 * .drop_rate); // SP_MOD_DROP
setparam(127, 0); // SP_MOD_DEATH
}
else
{
setparam(125, 100); // SP_MOD_EXP
setparam(126, 100); // SP_MOD_DROP
setparam(127, 0); // SP_MOD_DEATH
}
end;
OnPCLoginEvent:
if (countitem(orange) > 0)
{
setparam(125, 55 * .exp_rate); // SP_MOD_EXP
setparam(126, 40 * .drop_rate); // SP_MOD_DROP
setparam(127, 0); // SP_MOD_DEATH
}
else
{
setparam(125, 100); // SP_MOD_EXP
setparam(126, 100); // SP_MOD_DROP
setparam(127, 0); // SP_MOD_DEATH
}
end;
}
not work like above..i forgot how to make script if and else...can someone show me the script?