Hello everyone here at RageZone.
I am pretty much a novice at coding and at the moment yes i am at the moment leeching alot of scripts to view and learn abit from.
What i dont understand at this point is this script:
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("I am the server skill maxer.");
} else if (status == 1) {
cm.sendSimple("Would you like me to max your skills? \r\n #L0# Yes. #l \r\n #L1# No. #l");
} else if (status == 2) {
if (selection == 0) {
cm.maxMastery();
cm.sendOk("Your skills have been maxed.");
cm.dispose();
} else if (selection == 1) {
cm.sendOk("Hmph. Come back later.");
cm.dispose();
}
}
}
Sure it puts up a dialog for the NPC i added it to BUT and yes it gives all skills but it doesnt max them, but it also steals all AP from the person who uses it.
So why is it stealing the AP and wont max the skills?
AM i missing something in this script?
Cause as i said in the beginning i am really newb to scripting and i can absolutly nothing.
But im trying to learn.
Well hopefully someone can help me get the script working.
And yes i have added in the bits i need in the npcconversationmanager.
And if someone could help me create a player command it would also help alot.
I dont know how to make the GM command !maxskills into a player command so all help is welcome.
Im using moopledev rev 120.


Reply With Quote![[Solved]This npc script wont work](http://ragezone.com/hyper728.png)



