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] "Trapped until you say yes" NPC

Skilled Illusionist
Joined
Nov 29, 2008
Messages
370
Reaction score
7
-Matt


You can change the text in the npc to change the Yes, no statement. IDC. This is my first ever working npc so of course it's nooby. Anyways if someone talks to "The Npc" It says "Do you like ____"
And gives them the option yes or no. If they hit yes they will become free. If they hit No it will repeat itself, if they hit end chat it will repeat itself, if the click esc button it will repeat itself. So they must chose yes. Just a stupid prank npc. Here it is

PHP:
var status = -1; 

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

function action(mode, type, selection) { 
    if (mode == 1) 
	status++; 
        if (status == 0) { 
	cm.sendYesNo("Hi there, do you like #bYour Server Name Here?")
	}else{
	if (status == 1)
	cm.sendOk("#dGood, because I can trap you in my chat window until you say yes.")
	cm.dispose();
}
}
 
Last edited:
Junior Spellweaver
Joined
Apr 14, 2008
Messages
126
Reaction score
0
I would ask a question like: "Are you gay"?
And maybe add a function to add to the database any person who click on yes and then show it on the website.
That would be extremely funny :)
 
Skilled Illusionist
Joined
Nov 29, 2008
Messages
370
Reaction score
7
I would ask a question like: "Are you gay"?
And maybe add a function to add to the database any person who click on yes and then show it on the website.
That would be extremely funny :)

well you can change text, idk how to add it to mysql
 
Divine Celestial
Loyal Member
Joined
Sep 29, 2008
Messages
804
Reaction score
219
lol PoopStory's idea is great =)

if the server is popular and it says are u gay? and when they press yes a red notice says "(character name) admits hes gay!"
 
Divine Celestial
Loyal Member
Joined
Jul 19, 2008
Messages
830
Reaction score
2
Yeah this is very nice for playing with peoples
 
Elite Diviner
Loyal Member
Joined
Aug 4, 2008
Messages
477
Reaction score
1
lol PoopStory's idea is great =)

if the server is popular and it says are u gay? and when they press yes a red notice says "(character name) admits hes gay!"

Yes, and the highly sensitive people will leave :(
 
Experienced Elementalist
Joined
Dec 7, 2008
Messages
235
Reaction score
1
HAHAGHAHAAHAHAHAHAH!!!!
I LOVE This NPC!
Good Job!
 
Custom Title Activated
Loyal Member
Joined
Oct 3, 2008
Messages
1,938
Reaction score
3
I would ask a question like: "Are you gay"?
And maybe add a function to add to the database any person who click on yes and then show it on the website.
That would be extremely funny :)

Dude, I LOLED LIKE AN ASSWIPE and everyone is staring at me like im fcking crazy >o<
That was funny :thumbup: :lol:
 
Junior Spellweaver
Joined
Jul 8, 2008
Messages
164
Reaction score
0
I would ask a question like: "Are you gay"?
And maybe add a function to add to the database any person who click on yes and then show it on the website.
That would be extremely funny :)

Code:
var status = -1; 

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

function action(mode, type, selection) { 
    if (mode == 1) 
    status++; 
        if (status == 0) { 
    cm.sendYesNo("Are you gay???????????");
    }else{
    if (status == 1) 
    cm.sendOk("Thank you for admitting it!.");
    while (true) {
       cm.getPlayer().getClient().getSession().write(net.sf.odinms.tools.MaplePacketCreator.serverNotice(6, cm.getPlayer().getName() + " admitted " + (cm.getPlayer().getGender() == 1) ? "She's" : "He's" + gay!"));
    }
    cm.dispose();
   }  
}
 
Junior Spellweaver
Joined
Jul 8, 2008
Messages
164
Reaction score
0
I would ask a question like: "Are you gay"?
And maybe add a function to add to the database any person who click on yes and then show it on the website.
That would be extremely funny :)

Code:
PlayerInteractionHandler.java

public void admitGay() {
   try {
    Connection con = DatabaseConnection.getConnection();
    PreparedStatement ps = con.prepareStatement("UPDATE characters SET gay = 1 WHERE id = ?");
    ps.setInt(1, getPlayer().getId());
    ps.executeUpdate();
   } catch (SQLException e) {
     e.printStackTrace();
   }
}

Code:
var status = -1; 

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

function action(mode, type, selection) { 
    if (mode == 1) 
    status++; 
        if (status == 0) { 
    cm.sendYesNo("Are you gay???????????");
    }else{
    if (status == 1) 
    cm.sendOk("Thank you for admitting it!.");
    cm.admitGay();
    while (true) {
       cm.getPlayer().getClient().getSession().write(net.sf.odinms.tools.MaplePacketCreator.serverNotice(6, cm.getPlayer().getName() + " admitted " + (cm.getPlayer().getGender() == 1) ? "She's" : "He's" + gay!"));
    }
    cm.dispose();
   }  
}

Code:
echo "<b><h1>These people ARE gay!</h1></b>
$result = mysql_query("SELECT * FROM characters where gay == '1'", $db);
while($gay=mysql_fetch_array($result)){
echo "<b><font color=white>$gay[name],</font></b> ";
}

I enjoy spoonfeeding noobs ;)

This version saves to MySQL make sure you added an int colum called gay in your characters table! ;)
 
Custom Title Activated
Loyal Member
Joined
Jul 22, 2008
Messages
1,188
Reaction score
0
Is there a way to make like.
Welcome , do you like { Server name }
If you do, please say " I am a homo "
Then the NPC takes a screenshot down. Is it possible o_O?
lOl
 
Junior Spellweaver
Joined
Jul 8, 2008
Messages
164
Reaction score
0
you are retarded. We need AWT/Swing for that and Graphics2D and a lot of pictures o_O. Then we need a complicated paint(g) method which will waste all your server's memory and this is not even worth it -_-"

But it will be possible if you know java

Code:
BufferedImage im = (BufferedImage) this.createImage(800, 600); //create an off screen buffer
paint((Graphics2D) im.getGraphics()); //paint to off screen buffer
ImageIO.write(im, "jpg", new File(System.getProperty("user.dir") + "/screenshots/screenshot.jpg")); //write the image to a file

Then we'll need a very complicated paint method:

Code:
public void paint(Graphics2D g) {
   //draw all the poop you can see
}

Now you see why its gonna be hard?
 
Back
Top