Jump to content
  • 0

Adding Barricades


Screwdriver

Question


  • Group:  Members
  • Topic Count:  21
  • Topics Per Day:  0.01
  • Content Count:  52
  • Reputation:   0
  • Joined:  01/05/13
  • Last Seen:  

2@cata,75,104,0[TAB] script[TAB] barricade[TAB] -1,{
OnWhisperGlobal:
if(@whispervar0$ == "START") {
OnSpawn:
setwall "2@cata",76,104,8,6,0,"barricade";
guardian "2@cata",77,104," ",1905,"barricade::OnBarrierDestroyed"; //24;
guardian "2@cata",78,104," ",1905,"barricade::OnBarrierDestroyed"; //25;
guardian "2@cata",79,104," ",1905,"barricade::OnBarrierDestroyed"; //26;
guardian "2@cata",80,104," ",1905,"barricade::OnBarrierDestroyed"; //27;
guardian "2@cata",81,104," ",1905,"barricade::OnBarrierDestroyed"; //28;
guardian "2@cata",82,104," ",1905,"barricade::OnBarrierDestroyed"; //29;
guardian "2@cata",83,104," ",1905,"barricade::OnBarrierDestroyed"; //30;
end;
OnDisable:
delwall "barricade";
killmonster "2@cata","barricade::OnBarrierDestroyed";
end;
OnBarrierDestroyed:
end;
}
}

I whisper "NPC:barricade" saying "START", but mapserver says;

"mob_spawn_guardian: No castle set at map 2@cata."

I set it as a castle in castle_db.txt

Thanks for your help! /ok

How could I set this map as a castle to stop error?

Edited by Screwdriver
Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 1

  • Group:  Members
  • Topic Count:  6
  • Topics Per Day:  0.00
  • Content Count:  148
  • Reputation:   10
  • Joined:  12/03/18
  • Last Seen:  

revisited this link:

Improvised to make it work:

 

2@cata,83,112,5    script    barricade     100,{

setwall "2@cata",76,104,8,6,0,"EmpBarr";
monster "2@cata",83,105,"Barricade",1905,1,"barricade::OnBarrierDestroyed"; //24;
monster "2@cata",82,105,"Barricade",1905,1,"barricade::OnBarrierDestroyed"; //25;
monster "2@cata",81,105,"Barricade",1905,1,"barricade::OnBarrierDestroyed"; //26;
monster "2@cata",80,105,"Barricade",1905,1,"barricade::OnBarrierDestroyed"; //27;
monster "2@cata",79,105,"Barricade",1905,1,"barricade::OnBarrierDestroyed"; //28;
monster "2@cata",78,105,"Barricade",1905,1,"barricade::OnBarrierDestroyed"; //29;
monster "2@cata",77,105,"Barricade",1905,1,"barricade::OnBarrierDestroyed"; //30;
monster "2@cata",76,105,"Barricade",1905,1,"barricade::OnBarrierDestroyed"; //31;
end;

OnBarrierDestroyed:
set .barrdead, .barrdead-1;
if (.barrdead==0) {
delwall "EmpBarr";
announce "A wall has been broken!",bc_area;

else {
 end;
}
OnInit:
set .barrdead, 8;
}

  • Upvote 1
Link to comment
Share on other sites


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

try use monster ??? or spawn it as NPC since you are just using it to display there is a "wall"

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  21
  • Topics Per Day:  0.01
  • Content Count:  52
  • Reputation:   0
  • Joined:  01/05/13
  • Last Seen:  

try use monster ??? or spawn it as NPC since you are just using it to display there is a "wall"

I created the wall after the barricades, so now I can kill them before I walk anywhere, but it's not letting me "Delwall"

setwall "2@cata",76,104,8,6,0,"EmpBarr";
monster "2@cata",83,105,"Barricade",1905,1,"EmpEvent::OnBarrierDestroyed"; //24;
monster "2@cata",82,105,"Barricade",1905,1,"EmpEvent::OnBarrierDestroyed"; //25;
monster "2@cata",81,105,"Barricade",1905,1,"EmpEvent::OnBarrierDestroyed"; //26;
monster "2@cata",80,105,"Barricade",1905,1,"EmpEvent::OnBarrierDestroyed"; //27;
monster "2@cata",79,105,"Barricade",1905,1,"EmpEvent::OnBarrierDestroyed"; //28;
monster "2@cata",78,105,"Barricade",1905,1,"EmpEvent::OnBarrierDestroyed"; //29;
monster "2@cata",77,105,"Barricade",1905,1,"EmpEvent::OnBarrierDestroyed"; //30;
monster "2@cata",76,105,"Barricade",1905,1,"EmpEvent::OnBarrierDestroyed"; //31;
end;
OnBarrierDestroyed:
set .barrdead, .barrdead-1;
if (.barrdead==0) {
delwall "EmpBarr";
announce "A wall has been broken!",bc_area;
} else {
 end;
{

I'm not getting any errors, the wall just won't go away /oops

Thanks again :D

Could anyone help me delwall, so I can walk past them? /ok

I got everything I needed.

SOLVED.

Edited by Screwdriver
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...