[Release] Clone giver NPC
This is based off trait0rs clone system you can find here http://forum.ragezone.com/f427/relea...system-484662/
it is untested, but i know it would work
first go to net.sf.odinms.scripting.npc.NPCConversationManager.java
add this import
Code:
import net.sf.odinms.server.maps.FakeCharacter;
then find this
Code:
public MapleClient getC() {
return getClient();
}
add this under it
Code:
public void giveClone() {
FakeCharacter fc = new FakeCharacter(c.getPlayer(), c.getPlayer().getId() + c.getPlayer().getFakeChars().size() + 1);
c.getPlayer().addFakeChar(fc);
}
then compile
and here's the npc script, i used fredrick for this, use can use any npc you want
new file -> 9030000.js (fredrick)
Code:
/*
This is made by Kippieeej/Bassoe - Clone function is made by Trait0r
*/
var status = 0;
var prize = 1000000;
function start() {
status = -1;
action(1, 0, 0);
}
function action(mode, type, selection) {
if (mode == -1) {
cm.dispose();
} else {
if (mode == 0 && status == 0) {
cm.sendOk("Well, see you later");
cm.dispose();
return;
}
if (mode == 1)
status++;
else
status--;
if (status == 0) {
cm.sendSimple("Hey there, i can give you a clone!\r\n\r\n#L1##bWohoo, i want a clone! - " + prize + " mesos#k#l\r\n#L2##rI want nothing..#k#l");
} else if (status == 1) {
if (selection == 1) {
if (cm.getMeso() >= prize) {
cm.sendYesNo("Are you sure you want to pay " + prize + " mesos for a clone?\r\nIt only works in this map\r\nAlso, it will disappear if you log out");
} else {
cm.sendOk("You don't have " + prize + " mesos..");
cm.dispose();
}
} else {
cm.sendOk("Don't bother me..");
cm.dispose();
}
} else {
cm.gainMeso(-prize);
cm.giveClone();
cm.sendOk("Enjoy!");
cm.dispose();
}
}
}
As i repeat, this is untested, but im very sure that it will work
Enjoy!
Re: [Release] Clone giver NPC
Add a check if they already have a clone.
Re: [Release] Clone giver NPC
Re: [Release] Clone giver NPC
Quote:
Originally Posted by
acEvolution
Add a check if they already have a clone.
easy to do, but i think it's cool to walk around with 20 clones =]
Re: [Release] Clone giver NPC
Quote:
Originally Posted by
kippieeej
easy to do, but i think it's cool to walk around with 20 clones =]
Oh. Not recommended for big servers then. Anyway yeah its easy to add.
Re: [Release] Clone giver NPC
And that is what lags servers o_0
Re: [Release] Clone giver NPC
lol, depends on the server
i used this today in my server (chickenMS)
20 clones - no lag
40 clones - no lag
60 clones - little lag
80 clones - lag
100 clones - lol, dc + dc + lag
Re: [Release] Clone giver NPC
or you could make it check for level 200 or give the players that did a rebirth , 1clone per rebirth :]
Re: [Release] Clone giver NPC
yea but the problem is, once you dc/change map, you will lose your clone ^^"
Re: [Release] Clone giver NPC
oh mine doesnt, hmm. so they have to pay for a temporary clone?
p/s i never added trait0r's clone, so i dont know ;]
Re: [Release] Clone giver NPC
ooh, you are using sexbot right?
anyways, this one disappears after dc
and if you change map it will stay in the old map and re-appear once u enter that map
so i'd make the price not too high
in my server i made it sell for 1 maple coin =]
Re: [Release] Clone giver NPC
good work. i may install it too in my server. =)
Re: [Release] Clone giver NPC
oh, nope, we have 2 types of clones & a sexbot.
one type of clone is a replica of you, like a playernpc, the other one is a uberclone, follow you , attack , smiles, exactly does everything you do,
sexbot moves/walking dictionary/chat.
Re: [Release] Clone giver NPC
hmm ok
well thanks for the replies..
Re: [Release] Clone giver NPC
umm nice release but what would it be to add a limit to it?