Newbie Spellweaver
- Joined
- Nov 8, 2010
- Messages
- 40
- Reaction score
- 2
Okay everyone probably knows what a proItem is. It's basically an item that you can write up with custom stats without editing the true properties itself.
I was thinking about putting a srebirth NPC without a lot of netbeans coding or wz editing (why waste a WZ ), when I stumbled across a NPC command in npcconversationmanager.
cm.makeProItem(int, hardcore int)
The int = the ID of item you are making (please choose an equip. Who knows what will happen if you pick an etc)
and hardcore int = stats (including WA, MA, jump, etc.)
Well the number you input to hardcore INT will effect WA, and WA is worth so much more than a regular stat, so I am GUESSING/ESTIMATING that 10,000 of each stat + 10,000 WA and 10,000 MA will be around a MSI.
I may be way off, I may be right on. I don't know the true ratio to WA:Stat, but I mean knocking off 20k from every stat will compensate for the huge income of attack from WA or MA, right? Plus don't forget all that defense you're getting. Anyways. Here we go.
I customly added NPC functions in my netbeans, so this is what you'll have to do.
You want your NPC to reset stats to 4, but you don't want any AP left over like how cm.resetStats(); does, so I just made a new NPC function called cm.reset();
This resets your stats to 4 without leftover AP.
I was thinking about putting a srebirth NPC without a lot of netbeans coding or wz editing (why waste a WZ ), when I stumbled across a NPC command in npcconversationmanager.
cm.makeProItem(int, hardcore int)
The int = the ID of item you are making (please choose an equip. Who knows what will happen if you pick an etc)
and hardcore int = stats (including WA, MA, jump, etc.)
Well the number you input to hardcore INT will effect WA, and WA is worth so much more than a regular stat, so I am GUESSING/ESTIMATING that 10,000 of each stat + 10,000 WA and 10,000 MA will be around a MSI.
I may be way off, I may be right on. I don't know the true ratio to WA:Stat, but I mean knocking off 20k from every stat will compensate for the huge income of attack from WA or MA, right? Plus don't forget all that defense you're getting. Anyways. Here we go.
I customly added NPC functions in my netbeans, so this is what you'll have to do.
You want your NPC to reset stats to 4, but you don't want any AP left over like how cm.resetStats(); does, so I just made a new NPC function called cm.reset();
This resets your stats to 4 without leftover AP.
Code:
public void reset() {
getPlayer().setStr(4);
getPlayer().setDex(4);
getPlayer().setLuk(4);
getPlayer().setInt(4);
getPlayer().updateSingleStat(MapleStat.STR, 4);
getPlayer().updateSingleStat(MapleStat.DEX, 4);
getPlayer().updateSingleStat(MapleStat.LUK, 4);
getPlayer().updateSingleStat(MapleStat.INT, 4);
}
Now that you have the command, you can use it in the form of cm.reset();
And second of all, you need the script. I custom coded this for my server, so credits go to me please. . .
And second of all, you need the script. I custom coded this for my server, so credits go to me please. . .
Code:
var status = 0;
var selected;
var fee;
function start() {
status = -1;
action(1, 0, 0);
}
function action(mode, type, selection) {
if (mode == -1) {
cm.dispose();
} else {
if (mode == 0) {
cm.sendOk("A little indecisive, eh? Come back when you've made your mind.");
cm.dispose();
return;
}
if (mode == 1)
status++;
else
status--;
if (status == 0) {
cm.sendNext("Hello #h #, I'm the #rmsi#k npc of #dMidnightMS#k. You will need #b30#k of every stat and 10 #rgolden maple leaves#k. You can get stats by leveling, and #rgolden maple leaves#k by the npc #dSilent#k near the front entrance of the FM.");
} else if (status == 1) {
if (!cm.getPlayer().getStr() > 29999 && !cm.getPlayer().getDex() > 29999 && !cm.getPlayer().getInt() > 29999 && !cm.getPlayer().getLuk() > 29999 && !cm.itemQuantity(4000313) > 9) {
cm.sendOk("You don't have enough stats, or you are lacking 10 #rgolden maple leaves#k.");
cm.dispose();
} else
cm.sendYesNo("All right, are you ready to make your #rMSI#k? \r\n#eIt will cost you a stat reset and 10 #rgolden maple leaves#k.");
} else if (status == 2) {
if (!cm.getPlayer().getStr() > 29999 && !cm.getPlayer().getDex() > 29999 && !cm.getPlayer().getInt() > 29999 && !cm.getPlayer().getLuk() > 29999 && !cm.itemQuantity(4000313) > 9) {
cm.sendOk("You don't have enough items or stats.");
cm.dispose();
} else
if (cm.getPlayer().getStr() > 29999 && cm.getPlayer().getDex() > 29999 && cm.getPlayer().getInt() > 29999 && cm.getPlayer().getLuk() > 29999 && cm.itemQuantity(4000313) > 9) {
cm.sendOk("There! Check in your #requips#k inventory, and a #eblack gaia cape#n will be there. \r\n\r\nYou will see that your item has #e10,000#n stats for every stat, however, weapon magic and weapon attack are included, and those give a lot of damage.\r\n\r\nEnjoy #dMidnightMS#k");
cm.makeProItem(1102024,10000);
cm.gainItem(4000313,-10);
cm.reset();
} else
if (cm.getJobId()==910)
cm.sendOk("Omg GM haxors.\r\n\r\nJk, good to have you on the force though.");
cm.dispose();
}
}
}
If you come across problems, post here, but I highly doubt you will. I mean, if you've worked with servers long enough you can solve the issue.
Why I added the GM check at the bottom? Because I love being recognized as one.
Press thanks if you like it.
Oh and don't ask why the function includes selection. It's because I'm too lazy to modify the script. It works fine the way it is.
Why I added the GM check at the bottom? Because I love being recognized as one.
Press thanks if you like it.
Last edited by a moderator: