|
hey addias can i help you on yru seever with xerofait i no good scriting here is one of mine that u can look at
// Made by XprinceX
// NPC ID: Who knows?
// Location: Somewhere in twin city
/*
* Quest: Get 20 pk tickets
* Reward: 30k or a chance for a NowbieBlade +1
* NPC name, location: Whatever you want, not my problem.
*/
String[] dlg=null;
switch(option)
{
case -1:
{
String[] tm={
"AVATAR 1",
"TEXT Please bring me 20 pk tickets! If you do, I will give you thirty thousand gold, or possibly a good weapon.",
"OPTION0 Here you go!",
"OPTION1 What weapon?",
"OPTION-1 Eat me."
};
dlg=tm;
break;
}
case 0:
{
int tickets = count(710001);
if (tickets < 20)
{
String[] tm={
"AVATAR 1",
"TEXT You do not have all the things I asked for.",
"OPTION-1 I will come back later or something."
};
dlg=tm;
break;
}
// no need to check for inv size,
// because if you lose 20 pk tickets you can definitely get 1 item
String[] tm={
"AVATAR 1",
"TEXT Please choose a reward.",
"OPTION2 I want 30,000 gold.",
"OPTION3 I want a chance to win a good weapon.",
"OPTION-1 These rewards blow."
};
dlg=tm;
break;
}
case 1:
{
String[] tm={
"AVATAR 1",
"TEXT The weapon is a NowbieBlade with two sockets and -7% damage blessing and a 255 health enchantment.",
"OPTION-1 Cool, I will think about it."
};
dlg=tm;
break;
}
case 2:
{
delitem(710001, 20);
atcommand("@gold 30000");
String[] tm={
"AVATAR 1",
"TEXT Thank you, here is your 30,000 gold as promised! Use it wisely.",
"OPTION-1 Sweet, bye."
};
dlg = tm;
break;
}
case 3:
{
delitem(710001, 20);
// RANDOM NUMBER GENERATOR HERE
// Sorry, I'm not sure if this is the correct syntax,
// But since this seems to be in java, it should work
java.util.Random numGen = new java.util.Random();
int RanNumber = numGet.nextInt(10);
if (ranNumber==5)
{
atcommand("@item 410302 1 2 0 7 255");
String[] tm={
"AVATAR 1",
"TEXT Well done, you won the NowbieBlade! Remember, you cannot trade it or drop it on purpose.",
"OPTION-1 Sweet, bye."
};
dlg=tm;
break;
}
String[] tm={
"AVATAR 1",
"TEXT Sorry, you did not win the item... Better luck next time.",
"OPTION-1 You son of a bitch!"
};
dlg=tm;
break;
}
}
if(dlg!=null)
dialog(dlg);
|