- Joined
- May 13, 2008
- Messages
- 90
- Reaction score
- 4
This NPC is based on a NPC providing information.
Screen Shots
The Script
PHP:
//Choices
var text0 = "Text 0";
var text1 = "Text 1";
var text2 = "Text 2";
var text3 = "Text 3";
var text4 = "Text 4";
var text5 = "Text 5";
var text6 = "Text 6";
var text7 = "Text 7";
var text8 = "Text 8";
var text9 = "Text 9";
var text10 = "Text 10";
//Selected text
var selection0 = "Selection 0";
var selection1 = "Selection 1";
var selection2 = "Selection 2";
var selection3 = "Selection 3";
var selection4 = "Selection 4";
var selection5 = "Selection 5";
var selection6 = "Selection 6";
var selection7 = "Selection 7";
var selection8 = "Selection 8";
var selection9 = "Selection 9";
var selection10 = "Selection 10";
//other text
var status0text = "Status 0 text";
var status1text = "Status 1 text";
//Shouldn't Have to go pass this line.
var status;
function start() {
status = -1;
action(1, 0, 0);
}
function action(mode, type, selection) {
if (mode == 1) {
status++;
}else{
status--;
}
if (status == 0) {
cm.sendNext(status0text);
} else if (status == 1) {
cm.sendSimple(""+status1text+"\r\n\r\n#L0#"+text0+"#l\r\n#L1#"+text1+"#l\r\n#L2#"+text2+"#l\r\n#L3#"+text3+"#l\r\n#L4#"+text4+"#l\r\n#L5#"+text5+"#l\r\n#L6#"+text6+"#l\r\n#L7#"+text7+"#l\r\n#L8#"+text8+"#l\r\n#L9#"+text9+"#l\r\n#L10#"+text10+"#l");
} else if (status == 2) {
if (selection == 0) {
cm.sendOk(selection0);
cm.dispose();
}else if (selection == 1) {
cm.sendOk(selection1);
cm.dispose();
}else if (selection == 2) {
cm.sendOk(selection2);
cm.dispose();
}else if (selection == 3) {
cm.sendOk(selection3);
cm.dispose();
}else if (selection == 4) {
cm.sendOk(selection4);
cm.dispose();
}else if (selection == 5) {
cm.sendOk(selection5);
cm.dispose();
}else if (selection == 6) {
cm.sendOk(selection6);
cm.dispose();
}else if (selection == 7) {
cm.sendOk(selection7);
cm.dispose();
}else if (selection == 8) {
cm.sendOk(selection8);
cm.dispose();
}else if (selection == 9) {
cm.sendOk(selection9);
cm.dispose();
}else if (selection == 10) {
cm.sendOk(selection10);
cm.dispose();
}
}else{
cm.dispose();
}
}
How to Edit
Choices, self explanitory
Selected Text, if choice 3 is chosen, selected text 3 will be shown.
Status0text, the first text you will see when clicking the npc.
Status1text, the text above choices you will see when the choices are shown.
If you wanted to add more, it doesn't take a genius. If you own a brain you should be able to read the script and add as many as you want. Same thing if you ant to remove.
Thanks or leave a nice comment if you like Selected Text, if choice 3 is chosen, selected text 3 will be shown.
Status0text, the first text you will see when clicking the npc.
Status1text, the text above choices you will see when the choices are shown.
If you wanted to add more, it doesn't take a genius. If you own a brain you should be able to read the script and add as many as you want. Same thing if you ant to remove.

