Jump to content
  • 0

need the code 2nd part :3


Mabuhay

Question


  • Group:  Members
  • Topic Count:  105
  • Topics Per Day:  0.02
  • Content Count:  446
  • Reputation:   229
  • Joined:  03/20/12
  • Last Seen:  

what if i spawn 100 porings for an event.

10 of them are the right while 90 are dont.

i want that everytime the right poring is killed, it will annuonce in a certain map.

sample:

10 right porings

player 1 killed one.

it will announce "Player1 killed 1 right poring, 9 more left"

then player 2 killed another.

"player2 killed 1 right poring, 8 more left" and so one :3

waiting for a reply :3

thanks:3

i will add some codes so that you can see my script

monster "pvp_n_1-2",0,0,"RIGHT PORING",1002,10,"My Custom Event:OnRightKill";

monster "pvp_n_1-2",0,0,"WRONG MONSTER",1002,100,"My Custom Event::OnWrongKill";

Edited by MrVandalBus
Link to comment
Share on other sites

11 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  17
  • Topics Per Day:  0.00
  • Content Count:  754
  • Reputation:   186
  • Joined:  05/22/12
  • Last Seen:  

- script My Custom Event -1,{
OnRightKill:
.poringvar--;
mapannounce strcharinfo(3),strcharinfo(0)+" killed 1 right poring, "+ (.poringvar?.poringvar:"No") +" more left",bc_map,"0x00CCFF",FW_NORMAL,12;
end;
OnWrongKill:
//do what you want here
end;

OnInit:
set .poringvar, 10;
end;
}

don't forget to Init every time you start the event.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  105
  • Topics Per Day:  0.02
  • Content Count:  446
  • Reputation:   229
  • Joined:  03/20/12
  • Last Seen:  

what if there are no more right porings? how do i make all players warp to prontera. if right porings turns to zero

- script My Custom Event -1,{
OnRightKill:
.poringvar--;
mapannounce strcharinfo(3),strcharinfo(0)+" killed 1 right poring, "+ (.poringvar?.poringvar:"No") +" more left",bc_map,"0x00CCFF",FW_NORMAL,12;
end;
OnWrongKill:
//do what you want here
end;

OnInit:
set .poringvar, 10;
end;
}

don't forget to Init every time you start the event.

Thanks working :D
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  17
  • Topics Per Day:  0.00
  • Content Count:  754
  • Reputation:   186
  • Joined:  05/22/12
  • Last Seen:  

inside the OnRightKill label, add the command

mapwarp strcharinfo(3),"prontera",22,33;

before end;

just change the coordinates

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  105
  • Topics Per Day:  0.02
  • Content Count:  446
  • Reputation:   229
  • Joined:  03/20/12
  • Last Seen:  

Thanks learned a lot /no1

wew, everytime i kill a poring, it warps out lol

what i wanted to happen was if the right poring turns to zero, the event will be over(This event will only last for 5 mins if the right porings does not turns to zero),

--- i am planning to release it if ever my players on my server would love it <3 ---

Edited by MrVandalBus
Link to comment
Share on other sites


  • Group:  Developer
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  2407
  • Reputation:   613
  • Joined:  07/05/12
  • Last Seen:  

/bo Something like this ?

splendide,219,152,5    script    My Custom Event    456,{
   if ( getgmlevel() < 1 ) end;
   select( "Turn event "+(.onoff?"Off":"On") );
   mes "Event "+(.onoff?"Off":"On")+".";
   if ( .onoff = !.onoff ) {
       initnpctimer;
       monster .mp$,0,0,"RIGHT PORING",1002,10,"My Custom Event::OnRightKill";
       monster .mp$,0,0,"WRONG MONSTER",1002,90,"My Custom Event::OnWrongKill";
       .poringvar = 10;
   } else
       donpcevent strnpcinfo(0)+"::OnTimer300000";
   close;


OnRightKill:
   if ( playerattached() ) {
       mapannounce strcharinfo(3),strcharinfo(0)+" killed 1 right poring, "+ (.poringvar--?.poringvar:"No") +" more left",bc_map,"0x00CCFF",FW_NORMAL,12;
       if ( .poringvar ) end; }
OnTimer300000:
   killmonster .mp$,"All";
   stopnpctimer;
   .onoff = 0;
   mapannounce .mp$,"End of event.",bc_map,"0x00CCFF",FW_NORMAL,12;
   sleep 2000;
   mapwarp .mp$,"prontera",0,0;
   end;


OnWrongKill:
   //do what you want here
   end;


OnInit:
   set .poringvar, 10;
   .mp$ = "pvp_n_1-2";
   end;
}
pvp_n_1-2    mapflag    nomobloot

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  105
  • Topics Per Day:  0.02
  • Content Count:  446
  • Reputation:   229
  • Joined:  03/20/12
  • Last Seen:  

/bo Something like this ?

splendide,219,152,5	script	My Custom Event	456,{
if ( getgmlevel() < 1 ) end;
select( "Turn event "+(.onoff?"Off":"On") );
mes "Event "+(.onoff?"Off":"On")+".";
if ( .onoff = !.onoff ) {
	initnpctimer;
	monster .mp$,0,0,"RIGHT PORING",1002,10,"My Custom Event::OnRightKill";
	monster .mp$,0,0,"WRONG MONSTER",1002,90,"My Custom Event::OnWrongKill";
	.poringvar = 10;
} else
	donpcevent strnpcinfo(0)+"::OnTimer300000";
close;


OnRightKill:
if ( playerattached() ) {
	mapannounce strcharinfo(3),strcharinfo(0)+" killed 1 right poring, "+ (.poringvar--?.poringvar:"No") +" more left",bc_map,"0x00CCFF",FW_NORMAL,12;
	if ( .poringvar ) end; }
OnTimer300000:
killmonster .mp$,"All";
stopnpctimer;
.onoff = 0;
mapannounce .mp$,"End of event.",bc_map,"0x00CCFF",FW_NORMAL,12;
sleep 2000;
mapwarp .mp$,"prontera",0,0;
end;


OnWrongKill:
//do what you want here
end;


OnInit:
set .poringvar, 10;
.mp$ = "pvp_n_1-2";
end;
}
pvp_n_1-2	mapflag	nomobloot

uhm just wanna ask if what part of this script does the job? i mean the one that ends the event if all the right porings are killed?

a little explanation maybe for a newbie like me :3

Edited by MrVandalBus
Link to comment
Share on other sites


  • Group:  Developer
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  2407
  • Reputation:   613
  • Joined:  07/05/12
  • Last Seen:  

uhm just wanna ask if what part of this script does the job? i mean the one that ends the event if all the right porings are killed?

a little explanation maybe for a newbie like me :3

Sure.

- GM turn event on/off. It's not an auto event.

- End of event when right porings turns to zero or after 5 mins. Then all players are warp in prontera.

Edited by Capuche
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  81
  • Topics Per Day:  0.02
  • Content Count:  1654
  • Reputation:   583
  • Joined:  08/09/12
  • Last Seen:  

splendide,219,152,5 script My Custom Event 456,{
if ( getgmlevel() < 1 ) end;
select( "Turn event "+(.onoff?"Off":"On") );
mes "Event "+(.onoff?"Off":"On")+".";
if ( .onoff = !.onoff ) {
initnpctimer;
announce "The Poring event has been started at "+.mp$,0;
monster .mp$,0,0,"RIGHT PORING",1002,10,"My Custom Event::OnRightKill";
monster .mp$,0,0,"WRONG MONSTER",1002,90,"My Custom Event::OnWrongKill";
.poringvar = 10;
} else
donpcevent strnpcinfo(0)+"::OnTimer300000";
close;

OnRightKill:
if ( playerattached() ) {
mapannounce strcharinfo(3),strcharinfo(0)+" killed 1 right poring, "+ (.poringvar--?.poringvar:"No") +" more left",bc_map,"0x00CCFF",FW_NORMAL,12;
getitem 909,1;
if ( .poringvar ) end; }

OnTimer300000:
killmonster .mp$,"All";
stopnpctimer;
.onoff = 0;
mapannounce .mp$,"End of event.",bc_map,"0x00CCFF",FW_NORMAL,12;
sleep 2000;
mapwarp .mp$,"prontera",0,0;
end;

OnWrongKill:
dispbottom "You have killed a wrong Poring, please try again!";
end;

OnInit:
set .poringvar, 10;
.mp$ = "pvp_n_1-2";
end;
}
pvp_n_1-2 mapflag nomobloot

Maybe like this, if you kill a right poring, you will get an item. But if you kill a wrong one, you'll get a message on the chat window.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  105
  • Topics Per Day:  0.02
  • Content Count:  446
  • Reputation:   229
  • Joined:  03/20/12
  • Last Seen:  

i already have my script here, i only need to modify it :3

oh well, i'm gonna try this now :3

thanks Capuche and nanakiwurtz

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.00
  • Content Count:  2044
  • Reputation:   682
  • Joined:  10/09/12
  • Last Seen:  

I believe this is Mysterious' poring summoner script

which, very very easy to replicate

-	script	poring	-1,{

OnInit:
.correct = 10; // spawn the correct porings
.wrong = 90; // spawn the fake porings
end;

OnWhisperGlobal:
if ( getgmlevel() < 60 ) end;
else if ( compare( @whispervar0$, "on" ) || compare( @whispervar0$, "start" ) ) {
	if ( .count )
		dispbottom "event already started";
	else
		goto L_Start;
}
else if ( compare( @whispervar0$, "off" ) || compare( @whispervar0$, "end" ) ) {
	if ( !.count )
		dispbottom "event not yet start";
	else
		goto L_End;
}
else if ( !.count )
	dispbottom "event is currently not running";
else
	dispbottom "event is currently running. "+ .count +" poring left";
end;

//OnClock0000: // put the start time here
L_Start:
.count = .correct;
announce "poring summoner event has started", 0;
monster "pvp_n_1-2", 0,0, "--ja--", 1002, .correct, strnpcinfo(0)+"::OnCorrectKill";
monster "pvp_n_1-2", 0,0, "--ja--", 1002, .wrong, strnpcinfo(0)+"::OnWrongKill";
sleep 300000; // 5 minutes
if ( !.count ) end;
L_End:
.count = 0;
announce "poring summoner event has ended", 0;
killmonster "pvp_n_1-2", strnpcinfo(0)+"::OnCorrectKill";
killmonster "pvp_n_1-2", strnpcinfo(0)+"::OnWrongKill";
sleep 3000; // give them a pause ...
mapwarp "pvp_n_1-2", "prontera", 156, 191;
end;
OnCorrectKill:
getitem 909,1; // item reward
.count--;
if ( .count )
	announce strcharinfo(0) +" killed 1 correct poring. "+ .count +" poring left", 1;
else
	goto L_End;
end;
OnWrongKill:
dispbottom "You have killed a wrong Poring, please try again!"; // feel like this is useless
end;
}
pvp_n_1-2	mapflag	nomobloot

btw ... try to make the script that is easily modify by client ...

Edited by AnnieRuru
  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  105
  • Topics Per Day:  0.02
  • Content Count:  446
  • Reputation:   229
  • Joined:  03/20/12
  • Last Seen:  

Wow, thanks annie, so easy to understand the script /no1

Not sure if this is a poring summoner but i just got ideas from multiple event scripts i have here then created one my own.

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...