Would you like to react to this message? Create an account in a few clicks or log in to continue.

Welcome to sextms forum, please vote for us! to get points you must go to sextms.tk and click on either vote4voting points or vote4nx, Please donate as well!!! thank you we hope you enjoy this awesome PS Smile

You are not connected. Please login or register

Slick's Coder Application.

4 posters

Go down  Message [Page 1 of 1]

1Slick's Coder Application. Empty Slick's Coder Application. Fri Jan 07, 2011 6:20 pm

Slicks


Nublet

Name: Reilly John Wiebe Laforge

Gender: Male

In-Game-Name: Slicks

Age: 16

Time Zone: GMT

Ways to contact you:

MSN: Maplefan400@hotmail.com
Facebook: Look up "Reilly Wiebe"

What can you code?: Scroll down.

Experience (Have you ever coded for other servers..): Yes. My own, KoolMS, ChickenMS,

Examples of work (Tell us what you can do, professionally, or show pics)?: Scroll down.

Possible additions you can do that you think will make the server better (You can leave empty)?: Scroll down! bounce

Do you agree to help with any task assigned?: Yes.

Are you active?: I got no school at the moment. So I am on 24/7

Talk about yourself:
I live in winnipeg manitoba. I like drawing, I realy enjoy playing SextMS Smile


What I made for the server. Smile
Balarog PQ Very Happy

server.Events.BalrogPQ:
PHP Code:

/*
* For you SextMS Smile

package server.Events;
import client.MapleCharacter;
import java.util.*;
import server.life.MapleLifeFactory;
import java.awt.Point;
import server.maps.MapleMap;
import server.TimerManager;

/**
*
* @author Slicks
* @Mapid 105100300
*/
public class BalrogPQ {
public static final int[] EasyBalrogParts = {8830002, 8830003, 8830000};
public static final int[] HardBalrogParts = {8830000, 8830001, 8830002};
public static List<MapleCharacter> candidates = new ArrayList<MapleCharacter>();
public static boolean hasStarted = false;
public static String partyLeader = "undefined";
public static boolean balrogSpawned = false;
public static long timeStamp = 0;
public static byte channel = 1;
public static void addCandidate(MapleCharacter chr){
synchronized(candidates){
candidates.add(chr);
}
}

public static void warpAllCandidates(){
for(MapleCharacter c : candidates){
c.changeMap(105100300);
}
}

public static boolean isFull(MapleCharacter chr){
return chr.getClient().getChannelServer().getMapFactory().getMap(105100300).getCharacters().size() > 0;
}

public static void warpIn(MapleCharacter chr){
if(hasStarted){
chr.changeMap(105100300);
}
}

public static void scheduleChecks(MapleMap map){
final MapleMap fmap = map;
TimerManager tMan = TimerManager.getInstance();
tMan.schedule(new Runnable(){
@Override
public void run(){
for(MapleCharacter chrs : fmap.getCharacters()){
chrs.changeMap(105100100);
chrs.message("You did not defeat the balrog in time..");
close();
}
}
} , 60 * 60 * 1000);

tMan.schedule(new Runnable(){
@Override
public void run(){
if(fmap.getCharacters().size() <= 3){
if(fmap.getCharacters().size() > 0){
for(MapleCharacter chrs : fmap.getCharacters()){
chrs.message("[The Order]: What? You're down to that many mercenaries? I need you get you out of there.");
chrs.changeMap(105100100);
}
}
fmap.killAllMonsters();
close();
}
}
} , 60 * 1000);
}

public static void open(MapleCharacter chr){
channel = (byte)chr.getClient().getChannel();
hasStarted = true;
timeStamp = System.currentTimeMillis();
scheduleChecks(chr.getClient().getChannelServer().getMapFactory().getMap(105100300));
}

public static int getSecondsLeft(){ // assuming the thing lasts 60 minutes
int hour = 60 * 60; // 3600 seconds = 1hr
long elapsed = System.currentTimeMillis() - timeStamp;
int secondsLeft = (int)(hour - (elapsed / 1000));
return secondsLeft;
}

public static void close(){
hasStarted = false;
balrogSpawned = false;
partyLeader = "undefined";
candidates.clear();
timeStamp = 0;
}
public static void spawnBalrog(int mode, MapleCharacter chr){
if(!balrogSpawned){
for(int i = 0; i < HardBalrogParts.length; i++){
chr.getClient().getChannelServer().getMapFactory().getMap(105100300).spawnMonsterOnGroundBelow(MapleLifeFactory.getMonster(HardBalrogParts[i]), new Point(412, 258));
balrogSpawned = true;
}
} else {
// DO NUFFIN'
}
}
}

scripts/onFirstUserEnter/balog_summon (Yes, there's a typo in the WZ files)
PHP Code:

importPackage(Packages.server.life);
importPackage(Packages.tools);
importPackage(Packages.server.Events);

function start(ms) {
try {
ms.getPlayer().resetEnteredScript();
ms.getPlayer().getClient().getSession().write(MaplePacketCreator.getClock(BalrogPQ.getSecondsLeft())); // 60 mins(1hr)
BalrogPQ.spawnBalrog(1, ms.getPlayer());
} catch(err) {
ms.getPlayer().dropMessage(err);
}
}

1061014.js (NPC) :
PHP Code:

importPackage(Packages.server.Events);
var status = 0;
function start(){
status = 0;
action(1, 0, 0);
}

function action(mode, type, selection){
if(mode <= 0){
cm.dispose();
} else if(status == 0){
cm.sendNext("Hi there. I am #b#nMu Young#n#k, the temple Keeper.");
status++;
} else if(BalrogPQ.partyLeader == "undefined"){
if(status == 1){
var text = "This temple is currently under siege by the Balrog troops. We currently do not know who gave the orders. " +
"For a few weeks now, the #e#b Order of the Altair#n#k has been sending mercenaries, but they were eliminated every time." +
" So, traveler, would you like to try your luck at defeating this unspeakable horror? \r\n\r\n " +
"#L0#Yes. Please register me as party leader\r\n#L1#What is the #eOrder of the Altair?";
cm.sendSimple(text);
status++;
} else if(selection == 0){
if(cm.getPlayer().getLevel() >= 70){
BalrogPQ.partyLeader = cm.getPlayer().getName();
cm.sendOk("Success. Your name has been registered and you may enter the battlefield. Come speak to me when you're ready!");
cm.getPlayer().getMap().broadcastMessage(Packages.tools.MaplePacketCreator.serverNotice(0, cm.getPlayer().getName() + " is currently fighting the balrog on CH" + cm.getPlayer().getClient().getChannel() + ". To join, do @balrogpq."))
BalrogPQ.open(cm.getPlayer());
cm.dispose();
} else if(cm.getPlayer().getLevel() < 70){
cm.sendOk("You must be at least level 70 to even consider battling the monster.");
cm.dispose();
}
} else if(selection == 1){
cm.sendOk("The Order of the Altair is a group of elite mercenaries that oversee the world's economy and battle operations. It was founded 40 years ago right after Black Mage was defeated in hopes of forseeing the next possible attack.");
cm.dispose();
} else if(status == 3){
cm.warp(105100300);
cm.dispose();
}
} else {
if(status == 1){
cm.sendYesNo(BalrogPQ.partyLeader + "'s party is currently battling the Balrog. Would you like to assist?");
status++;
} else if(status == 2){
if(cm.getPlayer().getLevel() > 60 && cm.getPlayer().getClient().getChannel() == BalrogPQ.channel){
cm.warp(105100300);
cm.dispose();
} else {
cm.sendOk("You may not battle the balrog when you are below Lv60! \r\n\r\n Or maybe you are not on the right channel.. Try CH" + BalrogPQ.channel + ".");
cm.dispose();
}
}
}
}

1061018.js (NPC) :
PHP Code:

var status = 0;
var dispose = false;
function start(){
status == 0;
action(1, 0, 0);
}

function action(mode, type, selection){
if(mode <= 0){
if(!cm.getPlayer().getMap().getAllmonsters().size() == 2){
cm.sendOk("Alrighty. We have high hopes for you so make us mercenaries proud!");
cm.dispose();
} else {
cm.getPlayer().getMap().killAllMonsters();
Packages.server.Events.BalrogPQ.partyLeader = "undefined";
Packages.server.Events.BalrogPQ.balrogSpawned = false;
Packages.server.Events.BalrogPQ.close();
cm.warp(105100100);
cm.dispose();
}
} else if(status == 0){
if(cm.getPlayer().getMap().getCharacters().size() > 1){
cm.sendYesNo("Are you really going to leave this battle and leave your fellow travelers to die?");
dispose = false;
status++;
} else if(cm.getPlayer().getMap().getCharacters().size() <= 1 && cm.getPlayer().getMap().getAllmonsters().size() != 2){
cm.sendYesNo("If you're a coward, you will leave.");
dispose = true;
status++;
} else if(cm.getPlayer().getMap().getAllmonsters().size() == 0){
cm.sendOk("Wow! You defeated the balrog.");
dispose = true;
cm.getPlayer().getClient().getChannelServer().broadcastPacket(Packages.tools.MaplePacketCreator.serverNotice(0, Packages.server.Events.BalrogPQ.partyLeader + "'s party has successfully defeated the Balrog! Praise to them, they finished with " + cm.getPlayer().getMap().getCharacters().size() + " players."));
status++;
} else {
cm.sendYesNo("So you are really going to leave?");
status++;
}
} else if(status == 1){
if(dispose){
cm.getPlayer().getMap().killAllMonsters();
Packages.server.Events.BalrogPQ.partyLeader = "undefined";
Packages.server.Events.BalrogPQ.balrogSpawned = false;
Packages.server.Events.BalrogPQ.close();
}
cm.warp(105100100);
cm.dispose();
}
}

2Slick's Coder Application. Empty Re: Slick's Coder Application. Fri Jan 07, 2011 8:52 pm

Scorpio

Scorpio
SextOwner!
SextOwner!

Added on msn, reply to me whenever you feel like

https://sextms.forumotion.net

3Slick's Coder Application. Empty Re: Slick's Coder Application. Fri Jan 07, 2011 10:09 pm

Slicks


Nublet

Affirmitive

4Slick's Coder Application. Empty Re: Slick's Coder Application. Fri Jan 07, 2011 10:18 pm

Andre

Andre
Gettin' Started!
Gettin' Started!

Good App,
Well made.
Good Luck (:

5Slick's Coder Application. Empty Re: Slick's Coder Application. Sat Jan 08, 2011 4:24 am

Slicks


Nublet

thannkkkk you

6Slick's Coder Application. Empty Re: Slick's Coder Application. Sat Jan 08, 2011 9:29 am

Sora

Sora
Forum-Pwner
Forum-Pwner

Good App Slicks Smile

7Slick's Coder Application. Empty Re: Slick's Coder Application. Sat Jan 08, 2011 7:26 pm

Slicks


Nublet

Shanks you. Smile

8Slick's Coder Application. Empty Re: Slick's Coder Application. Sat Jan 08, 2011 8:08 pm

Sora

Sora
Forum-Pwner
Forum-Pwner

Sure thing Very Happy

Back to top  Message [Page 1 of 1]

Permissions in this forum:
You cannot reply to topics in this forum