Jump to content
AnnieRuru

OnStart become onstart with [codebox]

Recommended Posts

prontera,155,178,5	script	ldjfhksfjs	100,{
end;
OnInit:
.minplayer2start = 1; // minimum player to start
.summon_clone = 3; // summon how many evil clone per player
.map$ = "guild_vs2"; // the map play on
L_Reset:
waitingroom "Clone Event", .minplayer2start +1, strnpcinfo(0)+"::OnStart", .minplayer2start;
end;
OnStart:
if ( getwaitingroomstate(0) < .minplayer2start ) end;
warpwaitingpc .map$, 0,0;
killmonster .map$, strnpcinfo(0)+"::Onclonedead";
for ( [email protected] = 0; [email protected] < [email protected]; [email protected]++ )
	for ( [email protected] = 0; [email protected] < .summon_clone; [email protected]++ )
		clone .map$, 0,0, strnpcinfo(0)+"::Onclonedead", [email protected] = getcharid( 0, rid2name( [email protected][[email protected]] ) );
.count = .minplayer2start * .summon_clone;
copyarray .register_aid, [email protected],  [email protected];

delwaitingroom;
end;
Onclonedead:
.count--;
if ( .count ) end;
announce "all clones are dead !", 0;
[email protected] = getarraysize( .register_aid );
for ( [email protected] = 0; [email protected] < [email protected]; [email protected]++ )
	getitem 501, 1, .register_aid[[email protected]]; // reward item here
getmapxy [email protected]$, [email protected], [email protected], 1;
mapwarp .map$, [email protected]$, [email protected], [email protected];
goto L_Reset;
OnPCDieEvent:
OnPCLogoutEvent:
if ( strcharinfo(3) != .map$ ) end;
[email protected] = getarraysize( .register_aid );
while ( .register_aid[[email protected]] != getcharid(3) && [email protected] < [email protected] ) [email protected]++;
deletearray .register_aid[[email protected]], 1;
warp "Save", 0,0;
if ( [email protected] > 1 ) end;
announce "all players died, what a failure", 0;
killmonster .map$, strnpcinfo(0)+"::Onclonedead";
goto L_Reset;
}

prontera,155,178,5	script	ldjfhksfjs	100,{
end;
OnInit:
.minplayer2start = 1; // minimum player to start
.summon_clone = 3; // summon how many evil clone per player
.map$ = "guild_vs2"; // the map play on
L_Reset:
waitingroom "Clone Event", .minplayer2start +1, strnpcinfo(0)+"::OnStart", .minplayer2start;
end;
OnStart:
if ( getwaitingroomstate(0) < .minplayer2start ) end;
warpwaitingpc .map$, 0,0;
killmonster .map$, strnpcinfo(0)+"::Onclonedead";
for ( [email protected] = 0; [email protected] < [email protected]; [email protected]++ )
	for ( [email protected] = 0; [email protected] < .summon_clone; [email protected]++ )
		clone .map$, 0,0, strnpcinfo(0)+"::Onclonedead", [email protected] = getcharid( 0, rid2name( [email protected][[email protected]] ) );
.count = .minplayer2start * .summon_clone;
copyarray .register_aid, [email protected],  [email protected];

delwaitingroom;
end;
Onclonedead:
.count--;
if ( .count ) end;
announce "all clones are dead !", 0;
[email protected] = getarraysize( .register_aid );
for ( [email protected] = 0; [email protected] < [email protected]; [email protected]++ )
	getitem 501, 1, .register_aid[[email protected]]; // reward item here
getmapxy [email protected]$, [email protected], [email protected], 1;
mapwarp .map$, [email protected]$, [email protected], [email protected];
goto L_Reset;
OnPCDieEvent:
OnPCLogoutEvent:
if ( strcharinfo(3) != .map$ ) end;
[email protected] = getarraysize( .register_aid );
while ( .register_aid[[email protected]] != getcharid(3) && [email protected] < [email protected] ) [email protected]++;
deletearray .register_aid[[email protected]], 1;
warp "Save", 0,0;
if ( [email protected] > 1 ) end;
announce "all players died, what a failure", 0;
killmonster .map$, strnpcinfo(0)+"::Onclonedead";
goto L_Reset;
}

both of these are the exact same script,

but look at the OnStart label

with {codebox}, OnStart becomes onstart ( becomes small letters )

but with {code}, it retains the OnStart

try {quote} this post and you'll see both are exact same script

in that topic I have to change into OnEventInit <.<

what a weird bug

Edited by Maki
Link to comment
Share on other sites



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.