Jump to content
  • 0

Setcell not working.


Noel Gallagher

Question


  • Group:  Members
  • Topic Count:  34
  • Topics Per Day:  0.01
  • Content Count:  150
  • Reputation:   2
  • Joined:  11/19/11
  • Last Seen:  

Can anyone help me to fix this script.


OnStart:
set @start,1;
goto OnGo;
end;

OnGO:
warpparty "guild_vs1",49,7,$@TeamID1;
warpparty "guild_vs1",50,92,$@TeamID2;
setcell "guild_vs1",51,87,50,87,cell_walkable,0;
setcell "guild_vs1",49,87,48,87,cell_walkable,0;
enablenpc "WALL#1";
enablenpc "WALL#2";
enablenpc "WALL#3";
enablenpc "WALL#4";
enablenpc "WALL#5";
enablenpc "WALL#6";
enablenpc "WALL#7";
enablenpc "WALL#8";
mapannounce "guild_vs1","Get ready for battle!!",0;
mapannounce "guild_vs1","Match will begin in 5",0;
mapannounce "guild_vs1","4",0;
mapannounce "guild_vs1","3",0;
mapannounce "guild_vs1","2",0;
mapannounce "guild_vs1","1",0;
mapannounce "guild_vs1","GO!",0;
goto OnWall;
end;

OnWall:
setcell "guild_vs1",51,87,50,87,cell_walkable,1;
setcell "guild_vs1",49,87,48,87,cell_walkable,1;
disablenpc "WALL#1";
disablenpc "WALL#2";
disablenpc "WALL#3";
disablenpc "WALL#4";
disablenpc "WALL#5";
disablenpc "WALL#6";
disablenpc "WALL#7";
disablenpc "WALL#8";
end;

The mapannounce and setcell not working.

Edited by Joseph
Codeboxed.
Link to comment
Share on other sites

5 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  16
  • Topics Per Day:  0.00
  • Content Count:  66
  • Reputation:   2
  • Joined:  09/01/12
  • Last Seen:  

Did you get error when you start the npc?

Link to comment
Share on other sites


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

Attach the full script.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  34
  • Topics Per Day:  0.01
  • Content Count:  150
  • Reputation:   2
  • Joined:  11/19/11
  • Last Seen:  

gonryun,170,141,4 script Party Vs Party::teamwar 899,{
if (getgmlevel() >= 99){
menu "Standard menu",Standard,"Reset",lend;
}
standard:
set $@members,1; // number of party members
set @start,0;
getpartymember (getcharid(1));
set @partymembercount,$@partymembercount;
mes " "+ @partymembercount;
if ( @partymembercount==$@members) {
 mes "Hello "+strcharinfo(0)+" what do you want?";
 if (($@TeamID1!=0) && ($@TeamID2!=0))
 {
  mes "The Sign Ups are currently unavailable because a match is in progress. Don't hesitate to try again in a few minutes!";
  close;
 }
 if ( getpartyleader(getcharid(1),2) != getcharid(0) )
 {
  mes "Only party leader have the right to sign up / out from the game with me..";
  close;
 }
  mes "Choose your team to register.";
  switch(select("Red Team - [" + GetPartyName($@TeamID1) + "] :Blue Team - [" + GetPartyName($@TeamID2) + "]"))
{
case 1: mes "[  Party vs Party  ]";
 if ($@TeamID1==getcharid(1))
  {
   mes "Do you wish to sign out your team?";
   next;
   if (select("I Give up ~.","Never Say Quit !!")==2) close;
	announce "Team 1 : [ " + getpartyname($@TeamID1) + " ] has sign out. We need another Party to sign up now!",bc_blue|bc_map;
	set $@TeamID1, 0;
	close;
  }
  if ($@TeamID1==0 || getpartyname($@TeamID1)=="null")
  {
   getpartymember(getcharid(1)),1;
   copyarray $@partymembercidt1[0],$@partymembercid[0],$@members;
   set $@TeamID1, getcharid(1);
   initnpctimer;
   mes "Your Party is now registered, Goodluck!!";
   announce "Team 1 : [ " +getpartyname($@TeamID1)+ " ] has sign up for the Party vs Party!",bc_yellow|bc_map;
   doevent "teamwar::OnSubscriptionTeam";
   close;
  } else {
   mes "I'm sorry! Another Team has sign up before you.";
   close;
  }
case 2: mes "[  Party vs Party  ]";
 if ($@TeamID2==getcharid(1))
 {
  mes "Do you wish to sign out your team?";
  next;
  if (select("I Give up ~.","Never Say Quit !!")==2) close;
   announce "Team 2 : [ " + getpartyname($@TeamID2) + " ] has sign out. We need another Party to sign up now!",bc_blue|bc_map;
   set $@TeamID2, 0;
   close;
 }
 if ($@TeamID2==0 || getpartyname($@TeamID2)=="null")
 {
  getpartymember(getcharid(1)),1;
  copyarray $@partymembercidt2[0],$@partymembercid[0],$@members;
  set $@TeamID2, getcharid(1);
  initnpctimer;
  mes "Your Party is now subscribed, good luck!";
  announce "Team 2 : [ " +getpartyname($@TeamID2)+ " ] has sign up For the Party vs Party!",bc_blue|bc_map;
  doevent "teamwar::OnSubscriptionTeam";
  close;
 }
 else
 {
  mes "I'm sorry! Another Team has sign up before you...";
  close;
 }
}
} else {
 mes "[Event Handler]";
 mes "Your team must have a party consisting of 5 members.";
 close;
}
OnSubscriptionTeam:
if($@TeamID1!=0 && $@TeamID2!=0){
 announce "Party vs Party : We have 2 Teams signed up now : "+getpartyname($@TeamID1)+" and "+getpartyname($@TeamID2)+".",bc_blue|bc_map;
 set @win1, 0;
 set @win2, 0;
 goto Onstart;
}
end;
OnTimer50000:
if (($@TeamID1!=0) && ($@TeamID2!=0)) {
 stopnpctimer;
 end;
}
stopnpctimer;
set $@TeamID1, 0;
set $@TeamID1, 0;
announce "Party vs Party : We lack teams to start registration for two teams are now available",0;
end;

OnStart:
warpparty "guild_vs1",49,7,$@TeamID1;
warpparty "guild_vs1",50,92,$@TeamID2;
setcell "guild_vs1",51,87,50,87,cell_walkable,0;
setcell "guild_vs1",49,87,48,87,cell_walkable,0;
enablenpc "WALL#1";
enablenpc "WALL#2";
enablenpc "WALL#3";
enablenpc "WALL#4";
enablenpc "WALL#5";
enablenpc "WALL#6";
enablenpc "WALL#7";
enablenpc "WALL#8";
mapannounce "guild_vs1","Get ready for battle!!",0;
mapannounce "guild_vs1","Match will begin in 5",0;
mapannounce "guild_vs1","4",0;
mapannounce "guild_vs1","3",0;
mapannounce "guild_vs1","2",0;
mapannounce "guild_vs1","1",0;
mapannounce "guild_vs1","GO!",0;
goto OnWall;
end;

///OFFWALL
OnWall:
setcell "guild_vs1",51,87,50,87,cell_walkable,1;
setcell "guild_vs1",49,87,48,87,cell_walkable,1;
enablenpc "WALL#1";
enablenpc "WALL#2";
enablenpc "WALL#3";
enablenpc "WALL#4";
enablenpc "WALL#5";
enablenpc "WALL#6";
enablenpc "WALL#7";
enablenpc "WALL#8";
end;


lend:
stopnpctimer;
set $@TeamID1,0;
set $@TeamID2,0;
set @start,0;
set @win1,0;
set @win2,0;
set @partymembercount,$@members;
announce "Thanks for playing",0;
end;
OnTimer250000:
Announce "Party vs Party : No Party won due to time limit!",0;
mapwarp "guild_vs1","prontera",156,191;
goto lend;
end;
OnPCKillEvent:
/*
Its party Vs party kind of script, then y checking for guilds on the map??
getmapxy(.@map$,.@x,.@y,0);
if(.@map$=="guild_vs1")
{
set .@guser, getmapguildusers("guild_vs1",getcharid(1));
 if ( getcharid(1) == $@TeamID2 )
 {
  if (.@guser) end; // Checks if 0 guild member of teamid2 left
  warpparty "bat_b01",390,9,$@TeamID2;
  Announce "Party vs Party :"+GetPartyName($@TeamID2)+" won",0;
  goto lend;
 }
 if ( getcharid(1) == $@TeamID1 )
 {
  if (.@guser) end; // Checks if 0 guild member of teamid1 left
  warpparty "bat_b01",390,9,$@TeamID1;
  Announce "Party vs Party :"+GetPartyName($@TeamID1)+" won",0;
  goto lend;
 }
}
*/
end;

OnPCDieEvent:
if(strcharinfo(3) != "guild_vs1") end;
 for(set .@i, 0; .@i < $@members; set .@i, .@i + 1) {
  if ( $@partymembercidt1[.@i] == getcharid(0)) {
deletearray $@partymembercidt1[.@i], 1;
if( getarraysize($@partymembercidt1) == 0 ) {
 Announce "Party vs Party :"+GetPartyName($@TeamID2)+" won.",0;
 warpparty "bat_b01",390,9,$@TeamID2;
 set @win2,$@partymembercount;
 goto onwin;
}
  }
  if ( $@partymembercidt2[.@i] == getcharid(0) ) {
deletearray $@partymembercidt2[.@i], 1;
if( getarraysize($@partymembercidt2)  == 0 ) {
 Announce "Party vs Party :"+GetPartyName($@TeamID1)+" won.",0;
 warpparty "bat_b01",390,9,$@TeamID1;
 set @win1,$@partymembercount;
 goto onwin;
}
  }
 }
end;
onwin:
if (@win1==0)
{
 warpparty "bat_b01",390,9,$@TeamID2;
 Announce "Party vs Party :"+GetPartyName($@TeamID2)+" won",0;
 goto lend;
 end;
}
if (@win2==0)
{
 warpparty "bat_b01",390,9,$@TeamID1;
 Announce "Party vs Party :"+GetPartyName($@TeamID1)+" won",0;
 goto lend;
 end;
}
end;
}
guild_vs1 mapflag nosave
guild_vs1 mapflag nomemo
guild_vs1 mapflag nobranch
guild_vs1 mapflag pvp_noguild
guild_vs1 mapflag nocommand 60
guild_vs1 mapflag noicewall
bat_b01 mapflag nosave
bat_b01 mapflag nomemo
bat_b01 mapflag nobranch
bat_b01 mapflag pvp_noparty
bat_b01 mapflag nocommand
bat_b01,390,9,0 script #prizegiver 111,5,5,{
//OnTouch2:
OnTouch:
mes "congratulations for winning";
mes "take this as a your reward";
getitem 7588,rand(6,10);
mes "ill warp you back to prontera now";
next;
warp "prontera",156,196;
close;
}

Edited by Sunny Day
Codeboxed.
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...