This is my first release! I am a Noob at NPC Scripting but everyone has to start somewhere. This might seem really really really really easy to some people but for me it was not. I call this the Hoe System. I had a lot of help around the forums with NPC Scripting Tuts. Enough of me Talking Heres The Hoe System.
This is The Hoe to Item NPC
You can always change the items they give too to make more since i guess.Code:/* Created By Blake From ShainaStory.*/
var wui = 0;
function start() {
cm.sendSimple ("#eSup Nigga. I Am The Playa of ShainaStory. To Earn Some Hoes... You Must Talk To Scrooge To Get Some Hoes Nigga!! \r\n#L0##b10#k #i4031222#\n\ FOR #b1#k#i1002015#\n\ #l\r\n#L1##b15#k #i4031222#\n\ FOR #b1#k #i3010025#\n\ #l\r\n#L2##b10#k #i4031222#\n\ FOR #b1#k #i1102206#\n\ #l\r\n#L3##b20#k #i4031222#\n\ FOR #b1#k #i1322055#\n\ #l\r\n#L4##b200#k #i4031222#\n\ FOR #b1#k Go To GM For A 300 Stat Weapon!! ");
}
function action(mode, type, selection) {
cm.dispose();
if (selection == 0) {
if (cm.haveItem(4031222, 10)) {
cm.gainItem(1002015,1);
cm.gainItem(4031222, -10);
cm.sendOk("Good Job Pimp Doin Good So Far!.");
cm.dispose();
} else {
cm.sendOk(" Hey, You dont have enough Hoes!");
cm.dispose();
}
} else if (selection == 1) {
if (cm.haveItem(4031222, 15)) {
cm.gainItem(3010025,1);
cm.gainItem(4031222, -15);
cm.sendOk("Great Job! Keep On Getting Them Hoes");
cm.dispose();
} else {
cm.sendOk(" Come back when you have the hoes you stinken bum! ");
cm.dispose();
}
} else if (selection == 2) {
if (cm.haveItem(4031222, 20)) {
cm.gainItem(1102206,1);
cm.gainItem(4031222, -20);
cm.sendOk("WOW! More Hoes!");
cm.dispose();
} else {
cm.sendOk(" Come back later, when you have the hoes!");
cm.dispose();
}
} else if (selection == 3) {
if (cm.haveItem(4031222, 30)) {
cm.gainItem(1322055,1);
cm.gainItem(4031222, -30);
cm.sendOk("WTF! 30 Hoes!!");
cm.dispose();
} else {
cm.sendOk("You Do Not Have Enough Hoes, Nigga!!. ");
cm.dispose();
}
} else if (selection == 4) {
if (cm.haveItem(4000213, 10)) {
cm.gainItem(4000214,1);
cm.gainItem(4000213, -10);
cm.sendOk("HOLY! A coke Gem, You have Been Given a HighFive!");
cm.dispose();
} else {
cm.sendOk(" Trying to scam me!OFFICERS! DC HIM! You better run.");
cm.dispose();
}
cm.dispose();
}
}
To change The Text The NPC Says Change This Line To whatever!
To Change The Items Earned...Change These LinesCode:cm.sendSimple ("#eSup Nigga. I Am The Playa of ShainaStory. To Earn Some Hoes... You Must Talk To Scrooge To Get Some Hoes Nigga!!
Code:#i3010025#\n\
#k#i1002015#\n\
#i1102206#\n\
#i1322055#\n\
This is the Hoe Seller
To Change How Much It Will Cost To Buy A Hoe Change This NumberCode:/* Created By Blake From ShainaStory.*/
function start() {
cm.sendSimple ("I Am The Pimp! Would you like to buy some Hoes?\r\n#r#L0##e1 Hoe - 100,000,000 Mesos#n#l\r\n#k#L1##e 5 Hoes - 350,000,000 Mesos#n#l#k");
}
function action(mode, type, selection) {
cm.dispose();
switch(selection){
case 0:
if(cm.getMeso() >= 100000000){
cm.sendOk("You Have A Hoe Now Have Fun.");
cm.gainItem(4031222, 1);
cm.gainMeso(-100000000);
cm.dispose();
}else{
cm.sendOk("You do not have 100,000,000 mesos.");
cm.dispose();
}
break;
case 1:
if(cm.getMeso() >= 350000000){
cm.sendOk("You Have 5 Hoes! Have Fun!!");
cm.gainItem(4031222, 5);
cm.gainMeso(-350000000);
cm.dispose();
}else{
cm.sendOk("You do not have 350,000,000 mesos.");
cm.dispose();
}
break;
}
}
Place those in any NPC Script you would like. I know this would be really easy to create for some of you people. But for me it wasn't.Code:100000000
-100000000
350000000
-350000000
Screenshots
http://i33.tinypic.com/jkw2lu.jpg
http://i37.tinypic.com/av1pww.jpg
Credits
Blake [Making The Scripts]
RageZone [Helping me Make A NPC]
Thanks Again!

