[Release]Timeless and elemental weapon creation npc,
This was made by me and fixed by Bendanx3 and happydud3 Thanks guys.And here you go might be usefull i unno i havent tested it not gms like i know but oh well everyone else releases useless crap why cant i? Enjoy :]
Code:
/*
This file is part of the OdinMS Maple Story Server
Copyright (C) 2008 Patrick Huy <patrick.huy@frz.cc>
Matthias Butz <matze@odinms.de>
Jan Christian Meyer <vimes@odinms.de>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License version 3
as published by the Free Software Foundation. You may not use, modify
or distribute this program under any other version of the
GNU Affero General Public License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/* Timeless weapon creator and Elemental Weapon creator Nana perion.
* Author: Josh
* Fixed by happydud3 && bendanx3.
* lalalala.
*/
var status;
var weaponType;
var Weapon;
var cost;
var reqItems;
var reqAmount;
var timeLessW = new Array(1482023, 1302081, 1312037, 1322060, 1402046, 1412033, 1422037);
var elementalS = new Array(1382045, 1382046, 1382047, 1382048, 1382049, 1382050, 1382051, 1382052, 1372035, 1372036, 1372037, 1372038, 1372039, 1372040, 1372041, 1372042);
function start() {
status = -1;
action(1, 0, 0);
}
function action(mode, type, selection) {
if (mode == -1 || mode == 0) {
cm.dispose();
return;
} else if (mode == 1)
status++;
else
status--; // Wont ever decrease but good for future reference.
if (status == 0) {
cm.sendOk("Pst... If you have the right goods, I can turn it into something Sweet...\r\n#b#L0#Create a TimeLess Weapon?#l\r\n#L1#Elemental Weapon?#l");
} else if (status == 1) {
if (selection == 0) {
weaponType = 1;
var talk = "So, what kind of Weapon would you like me to make?";
for (var i = 0; i < timeLessW.length; i++)
talk += "\r\n#L"+i+"##b#t"+timeLessW[i]+"##k - Warrior Lv. 120#l";
cm.sendSimple(talk);
} else if (selection == 1) {
weaponType = 2;
var talk = "Elemental weapons? Sure i can hook you up with them for a price...";
var reqLevel;
for (var i = 0; i < eWeapon.length; i++) {
if (i < 4)
reqLevel = 103;
else if (i >= 4 && i < 8)
reqLevel = 163;
else if (i >= 8 && i < 12)
reqLevel = 70;
else
reqLevel = 130;
talk += "\r\n#L"+i+"##b#t"+eWeapon[i]+"##k - Mage Lv. "+reqLevel+"#l";
}
cm.sendSimple(talk);
}
} else if (status == 2) {
Weapon = weaponType == 1 ? timeLessW[selection] : elementalS[selection];
cm.sendYesNo("So, you want me to make a #t"+Weapon+"?");
} else if (status == 3) {
var talk = "I'm going to need specific items from you in order to make it. Make sure you have room in your inventory, though!#b";
if (weaponType == 1) {
reqItems = new Array(4005004, 4005000, 4011006, 4005004, 4005000, 4011006, 4005004, 4005000, 4011006, 4005004, 4005000, 4011006, 4005004, 4005000, 4011006, 4005004, 4005000, 4011006, 4005004, 4005000, 4011006);
reqAmount = new Array(50, 50, 10);
} else if (weaponType == 2) {
reqItems = new Array(4005001, 4021008, 4021005, 4005001, 4021008, 4021005, 4005001, 4021008, 4021005, 4005001, 4021008, 4021005, 4005001, 4021008, 4021005, 4005001, 4021008, 4021005, 4005001, 4021008, 4021005, 4005001, 4021008, 4021005, 4005001, 4021008, 4021005, 4005001, 4021008, 4021005, 4005001, 4021008, 4021005, 4005001, 4021008, 4021005, 4005001, 4021008, 4021005, 4005001, 4021008, 4021005, 4005001, 4021008, 4021005);
reqAmount = new Array(15, 15, 10);
}
var x = -1; // Rofl for the reqAmount.
for(var i = 0; i < reqItems.length; i++) {
x++;
if (x > 2)
x = 0;
prompt += "\r\n#i"+reqItems[i]+"# - "+reqAmount[x]+"#t"+reqItems[i]+"#";
}
} else if (status == 4) {
if (cm.getMeso() >= cost) {
var complete = true;
var x = -1; // Rofl defined again. FTW
for(var i = 0; i < reqItems.length && complete; i++) {
x++;
if (x > 2)
x = 0;
if (!cm.haveItem(reqItems[i], reqAmount[x]))
complete = false;
}
if (complete) {
// if (cm.canHold(item)) { /*No idea if theres a function called "canHold"*/
cm.gainItem(Weapon, 1);
cm.sendOk("All done. If you need anything else... Well, I'm not going anywhere.");
// } else { cm.sendOk("Please make sure you have room in your inventory, and talk to me again."); }
} else {
cm.sendOk("I can't make anything unless you bring me what I ask for.");
}
} else {
cm.sendOk("You cannot afford my services...");
}
cm.dispose();
}
}
Re: Timeless and elemental weapon creation npc,
Re: Timeless and elemental weapon creation npc,
v60 plus v55-59 doesent have elemental weapons or timeless weps.
Re: Timeless and elemental weapon creation npc,
nice ive v61 server ill add it soon
where do i need to put this?
Re: Timeless and elemental weapon creation npc,
Re: Timeless and elemental weapon creation npc,
Re: Timeless and elemental weapon creation npc,
Quote:
Originally Posted by
aropop
nice ive v61 server ill add it soon
where do i need to put this?
it's a npc script choose the npc you want to use it and copy paste it o-o
Re: Timeless and elemental weapon creation npc,
Where do i need to put the script?
Re: Timeless and elemental weapon creation npc,
Quote:
Originally Posted by
aropop
Where do i need to put the script?
v61 source folder>scripts>Npc then pick a npc you want to use it ... if you dont know the id's i suggest finding npc id's somewhere and picking a npc you want to use it.
Re: [Release]Timeless and elemental weapon creation npc,
great release
ill not use it so bad cuz my server is v55 :(:
Re: [Release]Timeless and elemental weapon creation npc,
Nice release. Will add if a v62 localhost ever comes out...
Re: [Release]Timeless and elemental weapon creation npc,
Quote:
Originally Posted by
happydud3
Guys You gotta fix up the script a little, it still doesnt work lol =/
I have no idea where I went wrong with the script but yeahs..
EDIT: BloodAngel13, can you see that I can actually code ?. Just because I dont release shit to the public doesnt mean I cant code
You just said that you dont know where YOU went wrong with the scripts. Yea that is showing how awesome you can code. If you thought the npc script release was intended for you, you are stupid. I clearly stated it was for begginers so that they can have at least 1 custom npc.
Re: [Release]Timeless and elemental weapon creation npc,
Quote:
Originally Posted by
BloodAngel13
You just said that you dont know where YOU went wrong with the scripts. Yea that is showing how awesome you can code. If you thought the npc script release was intended for you, you are stupid. I clearly stated it was for begginers so that they can have at least 1 custom npc.
eh pretty much the reason i dont release anything publically is cause people dont appriciate it.Flame you take it and call it theres and they make it there duty to criticise your codeing.Thats why i dont release anything really but i decided to release this.
Re: [Release]Timeless and elemental weapon creation npc,
Try this shadowzz...
This is for the thread you deleted.. you wanted to test me :)
I never test what i post.. try it.
PHP Code:
/*
This file is part of the OdinMS Maple Story Server
Copyright (C) 2008 Patrick Huy <patrick.huy@frz.cc>
Matthias Butz <matze@odinms.de>
Jan Christian Meyer <vimes@odinms.de>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License version 3
as published by the Free Software Foundation. You may not use, modify
or distribute this program under any other version of the
GNU Affero General Public License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* Timeless weapon creator and Elemental Weapon creator Nana perion.
* Author: Josh
* Fixed by happydud3 && bendanx3.
* lalalala.
*/
var i;
var status;
var weaponType;
var Weapon;
var cost;
var reqItems;
var reqAmount;
var cost = 100000;
var timeLessW = new Array(1482023, 1302081, 1312037, 1322060, 1402046, 1412033, 1422037);
var elementalS = new Array(1382045, 1382046, 1382047, 1382048, 1382049, 1382050, 1382051, 1382052, 1372035, 1372036, 1372037, 1372038, 1372039, 1372040, 1372041, 1372042);
function start() {
status = -1;
action(1, 0, 0);
}
function action(mode, type, selection) {
if (mode == -1 || mode == 0){
cm.dispose();
return;
}else{
if (mode == 1)
status++;
if (status == 0) {
cm.sendOk("Pst... If you have the right goods, I can turn it into something Sweet...\r\n#b#L0#Create a TimeLess Weapon?#l\r\n#L1#Elemental Weapon?#l");
} else if (status == 1) {
if (selection == 0) {
weaponType = 1;
var talk = "So, what kind of Weapon would you like me to make?";
for (i = 0; i < timeLessW.length; i++)
talk += "\r\n#L"+i+"##b#t"+timeLessW[i]+"##k - Warrior Lv. 120#l";
cm.sendSimple(talk);
} else if (selection == 1) {
weaponType = 2;
var talk = "Elemental weapons? Sure i can hook you up with them for a price...";
var reqLevel;
for (i = 0; i < elementalS.length; i++) {
if (i < 4)
reqLevel = 103;
else if (i >= 4 && i < 8)
reqLevel = 163;
else if (i >= 8 && i < 12)
reqLevel = 70;
else
reqLevel = 130;
talk += "\r\n#L" + i + "##b#t" + elementalS[i] + "##k - Mage Lv. " + reqLevel + "#l";
}
cm.sendSimple(talk);
}
} else if (status == 2) {
Weapon = weaponType == 1 ? timeLessW[selection] : elementalS[selection];
cm.sendYesNo("So, you want me to make a #t" + Weapon + "#?");
} else if (status == 3) {
talk = "I'm going to need specific items from you in order to make it. Make sure you have room in your inventory, though!#b";
if (weaponType == 1) {
reqItems = new Array(4005004, 4005000, 4011006, 4005004, 4005000, 4011006, 4005004, 4005000, 4011006, 4005004, 4005000, 4011006, 4005004, 4005000, 4011006, 4005004, 4005000, 4011006, 4005004, 4005000, 4011006);
reqAmount = new Array(50, 50, 10);
} else if (weaponType == 2) {
reqItems = new Array(4005001, 4021008, 4021005, 4005001, 4021008, 4021005, 4005001, 4021008, 4021005, 4005001, 4021008, 4021005, 4005001, 4021008, 4021005, 4005001, 4021008, 4021005, 4005001, 4021008, 4021005, 4005001, 4021008, 4021005, 4005001, 4021008, 4021005, 4005001, 4021008, 4021005, 4005001, 4021008, 4021005, 4005001, 4021008, 4021005, 4005001, 4021008, 4021005, 4005001, 4021008, 4021005, 4005001, 4021008, 4021005);
reqAmount = new Array(15, 15, 10);
}
var x = -1; // Rofl for the reqAmount.
for(i = 0; i < reqItems.length; i++) {
x++;
if (x > 2)
x = 0;
prompt += "\r\n#i"+reqItems[i]+"# - "+reqAmount[x]+"#t"+reqItems[i]+"#";
}
talk += prompt;
cm.sendNext(talk);
} else if (status == 4) {
if (cm.getMeso() >= cost) {
var complete = true;
x = -1; // Rofl defined again. FTW
for(i = 0; i < reqItems.length; i++) {
x++;
if (x > 2)
x = 0;
if (!cm.haveItem(reqItems[i], reqAmount[x]))
complete = false;
}
if (complete) {
if (cm.canHold(1482023)) {
for(i = 0; i < reqItems.length; i++) {
x++;
if (x > 2)
x = 0;
cm.gainItem(reqItems[i], -(reqAmount[x]));
}
cm.gainItem(Weapon, 1);
cm.sendOk("All done. If you need anything else... Well, I'm not going anywhere.");
cm.dispose();
} else {
cm.playerMessage(1,"Equip Inventory Full.");
cm.dispose();
}
} else {
cm.sendOk("I can't make anything unless you bring me what I ask for.");
cm.dispose();
}
} else {
cm.sendOk("You cannot afford my services...");
cm.dispose();
}
}
}
}
Re: [Release]Timeless and elemental weapon creation npc,
Quote:
Originally Posted by
shadowzzz
eh pretty much the reason i dont release anything publically is cause people dont appriciate it.Flame you take it and call it theres and they make it there duty to criticise your codeing.Thats why i dont release anything really but i decided to release this.
Amazing...I could'nt have said it better myself. I released a npc script that was 100% FULLY-WORKING. Just because people found a simpler way to script it everyone started flaming... I mean wtf? Many people here cant code an npc to begin with, and now people are going to critize me for trying? Not to mention I didnt fail, I tested it and I can show SS to prove it. I swear people these days got nothing better to do...