
Originally Posted by
mixta11
no i just noticed it isnt. ill add to code now and post result
getreborns is in npcconversation and still get error on .bat for } missing in compound. No idea at all
ok so i got the NPC working except one thing i need next. I need it to drop a message saying what i need to say after 200 rb. My script is
PHP Code:
function start() {
status = -1;
action(1, 0, 0);
}
function action(mode, type, selection) {
if (mode == -1) {
cm.dispose();
} else {
if (mode == 0 && status == 0) {
cm.dispose();
return;
}
if (mode == 1)
status++;
else
status--;
if (status == 0) {
cm.sendSimple ("#r I'm the StarterMap Warper of MixtaMS! I only work for people under 200 rebirths. After 200 RB i will be useless to you!#b \r\n#L1#Starter Map");
} else if (selection == 1) { ;
if (cm.getPlayer().getReborns() <= 200) {
cm.warp(30000);
cm.sendNext("Sorry, You have exceeded the Rebirth limit to train in this map now");
cm.dispose();
}
}
}
}
Assuming that the StarterMap MapID is 30000,
PHP Code:
function start() {
status = -1;
action(1, 0, 0);
}
function action(mode, type, selection) {
if (mode == -1) {
cm.dispose();
} else {
if (mode == 0 && status == 0) {
cm.dispose();
return;
}
if (mode == 1) { // in the above script, you did not open and close bracket for mode == 1 and else.
status++;
} else {
status--;
}
} // I added a } to indicate the closing of the entire mode if statement as you didnt close properly in the above script; I assumed the bat error was indicating this. Please reply if this work for you. Thanks.
if (status == 0) {
cm.sendSimple ("#r I'm the StarterMap Warper of MixtaMS! I only work for people under 200 rebirths. After 200 RB i will be useless to you!#b \r\n#L1#Starter Map");
} else if (status == 1) {
if(selection == 1) {
if (cm.getPlayer().getReborns() <= 200) {
cm.warp(30000);
cm.dispose();
} else {
cm.sendNext("Sorry, You have exceeded the Rebirth limit to train in this map now");
cm.dispose();
} // closing bracket of getReborn If statement
} // closing bracket of selection if statement
} // closing bracket of status if statement
} // closing bracket of action function
This should be working, I did not check for syntax error.
Edit: This script is assuming that what you want the script to do is when you click the NPC, you are given a choice whether to go to the StarterMap, assuming that you click that you want to go, it will check whether you have less than 200 or 200 rebirth, if you fit the criteria of having less than or equal to 200 rebirth, you get warp to the Map with MapID: 30000. If you doesnt fit the criteria which mean you have more than 200 rebirth, it output the message saying that you exceeded the rebirth limit for training at the map.