Jump to content
  • 0

Permanent monster spawn


Question

18 answers to this question

Recommended Posts

Posted

Sorry.. Spawning the monster wasn't the problem. Got a bit confused. I can add the barricade just fine, but I walk straight through it.

Posted

The barricades within the WoE II scripts use special cell blocks in order for you not to pass.. I'm guessing that's what you're trying to refer to?

For example:


// Barrier Summoners
arug_cas05,2,1,0	script	#aru05_RL00	-1,{
OnEnable:
setcell "arug_cas05",138,136,145,110,cell_walkable,0;
setcell "arug_cas05",138,110,145,110,cell_shootable,0;
guardian "arug_cas05",139,111," ",1905,"#aru05_RL00::OnBarrierDestroyed"; //24;
guardian "arug_cas05",141,111," ",1905,"#aru05_RL00::OnBarrierDestroyed"; //25;
guardian "arug_cas05",143,111," ",1905,"#aru05_RL00::OnBarrierDestroyed"; //26;
guardian "arug_cas05",145,111," ",1905,"#aru05_RL00::OnBarrierDestroyed"; //27;
end;

OnDisable:
setcell "arug_cas05",138,136,145,110,cell_walkable,1;
setcell "arug_cas05",138,110,145,110,cell_shootable,1;
killmonster "arug_cas05","#aru05_RL00::OnBarrierDestroyed";
end;

OnBarrierDestroyed:
end;
}

Posted

The barricades within the WoE II scripts use special cell blocks in order for you not to pass.. I'm guessing that's what you're trying to refer to?

For example:


// Barrier Summoners
arug_cas05,2,1,0	script	#aru05_RL00	-1,{
OnEnable:
setcell "arug_cas05",138,136,145,110,cell_walkable,0;
setcell "arug_cas05",138,110,145,110,cell_shootable,0;
guardian "arug_cas05",139,111," ",1905,"#aru05_RL00::OnBarrierDestroyed"; //24;
guardian "arug_cas05",141,111," ",1905,"#aru05_RL00::OnBarrierDestroyed"; //25;
guardian "arug_cas05",143,111," ",1905,"#aru05_RL00::OnBarrierDestroyed"; //26;
guardian "arug_cas05",145,111," ",1905,"#aru05_RL00::OnBarrierDestroyed"; //27;
end;

OnDisable:
setcell "arug_cas05",138,136,145,110,cell_walkable,1;
setcell "arug_cas05",138,110,145,110,cell_shootable,1;
killmonster "arug_cas05","#aru05_RL00::OnBarrierDestroyed";
end;

OnBarrierDestroyed:
end;
}

Yeah, I attempted to copy that.

This code spawns the barricades, and doesn't allow me to run through it, but I can't hit them now? :<

phang_cas01,69,34,0,0    monster    Barricade    1905,1,7200000,0,0
phang_cas01,70,34,0,0    monster    Barricade    1905,1,7200000,0,0
phang_cas01,71,34,0,0    monster    Barricade    1905,1,7200000,0,0
phang_cas01,72,34,0,0    monster    Barricade    1905,1,7200000,0,0
phang_cas01,73,34,0,0    monster    Barricade    1905,1,7200000,0,0

phang_cas01,69,34,0    script    #phang_bar01    -1,{

Oninit:
setwall "phang_cas01",69,34,8,6,0,"phang_bar01";

end;
}

Posted

Try:

phang_cas01,69,34,0,0   monster Barricade	   1905,1,7200000,0,0
phang_cas01,70,34,0,0   monster Barricade	   1905,1,7200000,0,0
phang_cas01,71,34,0,0   monster Barricade	   1905,1,7200000,0,0
phang_cas01,72,34,0,0   monster Barricade	   1905,1,7200000,0,0
phang_cas01,73,34,0,0   monster Barricade	   1905,1,7200000,0,0
phang_cas01,69,34,0	 script  #phang_bar01	-1,{

OnInit:
setwall "phang_cas01",69,34,69,34,cell_walkable,0;
setwall "phang_cas01",70,34,70,34,cell_walkable,0;
setwall "phang_cas01",71,34,71,34,cell_walkable,0;
setwall "phang_cas01",72,34,72,34,cell_walkable,0;
setwall "phang_cas01",73,34,73,34,cell_walkable,0;
end;
}

I'm not really an expert with setwall cause I've haven't really played around with it. Though, I believe I don't need the end there.. Try with it and without it just incase x.x

Posted

Try:

phang_cas01,69,34,0,0   monster Barricade	   1905,1,7200000,0,0
phang_cas01,70,34,0,0   monster Barricade	   1905,1,7200000,0,0
phang_cas01,71,34,0,0   monster Barricade	   1905,1,7200000,0,0
phang_cas01,72,34,0,0   monster Barricade	   1905,1,7200000,0,0
phang_cas01,73,34,0,0   monster Barricade	   1905,1,7200000,0,0
phang_cas01,69,34,0	 script  #phang_bar01	-1,{

OnInit:
setwall "phang_cas01",69,34,69,34,cell_walkable,0;
setwall "phang_cas01",70,34,70,34,cell_walkable,0;
setwall "phang_cas01",71,34,71,34,cell_walkable,0;
setwall "phang_cas01",72,34,72,34,cell_walkable,0;
setwall "phang_cas01",73,34,73,34,cell_walkable,0;
end;
}

I'm not really an expert with setwall cause I've haven't really played around with it. Though, I believe I don't need the end there.. Try with it and without it just incase x.x

Then end wasn't needed, but now.. I can hit them, but it still walks through them. /sob

Thanks for attempting though :D

Posted

Okay hm, try this:

phang_cas01,69,34,0,0   monster Barricade	   1905,1,7200000,0,0
phang_cas01,70,34,0,0   monster Barricade	   1905,1,7200000,0,0
phang_cas01,71,34,0,0   monster Barricade	   1905,1,7200000,0,0
phang_cas01,72,34,0,0   monster Barricade	   1905,1,7200000,0,0
phang_cas01,73,34,0,0   monster Barricade	   1905,1,7200000,0,0
phang_cas01,69,34,0	 script  #phang_bar01	-1,{

OnInit:
setwall "phang_cas01",69,34,69,34,cell_walkable,1;
setwall "phang_cas01",70,34,70,34,cell_walkable,1;
setwall "phang_cas01",71,34,71,34,cell_walkable,1;
setwall "phang_cas01",72,34,72,34,cell_walkable,1;
setwall "phang_cas01",73,34,73,34,cell_walkable,1;
}

Because as stated:

(0:clear flag, 1:set flag)

So I changed 0's to 1's to set the flag.. =/

https://rathena.svn.sourceforge.net/svnroot/rathena/trunk/doc/script_commands.txt


*setcell "<map name>",<x1>,<y1>,<x2>,<y2>,<type>,<flag>;

Each map cell has several 'flags' that specify the properties of that cell.
These include terrain properties (walkability, shootability, presence of water),
skills (basilica, land protector, ...) and other (NPC nearby, no vending, ...).
Each of these can be 'on' or 'off'. Together they define a cell's behavior.

This command lets you alter these flags for all map cells in the specified
(x1,y1)-(x2,y2) rectangle. The 'flag' can be 0 or 1 (0:clear flag, 1:set flag).
The 'type' defines which flag to modify. Possible options include cell_walkable,
cell_shootable, cell_basilica. For a full list, see const.txt.

Example:

setcell "arena",0,0,300,300,cell_basilica,1;
setcell "arena",140,140,160,160,cell_basilica,0;
setcell "arena",135,135,165,165,cell_walkable,0;
setcell "arena",140,140,160,160,cell_walkable,1;

This will add a makeshift ring into the center of the map. The ring will be
surrounded by a 5-cell wide 'gap' to prevent interference from outside, and
the rest of the map will be marked as 'basilica', preventing observers from
casting any offensive skills or fighting among themselves. Note that the wall
will not be shown nor known client-side, which may cause movement problems.

Another example:

OnBarricadeDeploy:
setcell "schg_cas05",114,51,125,51,cell_walkable,0;
end;
OnBarricadeBreak:
setcell "schg_cas05",114,51,125,51,cell_walkable,1;
end;

This could be a part of the WoE:SE script, where attackers are not allowed
to proceed until all barricades are destroyed. This script would place and
remove a nonwalkable row of cells after the barricade mobs.

Posted

Okay hm, try this:

phang_cas01,69,34,0,0   monster Barricade	   1905,1,7200000,0,0
phang_cas01,70,34,0,0   monster Barricade	   1905,1,7200000,0,0
phang_cas01,71,34,0,0   monster Barricade	   1905,1,7200000,0,0
phang_cas01,72,34,0,0   monster Barricade	   1905,1,7200000,0,0
phang_cas01,73,34,0,0   monster Barricade	   1905,1,7200000,0,0
phang_cas01,69,34,0	 script  #phang_bar01	-1,{

OnInit:
setwall "phang_cas01",69,34,69,34,cell_walkable,1;
setwall "phang_cas01",70,34,70,34,cell_walkable,1;
setwall "phang_cas01",71,34,71,34,cell_walkable,1;
setwall "phang_cas01",72,34,72,34,cell_walkable,1;
setwall "phang_cas01",73,34,73,34,cell_walkable,1;
}

Because as stated:

(0:clear flag, 1:set flag)

So I changed 0's to 1's to set the flag.. =/

https://rathena.svn....pt_commands.txt


*setcell "<map name>",<x1>,<y1>,<x2>,<y2>,<type>,<flag>;

Each map cell has several 'flags' that specify the properties of that cell.
These include terrain properties (walkability, shootability, presence of water),
skills (basilica, land protector, ...) and other (NPC nearby, no vending, ...).
Each of these can be 'on' or 'off'. Together they define a cell's behavior.

This command lets you alter these flags for all map cells in the specified
(x1,y1)-(x2,y2) rectangle. The 'flag' can be 0 or 1 (0:clear flag, 1:set flag).
The 'type' defines which flag to modify. Possible options include cell_walkable,
cell_shootable, cell_basilica. For a full list, see const.txt.

Example:

setcell "arena",0,0,300,300,cell_basilica,1;
setcell "arena",140,140,160,160,cell_basilica,0;
setcell "arena",135,135,165,165,cell_walkable,0;
setcell "arena",140,140,160,160,cell_walkable,1;

This will add a makeshift ring into the center of the map. The ring will be
surrounded by a 5-cell wide 'gap' to prevent interference from outside, and
the rest of the map will be marked as 'basilica', preventing observers from
casting any offensive skills or fighting among themselves. Note that the wall
will not be shown nor known client-side, which may cause movement problems.

Another example:

OnBarricadeDeploy:
setcell "schg_cas05",114,51,125,51,cell_walkable,0;
end;
OnBarricadeBreak:
setcell "schg_cas05",114,51,125,51,cell_walkable,1;
end;

This could be a part of the WoE:SE script, where attackers are not allowed
to proceed until all barricades are destroyed. This script would place and
remove a nonwalkable row of cells after the barricade mobs.

I tried the script you showed, I still walk through them ):

Posted

You walk through them are around them? Make sure you place the barricades in an area where players can't walk around it.

No.. I made all the barricades in a line, so you must break them to get through.. They walk straight through it though.

This gives the same effect, I walk through instead of having to break them

phang_cas01,69,34,0,0    monster    Barricade    1905,1,7200000,0,0
phang_cas01,70,34,0,0    monster    Barricade    1905,1,7200000,0,0
phang_cas01,71,34,0,0    monster    Barricade    1905,1,7200000,0,0
phang_cas01,72,34,0,0    monster    Barricade    1905,1,7200000,0,0
phang_cas01,73,34,0,0    monster    Barricade    1905,1,7200000,0,0

phang_cas01,69,34,0    script    #phang_bar01    -1,{

OnBarricadeDeploy:
   setcell "phang_cas01",69,34,69,34,cell_walkable,0;
   setwall "phang_cas01",70,34,70,34,cell_walkable,0;
   setwall "phang_cas01",71,34,71,34,cell_walkable,0;
   setwall "phang_cas01",72,34,72,34,cell_walkable,0;
   setwall "phang_cas01",73,34,73,34,cell_walkable,0;
   end;
OnBarricadeBreak:
   setcell "phang_cas01",69,34,69,34,cell_walkable,1;
   setwall "phang_cas01",70,34,70,34,cell_walkable,1;
   setwall "phang_cas01",71,34,71,34,cell_walkable,1;
   setwall "phang_cas01",72,34,72,34,cell_walkable,1;
   setwall "phang_cas01",73,34,73,34,cell_walkable,1;
   end;
}

Posted (edited)

You won't need the "On" part because it's not being triggered by anything. Other then that.. I'm not really 100% sure how to work around with this.. =/

Well.. Actually now it's like. Setting a different part of the map for the wall? I walk through the barricade and then I can't move any further..

phang_cas01,69,34,0,0	monster	Barricade	1905,1,7200000,0,0
phang_cas01,70,34,0,0	monster	Barricade	1905,1,7200000,0,0
phang_cas01,71,34,0,0	monster	Barricade	1905,1,7200000,0,0
phang_cas01,72,34,0,0	monster	Barricade	1905,1,7200000,0,0
phang_cas01,73,34,0,0	monster	Barricade	1905,1,7200000,0,0

phang_cas01,69,34,0	script	#phang_bar01	-1,{

OnInit:
setcell "phang_cas01",69,34,69,34,cell_walkable,0;
setwall "phang_cas01",70,34,70,34,cell_walkable,0;
setwall "phang_cas01",71,34,71,34,cell_walkable,0;
setwall "phang_cas01",72,34,72,34,cell_walkable,0;
setwall "phang_cas01",73,34,73,34,cell_walkable,0;
end;
}

Still attempting, but failing..

/Edit: Got my first part done, but I can't walk after I break the barricades?


phang_cas01,69,34,0,0	monster	Barricade	1905,1,7200000,0,0
phang_cas01,70,34,0,0	monster	Barricade	1905,1,7200000,0,0
phang_cas01,71,34,0,0	monster	Barricade	1905,1,7200000,0,0
phang_cas01,72,34,0,0	monster	Barricade	1905,1,7200000,0,0
phang_cas01,73,34,0,0	monster	Barricade	1905,1,7200000,0,0

phang_cas01,63,23,5	script	#phang_bar01	-1,{

OnInit:
setcell "phang_cas01",69,34,69,34,cell_walkable,0;
setcell "phang_cas01",70,34,70,34,cell_walkable,0;
setcell "phang_cas01",71,34,71,34,cell_walkable,0;
setcell "phang_cas01",72,34,72,34,cell_walkable,0;
setcell "phang_cas01",73,34,73,34,cell_walkable,0;
end;
}

Edited by Kurby
Posted

setwall got 4 parameter for coordinate ?? you sure /hmm

*setwall "<map name>",<x>,<y>,<size>,<dir>,<shootable>,"<name>";

@Kurby

to remove the barricade after the monster died...

it is better to make a label for the monster....

for example..when all barricade destroyed..

set the cell can wall again

that's why you need another label to make the cell walkable / remove the wall.

Posted

setwall got 4 parameter for coordinate ?? you sure /hmm

*setwall "<map name>",<x>,<y>,<size>,<dir>,<shootable>,"<name>";

@Kurby

to remove the barricade after the monster died...

it is better to make a label for the monster....

for example..when all barricade destroyed..

set the cell can wall again

that's why you need another label to make the cell walkable / remove the wall.

I'm using setcell instead, it worked better.

Would it work if I triggered monster killed, then goto walkable? I'm not very good with script.. Lol /meh

Posted

phang_cas01,69,34,0,0 monster Barricade 1905,1,7200000,0,"NPCNAME::OnEVENTLABEL";

edit the label..and create those label in the NPC...

put the setcell stuff there....

once the monster die...it will trigger the Label

Posted (edited)

phang_cas01,69,34,0,0 monster Barricade 1905,1,7200000,0,"NPCNAME::OnEVENTLABEL";

edit the label..and create those label in the NPC...

put the setcell stuff there....

once the monster die...it will trigger the Label

So.. Like this?

phang_cas01,69,34,0,0	monster	Barricade	1905,1,7200000,0,0,"#phang_bar01::OnMonsterDie";
phang_cas01,70,34,0,0	monster	Barricade	1905,1,7200000,0,0
phang_cas01,71,34,0,0	monster	Barricade	1905,1,7200000,0,0
phang_cas01,72,34,0,0	monster	Barricade	1905,1,7200000,0,0
phang_cas01,73,34,0,0	monster	Barricade	1905,1,7200000,0,0

phang_cas01,63,23,5	script	#phang_bar01	-1,{

OnInit:
setcell "phang_cas01",69,34,69,34,cell_walkable,0;
setcell "phang_cas01",70,34,70,34,cell_walkable,0;
setcell "phang_cas01",71,34,71,34,cell_walkable,0;
setcell "phang_cas01",72,34,72,34,cell_walkable,0;
setcell "phang_cas01",73,34,73,34,cell_walkable,0;
end;
OnMonsterDie:
setcell "phang_cas01",69,34,69,34,cell_walkable,1;
setcell "phang_cas01",70,34,70,34,cell_walkable,1;
setcell "phang_cas01",71,34,71,34,cell_walkable,1;
setcell "phang_cas01",72,34,72,34,cell_walkable,1;
setcell "phang_cas01",73,34,73,34,cell_walkable,1;
end;
}

I tried this, but after monsters die I still can't move /sob

phang_cas01,69,34,0,0	monster	Barricade	1905,1,7200000,0,0,"#phang_bar01::OnMonsterDie";
phang_cas01,70,34,0,0	monster	Barricade	1905,1,7200000,0,0
phang_cas01,71,34,0,0	monster	Barricade	1905,1,7200000,0,0
phang_cas01,72,34,0,0	monster	Barricade	1905,1,7200000,0,0
phang_cas01,73,34,0,0	monster	Barricade	1905,1,7200000,0,0

phang_cas01,63,23,5	script	#phang_bar01	-1,{

if (.mobs_left==0) goto OnMonsterDie; {

OnInit:
setcell "phang_cas01",69,34,69,34,cell_walkable,0;
setcell "phang_cas01",70,34,70,34,cell_walkable,0;
setcell "phang_cas01",71,34,71,34,cell_walkable,0;
setcell "phang_cas01",72,34,72,34,cell_walkable,0;
setcell "phang_cas01",73,34,73,34,cell_walkable,0;
end;

OnMonsterDie:
setcell "phang_cas01",69,34,69,34,cell_walkable,1;
setcell "phang_cas01",70,34,70,34,cell_walkable,1;
setcell "phang_cas01",71,34,71,34,cell_walkable,1;
setcell "phang_cas01",72,34,72,34,cell_walkable,1;
setcell "phang_cas01",73,34,73,34,cell_walkable,1;
end;
}
}

This doesn't work either.. Still can't move.. Anyone got any suggestions?


phang_cas01,69,34,0,0	monster	Barricade	1905,1,7200000,0,0
phang_cas01,70,34,0,0	monster	Barricade	1905,1,7200000,0,0
phang_cas01,71,34,0,0	monster	Barricade	1905,1,7200000,0,0
phang_cas01,72,34,0,0	monster	Barricade	1905,1,7200000,0,0
phang_cas01,73,34,0,0	monster	Barricade	1905,1,7200000,0,0

phang_cas01,63,23,5	script	BarricadeNPC	-1,{

set .Map$,"phang_cas01";

monster	.Map$,69,34,"Barricade",1905,1,"BarricadeNPC::OnMonsterDie";
monster	.Map$,70,34,"Barricade",1905,1,"BarricadeNPC::OnMonsterDie";
monster	.Map$,71,34,"Barricade",1905,1,"BarricadeNPC::OnMonsterDie";
monster	.Map$,72,34,"Barricade",1905,1,"BarricadeNPC::OnMonsterDie";
monster	.Map$,73,34,"Barricade",1905,1,"BarricadeNPC::OnMonsterDie";
set .mobs_left, 4;

OnInit:
setcell "phang_cas01",69,34,69,34,cell_walkable,0;
setcell "phang_cas01",70,34,70,34,cell_walkable,0;
setcell "phang_cas01",71,34,71,34,cell_walkable,0;
setcell "phang_cas01",72,34,72,34,cell_walkable,0;
setcell "phang_cas01",73,34,73,34,cell_walkable,0;
end;

OnMonsterDie:
set .mobs_left, .mobs_left-1;
if (.mobs_left==0) {
} else {
	announce "["+.mobs_left+"/4] Barricades left.",bc_map;
setcell "phang_cas01",69,34,69,34,cell_walkable,1;
setcell "phang_cas01",70,34,70,34,cell_walkable,1;
setcell "phang_cas01",71,34,71,34,cell_walkable,1;
setcell "phang_cas01",72,34,72,34,cell_walkable,1;
setcell "phang_cas01",73,34,73,34,cell_walkable,1;
end;
}
}

Anyone got any ideas?

When they die, I still cant walk through.. How do I trigger monster die?

How to when all barricades die, trigger walkable cell?

Still need to figure out triggering cell_walkable,1; after all barricades die..

Edited by Kurby
Posted · Hidden by Arcenciel, July 24, 2012 - Copy
Hidden by Arcenciel, July 24, 2012 - Copy

I try this, but I still can't move after I kill monster barricades.

phang_cas01,69,34,0,0    monster    Barricade    1905,1,7200000,0,0
phang_cas01,70,34,0,0    monster    Barricade    1905,1,7200000,0,0
phang_cas01,71,34,0,0    monster    Barricade    1905,1,7200000,0,0
phang_cas01,72,34,0,0    monster    Barricade    1905,1,7200000,0,0
phang_cas01,73,34,0,0    monster    Barricade    1905,1,7200000,0,0

phang_cas01,68,34,5    script    BarricadeNPC    -1,{

monster    "phang_cas01",69,34,"Barricade",1905,1,"BarricadeNPC::OnMonsterDie";
monster    "phang_cas01",70,34,"Barricade",1905,1,"BarricadeNPC::OnMonsterDie";
monster    "phang_cas01",71,34,"Barricade",1905,1,"BarricadeNPC::OnMonsterDie";
monster    "phang_cas01",72,34,"Barricade",1905,1,"BarricadeNPC::OnMonsterDie";
monster    "phang_cas01",73,34,"Barricade",1905,1,"BarricadeNPC::OnMonsterDie";

OnInit:
   setcell "phang_cas01",69,34,69,34,cell_walkable,0;
   setcell "phang_cas01",70,34,70,34,cell_walkable,0;
   setcell "phang_cas01",71,34,71,34,cell_walkable,0;
   setcell "phang_cas01",72,34,72,34,cell_walkable,0;
   setcell "phang_cas01",73,34,73,34,cell_walkable,0;
   end;

OnMonsterDie:
   setcell "phang_cas01",69,34,69,34,cell_walkable,1;
   setcell "phang_cas01",70,34,70,34,cell_walkable,1;
   setcell "phang_cas01",71,34,71,34,cell_walkable,1;
   setcell "phang_cas01",72,34,72,34,cell_walkable,1;
   setcell "phang_cas01",73,34,73,34,cell_walkable,1;
   end;
}

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...