Notepad :o?
Printable View
after you make your script how do you add it to ur server?
Would my script work?
Just making sure :/Quote:
/* Mikaela's Custom Wedding Script #1 */
var status = 0;
function start() {
status = -1;
action(1, 0, 0);
}
function action(mode, type, selection) {
if (mode == -1) {
cm.dispose();
}
else {
if (status >= 2 && mode == 0) {
cm.sendOk("See you later");
cm.dispose();
return;
}
if (mode == 1) {
status++;
}
else {
status--;
}
if (status == 1) {
cm.sendNext("Hello, I'm the head organizer of NhatMs Weddings");
}
else if (status == 0) {
cm.sendYesNo("Are YOU getting married?!");
}
else if (status == 0) {
cm.sendOk("Fantastic! Have your mate talk to me, too, to meet you in the dressing room");
cm.warp([680000100], [0]);
cm.dispose();
}
else if (status == 1)
cm.sendOk("I know how you feel...");
cm.dispose();
}
}
}
arigatou thank you this has helped me alot in my past projects
get31720, you may want to add that comments can be put in two ways:
or:Code://Like this...
Code:/* Like
This
.
.
.
*/
Great tut, especially simple because I already know actionScript and a bit of javaScript already. +thank'd.
Cool tutorial, helped me lots.
But, I have a problem with this script.
What's wrong with it?Code:/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
var status = 0;
function start() {
status = -1;
action(1,0,0);
}
function action(mode, type, selection) {
if (mode == -1) {
cm.sendOk("Now I'm going emo 'cuz you want talk to me D:");
cm.dispose();
} else {
if (mode == 1)
status++;
else
status--;
if (status == 0) {
cm.sendNext("Hello! My name is Duey and TEST NPC made by #d Jurkey");
} else if (status == 1) {
cm.sendGetText("What's your name?");
} else if (status == 2) {
cm.sendNext("Hello #b" + cm.getText() + "#k! Glad to meet you!");
} else if (status == 3) {
cm.sendNext("Do you want 100 NX Cash and 1 million mesos? It only works if you are SuperGM");
} else if (status == 4) {
if (cm.getJob().equals(net.sf.odinms.client.MapleJob. SUPERGM)) {
cm.gainNX(100);
cm.gainMeso(10000);
cm.sendOk("Enjoy and goodbye!");
cm.dispose();
}
}
}
}
Thanks for this guild. I can learn much more from here. :)
goood
I'm using the pack rev 107 and I was asking if someone can tell me which commend is use to make a NPC spawn a monster...
cm.spawnMonster doesn't exist so.....HELP XD
Hi this is my first post ever on RageZone, but I
Hello, thanks for this guide Angel! It is very useful.
Um, I know this is a very simple script, but I have been having trouble setting up a server (RuntimeExceptions and whatnot), so I can't really test this. Is it set up correctly? (Particularly the (status == 3) part.)
Thanks for answering!PHP Code:var status = 0;
function start() {
status = -1;
action(1, 0, 0);
}
function action(mode, type, selection) {
if (mode == -1) {
cm.dispose();
}
else {
if (status >= 2 && mode == 0) {
cm.sendOk("See you around!");
cm.dispose();
return;
}
if (mode == 1) {
status++;
}
else {
status--;
}
if (status == 0) {
cm.sendNext("Hello, welcome to RandompeepMS!");
cm.dispose();
}
else if (status == 1) {
cm.sendNext("How goes the hunting?");
cm.dispose();
}
}
else if (status == 2) {
cm.sendSimple("Do you need mesos? \r\n#L0#Yes, I'm broke and need some to start!#l\r\n#L1#No, but can I have some anyways?#l\r\n#L2#No, thank you.#l");
}
}
else if (status == 3) {
if (selection == 0) {
if (cm.getmeso() <= 1000) {
cm.gainmeso([500000]);
cm.sendOk("Wow, you really do need mesos. Well, I do not have much myself, but I hope it'll do.")
cm.dispose();
}
else {
cm.sendOk("No, you aren't. Don't rip me off!");
cm.dispose();
}
else if (selection == 1) {
if (cm.getmeso() <= 1000000) {
cm.gainmeso([100000]);
cm.sendOk("Well, you don't really need it, but... have a little anyways.");
cm.dispose();
}
else {
cm.sendOk("You don't have enough already? Stop leeching off my mesos; you have more than me now!");
cm.dispose();
}
else if (selection == 2) {
cm.sendOk("You're an honest one. Unfortunately I don't have anything else to give you. Maybe some other day. (When I figure out how to code adding fame/karma!");
cm.dispose();
}
}
}
}
}
Note: I have since figured out how to give fame. But, does it work on a server with karma instead?
Also, could you check this:
It's just the last part of the above script. Thank you for checking and (hopefully) answering the question!PHP Code:else if (selection == 2) {
cm.sendOk("You're an honest one. Unfortunately I don't have anything else to give you. Maybe some other day.");
cm.dispose();
if (cm.getFame() <= 25) {
cm.gainFame([1]);
}
}
}
}
}
}
Also, how do you use these? How do you determine which NPC gets the script?
Yo man,
I'm trying to edit my prize giver so my players can get cool items, It used to work just fine but now it wont work? can you correct what i did wrong Please and thank you!:D:
Quote:
/*Yellow Balloon
*/
/*Made By Saber
*/
var status = 0;
var l = "Welcome to the Custom Event ITEM Shop!, choose an item you'd wish to trade in for \r\n\n#fUI/UIWindow.img/QuestIcon/3/0#\r\n\n#L0#1#i1002140##t1002140# ~ 200 Tickets#l\r\n\n#L1# 1#i1042003##t1042003# ~ 400 tickets#l\r\n\n#L2# 1#i1062007##t1062007# ~ 1500 tickets#l\r\n\n#L3# 1#i1322013##t1322013# ~ 1500 tickets#l\r\n\n#L4# 1#i1442023##t1442023# ~ 50 tickets#l\r\n\n#L5# 1#i1012106##t1012106# ~ 700 tickets#l\r\n\n#L6# 1#i1012086##t1012086# ~ 420 tickets#l\r\n\n#L7# 1#i1012076##t1012076# ~ 580 tickets#l\r\n\n#L8# 1#i1012077##t1012077# ~ 20 tickets#l\r\n\n#L9# 1#i1452060##t1452060# ~ 900 tickets#l";
function start() {
status = -1;
action(1, 0, 0);
}
function action(mode, type, selection) {
if (mode == -1) {
cm.dispose();
} else {
if (mode == 0) {
cm.dispose();
return;
}
if (mode == 1)
status++;
else
status--;
if (status == 0) {
cm.sendYesNo("Do you have any #i5220001# Event Tickets? If You Do You Can Trade It For Some Nice Items!");
}else if(status == 1){
cm.sendSimple(l+r);
}else if(status == 2){
if(!cm.haveItem(5220001)){
cm.sendOk("Come Back When You Have Some Event Tickets");
cm.dispose();
}else if(selection >= 0 && selection <= 0 && !cm.haveItem(5220001,200)){
cm.sendOk("Come Back When You Obtain A few Event Tickets");
cm.dispose();
}else if(selection >= 1 && selection <= 1 && !cm.haveItem(5220001,400)){
cm.sendOk("Come Back When You Obtain A few Event Tickets");
cm.dispose();
}else if(selection >= 2 && selection <= 2 && !cm.haveItem(5220001,1500)){
cm.sendOk("Come Back When You Obtain A few Event Tickets");
cm.dispose();
}else if(selection >= 3 && selection <= 3 && !cm.haveItem(5220001,1500)){
cm.sendOk("Come Back When You Obtain A few Event Tickets");
cm.dispose();
}else if(selection >= 4 && selection <= 4 && !cm.haveItem(5220001,50)){
cm.sendOk("Come Back When You Obtain A few Event Tickets");
cm.dispose();
}else if(selection >= 5 && selection <= 5 && !cm.haveItem(5220001,700)){
cm.sendOk("Come Back When You Obtain A few Event Tickets");
cm.dispose();
}else if(selection >= 6 && selection <= 6 && !cm.haveItem(5220001,420)){
cm.sendOk("Come Back When You Obtain A few Events Tickets");
cm.dispose();
}else if(selection >= 7 && selection <= 7 && !cm.haveItem(5220001,580)){
cm.sendOk("Come Back When You Obtain A few Events Tickets");
cm.dispose();
}else if(selection >= 8 && selection <= 8 && !cm.haveItem(5220001,20)){
cm.sendOk("Come Back When You Obtain A few Events Tickets");
cm.dispose();
}else if(selection >= 9 && selection <= 9 && !cm.haveItem(5220001,900)){
cm.sendOk("Come Back When You Obtain A few Events Tickets");
cm.dispose();
}else{
if(selection == 0){
cm.gainItem(1002140,1);
cm.gainItem(5220001,-200);
}else if(selection == 1){
cm.gainItem(1042003,1);
cm.gainItem(5220001,-400);
}else if(selection == 2){
cm.gainItem(1062007,1);
cm.gainItem(5220001,-1500);
}else if(selection == 3){
cm.gainItem(1322013,1);
cm.gainItem(5220001,-1500);
}else if(selection == 4){
cm.gainItem(1442023,1);
cm.gainItem(5220001,-50);
}else if(selection == 5){
cm.gainItem(1012106,1);
cm.gainItem(5220001,-700);
}else if(selection == 6){
cm.gainItem(1012086,1);
cm.gainItem(5220001,-420);
}else if(selection == 7){
cm.gainItem(1012076,1);
cm.gainItem(5220001,-580);
}else if(selection == 8){
cm.gainItem(1012077,1);
cm.gainItem(5220001,-20);
}else if(selection == 9){
cm.gainItem(1452060,1);
cm.gainItem(5220001,-900);
}
cm.sendOk("There you go, Hope You Enjoy It");
cm.dispose();
}
}
}
}