Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

[Release] Buff NPC! :D

Junior Spellweaver
Joined
Apr 21, 2007
Messages
158
Reaction score
1
Alright heres the buff NPC after editing a bit. :)

What it does:
It will let you choose what type of buff you want like...
Bless, Holy Symbol, Hyper Body, etc. :p
You can choose the amount of mesos you want your players to pay. :)

How to install:
1. Go to this thread and add the NPC command. :)
2. Copy this code into one of your NPC .js file. :D
You can use like Mia, duey, etc. Any NPC is good. :X

Credits to RMZero213 for the better script. :D
PHP:
// Credits to RMZero213 for the loop, www.untitledms.com

importPackage(net.sf.odinms.client); // leave this alone

var status = 0; // leave this alone
var price = 10000000; // define your price
var skills = new Array(2311003, 4101004, 2301004, 2301002, 2301003, 2321000, 1005, 3221002, 4001003, 2201001, 2001003, 1301006, 3001003, 1301007); // place your skills here

function start() {
    status = -1;
    action(1, 0, 0);
}

function action(mode, type, selection) {
    if (mode == -1) {
        cm.dispose();
    } else {
        if (mode == 0) {
            cm.dispose();
        }
        if (mode == 1)
            status++;
        else
            status--;
        if (status == 0) {
            var seleskill = "Hello #h #, would you like to be buffed? \r\nSelect which buff you want. \r\n#r#eNote#n: You will be using your own MP.#k\r\n#b" + price + " mesos per buff.#b";
            for (var i = 0; i < skills.length; i++) {
                seleskill += "\r\n#L" + i + "##s" + skills[i] + "#     #q" + skills[i] + "##l";
            }
            seleskill += "#k";
            cm.sendSimple(seleskill);
        } else if (status == 1) {
            if (cm.getMeso() < price) {
                cm.sendOk("You dont have enough mesos #h #.");
                cm.dispose();
            } else {
                var buff = SkillFactory.getSkill(skills[selection]);
                cm.sendOk("Enjoy your buff.");
                cm.gainMeso(-price);
                cm.giveBuff(skills[selection], buff.getMaxLevel()); //gets the max level and the selection and applies it
                cm.dispose();
            }
        }
    }
}
3. Then just edit the price you want and you can add more buffs with the array.

Screenshot:
(Old screenshots but look 80% alike) :D
kakashirock - [Release] Buff NPC! :D - RaGEZONE Forums

kakashirock - [Release] Buff NPC! :D - RaGEZONE Forums

kakashirock - [Release] Buff NPC! :D - RaGEZONE Forums



For those who wanna re-release the NPC script that is better and more advanced, please leave my copyright there and you may put yours there too. :)
 
Last edited:
Master Summoner
Loyal Member
Joined
Mar 4, 2007
Messages
564
Reaction score
1
Something new, and that's always a nice thing to see in the Release section.
Good job. ^-^
 
Junior Spellweaver
Joined
Apr 21, 2007
Messages
158
Reaction score
1
Lol, thanks.
Made this long time ago. Just didn't knew how to set skill buff levels. :D
But now I do. XD
 
Skilled Illusionist
Joined
Apr 29, 2008
Messages
310
Reaction score
1
hh nice idea to make it even better im gonna add this with a quest like in gms
and attach this to the admin
 
Master Summoner
Loyal Member
Joined
Apr 20, 2008
Messages
578
Reaction score
76
Err, your script isn't efficient. Adding new skills is harder than usual..

You may want to make use of an array.
 
Junior Spellweaver
Joined
Apr 21, 2007
Messages
158
Reaction score
1
@RMZero213
Well, im nub in javascript. :D
I guess I'll learn how to.. o.o

@Gmanpoinjay
Try relog. o.o
I tried that script in the post and it works so it should work for you. :)
 
Legendary Battlemage
Loyal Member
Joined
Dec 7, 2007
Messages
622
Reaction score
11
i tried reloging >.< i cheked if right npc still dont


Just Made New Banner =)
kakashirock - [Release] Buff NPC! :D - RaGEZONE Forums
 
Junior Spellweaver
Joined
Apr 21, 2007
Messages
158
Reaction score
1
@Sengi
If it works post a reply pl0x. :D

@Gmanpopinjay
Uh, try making the .js file 2002 then summon the npc with !npc 2002. o.o
 
Skilled Illusionist
Joined
Apr 29, 2008
Messages
310
Reaction score
1
srry actually im not gonna make the quest npc cause this DOES NOT WORK
phail
 
Legendary Battlemage
Joined
May 23, 2008
Messages
628
Reaction score
4
Why don't you make this own your own... it's not that hard lol
 
Master Summoner
Loyal Member
Joined
Apr 20, 2008
Messages
578
Reaction score
76
Code:
/*
Buff NPC made by kakashirock from RaGEZONE. :)
mapless.servegame.com
*/

// Credits to RMZero213 for the loop, www.untitledms.com

importPackage(net.sf.odinms.client); // leave this alone

var status = 0; // leave this alone
var price = 10000000; // define your price
var skills = new Array(2311003, 4101004); // place your skills here

function start() {
	status = -1;
	action(1, 0, 0);
}

function action(mode, type, selection) {
	if (mode == -1) {
		cm.dispose();
	} else {
		if (mode == 0) {
			cm.dispose();
		}
		if (mode == 1)
			status++;
		else
			status--;
		if (status == 0) {
			var seleskill = "Hello #h #, would you like to be buffed? Select which buff you want. \r\n#r#eNote#n: You will be using your own MP.#k\r\n#b" + price + " mesos per buff.#r";
			for (var i = 0; i < skills.length; i++) {
				seleskill += "\r\n#L" + i + "##s" + skills[i] + "##q" + skills[i] + "##l";
			}
			seleskill += "#k";
			cm.sendSimple(seleskill);
		} else if (status == 1) {
			if (cm.getMeso() < price) {
				cm.sendOk("You dont have enough mesos #h #.");
				cm.dispose();
			} else {
				var buff = SkillFactory.getSkill(skills[selection]);
				cm.sendOk("Enjoy your buff.");
				cm.gainMeso(-price);
				cm.giveBuff(skills[selection], buff.getMaxLevel()); //gets the max level and the selection and applies it
				cm.dispose();
			}
		}
	}
}
Try that, put the skills you want in the array though
 
Back
Top