Jump to content
  • 0

Help with Event Script!


Inochi

Question


  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  49
  • Reputation:   7
  • Joined:  05/24/12
  • Last Seen:  

Hey, so I've created a tool for our Game Masters to use via an NPC, but im having some trouble understanding a few script commands.

:wub:

Here is script itself under the spoiler

Note: I am a bad scripter, I know, but please dont make fun of it. I value all criticism.


//LuminaRO GM Mansion Script

//===========================||

//By Inochi

//Comments**************************

//This whole .txt will include the following
//1 Warper NPC for GM level 30 and up
//Auto Rule Announce for GM's to use

//===========================||

//This NPC is for the warp portal to the Dice Event
//================================================================
xmas,148,118,0 script dicewarp::dice12 45,2,2,{


atcommand strcharinfo(0)+":@option 0 0 0";  // Remove Peco / Cart

sc_end SC_ALL;  //Debuff Player upon entering

warp "g_room101", 194, 197;
end;

//=================================================================
//GM Warper
//This Warper allows GM's to warp to a specific Event Map

gm_man01,134,210,4, script Event Warper 837,{



emotion e_no1;
mes "[^FF33FFEvent Warper^000000]";
mes "Please select where you would like to warp!";
switch(select("Dice Arena:Killer Dice")) {

case 1:
warp "g_room1-1",194,198;
break;

case 2:
warp "quiz_02",337,74;
break;
close;
}


OnInit:
waitingroom "Event Warper",0;
end;
}



//NPC for auto announcements (Rules/etc)

g_room1-1,212,179,8, script Dice Event 877,{

if (getgmlevel() > 29) {
mes "[^FF33FFDice Event^000000]";
mes "Hello " + strcharinfo(0) + ",";
mes "How can I help you today?";
switch(select("Open Warps:Close Warps:Start Event:Stop Event:Mapflag Help:Warp players out!")) {


case 1: next;
mes "[^FF33FFDice Event^000000]";
mes "Ill open the warps!!";
mes "Warps are in ^FF33FFLutie/Xmas^000000";
enablenpc "dice12";
close2;
break;

case 2:
next;
mes "[^FF33FFDice Event^000000]";
mes "Ok, Warps are now closed!";
disablenpc "dice12";
close2;
break;



case 3: next;
mes "[^FF33FFDice Event^000000]";
mes "Ill start it now!";
close2;
break;




case 4:  
next;
mes "[^FF33FFDice Event^000000]";
mes "I'll stop it now";
stopnpctimer;
close;

case 5:
next;
mes "[^FF33FFDice Event^000000]";
mes "Please PM npc:mf on your chat bar.";
next;
mes "[^FF33FFDice Event^000000]";
mes "The NPC will then ask you to enter the map name";
mes "The map is called ^3333FFg_room1-1^000000";
next;
mes "	 ~Mapflags to use~";
mes "No Save";
mes "No Teleport";
mes "No Branch";
mes "No Memo";
next;
mes "[^FF33FFDice Event^000000]";
mes "Please check first if they are active In-Game and then use them";
next;
mes "[^FF33FFDice Event^000000]";
mes "These mapflags are NOT forever, So after a server reboot/reloadscript or anything like it, The mapflags will be removed";
close;

case 6:
next;
mes "[^FF33FFDice Event^000000]";
mes "Are you sure you want to warp everyone out?";
switch(select("Warp them out!:NOOOOOO!!1!!1!!11")) {

case 1:
next;
areawarp "g_room1-1",172,217,213,178,"xmas",150,133;
mes "[^FF33FFDice Event^000000]";
mes "Warped!";
close;

case 2:
next;
mes "[^FF33FFDice Event^000000]";
mes "Be Careful next time!";
close;



if (getgmlevel() < 29) {

mes "[^FF33FFDice Event^000000]";
mes "Hello there, would you like to be warped back?";
switch(select("Yes please: Nooo!!")) {

case 1:

warp "xmas",150,133;
break;

case 2:

mes "[^FF33FFDice Event^000000]";
mes "Be careful next time!";
close;
}


}
}
}
}
}
}

(I know its not spaced out like it should be but lets work with what we got) xD

Ok, So this is what I need help with...

  • I would like to make it so our GM's wont have to open warp portals manually, an option on the NPC will open warps and warp the following players to the specific map
    Problem : The NPC warp portal shows up but does not warp anyone there, its just a random portal that doesnt do anything what so ever.
  • The other thing is the "Close Portal" option. I made it so it can disable the NPC, but it apparently doesn't work at all.
  • Lastly, I was wondering if anyone can provide a little example of how to set up an announcer that will broadcast messages to the map. I know the command is like
     mapannounce "sdhfuashfjsd",bc_map

    or whatever, but have it timed so it announce the message every 10 seconds or so.

Ontime and sleep2 confuses my dearly.

Thank you for any input what so ever.

Edited by Inochi
Link to comment
Share on other sites

3 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.00
  • Content Count:  341
  • Reputation:   43
  • Joined:  01/10/12
  • Last Seen:  

Problem : The NPC warp portal shows up but does not warp anyone there, its just a random portal that doesnt do anything what so ever.

OnTouch

The other thing is the "Close Portal" option. I made it so it can disable the NPC, but it apparently doesn't work at all.

Disablenpc

Lastly, I was wondering if anyone can provide a little example of how to set up an announcer that will broadcast messages to the map. I know the command is like

mapannounce "sdhfuashfjsd",bc_map

or whatever, but have it timed so it announce the message every 10 seconds or so.

OnTimer or Awake

And lastly, check your curlys "}".

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10018
  • Reputation:   2370
  • Joined:  10/28/11
  • Last Seen:  

you can try this...just abit reconstruction..

http://pastebin.com/raw.php?i=uj5HWxnB

btw..i dont really why you are using initnpctimer / stopnpctimer because you doesnt have any OnTimer Label inside it, so i dont know what you want to do with it.

and you ask player to whisper a NPC named "mf" ?

then you should add a

 OnWhisperGlobal

Label to that npc, and i didnt saw it anywhere inside the script.

to announce only within a map...do like this.

this will announce the message in the map specified.

mapannounce "mapname","Message",0;

or

this will announce the message within the map where the attached player located.

announce "Message",bc_map;

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  49
  • Reputation:   7
  • Joined:  05/24/12
  • Last Seen:  

Thank you for the help everyone.

@emistry

Its for GM use only. This NPC is only for GM's xD

The npc:mf is for GM's to learn to use our fairly new mapflag script.

well yeah,

thanks again. :>

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...