hey uuh. how make a script.. notpad?
or w/e its java script right?
Edit: i maked one whit notepad but how let it work
i have only my notpad (where to put)
Printable View
hey uuh. how make a script.. notpad?
or w/e its java script right?
Edit: i maked one whit notepad but how let it work
i have only my notpad (where to put)
hi wats the cm.command for getting stats
@ Tropicano-Marc
You can make a script on nearly anything. Including regular Notepad. Save it as a .js file and put it in your scripts > NPC folder and you're done :]
@ koldoleboy
To be honest. I have no idea. I tried search some info. on it and this is what I found:
I managed to find a few scripts that actually checked for AP. Whether this works or not is completely unknown to me. I could not find it in the NPCCommandProcessor.java but you could try.
In the scripts they used:
PHP Code:p.getStr() // checks for Str (Same applys to Dex,Int,and Luk
Bascially the same sort of thing with cm. commands except it had p. All the scripts I could find used this. The only reason I'm IFing it is because I couldn't find it in the repacks. Good Luck tell me if this works or not. Somebody else will probably reply with a better answer or agree with this.PHP Code:p.setStr() // sets Str (Same applys to Dex,Int and Luk
Hey there I got problem and I hope you guys can help me out.
I need a code for a NPC to warp players somewhere BUT they need a certain level to get warped.
this is what I need,
- If a player is level 120 then he/she gets warped to map ("xxx")
- If a player is BELOW level 120 he/she gets warped to FM("910000000")
Can someone help me out?
Kind regards,
Frank
I'm a freaking bit rusty at scripting,lol. Test if it works and if not,post me the bat error.PHP Code:var status = 0;
var mapxxx = 1000000;
var fm = 910000000;
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("Alright, see you next time.");
cm.dispose();
return;
}
if (mode == 1) {
status++;
}
else {
status--;
}
if (status == 0) {
if(cm.getLevel() >= 120) {
cm.sendNext("You're gonna be warped to map xxx.");
status = 9;
} else if (cm.getLevel() < 120) {
cm.sendNext("You're not Level 120 yet,so you'll be warped to FM!");
status = 11;
}
} else if (status == 10) {
cm.warp(mapxxx);
cm.dispose();
} else if (status == 12) {
cm.warp(fm);
cm.dispose();
}
}
}
@ Frank + Lejgolacsz
Thanks Lejgolacsz for making his NPC script. I found a few problems. I didn't get to test it, but it should work. If not say what happened when you clicked the NPC.
PHP Code:var status = 0;
var mapxxx = 1000000;
var fm = 910000000;
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("Alright, see you next time.");
cm.dispose();
return;
}
if (mode == 1) {
status++;
}
else {
status--;
}
if (status == 0) {
if(cm.getLevel() >= 120) {
cm.sendNext("You're gonna be warped to map xxx.");
status = 10; // Status is CHANGED to 10 (not added 10)
} else if (cm.getLevel() < 120) {
cm.sendNext("You're not Level 120 yet,so you'll be warped to FM!");
status = 12;
}
} if (status == 10) { // If status is 10 then this will happen. I also changed the else if to if
cm.warp(mapxxx);
cm.dispose();
} else if (status == 12) { // If status is 12 this will happen
cm.warp(fm);
cm.dispose();
}
}
}
THANKS ANGEL! This guide helped lots. :]
I'd like to ask, though, is there a way I can make an NPC that would keep track of how many mesos it was given total. For example, PlayerA gives the NPC 1,000 mesos, then PlayerB comes back and gives the NPC another 1,000 mesos, making the NPC say that it is currently carrying 2,000 mesos.
hmm get31720,but doesn't the cm.sendNext increase the status below it by one already? That's what I had always when I made my scripts.
So if you do cm.sendNext() and status 10 after it,you need to do else if for status 11.
~Angel~ can you help me with this script?
I change this script so that we need 99 X-mas Present Box to exchange one of the Santa Equipment,but if we only have one and choose one of the following selection we will lose all of our X-mas Present Box.Can you change it so that the remaining X-mas Present Box will not gone?
This script works perfectly,the problem is you will lose all your X-max Present Box,example if you have only 90 X-mas Present Box and you choose one of the selection,your X-Mas Box Present will gone without getting your desire Santa's Equipment.Code:/* Author ~ johnlth93, xb0ib0ix3 and vincent - Zairean Dev
*
* X'mas Event
*
* 9201030.js: Happy Village - X'mas Present Box Item Exchanger.... Fixed a serious error in selection 4,5 (can get item without X'mas Present Box)
*/
function start() {
cm.sendSimple("Hello,Would you like to exchange #v4000423# for my Santa Equipments? You can get some from the Box on the ground. #bNotice#k:#rIf you don't have enough #v4000423# please don't exchange,because you will lose all your #v4000423# without getting your desire item.#k\r\n#L0# 99 #v4000423# for a #v1002225# #k\r\n#L1# 99 #v4000423# for a #v1012007##k\r\n#L2# 99 #v4000423# for a #v1082101##k\r\n#L3# 99 #v4000423# for a #v1051049# #k\r\n#L4# 99 #v4000423# for a #v1070005##k\r\n#L5# 99 #v4000423# for a #v1071016##k\r\n#L6# 99 #v4000423# for a #v1050119# #k\r\n#L7# 99 #v4000423# for a #v1050019# #k\r\n#L8# 99 #v4000423# for a #v1051131# #k\r\n#L9# 99 #v4000423# for a #v1702166# #k\r\n#L10# 99 #v4000423# for a #v1702100# #k\r\n#L11# 99 #v4000423# for a #v1702008# #k\r\n#L12# 99 #v4000423# for a #v1002479# #k\r\n#L13# 99 #v4000423# for a #v1052046#");
}
function action(mode, type, selection) {
cm.dispose();
if (selection == 0) {
cm.haveItem(4000423,99);
cm.gainItem(4000423,-99);
cm.gainItem(1002225,1);
cm.sendOk("Happy Merry Christmas with the #v1002225#");
} else if (selection == 1) {
cm.haveItem(4000423,99);
cm.gainItem(4000423,-99);
cm.gainItem(1012007,1);
cm.sendOk("Happy Merry Christmas with the #v1012007#");
} else if (selection == 2) {
cm.haveItem(4000423,99);
cm.gainItem(4000423,-99);
cm.gainItem(1082****1);
cm.sendOk("Happy Merry Christmas with the #v1082101#");
} else if (selection == 3) {
cm.haveItem(4000423,99);
cm.gainItem(4000423,-99);
cm.gainItem(1051049,1);
cm.sendOk("Happy Merry Christmas with the #v1051049#");
} else if (selection == 4) {
cm.haveItem(4000423,99);
cm.gainItem(4000423,-99);
cm.gainItem(1070005,1);
cm.sendOk("Happy Merry Christmas with the #v1070005#");
} else if (selection == 5) {
cm.haveItem(4000423,99);
cm.gainItem(4000423,-99);
cm.gainItem(1071016,1);
cm.sendOk("Happy Merry Christmas with the #v1071016#");
} else if (selection == 6) {
cm.haveItem(4000423,99);
cm.gainItem(4000423,-99);
cm.gainItem(1050119,1);
cm.sendOk("Happy Merry Christmas with the #v1050119#");
} else if (selection == 7) {
cm.haveItem(4000423,99);
cm.gainItem(4000423,-99);
cm.gainItem(1050019,1);
cm.sendOk("Happy Merry Christmas with the #v1050019#");
} else if (selection == 8) {
cm.haveItem(4000423,99);
cm.gainItem(4000423,-99);
cm.gainItem(1051131,1);
cm.sendOk("Happy Merry Christmas with the #v1051131#");
} else if (selection == 9) {
cm.haveItem(4000423,99);
cm.gainItem(4000423,-99);
cm.gainItem(1702166,1);
cm.sendOk("Happy Merry Christmas with the #v1702166#");
cm.dispose();
} else if (selection == 10) {
cm.haveItem(4000423,99);
cm.gainItem(4000423,-99);
cm.gainItem(1702****1);
cm.sendOk("Happy Merry Christmas with the #v1702100#");
cm.dispose();
} else if (selection == 11) {
cm.haveItem(4000423,99);
cm.gainItem(4000423,-99);
cm.gainItem(1702008,1);
cm.sendOk("Happy Merry Christmas with the #v1702008#");
cm.dispose();
} else if (selection == 12) {
cm.haveItem(4000423,99);
cm.gainItem(4000423,-99);
cm.gainItem(1002479,1);
cm.sendOk("Happy Merry Christmas with the #v1002479#");
cm.dispose();
} else if (selection == 13) {
cm.haveItem(4000423,99);
cm.gainItem(4000423,-99);
cm.gainItem(1052046,1);
cm.sendOk("Happy Merry Christmas with the #v1052046#");
cm.dispose();
}
}
hey bro more screenshots plz and maybe even add a vid of hao to check for an item plz and thnx
@ JackBread
You would need to keep the information in a table in your MySql DB. Look it up. Once you have that the NPC can be scripted to edit the numbers in the table for the character
@ Lejgolacsz
Hmm... I'm not sure. Try it and tell me which way works.
@ Kanzaki123
Sorry, I'm not completely fixing the script for you but I'll tell you what I see wrong. The cm.haveItem need to be use in the if and else way. Look at the guide for examples. Also you
'll need to make an else for the cm.haveItem because if they DON'T have it then the script needs to know what to do.
@ Epic
The check for Item and Mesos are mentioned in there.
Sorry about all the short replies. I can only check this on weekends and it's hard to answer all you at once D:
@ L♥ve
I actually don't really play maplestory at all anymore. I play something different, but I check my guide every now and then for new posts and PMs.
Is there a cm.[Command] for NPC to check whether the player/character have the skill?
I have a question how do you check if the person has both level and item?