PlayerEvent Function

Junior Spellweaver
Joined
Sep 23, 2011
Messages
164
Reaction score
33
Ok so im trying to build a system called PlayerEvent to where the Players can set a event
but only at the given jump quest maps

I don't know if i should make a command and then have a npc take it over or just do it all in one command

i have the command ready for a npc right here:
PHP:
	} else if (sub[0].equalsIgnoreCase("playerevent") {
		if (c.getPlayer().getItemQuantity(4000136, 30) {
			NPCScriptManager.getInstance().start(c, insert npc here);
	} else {
			player.dropMessage("You dont have enough Coconuts");
		}
	}

but i don't know which way would be better and i might need help if i just use the command

Any help is appreciated
Thanks
 
Ok but then how do i start the event when they choose what map they want to host from


PHP:
var status = 0;


function start() {
    status = -1;
    action(1, 0, 0);
}
 
function action(mode, type, selection) {
    if (mode == -1) {
        cm.dispose();
    } else {
        if (mode == 0) {
            cm.sendOk("Okay come again!");
            cm.dispose();
            return;
        }
        
    if (mode == 1)
        status++;
    else
        status--;
  if (status == 0) {
		cm.sendOk("You must have gotten 30 Coconuts!\r\nGratz!");
		cm.dispose();
	if (c.getPlayer().getItemQuantity(4000136, 30) {
		cm.gainItem(4000136, -30);
		cm.sendSimple("You can choose out of these Jump Quests to host and Event!\r\nPick one.\r\n#L0#1#l\r\n#L1#2#l\r\n#L2#3#l\r\n#L3#1#l\r\n#L4#2#l\r\n#L5#3#l\r\n#L6#1#l\r\n#L1#7#l\r\n#L8#3#l\r\n#L9#1#l\r\n#L10#2#l\r\n#L11#3#l\r\n#L12#1#l\r\n#L1#13#l\r\n#L14#3#l\r\n#L15#1#l\r\n#L16#2#l\r\n#L17#3#l\r\n#L18#1#l\r\n#L19#2#l\r\n#L20#3#l\r\n#L21#1#l\r\n#L22#2#l\r\n#L23#3#l\r\n");                                                                                                              
		cm.dispose();
	if (selection == 0) {
		cm.warpMap();

Sorry it looks messy i haven't added in all the jumpquest id's
 
Upvote 0
But if i use the command i have to make a sepreate event for a PlayerEvent function
because i cant use the GM event function

And i will have to find out the event function for npc




Edit:
I don't have a event function in NpcConversionManager

Nobody?
 
Upvote 0
Back