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 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("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 by maplepuppet; 12-31-2008 at 04:55 AM.
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 :)
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
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
I would'nt say it's a good idea, but it's kinda okay, btw you can add a field in the ranking which checks if a field "gay" is 1/0 if it's one it says Yes...
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();
}
}
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! ;)
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
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 shit you can see
}